亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sip.docs

?? sip協議棧
?? DOCS
?? 第 1 頁 / 共 2 頁
字號:
/* -*- c -*- *//**@mainpage SIP Parser, Messages and Headers * * @section sip_meta Module Meta Information * * The Sofia @b sip module contains interface to the SIP parser and the * header and message objects. * * @CONTACT Pekka Pessi <Pekka.Pessi@nokia.com> * * @STATUS Core library * * @LICENSE LGPL * * @section sip_overview Overview * * The structure of each header is defined in @b <sip.h>. In addition to the * header structure, there is defined a @em header @em class structure and * some standard functions for each header in the include file @b * <sip_header.h>.  For header @c X, there are types, functions, macros and * header class as follows: * *  - @c sip_X_t is the structure used to store parsed header, *  - @c SIP_X_INIT() initializes a static instance of sip_X_t, *  - @c sip_X_init() initializes a dynamic instance of sip_X_t, *  - @c sip_is_X() tests if header object is instance of header X, *  - @c sip_X_make() creates a header X object by decoding given string, *  - @c sip_X_format() creates a header X object by decoding given  *    printf() list, *  - @c sip_X_dup() duplicates (deeply copies) the header X,  *  - @c sip_X_copy() copies the header X, *  - @c sip_hclass_t @c sip_X_class[] contains the @em header @em class  *    for header X. *  * In addition to this interface, the @ref sip_parser "SIP parser documentation" * contains description of the functionality required when a parser is * extended by a new header. It is possible to add new headers to the SIP * parser or extend the definition of existing ones. * * @section sip_parser_intro Parsing SIP Messages * * Sofia SIP parser follows @em recursive-descent principle.  In other words, * it is a program that descends the SIP syntax tree top-down recursively. * (All syntax trees have root at top and they grow downwards.) * * In the case of SIP such a parser is very efficient. The parser can choose * between different forms based on each token, as SIP syntax is carefully * designed so that it requires only minimal scan-ahead.  It is also easy to * extend a recursive-descent parser via a standard API, unlike, for * instance, a LALR parser generated by @em Bison. * * The abstract message module @b msg contains a high-level parser engine * that drives the parsing process and invokes the SIP parser for each * header. As there are no framing between SIP messages, the parser * considers any received data, be it a UDP datagram or a TCP stream, as a * @em message @em stream, which may consist of one or more SIP messages.  * The parser works by first separating stream into fragments, then building * a complete message based on parsing result. After a message is completed, * it can be given to the message stream customer (typically a protocol * state machine). The parser continues processing the stream and feeding * the messages to protocol engine until the end of the stream is reached. * * For each message, the parser starts by separating the first fragment, * which is either a request or status line. After the first line has been * processed, the parser engine continues by separating the headers * one-by-one from the message. After the parser encounters an empty line * separating the headers and the message body (payload), it invokes a * function parsing the separator and payload fragment(s). When the message * is complete, the parser can hand the message over to the protocol engine.  * Then it is ready to start again with first fragment of the next message. * * @image html sip-parser.gif Separating byte stream to messages * @image latex sip-parser.eps Separating byte stream to messages * * When the parsing process has completed, the request or status line, each * header, separator and the payload are all in their own fragment * structure. The fragments form a dual-linked list known as @e fragment @e * chain as shown in the above figure. The buffers for the message, the * fragment chain, and a whole other stuff is held by the generic message * type, #msg_t, defined in <msg.h>. The internal structure of #msg_t is * known only within @b msg module and it is hidden from other modules. *  * The abstract message module @b msg also drives the reverse process, * invoking the encoding method of each fragment so that the whole outgoing * SIP message is encoded properly. * * @section sip_header_struct SIP Header as a C struct * * Just separating headers from each other and from the message body is not * usually enough. When a header contains structured data, the header * contents should be converted to a form that is convenient to use from C * programs. For that purpose, the message parser needs a special function * for each individual header. The header-specific parsing function divides * the contents of the header into semantically meaningful segments and * stores the result in a header-specific structure. * * The parser passes the fragment contents to a parsing function immediately * after it has separated a fragment from the message. The parsing function * is defined by the @e header @e class. The header class is either * determined by the fragment position (first line, separator line or * payload), or it is found from the hash table using the header name as * key. There is also a special header class for @e unknown headers, headers * with a name that is not regocnized by the parser. * * For instance, the From header has following syntax: * * @code * from           = ("From" | "f") ":"  *                  ( name-addr | addr-spec ) *( ";" addr-params ) * name-addr      = [ display-name ] "<" addr-spec ">" * addr-spec      = SIP-URL | URI * display-name   = *token | quoted-string * addr-params    = *( tag-param |  generic-param ) * tag-param      = "tag" "=" ( token | quoted-string ) * @endcode * * When a From header is parsed, the header parser function sip_from_d() * separates the @e display-name, @e addr-spec and each parameter in the @e * addr-params list. The parsing result is assigned to a #sip_from_t * structure, which is defined as follows: * * @code * typedef struct sip_addr_s { *   sip_common_t        a_common[1]; *   sip_unknown_t      *a_next; *   char const         *a_display; *   url_t               a_url[1]; *   sip_param_t const  *a_params; *   char const         *a_tag; * } sip_from_t; * @endcode * * The string containing the @e display-name is put into the @c a_display * field, the URL contents can be found in the @c a_url field, and the list * of @e addr-params parameters is put in the @c a_params array.  If there * is a @e tag-param present, a pointer to the parameter value is assigned * to @c a_tag field. * * @section sip_msg_struct SIP Message as a C struct * * It is not enough to represent a SIP message as a collection of headers * following each other. The programmer also needs a convenient way to * access certain headers at the SIP message level, for example, accessing * directly the @b From header instead of going through all headers and * examining their name. The structured view to the SIP message is provided * via a C struct with type #sip_t.  * * In other words, a single message is represented by two types, first type * (#msg_t) is private to the msg module and inaccessable by an application * programmer, second (#sip_t) is a public structure. * * The #sip_t structure is defined as follows: * @code * typedef struct sip_s { *   msg_common_t        sip_common[1];    // Used with recursive inclusion *   msg_pub_t          *sip_next;         // Ditto *   void               *sip_user;	   // Application data *   unsigned            sip_size; *   int                 sip_flags; * *   sip_error_t        *sip_error;	   // Erroneous headers *  *   sip_request_t      *sip_request;      // Request line *   sip_status_t       *sip_status;       // Status line * *   sip_via_t          *sip_via;          // Via (v) *   sip_route_t        *sip_route;        // Route *   sip_record_route_t *sip_record_route; // Record-Route *   sip_max_forwards_t *sip_max_forwards; // Max-Forwards *   ... * } sip_t; * @endcode * * As you can see above, the public #sip_t structure contains the common * header members that are also found in the beginning of a header * structure. The @e sip_size indicates the size of the structure - the * application can extend the parser and #sip_t structure beyond the * original size. The @e sip_flags contains various flags used during the * parsing and printing process. They are documented in the <msg.h>. These * boilerplate members are followed by the pointers to various message * elements and headers. * * @note Within the @b msg module, the public structure is known as * #msg_pub_t. The application programmer can cast a #msg_t pointer to * #sip_t with sip_object() function (or macro). * * * @section sip_parsing_example Result of Parsing Process * * Let us now show how a simple message is parsed and presented to the * applications. As an exampe, we choose a BYE message with only the * mandatory fields included: * @code * BYE sip:joe@example.com SIP/2.0 * Via: SIP/2.0/UDP sip.example.edu;branch=d7f2e89c.74a72681 * Via: SIP/2.0/UDP pc104.example.edu:1030;maddr=110.213.33.19 * From: Bobby Brown <sip:bb@example.edu>;tag=77241a86 * To: Joe User <sip:joe@example.com>;tag=7c6276c1 * Call-ID: 4c4e911b@pc104.example.edu * CSeq: 2 * @endcode * * The figure below shows the layout of the BYE message above after parsing: * * @image html sip-parser2.gif BYE message and its representation in C * @image latex sip-parser2.eps BYE message and its representation in C * * The leftmost box represents the message of type #msg_t.  Next box from * the left reprents the #sip_t structure, which contains pointers to a * header objects.  The next column contains the header objects.  There is * one header object for each message fragment. The rightmost box represents * the I/O buffer used when the message was received.  Note that the I/O * buffer may be non-continous and composed of many separate memory areas. * * The message object has link to the public message structure (@a * m_object), to the dual-linked fragment chain (@a m_frags) and to the I/O * buffer (@a m_buffer).  The public message structure contains pointers to * the headers according to their type.  If there are multiple headers of * the same type (like there are two Via headers in the above message), the * headers are put into a single-linked list. *  * Each fragment has pointers to successing and preceding fragment. It also * contains pointer to the corresponding data within the I/O buffer and its * length. *  * The main purpose of the fragment chain is to preserve the original order * of the headers.  If there were an third Via header after CSeq in the * message, the fragment representing it would be after the CSeq header in * the fragment chain but after second Via in the header list. * * @} *//**@defgroup sip_headers SIP Headers * * SIP headers and other SIP message elements. * * @{ *//**@page sip_header_x SIP Header Structure Conventions * * For each SIP header recognized by the SIP module, there is a header * structure containing the parsed value.  The header structure name is * generated from the header name by lowercasing the name, replacing the * non-alphanumeric characters (usually just minus "-") with underscore "_" * characters, and then adding prefix @c sip_ and suffix @c _t.  For * instance, the contents of header "MIME-Version" is stored in a structure * called sip_mime_version_t. * All header structures contain the common part, a sip_common_t structure * (@c X_common[]), a link to the next header in list (@c X_next), and a * various fields describing the header value (in this case, @c X_value). * * @code * typedef struct sip_X_s * { *  sip_common_t    X_common[1]; *  sip_X_t        *X_next; *  unsigned long   X_value;  * } sip_X_t; * @endcode * * The @c X_common is a structure sip_common_t (aka msg_common_t), which is * common to each fragment and can be considered as a base class for all * headers. The structure sip_common_t contains the pointers for dual-linked * fragment chain (@a h_succ, @a h_prev), a pointer to header class (@a * h_class), a pointer to the text encoding of header contents (@a h_data) * and the length of the encoding (@a h_len). (X_common is an array of size * 1, as it makes it easy to cast a header pointer to a pointer to * sip_common_t.) * * The @c X_next is a pointer to another header (usually a pointer to * structure of same type). If there are multiple headers with same name, * like the two "Via" headers in the example above, the @c X_next is used to * link the second header to the first. The fragment chain cannot be used * for this purpose as the headers with same name are not necessarily * adjacent. *//**@ingroup sip_X * @var msg_hclass_t sip_X_class[]; * @brief Header class for SIP X. *  * The header class sip_X_class defines how a SIP * X is parsed and printed.  It also * contains methods used by SIP parser and other functions * to manipulate the sip_X_t header structure. * 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本色道久久综合亚洲aⅴ蜜桃| 欧美人妇做爰xxxⅹ性高电影 | 国产午夜精品久久| 精品欧美乱码久久久久久1区2区 | 欧美性三三影院| 国产老妇另类xxxxx| 激情伊人五月天久久综合| 国产一区二区主播在线| 国产一区二区中文字幕| 成年人午夜久久久| 欧美中文字幕久久| 日韩欧美国产电影| 亚洲视频每日更新| 欧美一区二区成人| av福利精品导航| 欧美日韩dvd在线观看| 久久久久国产一区二区三区四区 | 亚洲狠狠爱一区二区三区| 日韩电影免费一区| 欧美亚洲动漫精品| 99这里只有精品| 国模娜娜一区二区三区| 在线免费不卡视频| 国产欧美一区二区精品久导航| 亚洲成人免费视频| 97久久精品人人澡人人爽| 国产日韩欧美不卡在线| 久久只精品国产| 欧美人与性动xxxx| 国产精品国产三级国产普通话99 | 99久久婷婷国产综合精品电影 | 精品一区二区综合| 欧美日韩性生活| 国产人妖乱国产精品人妖| 亚洲三级理论片| 97精品国产97久久久久久久久久久久| 日韩欧美一区中文| 伦理电影国产精品| 精品国产不卡一区二区三区| 亚洲一区二区黄色| 欧美tickling网站挠脚心| 欧美国产精品v| 96av麻豆蜜桃一区二区| 6080午夜不卡| 精品一区二区免费看| 精品久久久久久最新网址| 免费观看久久久4p| 日韩免费成人网| 国产精品亚洲午夜一区二区三区 | 欧美成人女星排行榜| 热久久免费视频| 成人免费视频视频| 国产精品久久午夜| jiyouzz国产精品久久| 欧美日韩卡一卡二| 一区二区三区在线视频观看58| 97精品视频在线观看自产线路二| 久久国产精品99久久人人澡| 亚洲一区视频在线| 亚洲一区二区三区三| 中文子幕无线码一区tr| 欧美大片日本大片免费观看| 欧美久久久久久久久中文字幕| 91久久国产最好的精华液| 99久久777色| 久久精品噜噜噜成人av农村| 国产三级精品视频| 日本一区二区三区免费乱视频| 久久婷婷成人综合色| 久久精品视频一区二区三区| 精品欧美乱码久久久久久 | 色婷婷激情久久| 欧美在线三级电影| 欧美一区三区四区| 日韩欧美国产午夜精品| 欧美一区二区观看视频| 欧美日韩亚洲综合一区| 在线播放国产精品二区一二区四区| 色综合久久综合网97色综合 | 欧洲日韩一区二区三区| 国产一区二区精品久久91| 亚洲福利视频一区| 国产精品区一区二区三区| 欧美tickling挠脚心丨vk| 欧美精品亚洲二区| 欧美一区二区三区在线| 日韩欧美国产综合| 精品sm捆绑视频| 亚洲影院在线观看| 成人动漫视频在线| 精品国产乱码久久久久久图片| 国产精品久久久久国产精品日日| 日本午夜精品视频在线观看 | 国产a精品视频| 国产精品1区二区.| 成人精品视频一区| 97se狠狠狠综合亚洲狠狠| 91欧美一区二区| 欧洲国产伦久久久久久久| 9人人澡人人爽人人精品| 成人精品一区二区三区中文字幕| 国产在线不卡一区| 成人高清在线视频| 色偷偷成人一区二区三区91| 一本一道综合狠狠老| 欧美中文字幕一区二区三区亚洲| 在线观看日韩国产| 精品国产乱码久久久久久图片 | va亚洲va日韩不卡在线观看| 欧美四级电影网| 久久夜色精品一区| 午夜伊人狠狠久久| 91色porny在线视频| 日韩欧美国产精品一区| 午夜伦欧美伦电影理论片| 91视频一区二区三区| 国产精品久久一卡二卡| 国产一区二区在线视频| 日韩免费一区二区三区在线播放| 国产精品传媒在线| 成人免费av网站| 国产精品视频观看| 不卡一卡二卡三乱码免费网站| 久久综合国产精品| 成人综合日日夜夜| 中文字幕制服丝袜成人av| 国产91综合一区在线观看| 欧美xfplay| 国产剧情一区二区三区| 久久精品一区二区| 成人激情综合网站| 亚洲人成小说网站色在线| 色成人在线视频| 麻豆精品久久精品色综合| 一区二区三区中文免费| 日韩电影在线免费观看| 精品国产髙清在线看国产毛片| 成人美女视频在线看| 亚洲精品久久久蜜桃| 精品日韩成人av| 欧美高清一级片在线| 成人av先锋影音| 国产一区二区三区免费看| 香蕉乱码成人久久天堂爱免费| 国产精品久久久久久久久快鸭| 精品国产乱码久久久久久久久 | 国产精品综合在线视频| 成人免费在线视频| 久久亚洲精华国产精华液 | 精品国内二区三区| 欧美性xxxxxxxx| 国产不卡在线视频| 精品一区二区在线看| 亚洲福利一二三区| 亚洲一区二区三区三| 国产精品黄色在线观看| 欧美一区二区啪啪| 欧美日韩中文国产| 一本大道久久a久久精二百| 成人久久18免费网站麻豆| 国产专区欧美精品| 激情文学综合丁香| 国产一区二区剧情av在线| 国产欧美1区2区3区| 成人激情免费视频| 婷婷开心激情综合| 国产日韩三级在线| 久久综合丝袜日本网| 欧美视频一区二区三区在线观看| 久久丁香综合五月国产三级网站| 国产精品久久99| 国产精品久久久久久久久果冻传媒 | 一区二区在线看| 欧美无砖专区一中文字| 久久久一区二区| 欧美国产日本视频| 亚洲成人动漫精品| 国产一区二区视频在线| 色诱亚洲精品久久久久久| 91小视频在线观看| 欧美大度的电影原声| 中文字幕一区二区在线播放| 国产精品激情偷乱一区二区∴| 亚洲免费资源在线播放| 亚洲成精国产精品女| 久草这里只有精品视频| 91麻豆福利精品推荐| 制服丝袜成人动漫| 国产精品视频第一区| 婷婷久久综合九色综合绿巨人| 视频一区二区欧美| 不卡电影免费在线播放一区| 欧美日本在线观看| 精品欧美一区二区久久| 亚洲国产综合色| 成人国产精品视频| 久久人人爽爽爽人久久久| 亚洲制服丝袜在线| 国产v日产∨综合v精品视频| 99国产精品久久久久久久久久久 |