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

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

?? ice_session.h

?? 一個開源的sip源代碼
?? H
?? 第 1 頁 / 共 2 頁
字號:
/* $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);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av不卡在线播放| 久久99久国产精品黄毛片色诱| 成人黄色在线网站| 国产精品福利一区| 99国产欧美另类久久久精品| 国产精品国产三级国产普通话蜜臀| 成人h动漫精品一区二区| 中文字幕 久热精品 视频在线| 94-欧美-setu| 亚洲aaa精品| 日韩三级视频在线看| 国产福利视频一区二区三区| 日韩理论片中文av| 欧美日韩电影在线| 精品在线视频一区| 国产精品乱人伦一区二区| 91成人国产精品| 男女视频一区二区| 久久久久久久久一| 91影院在线免费观看| 五月天中文字幕一区二区| 26uuu精品一区二区在线观看| 成人免费毛片片v| 天天综合日日夜夜精品| 久久久影视传媒| 91精品福利视频| 捆绑调教美女网站视频一区| 国产精品网站导航| 欧美久久久久中文字幕| 国产精品亚洲一区二区三区妖精| 亚洲欧美日韩国产手机在线| 91精品国产91久久久久久一区二区 | 在线免费观看视频一区| 青青草成人在线观看| 国产精品电影一区二区| 日韩欧美中文字幕制服| 99r精品视频| 久久69国产一区二区蜜臀| 亚洲人快播电影网| 337p粉嫩大胆噜噜噜噜噜91av| 91黄色在线观看| 国产成人自拍在线| 日本怡春院一区二区| 亚洲视频1区2区| 精品免费99久久| 欧美日韩一区二区不卡| 播五月开心婷婷综合| 美美哒免费高清在线观看视频一区二区| 国产精品高潮久久久久无| 日韩精品一区二区三区蜜臀| 欧美日韩黄视频| 99久久精品国产麻豆演员表| 国产一区二区三区美女| 美国十次综合导航| 亚洲大片免费看| 亚洲欧美电影院| 中文av一区二区| 2024国产精品| 日韩精品在线看片z| 欧美在线999| 色视频成人在线观看免| 成人国产电影网| 国产黄色精品视频| 国产在线播放一区三区四| 免费人成精品欧美精品| 日日骚欧美日韩| 亚洲成人av福利| 一区二区三区在线视频观看| 中文字幕在线不卡国产视频| 国产欧美一区二区三区在线老狼| 日韩免费在线观看| 日韩欧美你懂的| 欧美一级艳片视频免费观看| 91超碰这里只有精品国产| 欧美在线视频不卡| 欧美三级资源在线| 欧美老肥妇做.爰bbww视频| 欧美日韩中文字幕一区二区| 91国偷自产一区二区开放时间 | 日本 国产 欧美色综合| 天堂久久久久va久久久久| 午夜精品福利一区二区三区蜜桃| 成人午夜免费视频| 国产一区二区三区不卡在线观看| 久久国产视频网| 久久精品国产99久久6| 老司机精品视频一区二区三区| 久久精品国产久精国产| 久久97超碰国产精品超碰| 久久福利资源站| 国产乱妇无码大片在线观看| 国产二区国产一区在线观看| 国产成人精品免费网站| 99视频一区二区| 91国在线观看| 欧美一级在线观看| 久久久久国产精品麻豆ai换脸 | 久久综合久久鬼色中文字| 久久亚洲春色中文字幕久久久| 久久久精品tv| 国产精品福利影院| 亚洲成av人影院在线观看网| 美日韩一区二区| 成人综合激情网| 欧美怡红院视频| 精品国产免费人成电影在线观看四季| 久久精品亚洲精品国产欧美kt∨| 国产精品久久久久婷婷| 亚洲一区二区视频在线观看| 日韩成人dvd| 成人国产精品免费观看| 精品视频在线免费观看| 26uuu亚洲综合色欧美 | 国产欧美日韩久久| 一区二区三区在线视频观看58| 久草中文综合在线| 99久久精品免费看国产免费软件| 欧美日韩免费电影| 精品久久免费看| 亚洲精品乱码久久久久| 捆绑紧缚一区二区三区视频| 99精品国产99久久久久久白柏| 91精品国产综合久久香蕉麻豆| 国产欧美日韩综合| 日韩福利电影在线| 成人黄色国产精品网站大全在线免费观看| 欧美亚洲日本一区| 欧美高清在线视频| 免费在线一区观看| 91麻豆123| 久久久一区二区三区| 丝袜a∨在线一区二区三区不卡| 国产电影一区在线| 欧美一激情一区二区三区| 亚洲视频每日更新| 国产一区二区三区在线观看免费| 欧美日韩精品欧美日韩精品一综合| 欧美激情一区不卡| 麻豆精品国产91久久久久久| 欧美亚洲综合另类| 亚洲婷婷综合久久一本伊一区| 激情另类小说区图片区视频区| 欧美性视频一区二区三区| 日本一区二区高清| 欧美日韩一区二区三区高清| 国产女人aaa级久久久级| 日本在线观看不卡视频| 在线观看免费视频综合| 国产精品欧美极品| 国产白丝精品91爽爽久久| 日韩精品中文字幕在线一区| 日韩激情中文字幕| 欧美亚洲禁片免费| 一区二区三区日本| 91小视频在线免费看| 国产精品久久久久一区二区三区| 国产成人欧美日韩在线电影| 久久久精品黄色| 国产精品18久久久| 国产偷国产偷亚洲高清人白洁| 极品销魂美女一区二区三区| 精品三级av在线| 久久国产精品99久久久久久老狼| 日韩视频一区二区三区在线播放| 天堂成人免费av电影一区| 欧美色视频在线| 日韩成人精品视频| 日韩三区在线观看| 国内国产精品久久| 久久精品人人做人人爽人人| 国产精品一二三区在线| 国产精品伦一区| 91免费观看视频| 亚洲自拍偷拍图区| 欧美日韩国产三级| 日韩av一区二区三区| 欧美一级欧美三级在线观看 | 国产资源精品在线观看| 久久影院视频免费| 日韩欧美一区在线| 麻豆精品久久久| 国产欧美日韩在线| 色素色在线综合| 婷婷久久综合九色国产成人| 欧美一区二区三区喷汁尤物| 日本免费新一区视频| 精品国产一区二区三区不卡| 国产很黄免费观看久久| 中文字幕制服丝袜成人av | 秋霞av亚洲一区二区三| 精品国产免费久久| 丰满少妇久久久久久久| 一区二区三区自拍| 欧美一区二区久久久| 国产成人av影院| 亚洲精选视频在线| 在线综合亚洲欧美在线视频| 国产成人av网站| 亚洲1区2区3区4区| 久久久www成人免费无遮挡大片|