Ignore:
Timestamp:
Mar 2, 2007 7:06:05 PM (17 years ago)
Author:
bennylp
Message:

Finishing up client-side STUN authentication, a simple STUN client, and simple STUN server

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/include/pjlib-util/stun_session.h

    r1021 r1034  
    2424#include <pjlib-util/stun_transaction.h> 
    2525#include <pj/list.h> 
     26#include <pj/timer.h> 
    2627 
    2728PJ_BEGIN_DECL 
     
    140141 
    141142    pj_stun_client_tsx  *client_tsx;    /**< Client STUN transaction.       */ 
    142     pj_uint8_t           client_key[12];/**< Client transaction key.        */ 
     143    pj_uint32_t          msg_magic;     /**< Message magic.                 */ 
     144    pj_uint8_t           msg_key[12];   /**< Message/transaction key.       */ 
    143145 
    144146    void                *pkt;           /**< The STUN packet.               */ 
     
    146148    unsigned             pkt_size;      /**< The actual length of STUN pkt. */ 
    147149 
     150    unsigned             options;       /**< Options specified when sending */ 
    148151    unsigned             addr_len;      /**< Length of destination address. */ 
    149152    const pj_sockaddr_t *dst_addr;      /**< Destination address.           */ 
     153 
     154    pj_timer_entry       res_timer;     /**< Response cache timer.          */ 
    150155}; 
    151156 
     
    155160 * messages. These options may be specified as bitmask. 
    156161 */ 
    157 enum pj_stun_session_option 
     162enum pj_stun_session_send_option 
    158163{ 
    159164    /** 
     
    172177     * Add STUN fingerprint to the message. 
    173178     */ 
    174     PJ_STUN_USE_FINGERPRINT     = 4 
     179    PJ_STUN_USE_FINGERPRINT     = 4, 
     180 
     181    /** 
     182     * Instruct the session to cache outgoing response. This can only be  
     183     * used when sending outgoing response message, and when it's specified, 
     184     * the session will use \a res_cache_msec settings in pj_stun_endpoint 
     185     * as the duration of the cache. 
     186     */ 
     187    PJ_STUN_CACHE_RESPONSE      = 8 
    175188}; 
    176189 
     
    258271                                          const pj_str_t *user, 
    259272                                          const pj_str_t *passwd); 
     273 
    260274 
    261275/** 
     
    396410 * 
    397411 * @param sess      The STUN session instance. 
    398  * @param options   Optional flags, from pj_stun_session_option. 
     412 * @param options   Optional flags, from pj_stun_session_send_option. 
    399413 * @param dst_addr  The destination socket address. 
    400414 * @param addr_len  Length of destination address. 
Note: See TracChangeset for help on using the changeset viewer.