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

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

?? sip.docs

?? Sofia SIP is an open-source SIP User-Agent library, compliant with the IETF RFC3261 specification.
?? DOCS
?? 第 1 頁 / 共 2 頁
字號:
/* -*- c -*- *//**@MODULEPAGE "sip" - SIP Parser Module * * @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 @SofiaSIP Core library * * @LICENSE LGPL * * @section sip_overview Overview * * The structure of each header is defined in @b <sofia-sip/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 * <sofia-sip/sip_header.h>. For header @c X, there are types, functions, * macros and header class declared in <sofia-sip/sip_protos.h> and * <sofia-sip/sip_hclass.h>. See @ref sip_header_x for detailed description * of these header-specific boilerplate declarations. * * 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 <sofia-sip/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 @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 containing the parsed * headers. * * 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; // @RecordRoute *   sip_max_forwards_t *sip_max_forwards; // @MaxForwards *   ... * } 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 <sofia-sip/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 header 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 the second @Via in the header list. * *//**@defgroup sip_headers SIP Headers * * SIP headers and other SIP message elements. * * 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. * *//**@ingroup sip_headers * @defgroup sip_header_x SIP Header X - Conventions *  * For a SIP header X, there are types, functions, macros and global data * declared in <sofia-sip/sip_protos.h> and <sofia-sip/sip_hclass.h> as * follows: *  - #sip_X_t is the structure used to store parsed header, *  - SIP_X_INIT() initializes a static instance of #sip_X_t, *  - sip_X_init() initializes a dynamic instance of #sip_X_t, *  - sip_is_X() tests if header object is instance of header X, *  - sip_X_make() creates a header X object by decoding given string, *  - sip_X_format() creates a header X object by decoding given  *    printf() list, *  - sip_X_dup() duplicates (deeply copies) the header X,  *  - sip_X_copy() copies the header X, *  - #msg_hclass_t #sip_X_class[] contains the @em header @em class  *    for header X. *  * All header structures contain the common part, a #sip_common_t structure * (@a X_common[]), a link to the next header in list (@a X_next), and * various fields describing the header value (in this case, @a X_value). * The header structure looks like this: * @code * typedef struct sip_X_s * { *   struct msg_common_s { *     msg_header_t       *h_succ;   // Pointer to succeeding fragment *     msg_header_t      **h_prev;   // Pointer to preceeding fragment *     msg_hclass_t       *h_class;  // Header class  *     void const         *h_data;   // Encoded data *     usize_t             h_len;    // Encoding length (including CRLF) *   } X_common[1]; *   sip_X_t        *X_next;	     // Link to next X header field *   uint32_t       X_value;         // Value of X *   msg_param_t   *X_param;         // List of parameters * } sip_X_t; * @endcode * * The common structure #msg_common_t (aka #sip_common_t) * can be considered as a base class for all * headers. The structure 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). (@a X_common is an array of size * 1, as it makes it easy to cast a header pointer to a pointer to * msg_common_t.) * * The @a 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 @a 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 in the parsed message. * * The rest of the fields contain the parsed or decoded representation of * the header. In this case, it is a 32-bit integer followed by a list of * parameters. The content of parameters is not parsed, they are just * separated from each other and then stored in an dynamically allocated * array of string pointers. Pointer to the array is stored to @a X_params. *  * For more complex header structures, see #sip_contact_t or #sip_rack_t. * * @{ *//**The structure #sip_X_t contains representation of a SIP * @ref sip_header_x "X" header.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级中文字| 91成人免费电影| 亚洲精品国产视频| 日韩一区二区在线看| 成人精品免费看| 午夜日韩在线电影| 亚洲欧美自拍偷拍色图| 精品国产乱码久久久久久图片 | av中文字幕在线不卡| 亚洲天堂精品视频| 日韩视频一区二区| 日本电影欧美片| 福利电影一区二区| 蜜桃一区二区三区在线观看| 亚洲欧美日韩电影| 国产精品一线二线三线| 91片在线免费观看| 国产精品色哟哟网站| 看片网站欧美日韩| 制服丝袜国产精品| 亚洲18影院在线观看| 99热99精品| 国产精品国产三级国产普通话三级 | 国产美女在线观看一区| 欧美人xxxx| 亚洲 欧美综合在线网络| 色激情天天射综合网| 欧美激情在线一区二区三区| 久久99蜜桃精品| 精品免费视频一区二区| 免费亚洲电影在线| 91精品国产综合久久福利软件 | 久久99国产精品久久99| 91精品国产91久久久久久最新毛片| 亚洲午夜精品久久久久久久久| 99久久伊人精品| 亚洲视频你懂的| 日本福利一区二区| 午夜精品福利一区二区三区av| 在线亚洲精品福利网址导航| 一区二区三区国产精品| 欧美性受xxxx黑人xyx性爽| 亚洲电影一区二区三区| 欧美日韩久久不卡| 欧美aaa在线| 久久嫩草精品久久久精品| 国产精品18久久久久| 欧美国产日韩精品免费观看| 成人免费视频一区二区| 亚洲欧美日韩综合aⅴ视频| 91蝌蚪国产九色| 亚洲第一综合色| 欧美xxxxx裸体时装秀| 国产福利精品导航| 综合电影一区二区三区| 欧美丝袜丝交足nylons图片| 视频一区视频二区中文| 日韩欧美亚洲国产另类 | 久久日韩粉嫩一区二区三区| 成人污视频在线观看| 亚洲另类在线视频| 欧美一区二区播放| 国产高清亚洲一区| 亚洲猫色日本管| 欧美一区二区观看视频| 成人黄页毛片网站| 亚洲电影一区二区| 久久精品在线观看| 欧美日韩在线综合| 国产曰批免费观看久久久| 自拍偷拍国产精品| 日韩一区二区三区视频| 成人免费毛片嘿嘿连载视频| 亚洲国产精品久久一线不卡| 精品国产一区二区三区忘忧草| 成人激情小说网站| 奇米精品一区二区三区在线观看| 国产精品久久久久久久久果冻传媒 | 欧美日韩国产精品成人| 国产精品一区二区在线看| 亚洲一区在线视频| 中文天堂在线一区| 91精品国产综合久久久久久久| 不卡视频在线观看| 久久草av在线| 亚洲不卡在线观看| 最新欧美精品一区二区三区| 日韩一区二区三区在线观看| 色综合久久66| 成人av动漫网站| 国产成人啪午夜精品网站男同| 性感美女久久精品| 亚洲乱码国产乱码精品精小说 | 欧美三区在线观看| 国产精品夜夜嗨| 亚洲a一区二区| 国产清纯在线一区二区www| 欧美一区二区黄| 色偷偷久久一区二区三区| 久久99久久精品| 夜夜精品视频一区二区| 国产亚洲欧美一级| 国产一区二区不卡| 国产精品久久久久影视| 7777精品伊人久久久大香线蕉完整版 | 成人一级片网址| 视频在线观看一区| 亚洲狼人国产精品| 欧美成人三级电影在线| 日韩片之四级片| 欧美亚洲动漫制服丝袜| 国产成a人亚洲精品| 日韩高清在线不卡| 一区二区三区高清在线| 国产精品伦理一区二区| 欧美久久免费观看| av电影天堂一区二区在线观看| 美女网站色91| 亚洲v精品v日韩v欧美v专区| 亚洲少妇中出一区| 中文字幕一区二区三区视频| 中文子幕无线码一区tr| 久久久久久免费| 日韩一级成人av| 91精品国产综合久久精品app | 精品免费视频.| 欧美一区二区二区| 这里是久久伊人| 欧美日本免费一区二区三区| 狠狠狠色丁香婷婷综合激情| 久久成人av少妇免费| 精品在线免费视频| 韩国精品在线观看| 久久电影网电视剧免费观看| 日本va欧美va瓶| 免播放器亚洲一区| 国产a区久久久| 懂色av一区二区在线播放| 高清不卡一区二区| 99国产一区二区三精品乱码| 粉嫩av一区二区三区粉嫩| 国内精品不卡在线| 国产在线国偷精品免费看| 麻豆专区一区二区三区四区五区| 热久久国产精品| 韩国一区二区三区| 高清在线成人网| 99久久久国产精品免费蜜臀| 成人a区在线观看| 色综合久久天天| 色94色欧美sute亚洲线路二| 91精品麻豆日日躁夜夜躁| 日韩精品在线看片z| 久久久久久久久久看片| 国产欧美视频在线观看| 精品久久久久久亚洲综合网| 中文字幕免费不卡在线| 亚洲欧美色图小说| 青青草97国产精品免费观看无弹窗版| 亚洲一区在线看| 丁香桃色午夜亚洲一区二区三区| 97se亚洲国产综合自在线不卡| 97精品久久久久中文字幕| 欧美蜜桃一区二区三区| 欧美tk丨vk视频| 国产精品久久久久aaaa樱花| 亚洲精品视频一区二区| 日韩av不卡一区二区| 国产成人在线影院| 欧美一区二区在线看| 久久精品一区二区| 亚洲国产精品自拍| 激情成人午夜视频| 91丨porny丨蝌蚪视频| 久久久综合九色合综国产精品| 日韩毛片一二三区| 久久精品国产免费看久久精品| 成人免费黄色大片| 欧美高清hd18日本| 国产精品天美传媒沈樵| 蜜臀av国产精品久久久久| 成人激情小说网站| 欧美大片拔萝卜| 亚洲蜜桃精久久久久久久| 粉嫩av一区二区三区| 日韩一级片在线观看| 一区二区三区欧美视频| 精品无人码麻豆乱码1区2区 | 亚洲精品一二三四区| 美女尤物国产一区| 欧美亚洲国产一区在线观看网站| 日韩欧美的一区二区| 国产精品国产三级国产普通话三级| 天天操天天色综合| 不卡视频免费播放| 久久久久国色av免费看影院| 青椒成人免费视频| 91丝袜美女网| 久久久久久久国产精品影院| 国产老女人精品毛片久久|