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

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

?? stun_session.h

?? 一個開源的sip源代碼
?? H
?? 第 1 頁 / 共 2 頁
字號:
/* $Id: stun_session.h 1275 2007-05-15 10:42:56Z bennylp $ */
/* 
 * Copyright (C) 2003-2005 Benny Prijono <benny@prijono.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 */
#ifndef __PJNATH_STUN_SESSION_H__
#define __PJNATH_STUN_SESSION_H__

/**
 * @file stun_session.h
 * @brief STUN session management for client/server.
 */

#include <pjnath/stun_msg.h>
#include <pjnath/stun_auth.h>
#include <pjnath/stun_config.h>
#include <pjnath/stun_transaction.h>
#include <pj/list.h>
#include <pj/timer.h>

PJ_BEGIN_DECL


/* **************************************************************************/
/**
 * @defgroup PJNATH_STUN_SESSION STUN Client/Server Session
 * @brief STUN client and server session
 * @ingroup PJNATH_STUN
 * @{
 */


/** Forward declaration for pj_stun_tx_data */
typedef struct pj_stun_tx_data pj_stun_tx_data;

/** Forward declaration for pj_stun_session */
typedef struct pj_stun_session pj_stun_session;


/**
 * This is the callback to be registered to pj_stun_session, to send
 * outgoing message and to receive various notifications from the STUN
 * session.
 */
typedef struct pj_stun_session_cb
{
    /**
     * Callback to be called by the STUN session to send outgoing message.
     *
     * @param sess	    The STUN session.
     * @param pkt	    Packet to be sent.
     * @param pkt_size	    Size of the packet to be sent.
     * @param dst_addr	    The destination address.
     * @param addr_len	    Length of destination address.
     *
     * @return		    The callback should return the status of the
     *			    packet sending.
     */
    pj_status_t (*on_send_msg)(pj_stun_session *sess,
			       const void *pkt,
			       pj_size_t pkt_size,
			       const pj_sockaddr_t *dst_addr,
			       unsigned addr_len);

    /** 
     * Callback to be called on incoming STUN request message. In the 
     * callback processing, application MUST create a response by calling
     * pj_stun_session_create_response() function and send the response
     * with pj_stun_session_send_msg() function, before returning from
     * the callback.
     *
     * @param sess	    The STUN session.
     * @param pkt	    Pointer to the original STUN packet.
     * @param pkt_len	    Length of the STUN packet.
     * @param msg	    The parsed STUN request.
     * @param src_addr	    Source address of the packet.
     * @param src_addr_len  Length of the source address.
     *
     * @return		    The return value of this callback will be
     *			    returned back to pj_stun_session_on_rx_pkt()
     *			    function.
     */
    pj_status_t (*on_rx_request)(pj_stun_session *sess,
				 const pj_uint8_t *pkt,
				 unsigned pkt_len,
				 const pj_stun_msg *msg,
				 const pj_sockaddr_t *src_addr,
				 unsigned src_addr_len);

    /**
     * Callback to be called when response is received or the transaction 
     * has timed out.
     *
     * @param sess	    The STUN session.
     * @param status	    Status of the request. If the value if not
     *			    PJ_SUCCESS, the transaction has timed-out
     *			    or other error has occurred, and the response
     *			    argument may be NULL.
     *			    Note that when the status is not success, the
     *			    response may contain non-NULL value if the 
     *			    response contains STUN ERROR-CODE attribute.
     * @param request	    The original STUN request.
     * @param response	    The response message, on successful transaction,
     *			    or otherwise MAY BE NULL if status is not success.
     *			    Note that when the status is not success, this
     *			    argument may contain non-NULL value if the 
     *			    response contains STUN ERROR-CODE attribute.
     * @param src_addr	    The source address where the response was 
     *			    received, or NULL if the response is NULL.
     * @param src_addr_len  The length of the source  address.
     */
    void (*on_request_complete)(pj_stun_session *sess,
			        pj_status_t status,
			        pj_stun_tx_data *tdata,
			        const pj_stun_msg *response,
				const pj_sockaddr_t *src_addr,
				unsigned src_addr_len);


    /**
     * Type of callback to be called on incoming STUN indication.
     */
    pj_status_t (*on_rx_indication)(pj_stun_session *sess,
				    const pj_uint8_t *pkt,
				    unsigned pkt_len,
				    const pj_stun_msg *msg,
				    const pj_sockaddr_t *src_addr,
				    unsigned src_addr_len);

} pj_stun_session_cb;


/**
 * This structure describe the outgoing STUN transmit data to carry the
 * message to be sent.
 */
struct pj_stun_tx_data
{
    PJ_DECL_LIST_MEMBER(struct pj_stun_tx_data);

    pj_pool_t		*pool;		/**< Pool.			    */
    pj_stun_session	*sess;		/**< The STUN session.		    */
    pj_stun_msg		*msg;		/**< The STUN message.		    */

    void		*user_data;	/**< Arbitrary application data.    */

    pj_stun_client_tsx	*client_tsx;	/**< Client STUN transaction.	    */
    pj_uint32_t		 msg_magic;	/**< Message magic.		    */
    pj_uint8_t		 msg_key[12];	/**< Message/transaction key.	    */

    pj_str_t		 auth_key;	/**< Auth key.			    */

    void		*pkt;		/**< The STUN packet.		    */
    unsigned		 max_len;	/**< Length of packet buffer.	    */
    unsigned		 pkt_size;	/**< The actual length of STUN pkt. */

    unsigned		 addr_len;	/**< Length of destination address. */
    const pj_sockaddr_t	*dst_addr;	/**< Destination address.	    */

    pj_timer_entry	 res_timer;	/**< Response cache timer.	    */
};


/**
 * Create a STUN session.
 *
 * @param cfg		The STUN endpoint, to be used to register timers etc.
 * @param name		Optional name to be associated with this instance. The
 *			name will be used for example for logging purpose.
 * @param cb		Session callback.
 * @param fingerprint	Enable message fingerprint for outgoing messages.
 * @param p_sess	Pointer to receive STUN session instance.
 *
 * @return	    PJ_SUCCESS on success, or the appropriate error code.
 */
PJ_DECL(pj_status_t) pj_stun_session_create(pj_stun_config *cfg,
					    const char *name,
					    const pj_stun_session_cb *cb,
					    pj_bool_t fingerprint,
					    pj_stun_session **p_sess);

/**
 * Destroy the STUN session.
 *
 * @param sess	    The STUN session instance.
 *
 * @return	    PJ_SUCCESS on success, or the appropriate error code.
 */
PJ_DECL(pj_status_t) pj_stun_session_destroy(pj_stun_session *sess);

/**
 * Associated an arbitrary data with this STUN session. The user data may
 * be retrieved later with pj_stun_session_get_user_data() function.
 *
 * @param sess	    The STUN session instance.
 * @param user_data The user data.
 *
 * @return	    PJ_SUCCESS on success, or the appropriate error code.
 */
PJ_DECL(pj_status_t) pj_stun_session_set_user_data(pj_stun_session *sess,
						   void *user_data);

/**
 * Retrieve the user data previously associated to this STUN session with

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99国产精品久| 欧美国产精品专区| 国产精品久久久久久久久免费桃花 | 色综合激情久久| 日韩精品专区在线影院重磅| 1000精品久久久久久久久| 激情综合五月婷婷| 3d动漫精品啪啪| 亚洲一区欧美一区| av在线一区二区| 国产清纯在线一区二区www| 日产国产欧美视频一区精品| 色先锋aa成人| 中文字幕一区二区不卡| 国产精品 日产精品 欧美精品| 欧美精品在欧美一区二区少妇| 亚洲视频免费在线观看| 成人黄动漫网站免费app| 久久久国产精品麻豆| 精品在线一区二区| 中国av一区二区三区| 久久激情五月激情| 日韩午夜激情视频| 日韩精品一二三四| 欧美日韩成人激情| 午夜久久久久久久久| 欧美三区免费完整视频在线观看| 国产精品对白交换视频| 风间由美中文字幕在线看视频国产欧美| 日韩欧美亚洲一区二区| 蜜桃一区二区三区四区| 51精品视频一区二区三区| 亚洲成人先锋电影| 欧美日韩高清一区| 日韩电影在线免费观看| 91精品国产高清一区二区三区| 亚洲国产成人av好男人在线观看| 欧美系列一区二区| 午夜婷婷国产麻豆精品| 欧美一级在线视频| 激情综合五月天| 国产日韩精品一区二区三区| 成人不卡免费av| 亚洲精品欧美激情| 国产日韩av一区二区| 粉嫩aⅴ一区二区三区四区| 国产色一区二区| 成人国产亚洲欧美成人综合网| 国产精品成人免费| 欧美午夜精品久久久久久超碰| 亚洲成在线观看| 精品日韩一区二区三区 | 全国精品久久少妇| 欧美精品一区二区久久婷婷| 国产精品一二三| 亚洲美女屁股眼交3| 欧美一级欧美三级| 国产成人免费视频精品含羞草妖精| **欧美大码日韩| 911精品产国品一二三产区| 国产在线不卡一区| 国产精品国产精品国产专区不蜜| 欧美性感一类影片在线播放| 精品一区二区久久| 亚洲精品国产精华液| 日韩精品专区在线影院重磅| www.欧美亚洲| 久久99九九99精品| 亚洲一级二级三级| 久久精品视频免费观看| 欧美美女一区二区| 国产91清纯白嫩初高中在线观看 | 亚洲青青青在线视频| 91精品在线免费| 91小视频免费观看| 国产乱一区二区| 日本不卡视频在线观看| 亚洲女人小视频在线观看| 久久色在线观看| 欧美年轻男男videosbes| 成人爽a毛片一区二区免费| 青青草97国产精品免费观看 | 92国产精品观看| 精品综合免费视频观看| 亚洲第一精品在线| 亚洲欧洲国产日韩| 国产日韩欧美综合在线| 日韩亚洲欧美一区| 欧美男女性生活在线直播观看| 成人午夜av在线| 精品一区二区影视| 日韩国产在线观看一区| 亚洲国产精品自拍| 一区二区成人在线| 亚洲色图制服丝袜| 中文字幕一区二区三区精华液| 欧美精品一区二区三区在线播放| 7777精品伊人久久久大香线蕉最新版| 色妞www精品视频| 色综合一区二区三区| 丰满亚洲少妇av| 丁香亚洲综合激情啪啪综合| 国产一区二区不卡| 韩国一区二区视频| 国产一区二区精品久久91| 精品一区二区三区在线观看| 麻豆高清免费国产一区| 麻豆精品在线视频| 欧美体内she精视频| 欧美性受极品xxxx喷水| 欧美在线视频日韩| 欧洲中文字幕精品| 91.成人天堂一区| 日韩一级免费观看| wwwwww.欧美系列| 国产色一区二区| 一区在线观看免费| 一区二区三区中文字幕精品精品 | 成人免费精品视频| 91香蕉视频在线| 欧美日韩中字一区| 日韩一级免费观看| 国产亚洲一区二区三区在线观看| 久久久久久久综合狠狠综合| 国产视频在线观看一区二区三区 | 91色porny蝌蚪| 在线观看日韩国产| 日韩一区国产二区欧美三区| 精品国产91乱码一区二区三区| 精品国产制服丝袜高跟| 日本一区二区三区电影| 日韩理论片在线| 午夜精品在线视频一区| 激情都市一区二区| 成人av在线观| 欧美男男青年gay1069videost| 精品国产乱码久久久久久图片 | 91丨九色丨蝌蚪丨老版| 欧美日韩一区二区三区四区| 日韩欧美一二三区| 成人免费一区二区三区在线观看 | 日韩欧美国产1| 亚洲国产精品精华液ab| 亚洲一区二区在线免费看| 麻豆freexxxx性91精品| 成人性色生活片免费看爆迷你毛片| 色婷婷亚洲婷婷| 精品女同一区二区| 亚洲天堂成人网| 久久精品99久久久| 91女神在线视频| 精品成人免费观看| 亚洲一区在线观看视频| 国产精品1区2区| 欧美久久久久久久久| 国产精品久久久久久久久动漫| 日本在线不卡视频| 色猫猫国产区一区二在线视频| 精品国产一区二区三区久久久蜜月| 136国产福利精品导航| 精品一区二区三区免费视频| 在线观看av不卡| 国产精品久久久久四虎| 久久精品国产亚洲a| 欧美揉bbbbb揉bbbbb| 综合精品久久久| 国产精品一区二区在线观看不卡 | 欧美私模裸体表演在线观看| 国产欧美精品区一区二区三区| 香蕉影视欧美成人| 91国产丝袜在线播放| 中文字幕一区二区在线观看| 国产一区二区三区电影在线观看 | 欧美性猛交xxxx黑人交| 欧美国产在线观看| 国产一区二区在线观看免费| 欧美日本在线一区| 一区二区久久久| 99视频国产精品| 国产精品麻豆一区二区 | 美女视频免费一区| 欧美日韩国产综合一区二区| 日本一区二区三区电影| 国产精品自拍三区| 精品sm在线观看| 男女性色大片免费观看一区二区 | 美国欧美日韩国产在线播放| 欧美视频一区二区三区四区| 亚洲欧美日本韩国| 91亚洲精品一区二区乱码| 亚洲国产精品av| 不卡的av中国片| 国产精品不卡在线| 91亚洲精品久久久蜜桃| 成人欧美一区二区三区1314| 99精品热视频| 亚洲精品免费播放| 欧美探花视频资源| 日本欧美在线看| 精品国产三级电影在线观看|