JavaScript is required to for searching.
ナビゲーションリンクをスキップ
印刷ビューの終了
プログラミングインタフェースガイド     Oracle Solaris 10 1/13 Information Library (日本語)
search filter icon
search icon

ドキュメントの情報

はじめに

1.  メモリーと CPU の管理

2.  リモート共有メモリー API (Solaris クラスタ用)

3.  セッション記述プロトコル API

セッション記述 API の概要

SDP ライブラリ関数

SDP セッション構造体の作成

新しい SDP セッション構造体の作成

SDP セッション構造体への発信元フィールドの追加

SDP セッション構造体への名前フィールドの追加

SDP セッション構造体への情報フィールドの追加

SDP セッション構造体への URI フィールドの追加

SDP セッション構造体への電子メールフィールドの追加

SDP セッション構造体への電話フィールドの追加

SDP セッション構造体への接続フィールドの追加

SDP セッション構造体への帯域幅フィールドの追加

SDP セッション構造体への時間フィールドの追加

SDP セッション構造体への繰り返しフィールドの追加

SDP セッション構造体へのゾーンフィールドの追加

SDP セッション構造体へのキーフィールドの追加

SDP セッション構造体への属性フィールドの追加

SDP セッション構造体へのメディアフィールドの追加

コード例: SDP セッション構造体の作成

SDP セッション構造体の検索

SDP セッション構造体内の属性の検索

SDP セッション構造体内のメディアの検索

SDP セッション構造体内のメディア形式の検索

SDP セッション構造体のシャットダウン

SDP セッション構造体からのフィールドの削除

SDP メディア構造体からのフィールドの削除

SDP メディア構造体からのメディアの削除

SDP メディア構造体からの属性の削除

SDP メディア構造体からの属性の削除

SDP API ユーティリティー関数

SDP セッション構造体の解析

既存の SDP セッション構造体の複製

SDP セッション構造体の文字列への変換

4.  プロセススケジューラ

5.  近傍性グループ API

6.  入出力インタフェース

7.  プロセス間通信

8.  ソケットインタフェース

9.  XTI と TLI を使用したプログラミング

10.  パケットフィルタリングフック

11.  トランスポート選択と名前からアドレスへのマッピング

12.  リアルタイムプログラミングと管理

13.  Solaris ABI と ABI ツール

A.  UNIX ドメインソケット

索引

セッション記述 API の概要

SDP API を構成する関数呼び出しは、共有オブジェクト libcommputil.so.1 によって提供されます。この共有オブジェクト内の関数は、SDP 記述を解析し、記述の構文を確認します。

sdp.h ヘッダーファイルは、sdp_session_t 構造体を定義します。この構造体には次のメンバーが含まれます。

typedef    struct sdp_session {
   int             sdp_session_version; /* SDP session verstion */
   int             s_version;           /* SDP version field */
   sdp_origin_t    *s_origin;           /* SDP origin field */
   char            *s_name;             /* SDP name field */
   char            *s_info;             /* SDP info field */
   char            *s_uri;              /* SDP uri field */
   sdp_list_t      *s_email;            /* SDP email field */
   sdp_list_t      *s_phone;            /* SDP phone field */
   sdp_conn_t      *s_conn;             /* SDP connection field */
   sdp_bandwidth_t *s_bw;               /* SDP bandwidth field */
   sdp_time_t      *s_time;             /* SDP time field */
   sdp_zone_t      *s_zone;             /* SDP zone field */
   sdp_key_t       *s_key;              /* SDP key field */
   sdp_attr_t      *s_attr;             /* SDP attribute field */
   sdp_media_t     *s_media;            /* SDP media field */
} sdp_session_t;

sdp_session_version メンバーは、構造体のバージョンを追跡します。sdp_session_version メンバーの初期値は SDP_SESSION_VERSION_1 です。

sdp_origin_t 構造体には次のメンバーが含まれます。

typedef struct sdp_origin {
   char        *o_username;  /* username of the originating host */
   uint64_t    o_id;         /* session id */
   uint64_t    o_version;    /* version number of this session */
                             /* description */
   char        *o_nettype;   /* type of network */
   char        *o_addrtype;  /* type of the address */
   char        *o_address;   /* address of the machine from which */
                             /* session was created */
} sdp_origin_t;

sdp_conn_t 構造体には次のメンバーが含まれます。

typedef struct sdp_conn {
   char    *c_nettype;         /* type of network */
   char    *c_addrtype;        /* type of the address */
   char    *c_address;         /* unicast-address or multicast */
                               /* address */
   int     c_addrcount;        /* number of addresses (case of */
                               /* multicast address with layered */
                               /* encodings */
   struct  sdp_conn *c_next;   /* pointer to next connection */
                               /* structure; there could be several */
                               /* connection fields in SDP description */
   uint8_t c_ttl;              /* TTL value for IPV4 multicast address */
} sdp_conn_t;

sdp_bandwidth_t 構造体には次のメンバーが含まれます。

typedef struct sdp_bandwidth {
   char                  *b_type; /* info needed to interpret b_value */
   uint64_t              b_value; /* bandwidth value */
   struct sdp_bandwidth  *b_next; /* pointer to next bandwidth structure*/
                                  /* (there could be several bandwidth */
                                  /* fields in SDP description */
} sdp_bandwidth_t;

sdp_list_t 構造体は、void ポインタのリンクリストです。この構造体は SDP フィールドを保持します。emailphone などの SDP 構造体フィールドの場合は、void ポインタは文字バッファーを指します。offset フィールドが繰り返される場合のように、要素の数が事前に定義されていない場合は、この構造体を使用して情報を保持します。その場合、void ポインタは整数値を保持します。

sdp_list_t 構造体には次のメンバーが含まれます。

typedef struct sdp_list {
   void            *value; /* string values in case of email, phone and */
                           /* format (in media field) or integer values */
                           /* in case of offset (in repeat field) */
   struct sdp_list *next;  /* pointer to the next node in the list */
} sdp_list_t;

sdp_repeat_t 構造体は、時間構造体 sdp_time_t に必ず含まれます。repeat フィールドが SDP 記述に単独で現れることはなく、常に time フィールドに関連付けられています。

sdp_repeat_t 構造体には次のメンバーが含まれます。

typedef struct sdp_repeat {
   uint64_t          r_interval; /* repeat interval, e.g. 86400 seconds */
                                 /* (1 day) */
   uint64_t          r_duration; /* duration of session, e.g. 3600 */
                                 /* seconds (1 hour) */
   sdp_list_t        *r_offset;  /* linked list of offset values; each */
                                 /* represents offset from start-time */
                                 /* in the SDP time field */
   struct sdp_repeat *r_next;    /* pointer to next repeat structure; */
                                 /* there could be several repeat */
                                 /* fields in the SDP description */

sdp_time_t 構造体には次のメンバーが含まれます。

typedef struct sdp_time {
   uint64_t         t_start;   /* start-time for a session */
   uint64_t         t_stop;    /* end-time for a session */
   sdp_repeat_t     *t_repeat; /* points to the SDP repeat field */
   struct sdp_time  *t_next;   /* pointer to next time field; there */
                               /* could there could be several time */
                               /* fields in SDP description */
} sdp_time_t;

sdp_zone_t 構造体には次のメンバーが含まれます。

typedef struct sdp_zone {
   uint64_t        z_time;    /* base time */
   char            *z_offset; /* offset added to z_time to determine */
                              /* session time; mainly used for daylight */
                              /* saving time conversions */
   struct sdp_zone *z_next;   /* pointer to next zone field; there */
                              /* could be several <adjustment-time> */
                              /* <offset> pairs within a zone field */
} sdp_zone_t;

sdp_key_t 構造体には次のメンバーが含まれます。

typedef struct sdp_key {
   char   *k_method;   /* key type */
   char   *k_enckey;   /* encryption key */
 } sdp_key_t;

sdp_attr_t 構造体には次のメンバーが含まれます。

typedef struct sdp_attr {
   char            *a_name;  /* name of the attribute */
   char            *a_value; /* value of the attribute */
   struct sdp_attr *a_next;  /* pointer to the next attribute */
                             /* structure; there could be several */
                             /* attribute fields within SDP description */
} sdp_attr_t;

sdp_media_t 構造体には次のメンバーが含まれます。

typedef struct sdp_media {
   char              *m_name;     /* name of the media such as "audio", */
                                  /* "video", "message" */
   uint_t            m_port;      /* transport layer port information */
   int               m_portcount; /* number of ports in case of */
                                  /* hierarchically encoded streams */
   char              *m_proto;    /* transport protocol */
   sdp_list_t        *m_format;   /* media format description */
   char              *m_info;     /* media info field */
   sdp_conn_t        *m_conn;     /* media connection field */
   sdp_bandwidth_t   *m_bw;       /* media bandwidth field */
   sdp_key_t         *m_key;      /* media key field */
   sdp_attr_t        *m_attr;     /* media attribute field */
   struct sdp_media  *m_next;     /* pointer to next media structure; */
                                  /* there could be several media */
                                  /* sections in SDP description */
   sdp_session_t     *m_session;  /* pointer to the session structure */
} sdp_media_t;