Ignore:
Timestamp:
Apr 22, 2009 5:20:24 PM (15 years ago)
Author:
bennylp
Message:

Part of ticket #780: enhance the PJNATH doxygen documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/include/pjnath/types.h

    r2589 r2642  
    7373 */ 
    7474 
    75 /* Doxygen documentation below: */ 
    76  
    77 /** 
    78  
    79 @mainpage PJNATH - Open Source ICE, STUN, and TURN Library 
    80  
    81 \n 
    82 This is the documentation of PJNATH, an Open Source library providing 
    83 NAT traversal helper functionalities by using standard based protocols 
    84 such as STUN, TURN, and ICE. 
    85  
    86 \n 
    87 \n 
    88  
    89 \section lib_comps Library Components 
    90  
    91 \subsection comp_stun STUN 
    92  
    93 Session Traversal Utilities (STUN, or previously known as Simple  
    94 Traversal of User Datagram Protocol (UDP) Through Network Address  
    95 Translators (NAT)s), is a lightweight protocol that serves as a tool for 
    96 application protocols in dealing with NAT traversal. It allows a client 
    97 to determine the IP address and port allocated to them by a NAT and to  
    98 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 TURN 
    106  
    107 Traversal Using Relays around NAT (TURN) allows the host to control the 
    108 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 Addresses  
    113    from Simple Traversal Underneath NAT (STUN) 
    114  - DNS SRV resolution 
    115  - Fallback to DNS A resolution if SRV record is not found 
    116  - UDP and TCP connection to TURN server 
    117  - automatic management of allocation refresh 
    118  
    119  
    120  
    121 \subsection comp_ice ICE 
    122  
    123 Interactive Connectivity Establishment (ICE) is a standard based  
    124 methodology for traversing Network Address Translator (NAT). This 
    125 implementation is aimed to provide a usable and generic ICE transports 
    126 for different types of application, including but not limited to 
    127 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 ICE 
    133  
    134  
    135 \subsection comp_natck NAT Classification Utility 
    136  
    137 The PJNATH library also provides NAT classification utility as  
    138 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 traversal 
    140 has been deprecated in favor of ICE, the information may still be 
    141 useful for troubleshooting purposes, hence the utility is provided. 
    142  
    143  
    144 \n 
    145 \n 
    146  
    147 \section lib_org Library Organization 
    148  
    149 The PJNATH library consists of many components with each providing 
    150 specific functionality that may or may not be of the interests of  
    151 applications (or application developers). This section attempts to  
    152 give brief overview on the components provided by PJNATH. 
    153  
    154 The PJNATH components from the highest layer to the lower layer are 
    155 as follows. 
    156  
    157  
    158 \n 
    159  
    160 \subsection user_comp High-level Transport Objects 
    161  
    162 PJNATH library provides some high-level objects that may be used 
    163 by applications: 
    164  
    165  
    166 \subsubsection stun_sock STUN Transport 
    167  
    168 The \ref PJNATH_STUN_SOCK provides asynchronous UDP like socket transport 
    169 with the additional capability to query the publicly mapped transport 
    170 address (using STUN resolution), to refresh the NAT binding, and to 
    171 demultiplex internal STUN messages from application data (the  
    172 application data may be a STUN message as well). 
    173  
    174  
    175 \subsubsection turn_sock TURN Client Transport 
    176  
    177 The \ref PJNATH_TURN_SOCK may be used by the application to send and 
    178 receive data via TURN server. For more information please see the 
    179 documentation of \ref PJNATH_TURN_SOCK. 
    180  
    181  
    182 \subsubsection ice_strans ICE Stream Transport 
    183  
    184 The \ref PJNATH_ICE_STREAM_TRANSPORT provides transport interface to 
    185 send and receive data through connection that is negotiated 
    186 with ICE protocol. The \ref PJNATH_ICE_STREAM_TRANSPORT naturally  
    187 contains both STUN Transport and \ref PJNATH_TURN_SOCK. 
    188  
    189 The \ref PJNATH_ICE_STREAM_TRANSPORT interface is suitable for both 
    190 SIP or non-SIP use. For SIP use, application may prefer to use the 
    191 ICE media transport in PJMEDIA instead where it has been integrated 
    192 with the SDP offer and answer mechanism. 
    193  
    194  
    195 \subsubsection natck NAT Classification Utility 
    196  
    197 PJNATH also provides \a PJNATH_NAT_DETECT to assist troubleshooting 
    198 of problems related to NAT traversal. 
    199  
    200  
    201  
    202 \n 
    203  
    204  
    205 \subsection sessions Transport Independent Sessions Layer 
    206  
    207 Right below the high level transports objects are the transport 
    208 independent sessions. These sessions don't have access to sockets, 
    209 so higher level objects (such as transports) must give incoming 
    210 packets to the sessions and provide callback to be called by 
    211 sessions to send outgoing packets. 
    212  
    213  
    214 \subsubsection ice_sess ICE Session 
    215  
    216 The \ref PJNATH_ICE_SESSION is used by the \ref PJNATH_ICE_STREAM_TRANSPORT 
    217 and contains the actual logic of the ICE negotiation. 
    218  
    219  
    220 \subsubsection turn_sess TURN Session 
    221  
    222 The \ref PJNATH_TURN_SESSION is used by the \ref PJNATH_TURN_SOCK 
    223 and it contains TURN protocol logic. Implementors may implement 
    224 other types of TURN client connection (such as TURN TLS client) 
    225 by utilizing this session. 
    226  
    227  
    228 \subsubsection stun_sess STUN Session 
    229  
    230 The \ref PJNATH_STUN_SESSION manages STUN message exchange between 
    231 a client and server (or vice versa). It manages \ref PJNATH_STUN_TRANSACTION 
    232 for sending or receiving requests and \ref PJNATH_STUN_AUTH for both 
    233 both incoming and outgoing STUN messages.  
    234  
    235 The \ref PJNATH_STUN_SESSION is naturally used by the \ref PJNATH_TURN_SESSION 
    236 and \ref PJNATH_ICE_SESSION 
    237  
    238  
    239 \n 
    240  
    241 \subsection stun_tsx STUN Transaction Layer 
    242  
    243 The \ref PJNATH_STUN_TRANSACTION is a thin layer to manage retransmission 
    244 of STUN requests. 
    245  
    246  
    247 \n 
    248  
    249  
    250 \subsection stun_msg STUN Messaging Layer 
    251  
    252 At the very bottom of the PJNATH components is the \ref PJNATH_STUN_MSG 
    253 layer. The API contains various representation of STUN messaging components 
    254 and it provides API to encode and decode STUN messages. 
    255  
    256  
    257  
    258 \n 
    259 \n 
    260  
    261 \section class_dia Class Diagram 
    262  
    263  
    264 The following class diagram shows the interactions between objects in 
    265 PJNATH: 
    266  
    267 \image html UML-class-diagram.png "Class Diagram" 
    268 \image latex UML-class-diagram.png "Class Diagram" 
    269  
    270  
    271  
    272 \n 
    273 \n 
    274  
    275 \section samples Sample Applications 
    276  
    277  
    278 Some sample applications have been provided with PJNATH, and it's available 
    279 under <tt>pjnath/src</tt> directory: 
    280  
    281    - <b>pjturn-client</b>: this is a stand-alone, console based TURN client 
    282      application to be used as a demonstration for PJNATH TURN client  
    283      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 testing 
    287      purposes. It supports both UDP and TCP connections to the clients. 
    288  
    289  
    290 */ 
    291  
    292 /** 
    293  * @defgroup PJNATH_STUN STUN Library 
    294  * @brief Open source STUN library 
    295  * 
    296  * This module contains implementation of STUN library in PJNATH - 
    297  * the open source NAT helper containing STUN and ICE. 
    298  */ 
    299  
    30075#endif  /* __PJNATH_TYPES_H__ */ 
    30176 
Note: See TracChangeset for help on using the changeset viewer.