Ignore:
Timestamp:
Mar 20, 2007 10:36:54 PM (17 years ago)
Author:
bennylp
Message:

Today's work

File:
1 edited

Legend:

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

    r1085 r1089  
    2828#include <pjlib-util/resolver.h> 
    2929#include <pj/sock.h> 
     30#include <pj/timer.h> 
     31 
    3032 
    3133PJ_BEGIN_DECL 
     
    6870#define PJ_ICE_MAX_COMP     8 
    6971#define PJ_ICE_MAX_CHECKS   32 
     72#define PJ_ICE_TA_VAL       20 
    7073 
    7174/** 
     
    7477typedef struct pj_ice_comp 
    7578{ 
    76     unsigned        comp_id; 
    77     pj_sock_t       sock; 
     79    unsigned         comp_id; 
     80    pj_sock_t        sock; 
     81    pj_stun_session *stun_sess; 
     82    pj_sockaddr      local_addr; 
    7883} pj_ice_comp; 
    7984 
     
    105110typedef struct pj_ice_check 
    106111{ 
    107     unsigned            cand_id; 
    108     pj_uint32_t         comp_id; 
    109     pj_str_t            foundation; 
    110  
    111     pj_uint64_t         check_prio; 
    112     pj_ice_check_state  check_state; 
    113  
    114     pj_ice_cand_type    rem_type; 
    115     pj_str_t            rem_foundation; 
    116     pj_uint32_t         rem_prio; 
    117     pj_sockaddr         rem_addr; 
    118     pj_sockaddr         rem_base_addr; 
     112    pj_ice_cand         *lcand; 
     113    pj_ice_cand         *rcand; 
     114 
     115    pj_uint64_t          prio; 
     116    pj_ice_check_state   state; 
     117    pj_bool_t            nominated; 
     118    pj_status_t          err_code; 
    119119} pj_ice_check; 
    120120 
     
    132132    unsigned                 count; 
    133133    pj_ice_check             checks[PJ_ICE_MAX_CHECKS]; 
     134    pj_timer_entry           timer; 
    134135} pj_ice_checklist; 
    135136 
     
    176177    pj_ice_role          role; 
    177178    pj_ice_state         state; 
    178  
    179179    pj_ice_cb            cb; 
     180 
     181    pj_stun_config       stun_cfg; 
    180182 
    181183    /* STUN credentials */ 
     
    206208    pj_bool_t            relay_enabled; 
    207209    pj_sockaddr          stun_srv; 
    208  
    209     /* STUN sessions */ 
    210     pj_stun_session     *tx_sess; 
    211     pj_stun_session     *rx_sess; 
    212210}; 
    213211 
    214212 
    215 PJ_DECL(pj_status_t) pj_ice_create(pj_stun_config *cfg, 
     213PJ_DECL(pj_status_t) pj_ice_create(pj_stun_config *stun_cfg, 
    216214                                   const char *name, 
    217215                                   pj_ice_role role, 
     
    257255PJ_DECL(unsigned) pj_ice_get_cand_cnt(pj_ice *ice); 
    258256PJ_DECL(pj_status_t) pj_ice_enum_cands(pj_ice *ice, 
    259                                        unsigned sort_by, 
    260257                                       unsigned *p_count, 
    261258                                       unsigned cand_ids[]); 
    262 PJ_DECL(unsigned) pj_ice_get_default_cand(pj_ice *ice, 
    263                                           int *cand_id); 
     259PJ_DECL(pj_status_t) pj_ice_get_default_cand(pj_ice *ice, 
     260                                             unsigned comp_id, 
     261                                             int *cand_id); 
    264262PJ_DECL(pj_status_t) pj_ice_get_cand(pj_ice *ice, 
    265263                                     unsigned cand_id, 
     
    267265 
    268266PJ_DECL(pj_status_t) pj_ice_create_check_list(pj_ice *ice, 
    269                                               pj_bool_t is_remote_offer, 
    270267                                              unsigned rem_cand_cnt, 
    271268                                              const pj_ice_cand rem_cand[]); 
Note: See TracChangeset for help on using the changeset viewer.