Ignore:
Timestamp:
Jun 6, 2008 2:47:10 PM (16 years ago)
Author:
bennylp
Message:

Major major modifications related to ticket #485 (support for TURN-07):

  • Added STUN socket transport pj_stun_sock
  • Integration of TURN-07 to ICE
  • Major refactoring in ICE stream transport to make it simpler
  • Major modification (i.e. API change) in almost everywhere else
  • Much more elaborate STUN, TURN, and ICE tests in pjnath-test
File:
1 edited

Legend:

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

    r1913 r1988  
    214214struct pj_stun_tx_data 
    215215{ 
     216    /** PJLIB list interface */ 
    216217    PJ_DECL_LIST_MEMBER(struct pj_stun_tx_data); 
    217218 
     
    238239    pj_timer_entry       res_timer;     /**< Response cache timer.          */ 
    239240}; 
     241 
     242 
     243/** 
     244 * These are the flags to control the message logging in the STUN session. 
     245 */ 
     246typedef enum pj_stun_sess_msg_log_flag 
     247{ 
     248    PJ_STUN_SESS_LOG_TX_REQ=1,  /**< Log outgoing STUN requests.    */ 
     249    PJ_STUN_SESS_LOG_TX_RES=2,  /**< Log outgoing STUN responses.   */ 
     250    PJ_STUN_SESS_LOG_TX_IND=4,  /**< Log outgoing STUN indications. */ 
     251 
     252    PJ_STUN_SESS_LOG_RX_REQ=8,  /**< Log incoming STUN requests.    */ 
     253    PJ_STUN_SESS_LOG_RX_RES=16, /**< Log incoming STUN responses    */ 
     254    PJ_STUN_SESS_LOG_RX_IND=32  /**< Log incoming STUN indications  */ 
     255} pj_stun_sess_msg_log_flag; 
    240256 
    241257 
     
    259275 
    260276/** 
    261  * Destroy the STUN session. 
    262  * 
    263  * @param sess      The STUN session instance. 
    264  * 
    265  * @return          PJ_SUCCESS on success, or the appropriate error code. 
     277 * Destroy the STUN session and all objects created in the context of 
     278 * this session. 
     279 * 
     280 * @param sess      The STUN session instance. 
     281 * 
     282 * @return          PJ_SUCCESS on success, or the appropriate error code. 
     283 *                  This function will return PJ_EPENDING if the operation 
     284 *                  cannot be performed immediately because callbacks are 
     285 *                  being called; in this case the session will be destroyed 
     286 *                  as soon as the last callback returns. 
    266287 */ 
    267288PJ_DECL(pj_status_t) pj_stun_session_destroy(pj_stun_session *sess); 
     
    334355                                                pj_stun_auth_type auth_type, 
    335356                                                const pj_stun_auth_cred *cred); 
     357/** 
     358 * Configure message logging. By default all flags are enabled. 
     359 * 
     360 * @param sess      The STUN session instance. 
     361 * @param flags     Bitmask combination of #pj_stun_sess_msg_log_flag 
     362 */ 
     363PJ_DECL(void) pj_stun_session_set_log(pj_stun_session *sess, 
     364                                      unsigned flags); 
    336365 
    337366/** 
     
    382411 * 
    383412 * @param sess      The STUN session instance. 
    384  * @param req       The STUN request where the response is to be created. 
     413 * @param rdata     The STUN request where the response is to be created. 
    385414 * @param err_code  Error code to be set in the response, if error response 
    386415 *                  is to be created, according to pj_stun_status enumeration. 
     
    433462 * 
    434463 * @return          PJ_SUCCESS on success, or the appropriate error code. 
     464 *                  This function will return PJNATH_ESTUNDESTROYED if  
     465 *                  application has destroyed the session in  
     466 *                  \a on_send_msg() callback. 
    435467 */ 
    436468PJ_DECL(pj_status_t) pj_stun_session_send_msg(pj_stun_session *sess, 
     
    450482 * @param sess      The STUN session instance. 
    451483 * @param rdata     The STUN request message to be responded. 
    452  * @param err_code  Error code to be set in the response, if error response 
     484 * @param code      Error code to be set in the response, if error response 
    453485 *                  is to be created, according to pj_stun_status enumeration. 
    454486 *                  This argument MUST be zero if successful response is 
     
    473505 * 
    474506 * @return          PJ_SUCCESS on success, or the appropriate error code. 
     507 *                  This function will return PJNATH_ESTUNDESTROYED if  
     508 *                  application has destroyed the session in  
     509 *                  \a on_send_msg() callback. 
    475510 */ 
    476511PJ_DECL(pj_status_t) pj_stun_session_respond(pj_stun_session *sess,  
     
    497532 * 
    498533 * @return          PJ_SUCCESS if transaction is successfully cancelled. 
     534 *                  This function will return PJNATH_ESTUNDESTROYED if  
     535 *                  application has destroyed the session in  
     536 *                  \a on_request_complete() callback. 
    499537 */ 
    500538PJ_DECL(pj_status_t) pj_stun_session_cancel_req(pj_stun_session *sess, 
     
    512550 * 
    513551 * @return          PJ_SUCCESS on success, or the appropriate error. 
     552 *                  This function will return PJNATH_ESTUNDESTROYED if  
     553 *                  application has destroyed the session in \a on_send_msg() 
     554 *                  callback. 
    514555 */ 
    515556PJ_DECL(pj_status_t) pj_stun_session_retransmit_req(pj_stun_session *sess, 
     
    549590 * 
    550591 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     592 *                      This function will return PJNATH_ESTUNDESTROYED if  
     593 *                      application has destroyed the session in one of the 
     594 *                      callback. 
    551595 */ 
    552596PJ_DECL(pj_status_t) pj_stun_session_on_rx_pkt(pj_stun_session *sess, 
Note: See TracChangeset for help on using the changeset viewer.