Changeset 2642 for pjproject/trunk/pjnath/include/pjnath/types.h
- Timestamp:
- Apr 22, 2009 5:20:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/include/pjnath/types.h
r2589 r2642 73 73 */ 74 74 75 /* Doxygen documentation below: */76 77 /**78 79 @mainpage PJNATH - Open Source ICE, STUN, and TURN Library80 81 \n82 This is the documentation of PJNATH, an Open Source library providing83 NAT traversal helper functionalities by using standard based protocols84 such as STUN, TURN, and ICE.85 86 \n87 \n88 89 \section lib_comps Library Components90 91 \subsection comp_stun STUN92 93 Session Traversal Utilities (STUN, or previously known as Simple94 Traversal of User Datagram Protocol (UDP) Through Network Address95 Translators (NAT)s), is a lightweight protocol that serves as a tool for96 application protocols in dealing with NAT traversal. It allows a client97 to determine the IP address and port allocated to them by a NAT and to98 keep NAT bindings open.99 100 This version of PJNATH implements the following STUN RFC:101 - <A HREF="http://www.ietf.org/rfc/rfc5389.txt"><B>RFC 5389</b></A>:102 Session Traversal Utilities for (NAT) (STUN),103 104 105 \subsection comp_turn TURN106 107 Traversal Using Relays around NAT (TURN) allows the host to control the108 operation of the relay and to exchange packets with its peers using the relay.109 110 Features:111 - <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-behave-turn-13.txt">112 <B>draft-ietf-behave-turn-13</B></A>: Obtaining Relay Addresses113 from Simple Traversal Underneath NAT (STUN)114 - DNS SRV resolution115 - Fallback to DNS A resolution if SRV record is not found116 - UDP and TCP connection to TURN server117 - automatic management of allocation refresh118 119 120 121 \subsection comp_ice ICE122 123 Interactive Connectivity Establishment (ICE) is a standard based124 methodology for traversing Network Address Translator (NAT). This125 implementation is aimed to provide a usable and generic ICE transports126 for different types of application, including but not limited to127 the usage of ICE in SIP/SDP offer/answer.128 129 130 This version of PJNATH implements the following ICE draft:131 - <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-mmusic-ice-19.txt">132 <B>draft-ietf-mmusic-ice-19.txt</B></A> draft. The PJNATH ICE133 134 135 \subsection comp_natck NAT Classification Utility136 137 The PJNATH library also provides NAT classification utility as138 described in <A HREF="http://www.ietf.org/rfc/rfc3489.txt">RFC 3489</A>.139 While the practice to detect the NAT type to assist NAT traversal140 has been deprecated in favor of ICE, the information may still be141 useful for troubleshooting purposes, hence the utility is provided.142 143 144 \n145 \n146 147 \section lib_org Library Organization148 149 The PJNATH library consists of many components with each providing150 specific functionality that may or may not be of the interests of151 applications (or application developers). This section attempts to152 give brief overview on the components provided by PJNATH.153 154 The PJNATH components from the highest layer to the lower layer are155 as follows.156 157 158 \n159 160 \subsection user_comp High-level Transport Objects161 162 PJNATH library provides some high-level objects that may be used163 by applications:164 165 166 \subsubsection stun_sock STUN Transport167 168 The \ref PJNATH_STUN_SOCK provides asynchronous UDP like socket transport169 with the additional capability to query the publicly mapped transport170 address (using STUN resolution), to refresh the NAT binding, and to171 demultiplex internal STUN messages from application data (the172 application data may be a STUN message as well).173 174 175 \subsubsection turn_sock TURN Client Transport176 177 The \ref PJNATH_TURN_SOCK may be used by the application to send and178 receive data via TURN server. For more information please see the179 documentation of \ref PJNATH_TURN_SOCK.180 181 182 \subsubsection ice_strans ICE Stream Transport183 184 The \ref PJNATH_ICE_STREAM_TRANSPORT provides transport interface to185 send and receive data through connection that is negotiated186 with ICE protocol. The \ref PJNATH_ICE_STREAM_TRANSPORT naturally187 contains both STUN Transport and \ref PJNATH_TURN_SOCK.188 189 The \ref PJNATH_ICE_STREAM_TRANSPORT interface is suitable for both190 SIP or non-SIP use. For SIP use, application may prefer to use the191 ICE media transport in PJMEDIA instead where it has been integrated192 with the SDP offer and answer mechanism.193 194 195 \subsubsection natck NAT Classification Utility196 197 PJNATH also provides \a PJNATH_NAT_DETECT to assist troubleshooting198 of problems related to NAT traversal.199 200 201 202 \n203 204 205 \subsection sessions Transport Independent Sessions Layer206 207 Right below the high level transports objects are the transport208 independent sessions. These sessions don't have access to sockets,209 so higher level objects (such as transports) must give incoming210 packets to the sessions and provide callback to be called by211 sessions to send outgoing packets.212 213 214 \subsubsection ice_sess ICE Session215 216 The \ref PJNATH_ICE_SESSION is used by the \ref PJNATH_ICE_STREAM_TRANSPORT217 and contains the actual logic of the ICE negotiation.218 219 220 \subsubsection turn_sess TURN Session221 222 The \ref PJNATH_TURN_SESSION is used by the \ref PJNATH_TURN_SOCK223 and it contains TURN protocol logic. Implementors may implement224 other types of TURN client connection (such as TURN TLS client)225 by utilizing this session.226 227 228 \subsubsection stun_sess STUN Session229 230 The \ref PJNATH_STUN_SESSION manages STUN message exchange between231 a client and server (or vice versa). It manages \ref PJNATH_STUN_TRANSACTION232 for sending or receiving requests and \ref PJNATH_STUN_AUTH for both233 both incoming and outgoing STUN messages.234 235 The \ref PJNATH_STUN_SESSION is naturally used by the \ref PJNATH_TURN_SESSION236 and \ref PJNATH_ICE_SESSION237 238 239 \n240 241 \subsection stun_tsx STUN Transaction Layer242 243 The \ref PJNATH_STUN_TRANSACTION is a thin layer to manage retransmission244 of STUN requests.245 246 247 \n248 249 250 \subsection stun_msg STUN Messaging Layer251 252 At the very bottom of the PJNATH components is the \ref PJNATH_STUN_MSG253 layer. The API contains various representation of STUN messaging components254 and it provides API to encode and decode STUN messages.255 256 257 258 \n259 \n260 261 \section class_dia Class Diagram262 263 264 The following class diagram shows the interactions between objects in265 PJNATH:266 267 \image html UML-class-diagram.png "Class Diagram"268 \image latex UML-class-diagram.png "Class Diagram"269 270 271 272 \n273 \n274 275 \section samples Sample Applications276 277 278 Some sample applications have been provided with PJNATH, and it's available279 under <tt>pjnath/src</tt> directory:280 281 - <b>pjturn-client</b>: this is a stand-alone, console based TURN client282 application to be used as a demonstration for PJNATH TURN client283 transport API and for simple testing against TURN server implementations.284 The client supports both UDP and TCP connection to the TURN server.285 286 - <b>pjturn-srv</b>: this is a simple TURN server to be used for testing287 purposes. It supports both UDP and TCP connections to the clients.288 289 290 */291 292 /**293 * @defgroup PJNATH_STUN STUN Library294 * @brief Open source STUN library295 *296 * This module contains implementation of STUN library in PJNATH -297 * the open source NAT helper containing STUN and ICE.298 */299 300 75 #endif /* __PJNATH_TYPES_H__ */ 301 76
Note: See TracChangeset
for help on using the changeset viewer.