WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJNATH Reference

stun_msg.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __PJNATH_STUN_MSG_H__
20#define __PJNATH_STUN_MSG_H__
21
27#include <pjnath/types.h>
28#include <pj/sock.h>
29
30
32
33
34/* **************************************************************************/
46#define PJ_STUN_MAGIC 0x2112A442
47
48
53{
58
63
68
73
78
83
88
93
98
103
108
114
115
120#define PJ_STUN_GET_METHOD(msg_type) ((msg_type) & 0xFEEF)
121
122
127{
132
137
142
148
149
153#define PJ_STUN_IS_REQUEST(msg_type) (((msg_type) & 0x0110) == 0x0000)
154
155
159#define PJ_STUN_IS_SUCCESS_RESPONSE(msg_type) (((msg_type) & 0x0110) == 0x0100)
160
164#define PJ_STUN_SUCCESS_RESPONSE_BIT (0x0100)
165
166
170#define PJ_STUN_IS_ERROR_RESPONSE(msg_type) (((msg_type) & 0x0110) == 0x0110)
171
175#define PJ_STUN_ERROR_RESPONSE_BIT (0x0110)
176
180#define PJ_STUN_IS_RESPONSE(msg_type) (((msg_type) & 0x0100) == 0x0100)
181
182
186#define PJ_STUN_IS_INDICATION(msg_type) (((msg_type) & 0x0110) == 0x0010)
187
191#define PJ_STUN_INDICATION_BIT (0x0010)
192
193
198{
203
208
213
218
223
228
233
234
239
244
249
250
255
260
265
266
271
272
277
278
283
288
293
294
299
304
309
314
319
324
326
327
328
333{
368 PJ_STUN_ATTR_END_MANDATORY_ATTR,
369
370 PJ_STUN_ATTR_START_EXTENDED_ATTR= 0x8021,
371
379 PJ_STUN_ATTR_END_EXTENDED_ATTR
380
382
383
387typedef enum pj_stun_status
388{
394#if 0
395 /* These were obsolete in recent rfc3489bis */
396 //PJ_STUN_SC_STALE_CREDENTIALS = 430, /**< Stale Credentials */
397 //PJ_STUN_SC_INTEGRITY_CHECK_FAILURE= 431, /**< Integrity Chk Fail */
398 //PJ_STUN_SC_MISSING_USERNAME = 432, /**< Missing Username */
399 //PJ_STUN_SC_USE_TLS = 433, /**< Use TLS */
400 //PJ_STUN_SC_MISSING_REALM = 434, /**< Missing Realm */
401 //PJ_STUN_SC_MISSING_NONCE = 435, /**< Missing Nonce */
402 //PJ_STUN_SC_UNKNOWN_USERNAME = 436, /**< Unknown Username */
403#endif
421
422
445typedef struct pj_stun_msg_hdr
446{
451
457
464
474
476
477
493typedef struct pj_stun_attr_hdr
494{
499
507
509
510
537{
542
548
553
555
556
561typedef struct pj_stun_empty_attr
562{
567
569
570
576{
581
586
588
589
594typedef struct pj_stun_uint_attr
595{
600
605
607
608
614{
619
624
626
627
633{
638
644
648 unsigned length;
649
654
656
657
666{
671
676
678
679
686typedef struct pj_stun_uint_attr pj_stun_fingerprint_attr;
687
688
708{
713
718
723
725
726
734typedef struct pj_stun_string_attr pj_stun_realm_attr;
735
736
744typedef struct pj_stun_string_attr pj_stun_nonce_attr;
745
746
758{
763
767 unsigned attr_count;
768
773
775
776
781typedef struct pj_stun_sockaddr_attr pj_stun_mapped_addr_attr;
782
783
793typedef struct pj_stun_sockaddr_attr pj_stun_xor_mapped_addr_attr;
794
795
802typedef struct pj_stun_string_attr pj_stun_software_attr;
803
804
811typedef struct pj_stun_sockaddr_attr pj_stun_alt_server_attr;
812
813
820typedef struct pj_stun_uint_attr pj_stun_refresh_interval_attr;
821
822
832typedef struct pj_stun_sockaddr_attr pj_stun_response_addr_attr;
833
834
847typedef struct pj_stun_sockaddr_attr pj_stun_changed_addr_attr;
848
849
867typedef struct pj_stun_uint_attr pj_stun_change_request_attr;
868
879typedef struct pj_stun_sockaddr_attr pj_stun_src_addr_attr;
880
881
891typedef struct pj_stun_sockaddr_attr pj_stun_reflected_from_attr;
892
893
901typedef struct pj_stun_string_attr pj_stun_username_attr;
902
903
909typedef struct pj_stun_string_attr pj_stun_password_attr;
910
911
930typedef struct pj_stun_uint_attr pj_stun_channel_number_attr;
931
938#define PJ_STUN_GET_CH_NB(u32) ((pj_uint16_t)(u32>>16))
939
946#define PJ_STUN_SET_CH_NB(chnum) (((pj_uint32_t)chnum) << 16)
947
948
956typedef struct pj_stun_uint_attr pj_stun_lifetime_attr;
957
958
965typedef struct pj_stun_uint_attr pj_stun_bandwidth_attr;
966
967
974typedef struct pj_stun_sockaddr_attr pj_stun_xor_peer_addr_attr;
975
976
984typedef struct pj_stun_binary_attr pj_stun_data_attr;
985
986
993typedef struct pj_stun_sockaddr_attr pj_stun_xor_relayed_addr_attr;
994
995
1013typedef struct pj_stun_uint_attr pj_stun_req_addr_type_attr;
1014
1015
1043typedef struct pj_stun_uint_attr pj_stun_even_port_attr;
1044
1045
1074typedef struct pj_stun_uint_attr pj_stun_req_transport_attr;
1075
1079#define PJ_STUN_GET_RT_PROTO(u32) (u32 >> 24)
1080
1085#define PJ_STUN_SET_RT_PROTO(proto) (((pj_uint32_t)(proto)) << 24)
1086
1087
1096typedef struct pj_stun_empty_attr pj_stun_dont_fragment_attr;
1097
1098
1111typedef struct pj_stun_uint64_attr pj_stun_res_token_attr;
1112
1123typedef struct pj_stun_sockaddr_attr pj_stun_xor_reflected_from_attr;
1124
1132typedef struct pj_stun_uint_attr pj_stun_priority_attr;
1133
1141typedef struct pj_stun_empty_attr pj_stun_use_candidate_attr;
1142
1149typedef struct pj_stun_uint_attr pj_stun_timer_val_attr;
1150
1154typedef struct pj_stun_uint64_attr pj_stun_ice_controlling_attr;
1155
1159typedef struct pj_stun_uint64_attr pj_stun_ice_controlled_attr;
1160
1164typedef struct pj_stun_uint_attr pj_stun_icmp_attr;
1165
1171typedef struct pj_stun_msg
1172{
1177
1181 unsigned attr_count;
1182
1187
1188} pj_stun_msg;
1189
1190
1193{
1199
1206
1213
1222
1223
1231PJ_DECL(const char*) pj_stun_get_method_name(unsigned msg_type);
1232
1233
1241PJ_DECL(const char*) pj_stun_get_class_name(unsigned msg_type);
1242
1243
1251PJ_DECL(const char*) pj_stun_get_attr_name(unsigned attr_type);
1252
1253
1261PJ_DECL(pj_str_t) pj_stun_get_err_reason(int err_code);
1262
1263
1270PJ_DECL(int) pj_stun_set_padding_char(int chr);
1271
1272
1287 unsigned msg_type,
1288 pj_uint32_t magic,
1289 const pj_uint8_t tsx_id[12]);
1290
1305 unsigned msg_type,
1306 pj_uint32_t magic,
1307 const pj_uint8_t tsx_id[12],
1308 pj_stun_msg **p_msg);
1309
1319 const pj_stun_msg *msg);
1320
1338 const pj_stun_msg *req_msg,
1339 unsigned err_code,
1340 const pj_str_t *err_msg,
1341 pj_stun_msg **p_response);
1342
1343
1354 pj_stun_attr_hdr *attr);
1355
1356
1391 pj_uint8_t *pkt_buf,
1392 pj_size_t buf_size,
1393 unsigned options,
1394 const pj_str_t *key,
1395 pj_size_t *p_msg_len);
1396
1417 pj_size_t pdu_len, unsigned options);
1418
1419
1442 const pj_uint8_t *pdu,
1443 pj_size_t pdu_len,
1444 unsigned options,
1445 pj_stun_msg **p_msg,
1446 pj_size_t *p_parsed_len,
1447 pj_stun_msg **p_response);
1448
1461#if PJ_LOG_MAX_LEVEL > 0
1462PJ_DECL(char*) pj_stun_msg_dump(const pj_stun_msg *msg,
1463 char *buffer,
1464 unsigned length,
1465 unsigned *printed_len);
1466#else
1467# define pj_stun_msg_dump(msg, buf, length, printed_len) ""
1468#endif
1469
1470
1485 int attr_type,
1486 unsigned start_index);
1487
1488
1498 const pj_stun_attr_hdr *attr);
1499
1500
1516 int attr_type,
1517 pj_bool_t xor_ed,
1518 const pj_sockaddr_t *addr,
1519 unsigned addr_len);
1520
1537 int attr_type,
1538 pj_bool_t xor_ed,
1539 const pj_sockaddr_t *addr,
1540 unsigned addr_len,
1541 pj_stun_sockaddr_attr **p_attr);
1542
1543
1560 pj_stun_msg *msg,
1561 int attr_type,
1562 pj_bool_t xor_ed,
1563 const pj_sockaddr_t *addr,
1564 unsigned addr_len);
1565
1578 pj_pool_t *pool,
1579 int attr_type,
1580 const pj_str_t *value);
1581
1593 int attr_type,
1594 const pj_str_t *value,
1595 pj_stun_string_attr **p_attr);
1596
1608 pj_stun_msg *msg,
1609 int attr_type,
1610 const pj_str_t *value);
1611
1623 int attr_type,
1624 pj_uint32_t value,
1625 pj_stun_uint_attr **p_attr);
1626
1638 pj_stun_msg *msg,
1639 int attr_type,
1640 pj_uint32_t value);
1641
1642
1654 int attr_type,
1655 const pj_timestamp *value,
1656 pj_stun_uint64_attr **p_attr);
1657
1658
1670 pj_stun_msg *msg,
1671 int attr_type,
1672 const pj_timestamp *value);
1673
1683 pj_stun_msgint_attr **p_attr);
1684
1694 pj_stun_msg *msg);
1695
1708 int err_code,
1709 const pj_str_t *err_reason,
1710 pj_stun_errcode_attr **p_attr);
1711
1712
1725 pj_stun_msg *msg,
1726 int err_code,
1727 const pj_str_t *err_reason);
1728
1741 unsigned attr_cnt,
1742 const pj_uint16_t attr[],
1743 pj_stun_unknown_attr **p_attr);
1744
1756 pj_stun_msg *msg,
1757 unsigned attr_cnt,
1758 const pj_uint16_t attr[]);
1759
1774 pj_pool_t *pool,
1775 int attr_type,
1776 const pj_uint8_t *data,
1777 unsigned length);
1778
1793 int attr_type,
1794 const pj_uint8_t *data,
1795 unsigned length,
1796 pj_stun_binary_attr **p_attr);
1797
1812 pj_stun_msg *msg,
1813 int attr_type,
1814 const pj_uint8_t *data,
1815 unsigned length);
1816
1827 int attr_type,
1828 pj_stun_empty_attr **p_attr);
1829
1840 pj_stun_msg *msg,
1841 int attr_type);
1842
1849
1850
1851#endif /* __PJNATH_STUN_MSG_H__ */
1852
#define PJ_STUN_MAX_ATTR
Definition: config.h:63
pj_status_t pj_stun_string_attr_create(pj_pool_t *pool, int attr_type, const pj_str_t *value, pj_stun_string_attr **p_attr)
const char * pj_stun_get_method_name(unsigned msg_type)
pj_status_t pj_stun_msg_add_uint_attr(pj_pool_t *pool, pj_stun_msg *msg, int attr_type, pj_uint32_t value)
pj_status_t pj_stun_empty_attr_create(pj_pool_t *pool, int attr_type, pj_stun_empty_attr **p_attr)
pj_status_t pj_stun_binary_attr_create(pj_pool_t *pool, int attr_type, const pj_uint8_t *data, unsigned length, pj_stun_binary_attr **p_attr)
pj_status_t pj_stun_msg_add_uint64_attr(pj_pool_t *pool, pj_stun_msg *msg, int attr_type, const pj_timestamp *value)
pj_status_t pj_stun_msg_init(pj_stun_msg *msg, unsigned msg_type, pj_uint32_t magic, const pj_uint8_t tsx_id[12])
pj_stun_msg_type
Definition: stun_msg.h:198
pj_stun_status
Definition: stun_msg.h:388
pj_status_t pj_stun_uint_attr_create(pj_pool_t *pool, int attr_type, pj_uint32_t value, pj_stun_uint_attr **p_attr)
pj_status_t pj_stun_msg_add_string_attr(pj_pool_t *pool, pj_stun_msg *msg, int attr_type, const pj_str_t *value)
const char * pj_stun_get_class_name(unsigned msg_type)
pj_status_t pj_stun_msg_add_sockaddr_attr(pj_pool_t *pool, pj_stun_msg *msg, int attr_type, pj_bool_t xor_ed, const pj_sockaddr_t *addr, unsigned addr_len)
pj_status_t pj_stun_msg_decode(pj_pool_t *pool, const pj_uint8_t *pdu, pj_size_t pdu_len, unsigned options, pj_stun_msg **p_msg, pj_size_t *p_parsed_len, pj_stun_msg **p_response)
pj_stun_attr_hdr * pj_stun_msg_find_attr(const pj_stun_msg *msg, int attr_type, unsigned start_index)
pj_status_t pj_stun_msg_add_empty_attr(pj_pool_t *pool, pj_stun_msg *msg, int attr_type)
pj_status_t pj_stun_binary_attr_init(pj_stun_binary_attr *attr, pj_pool_t *pool, int attr_type, const pj_uint8_t *data, unsigned length)
pj_stun_method_e
Definition: stun_msg.h:53
pj_stun_decode_options
Definition: stun_msg.h:1193
pj_status_t pj_stun_msg_check(const pj_uint8_t *pdu, pj_size_t pdu_len, unsigned options)
pj_status_t pj_stun_string_attr_init(pj_stun_string_attr *attr, pj_pool_t *pool, int attr_type, const pj_str_t *value)
pj_stun_attr_type
Definition: stun_msg.h:333
const char * pj_stun_get_attr_name(unsigned attr_type)
pj_status_t pj_stun_msg_create(pj_pool_t *pool, unsigned msg_type, pj_uint32_t magic, const pj_uint8_t tsx_id[12], pj_stun_msg **p_msg)
pj_status_t pj_stun_uint64_attr_create(pj_pool_t *pool, int attr_type, const pj_timestamp *value, pj_stun_uint64_attr **p_attr)
pj_status_t pj_stun_sockaddr_attr_init(pj_stun_sockaddr_attr *attr, int attr_type, pj_bool_t xor_ed, const pj_sockaddr_t *addr, unsigned addr_len)
int pj_stun_set_padding_char(int chr)
pj_stun_attr_hdr * pj_stun_attr_clone(pj_pool_t *pool, const pj_stun_attr_hdr *attr)
pj_status_t pj_stun_sockaddr_attr_create(pj_pool_t *pool, int attr_type, pj_bool_t xor_ed, const pj_sockaddr_t *addr, unsigned addr_len, pj_stun_sockaddr_attr **p_attr)
pj_status_t pj_stun_msg_encode(pj_stun_msg *msg, pj_uint8_t *pkt_buf, pj_size_t buf_size, unsigned options, const pj_str_t *key, pj_size_t *p_msg_len)
pj_status_t pj_stun_msg_add_attr(pj_stun_msg *msg, pj_stun_attr_hdr *attr)
pj_stun_msg_class_e
Definition: stun_msg.h:127
pj_status_t pj_stun_msg_add_unknown_attr(pj_pool_t *pool, pj_stun_msg *msg, unsigned attr_cnt, const pj_uint16_t attr[])
pj_status_t pj_stun_msg_add_msgint_attr(pj_pool_t *pool, pj_stun_msg *msg)
pj_str_t pj_stun_get_err_reason(int err_code)
pj_status_t pj_stun_msg_create_response(pj_pool_t *pool, const pj_stun_msg *req_msg, unsigned err_code, const pj_str_t *err_msg, pj_stun_msg **p_response)
pj_status_t pj_stun_errcode_attr_create(pj_pool_t *pool, int err_code, const pj_str_t *err_reason, pj_stun_errcode_attr **p_attr)
pj_status_t pj_stun_unknown_attr_create(pj_pool_t *pool, unsigned attr_cnt, const pj_uint16_t attr[], pj_stun_unknown_attr **p_attr)
pj_status_t pj_stun_msgint_attr_create(pj_pool_t *pool, pj_stun_msgint_attr **p_attr)
pj_stun_msg * pj_stun_msg_clone(pj_pool_t *pool, const pj_stun_msg *msg)
pj_status_t pj_stun_msg_add_errcode_attr(pj_pool_t *pool, pj_stun_msg *msg, int err_code, const pj_str_t *err_reason)
pj_status_t pj_stun_msg_add_binary_attr(pj_pool_t *pool, pj_stun_msg *msg, int attr_type, const pj_uint8_t *data, unsigned length)
char * pj_stun_msg_dump(const pj_stun_msg *msg, char *buffer, unsigned length, unsigned *printed_len)
@ PJ_STUN_SHARED_SECRET_ERROR_RESPONSE
Definition: stun_msg.h:232
@ PJ_STUN_REFRESH_RESPONSE
Definition: stun_msg.h:259
@ PJ_STUN_CHANNEL_BIND_REQUEST
Definition: stun_msg.h:298
@ PJ_STUN_BINDING_REQUEST
Definition: stun_msg.h:202
@ PJ_STUN_SHARED_SECRET_REQUEST
Definition: stun_msg.h:222
@ PJ_STUN_BINDING_RESPONSE
Definition: stun_msg.h:207
@ PJ_STUN_SEND_INDICATION
Definition: stun_msg.h:270
@ PJ_STUN_ALLOCATE_REQUEST
Definition: stun_msg.h:238
@ PJ_STUN_ALLOCATE_RESPONSE
Definition: stun_msg.h:243
@ PJ_STUN_CONNECTION_ATTEMPT_INDICATION
Definition: stun_msg.h:323
@ PJ_STUN_CHANNEL_BIND_RESPONSE
Definition: stun_msg.h:303
@ PJ_STUN_BINDING_ERROR_RESPONSE
Definition: stun_msg.h:212
@ PJ_STUN_REFRESH_REQUEST
Definition: stun_msg.h:254
@ PJ_STUN_CONNECTION_BIND_REQUEST
Definition: stun_msg.h:318
@ PJ_STUN_DATA_INDICATION
Definition: stun_msg.h:276
@ PJ_STUN_REFRESH_ERROR_RESPONSE
Definition: stun_msg.h:264
@ PJ_STUN_CHANNEL_BIND_ERROR_RESPONSE
Definition: stun_msg.h:308
@ PJ_STUN_BINDING_INDICATION
Definition: stun_msg.h:217
@ PJ_STUN_CREATE_PERM_REQUEST
Definition: stun_msg.h:282
@ PJ_STUN_CREATE_PERM_ERROR_RESPONSE
Definition: stun_msg.h:292
@ PJ_STUN_ALLOCATE_ERROR_RESPONSE
Definition: stun_msg.h:248
@ PJ_STUN_SHARED_SECRET_RESPONSE
Definition: stun_msg.h:227
@ PJ_STUN_CONNECT_REQUEST
Definition: stun_msg.h:313
@ PJ_STUN_CREATE_PERM_RESPONSE
Definition: stun_msg.h:287
@ PJ_STUN_SC_ROLE_CONFLICT
Definition: stun_msg.h:415
@ PJ_STUN_SC_FORBIDDEN
Definition: stun_msg.h:392
@ PJ_STUN_SC_SERVER_ERROR
Definition: stun_msg.h:416
@ PJ_STUN_SC_UNAUTHORIZED
Definition: stun_msg.h:391
@ PJ_STUN_SC_GLOBAL_FAILURE
Definition: stun_msg.h:419
@ PJ_STUN_SC_CONNECTION_TIMEOUT
Definition: stun_msg.h:412
@ PJ_STUN_SC_STALE_NONCE
Definition: stun_msg.h:405
@ PJ_STUN_SC_UNSUPP_TRANSPORT_PROTO
Definition: stun_msg.h:408
@ PJ_STUN_SC_CONNECTION_FAILURE
Definition: stun_msg.h:411
@ PJ_STUN_SC_OPER_TCP_ONLY
Definition: stun_msg.h:410
@ PJ_STUN_SC_INSUFFICIENT_CAPACITY
Definition: stun_msg.h:417
@ PJ_STUN_SC_WRONG_CREDENTIALS
Definition: stun_msg.h:407
@ PJ_STUN_SC_BAD_REQUEST
Definition: stun_msg.h:390
@ PJ_STUN_SC_ALLOCATION_QUOTA_REACHED
Definition: stun_msg.h:413
@ PJ_STUN_SC_UNKNOWN_ATTRIBUTE
Definition: stun_msg.h:393
@ PJ_STUN_SC_TRANSITIONING
Definition: stun_msg.h:406
@ PJ_STUN_SC_TRY_ALTERNATE
Definition: stun_msg.h:389
@ PJ_STUN_SC_ALLOCATION_MISMATCH
Definition: stun_msg.h:404
@ PJ_STUN_ALLOCATE_METHOD
Definition: stun_msg.h:67
@ PJ_STUN_SHARED_SECRET_METHOD
Definition: stun_msg.h:62
@ PJ_STUN_CONNECTION_ATTEMPT_METHOD
Definition: stun_msg.h:107
@ PJ_STUN_CHANNEL_BIND_METHOD
Definition: stun_msg.h:92
@ PJ_STUN_METHOD_MAX
Definition: stun_msg.h:112
@ PJ_STUN_CONNECT_METHOD
Definition: stun_msg.h:97
@ PJ_STUN_CREATE_PERM_METHOD
Definition: stun_msg.h:87
@ PJ_STUN_DATA_METHOD
Definition: stun_msg.h:82
@ PJ_STUN_CONNECTION_BIND_METHOD
Definition: stun_msg.h:102
@ PJ_STUN_REFRESH_METHOD
Definition: stun_msg.h:72
@ PJ_STUN_SEND_METHOD
Definition: stun_msg.h:77
@ PJ_STUN_BINDING_METHOD
Definition: stun_msg.h:57
@ PJ_STUN_IS_DATAGRAM
Definition: stun_msg.h:1198
@ PJ_STUN_CHECK_PACKET
Definition: stun_msg.h:1205
@ PJ_STUN_NO_FINGERPRINT_CHECK
Definition: stun_msg.h:1220
@ PJ_STUN_NO_AUTHENTICATE
Definition: stun_msg.h:1212
@ PJ_STUN_ATTR_USERNAME
Definition: stun_msg.h:339
@ PJ_STUN_ATTR_UNKNOWN_ATTRIBUTES
Definition: stun_msg.h:343
@ PJ_STUN_ATTR_DATA
Definition: stun_msg.h:350
@ PJ_STUN_ATTR_CHANGED_ADDR
Definition: stun_msg.h:338
@ PJ_STUN_ATTR_MAPPED_ADDR
Definition: stun_msg.h:334
@ PJ_STUN_ATTR_ALTERNATE_SERVER
Definition: stun_msg.h:373
@ PJ_STUN_ATTR_CHANNEL_NUMBER
Definition: stun_msg.h:345
@ PJ_STUN_ATTR_ERROR_CODE
Definition: stun_msg.h:342
@ PJ_STUN_ATTR_ICMP
Definition: stun_msg.h:366
@ PJ_STUN_ATTR_ICE_CONTROLLING
Definition: stun_msg.h:377
@ PJ_STUN_ATTR_MAGIC_COOKIE
Definition: stun_msg.h:347
@ PJ_STUN_ATTR_XOR_PEER_ADDR
Definition: stun_msg.h:349
@ PJ_STUN_ATTR_NONCE
Definition: stun_msg.h:352
@ PJ_STUN_ATTR_REQ_ADDR_TYPE
Definition: stun_msg.h:354
@ PJ_STUN_ATTR_ICE_CONTROLLED
Definition: stun_msg.h:376
@ PJ_STUN_ATTR_USE_CANDIDATE
Definition: stun_msg.h:364
@ PJ_STUN_ATTR_SOFTWARE
Definition: stun_msg.h:372
@ PJ_STUN_ATTR_REQ_TRANSPORT
Definition: stun_msg.h:357
@ PJ_STUN_ATTR_REFLECTED_FROM
Definition: stun_msg.h:344
@ PJ_STUN_ATTR_CHANGE_REQUEST
Definition: stun_msg.h:336
@ PJ_STUN_ATTR_REALM
Definition: stun_msg.h:351
@ PJ_STUN_ATTR_BANDWIDTH
Definition: stun_msg.h:348
@ PJ_STUN_ATTR_TIMER_VAL
Definition: stun_msg.h:360
@ PJ_STUN_ATTR_XOR_REFLECTED_FROM
Definition: stun_msg.h:362
@ PJ_STUN_ATTR_XOR_MAPPED_ADDR
Definition: stun_msg.h:359
@ PJ_STUN_ATTR_RESPONSE_ADDR
Definition: stun_msg.h:335
@ PJ_STUN_ATTR_CONNECTION_ID
Definition: stun_msg.h:365
@ PJ_STUN_ATTR_XOR_RELAYED_ADDR
Definition: stun_msg.h:353
@ PJ_STUN_ATTR_DONT_FRAGMENT
Definition: stun_msg.h:358
@ PJ_STUN_ATTR_REFRESH_INTERVAL
Definition: stun_msg.h:374
@ PJ_STUN_ATTR_SOURCE_ADDR
Definition: stun_msg.h:337
@ PJ_STUN_ATTR_FINGERPRINT
Definition: stun_msg.h:375
@ PJ_STUN_ATTR_PRIORITY
Definition: stun_msg.h:363
@ PJ_STUN_ATTR_RESERVATION_TOKEN
Definition: stun_msg.h:361
@ PJ_STUN_ATTR_EVEN_PORT
Definition: stun_msg.h:356
@ PJ_STUN_ATTR_LIFETIME
Definition: stun_msg.h:346
@ PJ_STUN_ATTR_REQ_ADDR_FAMILY
Definition: stun_msg.h:355
@ PJ_STUN_ATTR_PASSWORD
Definition: stun_msg.h:340
@ PJ_STUN_ATTR_MESSAGE_INTEGRITY
Definition: stun_msg.h:341
@ PJ_STUN_ERROR_CLASS
Definition: stun_msg.h:146
@ PJ_STUN_REQUEST_CLASS
Definition: stun_msg.h:131
@ PJ_STUN_SUCCESS_CLASS
Definition: stun_msg.h:141
@ PJ_STUN_INDICATION_CLASS
Definition: stun_msg.h:136
unsigned char pj_uint8_t
int pj_bool_t
unsigned short pj_uint16_t
size_t pj_size_t
void pj_sockaddr_t
int pj_status_t
unsigned int pj_uint32_t
#define PJ_BEGIN_DECL
#define PJ_END_DECL
Definition: stun_msg.h:494
pj_uint16_t length
Definition: stun_msg.h:506
pj_uint16_t type
Definition: stun_msg.h:498
Definition: stun_msg.h:633
pj_stun_attr_hdr hdr
Definition: stun_msg.h:637
unsigned length
Definition: stun_msg.h:648
pj_uint8_t * data
Definition: stun_msg.h:653
pj_uint32_t magic
Definition: stun_msg.h:643
Definition: stun_msg.h:562
pj_stun_attr_hdr hdr
Definition: stun_msg.h:566
Definition: stun_msg.h:708
pj_str_t reason
Definition: stun_msg.h:722
int err_code
Definition: stun_msg.h:717
pj_stun_attr_hdr hdr
Definition: stun_msg.h:712
Definition: stun_msg.h:446
pj_uint16_t length
Definition: stun_msg.h:456
pj_uint16_t type
Definition: stun_msg.h:450
pj_uint32_t magic
Definition: stun_msg.h:463
pj_uint8_t tsx_id[12]
Definition: stun_msg.h:473
Definition: stun_msg.h:1172
pj_stun_msg_hdr hdr
Definition: stun_msg.h:1176
pj_stun_attr_hdr * attr[PJ_STUN_MAX_ATTR]
Definition: stun_msg.h:1186
unsigned attr_count
Definition: stun_msg.h:1181
Definition: stun_msg.h:666
pj_stun_attr_hdr hdr
Definition: stun_msg.h:670
pj_uint8_t hmac[20]
Definition: stun_msg.h:675
Definition: stun_msg.h:537
pj_stun_attr_hdr hdr
Definition: stun_msg.h:541
pj_sockaddr sockaddr
Definition: stun_msg.h:552
pj_bool_t xor_ed
Definition: stun_msg.h:547
Definition: stun_msg.h:576
pj_stun_attr_hdr hdr
Definition: stun_msg.h:580
pj_str_t value
Definition: stun_msg.h:585
Definition: stun_msg.h:614
pj_timestamp value
Definition: stun_msg.h:623
pj_stun_attr_hdr hdr
Definition: stun_msg.h:618
Definition: stun_msg.h:595
pj_uint32_t value
Definition: stun_msg.h:604
pj_stun_attr_hdr hdr
Definition: stun_msg.h:599
Definition: stun_msg.h:758
pj_uint16_t attrs[PJ_STUN_MAX_ATTR]
Definition: stun_msg.h:772
pj_stun_attr_hdr hdr
Definition: stun_msg.h:762
unsigned attr_count
Definition: stun_msg.h:767
PJNATH types.

 


PJNATH - Open Source NAT traversal helper library supporting STUN, TURN, and ICE
Copyright (C) 2006-2009 Teluu Inc.