Debian Codegraph @

Xpjproject/pjnath/docs/doc_ice.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 /**
20 @defgroup PJNATH_ICE ICE: Interactive Connectivity Establishment
21 @brief Interactive Connectivity Establishment (ICE)
22 @ingroup PJNATH
23 */
24
25 /**
26 @defgroup PJNATH_ICE_STREAM_TRANSPORT ICE stream transport
27 @brief Transport for media streams using ICE
28 @ingroup PJNATH_ICE
29 */
30
31 /**
32 @defgroup PJNATH_ICE_SESSION ICE Session
33 @brief Transport Independent ICE Session
34 @ingroup PJNATH_ICE
35 */
36
37 /**
38 @addtogroup PJNATH_ICE
39 \section org Library organizations
40
41 See <b>Table of Contents</b> below.
42
43 \section ice_intro_sec Introduction to ICE
44
45 Interactive Connectivity Establishment (ICE) is the ultimate
46 weapon a client can have in its NAT traversal solution arsenals,
47 as it promises that if there is indeed one path for two clients
48 to communicate, then ICE will find this path. And if there are
49 more than one paths which the clients can communicate, ICE will
50 use the best/most efficient one.
51
52 ICE works by combining several protocols (such as STUN and TURN)
53 altogether and offering several candidate paths for the communication,
54 thereby maximising the chance of success, but at the same time also
55 has the capability to prioritize the candidates, so that the more
56 expensive alternative (namely relay) will only be used as the last
57 resort when else fails. ICE negotiation process involves several
58 stages:
59
60 - candidate gathering, where the client finds out all the possible
61 addresses that it can use for the communication. It may find
62 three types of candidates: host candidate to represent its
63 physical NICs, server reflexive candidate for the address that
64 has been resolved from STUN, and relay candidate for the address
65 that the client has allocated from a TURN relay.
66 - prioritizing these candidates. Typically the relay candidate will
67 have the lowest priority to use since it's the most expensive.
68 - encoding these candidates, sending it to remote peer, and
69 negotiating it with offer-answer.
70 - pairing the candidates, where it pairs every local candidates
71 with every remote candidates that it receives from the remote peer.
72 - checking the connectivity for each candidate pairs.
73 - concluding the result. Since every possible path combinations are
74 checked, if there is a path to communicate ICE will find it.
75
76
77 \section icestrans_sec Using ICE transport
78
79 The \ref PJNATH_ICE_STREAM_TRANSPORT is a ready to use object which
80 performs the above ICE operations as well as provides application with
81 interface to send and receive data using the negotiated path.
82
83 Please see \ref PJNATH_ICE_STREAM_TRANSPORT on how to use this object.
84
85
86 \section ice_owntransport_sec Creating custom ICE transport
87
88 If the \ref PJNATH_ICE_STREAM_TRANSPORT is not suitable for use
89 for some reason, you will need to implement your own ICE transport,
90 by combining the \ref PJNATH_ICE_SESSION with your own means to
91 send and receive packets. The \ref PJNATH_ICE_STREAM_TRANSPORT
92 provides the best example on how to do this.
93
94
95 \section ice_samples_sec Samples
96
97 The ICE demo sample \src{pjsip-apps/src/samples/icedemo.c} demonstrates how to use
98 \ref PJNATH_ICE_STREAM_TRANSPORT <b>without</b> using signaling
99 protocol such as <b>SIP</b>. It provides interactive user interface
100 to create and manage the ICE sessions as well as to exchange SDP
101 with another ice_demo instance.
102
103 Also see <b>\ref samples_page</b> for other samples.
104 */
105
106