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

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

?? osip_message.h

?? SIP協議棧實現
?? H
字號:
/*  The oSIP library implements the Session Initiation Protocol (SIP -rfc2543-)  Copyright (C) 2001  Aymeric MOIZARD jack@atosc.org    This library is free software; you can redistribute it and/or  modify it under the terms of the GNU Lesser General Public  License as published by the Free Software Foundation; either  version 2.1 of the License, or (at your option) any later version.    This library is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  Lesser General Public License for more details.    You should have received a copy of the GNU Lesser General Public  License along with this library; if not, write to the Free Software  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#ifndef _OSIP_MESSAGE_H_#define _OSIP_MESSAGE_H_#include <osipparser2/osip_const.h>#include <osipparser2/osip_headers.h>#include <osipparser2/osip_body.h>/** * @file osip_message.h * @brief oSIP SIP Message Accessor Routines * * This is the SIP accessor and parser related API. * <BR>Understanding the parser implementation will prevent you from * using it improperly. Read this carefully.<BR> * <BR>This implementation could be seen as a partial implementation * of the whole SIP syntax. In other words, the parser is 'tolerant' * and will not detect a lot of error cases. As an example, no error * will be detected while trying to parse the following request-uri: * <BR><pre><code>INVITE sip:jack@atosc.org:abcd SIP/2.0</pre></code> * <BR>This code shows that even if your SIP message is parsed * correctly by oSIP, it may still be not compliant. This could be * used by attackers to make your application crash or whatever. * In this example, if you are trying to call the atoi() method with * the string 'abcd', your application will crash. Of course, there * exist solutions! You can check yourself for the validity of the * string or use the strtol() method (found on most unix) which is * capable of detecting such error cases. * <BR>Are you wondering why the parser has been built this way? * <BR>The initial answer is that each SIP application have * different requirement and some (the proxy!) needs SIP message * to be parsed as quickly as possible. Also, most applications * only need a few information from a SIP message. (the first Via * is the only one interesting!). If the parser was fully checking each * Via field validity, it would consume too much CPU on useless * operations. If you think this model does not fit your application, * then you should buy a slow stack :-). * <BR>Is there any plan to change that behaviour? * <BR>I do not need it, but if this interest you, it would be * possible to compile oSIP in 2 different ways: a full checker * model could be useful for SIP application with no performance * requirements. Any contributions is welcomed and will be merged * if it's made optional. *//** * @defgroup oSIP_SMSG oSIP message API * @ingroup oSIP * @{ */#ifdef __cplusplusextern "C"{#endif/** * Structure for SIP Message (REQUEST and RESPONSE). * @defvar osip_message_t */  typedef struct osip_message osip_message_t;  struct osip_message  {    /* Start-Line definition */    char        *sip_version;    /* req */    osip_uri_t  *req_uri;    char        *sip_method;    /* resp */    int         status_code;    char        *reason_phrase;    /* End of Start-Line definition */    osip_list_t *accepts;    osip_list_t *accept_encodings;    osip_list_t *accept_languages;    osip_list_t *alert_infos;    osip_list_t *allows;    osip_list_t *authorizations;    osip_call_id_t *call_id;    osip_list_t *call_infos;    osip_list_t *contacts;    osip_list_t *content_dispositions;    osip_list_t *content_encodings;    osip_content_length_t *content_length;    osip_content_type_t *content_type;    osip_cseq_t *cseq;    osip_list_t *error_infos;    osip_from_t *from;    osip_mime_version_t *mime_version;    osip_list_t *proxy_authenticates;    osip_list_t *proxy_authorizations;    osip_list_t *record_routes;    osip_list_t *routes;    osip_to_t *to;    osip_list_t *vias;    osip_list_t *www_authenticates;    osip_list_t *headers;    osip_list_t *bodies;    /*       1: structure and buffer "message" are identical.       2: buffer "message" is not up to date with the structure info (call osip_message_to_str to update it).     */    int message_property;    char *message;  };#ifndef SIP_MESSAGE_MAX_LENGTH/** * You can re-define your own maximum length for SIP message. */#define SIP_MESSAGE_MAX_LENGTH 4000#endif#ifndef BODY_MESSAGE_MAX_SIZE/** * You can define the maximum length for a body inside a SIP message. */#define BODY_MESSAGE_MAX_SIZE  1000#endif/** * Allocate a osip_message_t element. * @param sip The element to allocate. */  int osip_message_init (osip_message_t ** sip);/** * Free all resource in a osip_message_t element. * @param sip The element to free. */  void osip_message_free (osip_message_t * sip);/** * Parse a osip_message_t element. * @param sip The resulting element. * @param message The buffer to parse. */  int osip_message_parse (osip_message_t * sip, const char *message);/** * Get a string representation of a osip_message_t element. * @param sip The element to work on. * @param dest new allocated buffer returned. */  int osip_message_to_str (osip_message_t * sip, char **dest);/** * Clone a osip_message_t element. * @param sip The element to clone. * @param dest The new allocated element cloned. */  int osip_message_clone (const osip_message_t * sip, osip_message_t ** dest);/** * Set the reason phrase. This is entirely free in SIP. * @param sip The element to work on. * @param reason The reason phrase. */  void osip_message_set_reason_phrase (osip_message_t * sip, char *reason);/** * Get the reason phrase. This is entirely free in SIP. * @param sip The element to work on. */  char *osip_message_get_reason_phrase (const osip_message_t * sip);/** * Set the status code. This is entirely free in SIP. * @param sip The element to work on. * @param statuscode The status code. */  void osip_message_set_status_code (osip_message_t * sip, int statuscode);/** * Get the status code. * @param sip The element to work on. */  int osip_message_get_status_code (const osip_message_t * sip);/** * Set the method. You can set any string here. * @param sip The element to work on. * @param method The method name. */  void osip_message_set_method (osip_message_t * sip, char *method);/** * Get the method name. * @param sip The element to work on. */  char *osip_message_get_method (const osip_message_t * sip);/** * Set the SIP version used. (default is "SIP/2.0") * @param sip The element to work on. * @param version The version of SIP. */  void osip_message_set_version (osip_message_t * sip, char *version);/** * Get the SIP version. * @param sip The element to work on. */  char *osip_message_get_version (const osip_message_t * sip);/** * Set the Request-URI. * @param sip The element to work on. * @param uri The uri to set. */  void osip_message_set_uri (osip_message_t * sip, osip_uri_t * uri);/** * Get the Request-URI. * @param sip The element to work on. */  osip_uri_t *osip_message_get_uri (const osip_message_t * sip);/* *  These are helpfull MACROs to test messages type. *//** * Test if the message is a SIP RESPONSE * @param msg the SIP message. */#define MSG_IS_RESPONSE(msg) ((msg)->status_code!=0)/** * Test if the message is a SIP REQUEST * @param msg the SIP message. */#define MSG_IS_REQUEST(msg)  ((msg)->status_code==0)/** * Test if the message is an INVITE REQUEST * @param msg the SIP message. */#define MSG_IS_INVITE(msg)   (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"INVITE",6))/** * Test if the message is an ACK REQUEST * @param msg the SIP message. */#define MSG_IS_ACK(msg)      (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"ACK",3))/** * Test if the message is a REGISTER REQUEST * @param msg the SIP message. */#define MSG_IS_REGISTER(msg) (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"REGISTER",8))/** * Test if the message is a BYE REQUEST * @param msg the SIP message. */#define MSG_IS_BYE(msg)      (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"BYE",3))/** * Test if the message is an OPTIONS REQUEST * @param msg the SIP message. */#define MSG_IS_OPTIONS(msg)  (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"OPTIONS",7))/** * Test if the message is an INFO REQUEST * @param msg the SIP message. */#define MSG_IS_INFO(msg)     (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"INFO",4))/** * Test if the message is a CANCEL REQUEST * @param msg the SIP message. */#define MSG_IS_CANCEL(msg)   (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"CANCEL",6))/** * Test if the message is a REFER REQUEST * @param msg the SIP message. */#define MSG_IS_REFER(msg)   (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"REFER",5))/** * Test if the message is a NOTIFY REQUEST * @param msg the SIP message. */#define MSG_IS_NOTIFY(msg)   (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"NOTIFY",6))/** * Test if the message is a SUBSCRIBE REQUEST * @param msg the SIP message. */#define MSG_IS_SUBSCRIBE(msg)  (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"SUBSCRIBE",9))/** * Test if the message is a MESSAGE REQUEST * @param msg the SIP message. */#define MSG_IS_MESSAGE(msg)  (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"MESSAGE",7))/** * Test if the message is a PRACK REQUEST  (!! PRACK IS NOT SUPPORTED by the fsm!!) * @param msg the SIP message. */#define MSG_IS_PRACK(msg)    (MSG_IS_REQUEST(msg) && \			      0==strncmp((msg)->sip_method,"PRACK",5))/** * Test if the message is a response with status between 100 and 199 * @param msg the SIP message. */#define MSG_IS_STATUS_1XX(msg) ((msg)->status_code >= 100 && \                                (msg)->status_code < 200)/** * Test if the message is a response with status between 200 and 299 * @param msg the SIP message. */#define MSG_IS_STATUS_2XX(msg) ((msg)->status_code >= 200 && \                                (msg)->status_code < 300)/** * Test if the message is a response with status between 300 and 399 * @param msg the SIP message. */#define MSG_IS_STATUS_3XX(msg) ((msg)->status_code >= 300 && \                                (msg)->status_code < 400)/** * Test if the message is a response with status between 400 and 499 * @param msg the SIP message. */#define MSG_IS_STATUS_4XX(msg) ((msg)->status_code >= 400 && \                                (msg)->status_code < 500)/** * Test if the message is a response with status between 500 and 599 * @param msg the SIP message. */#define MSG_IS_STATUS_5XX(msg) ((msg)->status_code >= 500 && \                                (msg)->status_code < 600)/** * Test if the message is a response with status between 600 and 699 * @param msg the SIP message. */#define MSG_IS_STATUS_6XX(msg) ((msg)->status_code >= 600 && \                                (msg)->status_code < 700)/** * Test if the message is a response with a status set to the code value. * @param msg the SIP message. * @param code the status code. */#define MSG_TEST_CODE(msg,code) (MSG_IS_RESPONSE(msg) && \				 (code)==(msg)->status_code)/** * Test if the message is a response for a REQUEST of certain type * @param msg the SIP message. * @param requestname the method name to match. */#define MSG_IS_RESPONSE_FOR(msg,requestname)  (MSG_IS_RESPONSE(msg) && \				 0==strcmp((msg)->cseq->method,(requestname)))/** * Allocate a generic parameter element. * @param GP The element to work on. */#define osip_generic_param_init(GP) osip_uri_param_init(GP)/** * Free a generic parameter element. * @param GP The element to work on. */#define osip_generic_param_free(GP) osip_uri_param_free(GP)/** * Set values of a generic parameter element. * @param GP The element to work on. * @param NAME The token name. * @param VALUE The token value. */#define osip_generic_param_set(GP, NAME, VALUE)  osip_uri_param_set(GP, NAME, VALUE)/** * Clone a generic parameter element. * @param GP The element to work on. * @param DEST The resulting new allocated buffer. */#define osip_generic_param_clone(GP,DEST)     osip_uri_param_clone(GP,DEST)#ifndef DOXYGEN/* * Free a list of a generic parameter element. * @param LIST The list of generic parameter element to free. */#define osip_generic_param_freelist(LIST)       osip_uri_param_freelist(LIST)#endif/** * Allocate and add a generic parameter element in a list. * @param LIST The list of generic parameter element to work on. * @param NAME The token name. * @param VALUE The token value. */#define osip_generic_param_add(LIST,NAME,VALUE)        osip_uri_param_add(LIST,NAME,VALUE)/** * Find in a generic parameter element in a list. * @param LIST The list of generic parameter element to work on. * @param NAME The name of the parameter element to find. * @param DEST A pointer on the element found. */#define osip_generic_param_get_byname(LIST,NAME,DEST) osip_uri_param_get_byname(LIST,NAME,DEST)/** * Set the name of a generic parameter element. * @param generic_param The element to work on. * @param name the token name to set. */  void osip_generic_param_set_name (osip_generic_param_t * generic_param, char *name);/** * Get the name of a generic parameter element. * @param generic_param The element to work on. */  char *osip_generic_param_get_name (const osip_generic_param_t * generic_param);/** * Set the value of a generic parameter element. * @param generic_param The element to work on. * @param value the token name to set. */  void osip_generic_param_set_value (osip_generic_param_t * generic_param, char *value);/** * Get the value of a generic parameter element. * @param generic_param The element to work on. */  char *osip_generic_param_get_value (const osip_generic_param_t * generic_param);/** @} */#ifdef __cplusplus}#endif#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
这里只有精品电影| 在线视频一区二区免费| 精品日韩在线观看| 久久国产精品区| 精品福利二区三区| av在线播放不卡| 亚洲一区二区三区国产| 在线不卡a资源高清| 麻豆一区二区三区| 亚洲视频免费在线观看| 欧美亚州韩日在线看免费版国语版| 精品国产伦一区二区三区观看体验| 欧美一区二区三区在线观看 | 欧美日产在线观看| 国产成人h网站| 首页亚洲欧美制服丝腿| 国产三级一区二区三区| 欧美三级在线视频| 国产九色sp调教91| 亚洲成人av一区二区三区| 久久久噜噜噜久久中文字幕色伊伊| 99久久99久久综合| 国产成人免费视频网站高清观看视频| 亚洲激情自拍视频| 亚洲少妇中出一区| 欧美激情在线看| 久久综合九色综合97_久久久| 欧美午夜在线一二页| 欧美系列亚洲系列| 欧美亚州韩日在线看免费版国语版 | 欧美一级日韩不卡播放免费| 亚洲综合在线电影| 久久久99久久精品欧美| 日韩欧美在线123| 69堂成人精品免费视频| 欧美二区在线观看| 在线综合亚洲欧美在线视频| 欧美另类变人与禽xxxxx| 欧美色男人天堂| 日韩欧美成人午夜| 日韩免费福利电影在线观看| 欧美一级片免费看| 欧美精品一区二区不卡| 久久久蜜桃精品| 国产三级三级三级精品8ⅰ区| 久久综合色天天久久综合图片| 欧美精品一区二区高清在线观看| 26uuu久久天堂性欧美| 中文字幕欧美区| 亚洲日本在线天堂| 不卡影院免费观看| 国产精品亚洲专一区二区三区 | 国产91在线看| 欧美精品777| 青青青爽久久午夜综合久久午夜 | 欧美一级免费大片| 午夜不卡在线视频| 欧美男人的天堂一二区| 污片在线观看一区二区| 欧美一区二区三区四区五区| 国产精品第五页| 91在线视频官网| 136国产福利精品导航| 成人国产在线观看| 国产欧美精品一区| 国产成人在线影院 | 日韩中文欧美在线| 欧美性做爰猛烈叫床潮| 夜夜亚洲天天久久| 在线观看91精品国产麻豆| 亚洲成人av一区二区三区| 色狠狠色狠狠综合| 亚洲二区在线观看| 91精品国产色综合久久不卡蜜臀| 亚洲码国产岛国毛片在线| 色哟哟国产精品| 五月天亚洲婷婷| 日韩欧美电影一二三| 99精品视频中文字幕| 自拍视频在线观看一区二区| 在线国产电影不卡| 美日韩一区二区| 国产精品久久久久久久久果冻传媒| 国产风韵犹存在线视精品| 91精品国产综合久久精品app | 狠狠色综合播放一区二区| 久久久国际精品| 色综合中文字幕国产 | 欧美a一区二区| 国产精品久久久久久亚洲毛片| 91精品福利在线| 久久精品国内一区二区三区| 亚洲国产精品传媒在线观看| 91在线观看视频| 国产精品一二二区| 亚洲成人激情社区| 一区二区三区欧美日韩| 亚洲欧美偷拍卡通变态| 中文字幕av一区二区三区免费看| 亚洲精品一区二区精华| 国产精品女同一区二区三区| 亚洲小说欧美激情另类| 久国产精品韩国三级视频| 风间由美一区二区三区在线观看| 成人综合激情网| 韩国成人福利片在线播放| 日韩中文字幕不卡| 开心九九激情九九欧美日韩精美视频电影| 亚洲与欧洲av电影| 一区二区三区在线视频免费| 中文字幕制服丝袜成人av| 国产日韩欧美制服另类| 国产精品久久影院| 亚洲精品一卡二卡| 麻豆精品精品国产自在97香蕉| 免费高清视频精品| 日日夜夜免费精品| 亚洲va韩国va欧美va| 国产一区二区调教| 成人一区二区三区| 欧美亚洲综合久久| 国产丝袜欧美中文另类| eeuss鲁一区二区三区| 色偷偷久久人人79超碰人人澡| 精品久久久久久久久久久久久久久| 欧美成人福利视频| 国产精品拍天天在线| 视频一区二区国产| 国产丶欧美丶日本不卡视频| 91蝌蚪国产九色| 日韩欧美国产一区二区在线播放 | 91久久精品午夜一区二区| 久久你懂得1024| 久久成人免费网| 91精品国产色综合久久不卡蜜臀| 亚洲猫色日本管| 色一情一伦一子一伦一区| 国产精品素人视频| 国产91精品露脸国语对白| 久久久美女艺术照精彩视频福利播放| 视频一区在线播放| 91麻豆精品久久久久蜜臀| 精品日韩av一区二区| 日韩欧美你懂的| 欧洲av在线精品| 成人动漫在线一区| 91美女片黄在线观看91美女| 91在线精品一区二区| 色婷婷av一区二区三区软件| 在线观看日韩电影| 欧美男女性生活在线直播观看| 欧美私模裸体表演在线观看| 日韩免费成人网| 亚洲欧洲三级电影| 日本成人在线网站| 成人午夜电影久久影院| 欧洲亚洲国产日韩| 精品成人a区在线观看| 一区二区视频在线| 视频一区二区中文字幕| 91在线免费播放| 欧美mv日韩mv亚洲| 日韩精品福利网| 91麻豆成人久久精品二区三区| 日韩小视频在线观看专区| 亚洲欧美一区二区三区国产精品 | 日本高清无吗v一区| 国产精品剧情在线亚洲| 久久成人久久爱| 555www色欧美视频| 国产精品蜜臀在线观看| 亚洲综合免费观看高清完整版| 亚洲成人av一区二区三区| 91同城在线观看| 国产精品麻豆久久久| 欧美成人精品3d动漫h| 精品日产卡一卡二卡麻豆| zzijzzij亚洲日本少妇熟睡| 26uuu久久天堂性欧美| 欧美成人video| 亚洲一级在线观看| 成人福利视频在线| 国产日韩v精品一区二区| 蜜臀av性久久久久蜜臀aⅴ| 欧美日韩国产一二三| 亚洲综合色丁香婷婷六月图片| 成人性生交大片免费看在线播放| 日韩欧美一区二区免费| 日韩一区日韩二区| 91网上在线视频| 亚洲国产你懂的| 制服丝袜亚洲色图| 韩国精品免费视频| 亚洲女爱视频在线| 欧美丰满一区二区免费视频 | 久久91精品国产91久久小草| 久久精品免费在线观看| 麻豆91在线观看| 1024精品合集| wwwwxxxxx欧美|