diff options
Diffstat (limited to 'tinyNET/src/ice/tnet_ice_candidate.h')
-rwxr-xr-x | tinyNET/src/ice/tnet_ice_candidate.h | 92 |
1 files changed, 45 insertions, 47 deletions
diff --git a/tinyNET/src/ice/tnet_ice_candidate.h b/tinyNET/src/ice/tnet_ice_candidate.h index d2cb126..749192d 100755 --- a/tinyNET/src/ice/tnet_ice_candidate.h +++ b/tinyNET/src/ice/tnet_ice_candidate.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -59,54 +59,52 @@ TNET_BEGIN_DECLS #define TNET_ICE_CANDIDATE_FOUND_SIZE_PREF 15 -typedef enum tnet_ice_cand_type_e -{ - tnet_ice_cand_type_unknown, - tnet_ice_cand_type_host, - tnet_ice_cand_type_srflx, - tnet_ice_cand_type_prflx, - tnet_ice_cand_type_relay +typedef enum tnet_ice_cand_type_e { + tnet_ice_cand_type_unknown, + tnet_ice_cand_type_host, + tnet_ice_cand_type_srflx, + tnet_ice_cand_type_prflx, + tnet_ice_cand_type_relay } tnet_ice_cand_type_t; -typedef struct tnet_ice_candidate_s -{ - TSK_DECLARE_OBJECT; - - tnet_ice_cand_type_t type_e; - uint8_t foundation[33]; // 1*32ice-char - uint32_t comp_id; // 1*5DIGIT - char* transport_str; // "UP" / token - enum tnet_socket_type_e transport_e; - uint32_t priority; // 1*10DIGIST [1 - (2**31 - 1)] - char* cand_type_str; // "host" / "srflx" / "prflx" / "relay" / "token" - tnet_ip_t connection_addr; - tnet_port_t port; - tsk_params_L_t *extension_att_list; - - tsk_bool_t is_ice_jingle; - tsk_bool_t is_rtp; - tsk_bool_t is_video; - uint16_t local_pref; // [0 - 65535] - - char* ufrag; - char* pwd; - - struct tnet_socket_s* socket; - struct{ - char* nonce; - char* realm; - char* srflx_addr; - tnet_stun_transac_id_t transac_id; - tnet_port_t srflx_port; - } stun; - struct { - struct tnet_turn_session_s* ss; - char* relay_addr; - tnet_port_t relay_port; - } turn; - - char *tostring; +typedef struct tnet_ice_candidate_s { + TSK_DECLARE_OBJECT; + + tnet_ice_cand_type_t type_e; + uint8_t foundation[33]; // 1*32ice-char + uint32_t comp_id; // 1*5DIGIT + char* transport_str; // "UP" / token + enum tnet_socket_type_e transport_e; + uint32_t priority; // 1*10DIGIST [1 - (2**31 - 1)] + char* cand_type_str; // "host" / "srflx" / "prflx" / "relay" / "token" + tnet_ip_t connection_addr; + tnet_port_t port; + tsk_params_L_t *extension_att_list; + + tsk_bool_t is_ice_jingle; + tsk_bool_t is_rtp; + tsk_bool_t is_video; + uint16_t local_pref; // [0 - 65535] + + char* ufrag; + char* pwd; + + struct tnet_socket_s* socket; + struct { + char* nonce; + char* realm; + char* srflx_addr; + tnet_stun_transac_id_t transac_id; + tnet_port_t srflx_port; + } stun; + struct { + struct tnet_turn_session_s* ss; + char* relay_addr; + tnet_port_t relay_port; + } turn; + + char *tostring; } tnet_ice_candidate_t; |