- Timestamp:
- Mar 21, 2007 10:05:58 PM (18 years ago)
- Location:
- pjproject/trunk/pjnath
- Files:
-
- 9 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/build/pjnath.dsp
r1091 r1093 96 96 # Begin Source File 97 97 98 SOURCE=..\src\pjnath\ice_mt.c 99 # End Source File 100 # Begin Source File 101 98 102 SOURCE=..\src\pjnath\stun_auth.c 99 103 # End Source File … … 129 133 130 134 SOURCE=..\include\pjnath\ice.h 135 # End Source File 136 # Begin Source File 137 138 SOURCE=..\include\pjnath\ice_mt.h 131 139 # End Source File 132 140 # Begin Source File -
pjproject/trunk/pjnath/build/pjnath.dsw
r1080 r1093 36 36 Package=<4> 37 37 {{{ 38 }}} 39 40 ############################################################################### 41 42 Project: "pjnath_test"=.\pjnath_test.dsp - Package Owner=<4> 43 44 Package=<5> 45 {{{ 46 }}} 47 48 Package=<4> 49 {{{ 50 Begin Project Dependency 51 Project_Dep_Name pjlib 52 End Project Dependency 53 Begin Project Dependency 54 Project_Dep_Name pjlib_util 55 End Project Dependency 56 Begin Project Dependency 57 Project_Dep_Name pjnath 58 End Project Dependency 38 59 }}} 39 60 -
pjproject/trunk/pjnath/include/pjnath.h
r1091 r1093 20 20 #include <pjnath/config.h> 21 21 #include <pjnath/errno.h> 22 #include <pjnath/ice.h> 23 #include <pjnath/ice_mt.h> 22 24 #include <pjnath/stun_auth.h> 23 25 #include <pjnath/stun_config.h> -
pjproject/trunk/pjnath/include/pjnath/ice.h
r1092 r1093 21 21 22 22 /** 23 * @file ice _sock.h24 * @brief ICE socket.23 * @file ice.h 24 * @brief ICE. 25 25 */ 26 26 #include <pjnath/types.h> … … 29 29 #include <pj/timer.h> 30 30 31 /** 32 * @defgroup PJNATH_ICE Interactive Connectivity Establishment (ICE) 33 * @brief Interactive Connectivity Establishment (ICE) 34 * @ingroup PJNATH 35 */ 36 31 37 32 38 PJ_BEGIN_DECL 33 39 34 40 35 /* **************************************************************************/ 36 /** 37 * @defgroup PJNATH_ICE_SOCK ICE Socket 38 * @brief High level ICE socket abstraction. 39 * @ingroup PJNATH 41 /** 42 * @defgroup PJNATH_ICE_STREAM Transport Independent ICE Media Stream 43 * @brief Transport Independent ICE Media Stream 44 * @ingroup PJNATH_ICE 40 45 * @{ 41 46 */ … … 166 171 167 172 pj_pool_t *pool; 173 void *user_data; 168 174 pj_mutex_t *mutex; 169 int af;170 int sock_type;171 175 pj_ice_role role; 172 176 pj_bool_t is_complete; … … 177 181 178 182 /* STUN credentials */ 183 pj_str_t tx_ufrag; 179 184 pj_str_t tx_uname; 180 185 pj_str_t tx_pass; 186 pj_str_t rx_ufrag; 181 187 pj_str_t rx_uname; 182 188 pj_str_t rx_pass; … … 207 213 pj_ice_role role, 208 214 const pj_ice_cb *cb, 209 int af,210 int sock_type,211 215 pj_ice **p_ice); 212 216 PJ_DECL(pj_status_t) pj_ice_destroy(pj_ice *ice); … … 215 219 const pj_sockaddr_t *local_addr, 216 220 unsigned addr_len); 217 PJ_DECL(pj_status_t) pj_ice_add_sock_comp(pj_ice *ice,218 unsigned comp_id,219 pj_sock_t sock);220 221 PJ_DECL(pj_status_t) pj_ice_set_credentials(pj_ice *ice, 221 222 const pj_str_t *local_ufrag, -
pjproject/trunk/pjnath/src/pjnath/ice.c
r1092 r1093 137 137 pj_ice_role role, 138 138 const pj_ice_cb *cb, 139 int af,140 int sock_type,141 139 pj_ice **p_ice) 142 140 { … … 147 145 148 146 PJ_ASSERT_RETURN(stun_cfg && cb && p_ice, PJ_EINVAL); 149 PJ_ASSERT_RETURN(sock_type==PJ_SOCK_DGRAM || sock_type==PJ_SOCK_STREAM,150 PJ_EINVAL);151 147 152 148 if (!name) … … 156 152 ice = PJ_POOL_ZALLOC_T(pool, pj_ice); 157 153 ice->pool = pool; 158 ice->af = af;159 ice->sock_type = sock_type;160 154 ice->role = role; 161 155 … … 436 430 437 431 pj_strdup(ice->pool, &ice->tx_uname, &username); 432 pj_strdup(ice->pool, &ice->tx_ufrag, remote_ufrag); 438 433 pj_strdup(ice->pool, &ice->tx_pass, remote_pass); 439 434 … … 443 438 444 439 pj_strdup(ice->pool, &ice->rx_uname, &username); 440 pj_strdup(ice->pool, &ice->rx_ufrag, local_ufrag); 445 441 pj_strdup(ice->pool, &ice->rx_pass, local_pass); 446 442 … … 482 478 char tmp[128]; 483 479 484 PJ_ASSERT_RETURN(ice && comp_id && type &&local_pref &&480 PJ_ASSERT_RETURN(ice && comp_id && local_pref && 485 481 foundation && addr && base_addr && addr_len, 486 482 PJ_EINVAL); … … 704 700 for (i=0; i<clist->count; ++i) { 705 701 const pj_ice_check *c = &clist->checks[i]; 706 LOG((ice->obj_name, " %d: %s (prio= %u, state=%s)",702 LOG((ice->obj_name, " %d: %s (prio=0x%"PJ_INT64_FMT"x, state=%s)", 707 703 i, dump_check(buffer, sizeof(buffer), c), 708 704 c->prio, check_state_name[c->state])); … … 1102 1098 lcand = check->lcand; 1103 1099 rcand = check->rcand; 1104 comp = &ice->comp[lcand->comp_id];1100 comp = find_comp(ice, lcand->comp_id); 1105 1101 1106 1102 LOG((ice->obj_name, … … 1734 1730 pj_status_t status = PJ_SUCCESS; 1735 1731 pj_ice_comp *comp; 1736 pj_ bool_t is_stun;1732 pj_status_t stun_status; 1737 1733 1738 1734 PJ_ASSERT_RETURN(ice, PJ_EINVAL); … … 1746 1742 } 1747 1743 1748 is_stun= pj_stun_msg_check(pkt, pkt_size, PJ_STUN_IS_DATAGRAM);1749 if ( is_stun) {1744 stun_status = pj_stun_msg_check(pkt, pkt_size, PJ_STUN_IS_DATAGRAM); 1745 if (stun_status == PJ_SUCCESS) { 1750 1746 status = pj_stun_session_on_rx_pkt(comp->stun_sess, pkt, pkt_size, 1751 1747 PJ_STUN_IS_DATAGRAM, -
pjproject/trunk/pjnath/src/pjnath/stun_msg.c
r1085 r1093 482 482 PJ_STUN_ATTR_END_EXTENDED_ATTR-PJ_STUN_ATTR_START_EXTENDED_ATTR); 483 483 484 if (attr_type < PJ_STUN_ATTR_ START_EXTENDED_ATTR)484 if (attr_type < PJ_STUN_ATTR_END_MANDATORY_ATTR) 485 485 desc = &mandatory_attr_desc[attr_type]; 486 486 else if (attr_type >= PJ_STUN_ATTR_START_EXTENDED_ATTR &&
Note: See TracChangeset
for help on using the changeset viewer.