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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ice_session.h

?? 一個(gè)開源的sip源代碼
?? H
?? 第 1 頁 / 共 2 頁
字號(hào):
/* $Id: ice_session.h 1242 2007-05-02 11:29:37Z 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_ICE_SESSION_H__
#define __PJNATH_ICE_SESSION_H__

/**
 * @file ice_session.h
 * @brief ICE session management
 */
#include <pjnath/types.h>
#include <pjnath/stun_session.h>
#include <pj/sock.h>
#include <pj/timer.h>

/**
 * @defgroup PJNATH_ICE Interactive Connectivity Establishment (ICE)
 * @brief Interactive Connectivity Establishment (ICE)
 */


PJ_BEGIN_DECL


/**
 * @defgroup PJNATH_ICE_SESSION ICE Session
 * @brief Transport Independent ICE Session
 * @ingroup PJNATH_ICE
 * @{
 *
 * This module describes #pj_ice_sess, a transport independent ICE session,
 * part of PJNATH - the Open Source NAT helper library.
 *
 * An ICE session, represented by #pj_ice_sess structure, is the lowest 
 * abstraction of ICE in PJNATH, and it is used to perform and manage
 * connectivity checks of transport address candidates <b>within a
 * single media stream</b> (note: this differs from what is described
 * in ICE draft, where an ICE session manages the whole media sessions
 * rather than just a single stream).
 *
 * The ICE session described here is independent from any transports,
 * meaning that the actual network I/O for this session would have to
 * be performed by the application, or higher layer abstraction. 
 * Using this framework, application would give any incoming packets to
 * the ICE session, and it would provide the ICE session with a callback
 * to send outgoing message.
 *
 * For higher abstraction of ICE where transport is included, please 
 * see \ref PJNATH_ICE_STREAM_TRANSPORT.
 */

/**
 * This enumeration describes the type of an ICE candidate.
 */
typedef enum pj_ice_cand_type
{
    /**
     * ICE host candidate. A host candidate represents the actual local
     * transport address in the host.
     */
    PJ_ICE_CAND_TYPE_HOST,

    /**
     * ICE server reflexive candidate, which represents the public mapped
     * address of the local address, and is obtained by sending STUN
     * Binding request from the host candidate to a STUN server.
     */
    PJ_ICE_CAND_TYPE_SRFLX,

    /**
     * ICE peer reflexive candidate, which is the address as seen by peer
     * agent during connectivity check.
     */
    PJ_ICE_CAND_TYPE_PRFLX,

    /**
     * ICE relayed candidate, which represents the address allocated in
     * TURN server.
     */
    PJ_ICE_CAND_TYPE_RELAYED

} pj_ice_cand_type;


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

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


/**
 * This structure describes ICE component. 
 * A media stream may require multiple components, each of which has 
 * to work for the media stream as a whole to work.  For media streams
 * based on RTP, there are two components per media stream - one for RTP,
 * and one for RTCP.
 */
typedef struct pj_ice_sess_comp
{
    /**
     * The pointer to ICE check which was nominated for this component.
     * The value will be NULL if a nominated check has not been found
     * for this component.
     */
    pj_ice_sess_check	*valid_check;

    /**
     * The STUN session to be used to send and receive STUN messages for this
     * component.
     */
    pj_stun_session	*stun_sess;

} pj_ice_sess_comp;


/**
 * This structure describes an ICE candidate.
 * ICE candidate is a transport address that is to be tested by ICE
 * procedures in order to determine its suitability for usage for
 * receipt of media.  Candidates also have properties - their type
 * (server reflexive, relayed or host), priority, foundation, and
 * base.
 */
typedef struct pj_ice_sess_cand
{
    /**
     * The component ID of this candidate. Note that component IDs starts
     * with one for RTP and two for RTCP. In other words, it's not zero
     * based.
     */
    pj_uint32_t		 comp_id;

    /**
     * The candidate type, as described in #pj_ice_cand_type enumeration.
     */
    pj_ice_cand_type	 type;

    /**
     * The foundation string, which is an identifier which value will be
     * equivalent for two candidates that are of the same type, share the 
     * same base, and come from the same STUN server. The foundation is 
     * used to optimize ICE performance in the Frozen algorithm.
     */
    pj_str_t		 foundation;

    /**
     * The candidate's priority, a 32-bit unsigned value which value will be
     * calculated by the ICE session when a candidate is registered to the
     * ICE session.
     */
    pj_uint32_t		 prio;

    /**
     * IP address of this candidate. For host candidates, this represents
     * the local address of the socket. For reflexive candidates, the value
     * will be the public address allocated in NAT router for the host
     * candidate and as reported in MAPPED-ADDRESS or XOR-MAPPED-ADDRESS
     * attribute of STUN Binding request. For relayed candidate, the value 
     * will be the address allocated in the TURN server by STUN Allocate
     * request.
     */
    pj_sockaddr		 addr;

    /**
     * Base address of this candidate. "Base" refers to the address an agent 
     * sends from for a particular candidate.  For host candidates, the base
     * is the same as the host candidate itself. For reflexive candidates, 
     * the base is the local IP address of the socket. For relayed candidates,
     * the base address is the transport address allocated in the TURN server
     * for this candidate.
     */
    pj_sockaddr		 base_addr;

    /**
     * Related address, which is used for informational only and is not used
     * in any way by the ICE session.
     */
    pj_sockaddr		 rel_addr;

} pj_ice_sess_cand;


/**
 * This enumeration describes the state of ICE check.
 */
typedef enum pj_ice_sess_check_state
{
    /**
     * A check for this pair hasn't been performed, and it can't
     * yet be performed until some other check succeeds, allowing this
     * pair to unfreeze and move into the Waiting state.
     */
    PJ_ICE_SESS_CHECK_STATE_FROZEN,

    /**
     * A check has not been performed for this pair, and can be
     * performed as soon as it is the highest priority Waiting pair on
     * the check list.
     */
    PJ_ICE_SESS_CHECK_STATE_WAITING,

    /**
     * A check has not been performed for this pair, and can be
     * performed as soon as it is the highest priority Waiting pair on
     * the check list.
     */
    PJ_ICE_SESS_CHECK_STATE_IN_PROGRESS,

    /**
     * A check has not been performed for this pair, and can be
     * performed as soon as it is the highest priority Waiting pair on
     * the check list.
     */
    PJ_ICE_SESS_CHECK_STATE_SUCCEEDED,

    /**
     * A check for this pair was already done and failed, either
     * never producing any response or producing an unrecoverable failure
     * response.
     */
    PJ_ICE_SESS_CHECK_STATE_FAILED

} pj_ice_sess_check_state;


/**
 * This structure describes an ICE connectivity check. An ICE check
 * contains a candidate pair, and will involve sending STUN Binding 
 * Request transaction for the purposes of verifying connectivity. 
 * A check is sent from the local candidate to the remote candidate 
 * of a candidate pair.
 */
struct pj_ice_sess_check
{
    /**
     * Pointer to local candidate entry of this check.
     */
    pj_ice_sess_cand	*lcand;

    /**
     * Pointer to remote candidate entry of this check.
     */
    pj_ice_sess_cand	*rcand;

    /**
     * Check priority.
     */
    pj_timestamp	 prio;

    /**
     * Connectivity check state.
     */
    pj_ice_sess_check_state	 state;

    /**
     * STUN transmit data containing STUN Binding request that was sent 
     * as part of this check. The value will only be set when this check 
     * has a pending transaction, and is used to cancel the transaction
     * when other check has succeeded.
     */
    pj_stun_tx_data	*tdata;

    /**
     * Flag to indicate whether this check is nominated. A nominated check
     * contains USE-CANDIDATE attribute in its STUN Binding request.
     */
    pj_bool_t		 nominated;

    /**
     * When the check failed, this will contain the failure status of the
     * STUN transaction.
     */
    pj_status_t		 err_code;
};


/**
 * This enumeration describes ICE checklist state.
 */
typedef enum pj_ice_sess_checklist_state
{
    /**
     * The checklist is not yet running.
     */
    PJ_ICE_SESS_CHECKLIST_ST_IDLE,

    /**
     * In this state, ICE checks are still in progress for this
     * media stream.
     */
    PJ_ICE_SESS_CHECKLIST_ST_RUNNING,

    /**
     * In this state, ICE checks have completed for this media stream,
     * either successfully or with failure.
     */
    PJ_ICE_SESS_CHECKLIST_ST_COMPLETED

} pj_ice_sess_checklist_state;


/**
 * This structure represents ICE check list, that is an ordered set of 
 * candidate pairs that an agent will use to generate checks.
 */
typedef struct pj_ice_sess_checklist
{
    /**
     * The checklist state.
     */
    pj_ice_sess_checklist_state   state;

    /**
     * Number of candidate pairs (checks).
     */
    unsigned		     count;

    /**
     * Array of candidate pairs (checks).
     */
    pj_ice_sess_check	     checks[PJ_ICE_MAX_CHECKS];

    /**
     * A timer used to perform periodic check for this checklist.
     */
    pj_timer_entry	     timer;

} pj_ice_sess_checklist;


/**
 * This structure contains callbacks that will be called by the ICE
 * session.
 */
typedef struct pj_ice_sess_cb
{
    /**
     * An optional callback that will be called by the ICE session when
     * ICE negotiation has completed, successfully or with failure.
     *
     * @param ice	    The ICE session.
     * @param status	    Will contain PJ_SUCCESS if ICE negotiation is
     *			    successful, or some error code.
     */
    void	(*on_ice_complete)(pj_ice_sess *ice, pj_status_t status);

    /**
     * A mandatory callback which will be called by the ICE session when
     * it needs to send outgoing STUN packet. 
     *
     * @param ice	    The ICE session.
     * @param comp_id	    ICE component ID.
     * @param pkt	    The STUN packet.
     * @param size	    The size of the packet.
     * @param dst_addr	    Packet destination address.
     * @param dst_addr_len  Length of destination address.
     */
    pj_status_t (*on_tx_pkt)(pj_ice_sess *ice, unsigned comp_id, 
			     const void *pkt, pj_size_t size,
			     const pj_sockaddr_t *dst_addr,
			     unsigned dst_addr_len);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本一道久久a久久精品| 欧美日韩电影在线播放| 日韩一区二区免费在线电影| 久久蜜桃一区二区| 日韩精品色哟哟| 欧美中文字幕一区二区三区| 国产片一区二区| 丁香五精品蜜臀久久久久99网站 | 国产精品国产自产拍高清av王其| 偷拍一区二区三区四区| 欧美在线短视频| 天堂久久一区二区三区| 欧美日韩电影在线| 日韩二区三区四区| 欧美日韩国产综合草草| 蜜桃在线一区二区三区| 91精品国产综合久久久久| 五月婷婷综合激情| 色吊一区二区三区| wwwwww.欧美系列| 国产乱子伦视频一区二区三区| 国产视频在线观看一区二区三区| 亚洲高清免费视频| 精品国产伦一区二区三区观看方式 | 一区二区三区四区视频精品免费| 国产欧美精品区一区二区三区| 日韩免费电影网站| 极品尤物av久久免费看| 国产精品美女久久久久久久网站| 91蝌蚪porny九色| 蜜桃av一区二区在线观看| 久久久久97国产精华液好用吗| www.av亚洲| 麻豆精品视频在线| 国产精品久久久久永久免费观看| 成人精品亚洲人成在线| 日韩电影免费在线看| 亚洲日本免费电影| 欧美tickling网站挠脚心| 91小视频在线免费看| 另类专区欧美蜜桃臀第一页| 日韩毛片在线免费观看| 精品国产一区久久| 51精品秘密在线观看| 色婷婷av一区二区三区gif| 成人禁用看黄a在线| 国产乱码精品1区2区3区| 亚洲乱码中文字幕综合| 中文字幕av在线一区二区三区| 日韩欧美专区在线| 欧美一区二区美女| 91精品在线麻豆| 欧美精品久久99久久在免费线 | 人人精品人人爱| 亚洲成年人影院| 亚洲精品国产一区二区精华液 | 亚洲妇女屁股眼交7| 亚洲一区二区在线观看视频| 亚洲欧美日韩国产另类专区| 国产精品另类一区| 中文字幕在线视频一区| 亚洲裸体在线观看| 亚洲18色成人| 婷婷激情综合网| 麻豆免费精品视频| 国产精品一区在线| 成人aaaa免费全部观看| 色婷婷亚洲婷婷| 91网上在线视频| 欧美日韩精品一二三区| 欧美videossexotv100| 国产欧美一区二区精品婷婷| 中文字幕亚洲视频| 视频一区二区三区中文字幕| 亚洲国产成人va在线观看天堂| 日本成人在线一区| 国产精品一区三区| 日本高清无吗v一区| 欧美成人女星排行榜| 国产精品素人一区二区| 亚洲图片有声小说| 国产成人综合网| 欧美精品tushy高清| 久久一日本道色综合| 国产午夜久久久久| 婷婷综合另类小说色区| 成人精品免费视频| 欧美一级在线观看| 亚洲成人av一区二区三区| 国产乱人伦偷精品视频免下载| 色噜噜狠狠成人网p站| 国产亚洲一区字幕| 国产一区二区三区在线观看免费视频 | 国产精品美女www爽爽爽| 久久91精品久久久久久秒播| 欧美亚洲国产bt| 国产精品色眯眯| 国产91精品免费| 久久精品夜色噜噜亚洲a∨| 亚洲一二三四久久| 色成年激情久久综合| 亚洲精选视频免费看| 成人av免费在线播放| 久久久不卡影院| 国产一区欧美一区| 日韩免费观看高清完整版 | 欧美日韩国产美女| 一区二区三区日韩在线观看| 不卡欧美aaaaa| 亚洲免费av网站| 欧美性生活一区| 一区二区三区色| 欧美欧美午夜aⅴ在线观看| 爽好久久久欧美精品| 日韩午夜激情视频| 成人av网站在线| 久久99久久久欧美国产| 国产精品欧美综合在线| 日韩一区二区三区电影| 91欧美激情一区二区三区成人| 全部av―极品视觉盛宴亚洲| 亚洲国产精华液网站w| 欧美一区二区三区喷汁尤物| av在线这里只有精品| 国产在线一区二区综合免费视频| 亚洲女同ⅹxx女同tv| 欧美mv和日韩mv的网站| 欧美日韩精品电影| 91亚洲国产成人精品一区二区三| 精品一区二区三区在线播放| 亚洲高清一区二区三区| 亚洲猫色日本管| 亚洲欧美一区二区视频| 日韩美女视频19| 国产无一区二区| wwwwww.欧美系列| 欧美日韩精品一区二区天天拍小说 | 国产乱码一区二区三区| 三级欧美在线一区| 亚洲成a天堂v人片| 香蕉成人啪国产精品视频综合网| 亚洲日本电影在线| 国产精品国产a| 亚洲三级小视频| 一区二区三区在线不卡| 一区二区三区视频在线观看| 一级做a爱片久久| 亚洲影院免费观看| 日本午夜一区二区| 精品夜夜嗨av一区二区三区| 国产在线不卡一卡二卡三卡四卡| 天天综合天天综合色| 亚洲h在线观看| 极品少妇一区二区| 成人av资源在线观看| 色综合久久综合网欧美综合网 | 国产精品一区二区你懂的| 国产成人夜色高潮福利影视| 99久久国产综合精品色伊| 色94色欧美sute亚洲线路一ni| 欧美日韩成人综合天天影院| 欧美大尺度电影在线| 自拍偷拍亚洲激情| 蜜桃传媒麻豆第一区在线观看| 国产v日产∨综合v精品视频| 欧美熟乱第一页| 日本一区二区免费在线| 亚洲国产精品一区二区久久恐怖片 | 国产精品1区2区3区在线观看| 色综合久久中文综合久久牛| 欧美日韩免费一区二区三区视频| 久久在线观看免费| 亚洲va国产va欧美va观看| 国产大陆a不卡| 日韩一区二区三区高清免费看看| 亚洲天堂福利av| 国产一区二区在线看| 8v天堂国产在线一区二区| 国产精品卡一卡二| 国产一区二区影院| 日韩美女视频在线| 天堂av在线一区| 欧美日韩国产中文| 夜夜嗨av一区二区三区| 99久久精品费精品国产一区二区| 精品91自产拍在线观看一区| 日韩成人免费看| 欧美系列在线观看| 亚洲成人综合视频| 欧美精品乱码久久久久久按摩 | 成人网在线免费视频| 久久综合久久综合久久综合| 狠狠色综合播放一区二区| 日韩三级高清在线| 久88久久88久久久| 国产亚洲一区二区三区| 成人永久看片免费视频天堂| 国产欧美一区二区三区网站| 成人激情视频网站| 亚洲精品日韩综合观看成人91|