BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJNATH Reference

stun_msg.h
Go to the documentation of this file.
1 /* $Id: stun_msg.h 5987 2019-05-14 09:31:39Z nanang $ */
2 /*
3  * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 #ifndef __PJNATH_STUN_MSG_H__
21 #define __PJNATH_STUN_MSG_H__
22 
28 #include <pjnath/types.h>
29 #include <pj/sock.h>
30 
31 
33 
34 
35 /* **************************************************************************/
47 #define PJ_STUN_MAGIC 0x2112A442
48 
49 
54 {
59 
64 
69 
74 
79 
84 
89 
94 
99 
104 
109 
114 };
115 
116 
121 #define PJ_STUN_GET_METHOD(msg_type) ((msg_type) & 0xFEEF)
122 
123 
128 {
133 
138 
143 
148 };
149 
150 
154 #define PJ_STUN_IS_REQUEST(msg_type) (((msg_type) & 0x0110) == 0x0000)
155 
156 
160 #define PJ_STUN_IS_SUCCESS_RESPONSE(msg_type) (((msg_type) & 0x0110) == 0x0100)
161 
165 #define PJ_STUN_SUCCESS_RESPONSE_BIT (0x0100)
166 
167 
171 #define PJ_STUN_IS_ERROR_RESPONSE(msg_type) (((msg_type) & 0x0110) == 0x0110)
172 
176 #define PJ_STUN_ERROR_RESPONSE_BIT (0x0110)
177 
181 #define PJ_STUN_IS_RESPONSE(msg_type) (((msg_type) & 0x0100) == 0x0100)
182 
183 
187 #define PJ_STUN_IS_INDICATION(msg_type) (((msg_type) & 0x0110) == 0x0010)
188 
192 #define PJ_STUN_INDICATION_BIT (0x0010)
193 
194 
198 typedef enum pj_stun_msg_type
199 {
204 
209 
214 
219 
224 
229 
234 
235 
240 
245 
250 
251 
256 
261 
266 
267 
272 
273 
278 
279 
284 
289 
294 
295 
300 
305 
310 
311 
316 
321 
323 
324 
325 
329 typedef enum pj_stun_attr_type
330 {
365  PJ_STUN_ATTR_END_MANDATORY_ATTR,
366 
367  PJ_STUN_ATTR_START_EXTENDED_ATTR= 0x8021,
368 
376  PJ_STUN_ATTR_END_EXTENDED_ATTR
377 
379 
380 
384 typedef enum pj_stun_status
385 {
391 #if 0
392  /* These were obsolete in recent rfc3489bis */
393  //PJ_STUN_SC_STALE_CREDENTIALS = 430, /**< Stale Credentials */
394  //PJ_STUN_SC_INTEGRITY_CHECK_FAILURE= 431, /**< Integrity Chk Fail */
395  //PJ_STUN_SC_MISSING_USERNAME = 432, /**< Missing Username */
396  //PJ_STUN_SC_USE_TLS = 433, /**< Use TLS */
397  //PJ_STUN_SC_MISSING_REALM = 434, /**< Missing Realm */
398  //PJ_STUN_SC_MISSING_NONCE = 435, /**< Missing Nonce */
399  //PJ_STUN_SC_UNKNOWN_USERNAME = 436, /**< Unknown Username */
400 #endif
418 
419 
442 typedef struct pj_stun_msg_hdr
443 {
448 
454 
461 
471 
473 
474 
490 typedef struct pj_stun_attr_hdr
491 {
496 
504 
506 
507 
533 typedef struct pj_stun_sockaddr_attr
534 {
539 
545 
550 
552 
553 
558 typedef struct pj_stun_empty_attr
559 {
564 
566 
567 
572 typedef struct pj_stun_string_attr
573 {
578 
583 
585 
586 
591 typedef struct pj_stun_uint_attr
592 {
597 
602 
604 
605 
610 typedef struct pj_stun_uint64_attr
611 {
616 
621 
623 
624 
629 typedef struct pj_stun_binary_attr
630 {
635 
641 
645  unsigned length;
646 
651 
653 
654 
662 typedef struct pj_stun_msgint_attr
663 {
668 
672  pj_uint8_t hmac[20];
673 
675 
676 
683 typedef struct pj_stun_uint_attr pj_stun_fingerprint_attr;
684 
685 
704 typedef struct pj_stun_errcode_attr
705 {
710 
714  int err_code;
715 
720 
722 
723 
731 typedef struct pj_stun_string_attr pj_stun_realm_attr;
732 
733 
741 typedef struct pj_stun_string_attr pj_stun_nonce_attr;
742 
743 
754 typedef struct pj_stun_unknown_attr
755 {
760 
764  unsigned attr_count;
765 
770 
772 
773 
778 typedef struct pj_stun_sockaddr_attr pj_stun_mapped_addr_attr;
779 
780 
790 typedef struct pj_stun_sockaddr_attr pj_stun_xor_mapped_addr_attr;
791 
792 
799 typedef struct pj_stun_string_attr pj_stun_software_attr;
800 
801 
808 typedef struct pj_stun_sockaddr_attr pj_stun_alt_server_attr;
809 
810 
817 typedef struct pj_stun_uint_attr pj_stun_refresh_interval_attr;
818 
819 
829 typedef struct pj_stun_sockaddr_attr pj_stun_response_addr_attr;
830 
831 
844 typedef struct pj_stun_sockaddr_attr pj_stun_changed_addr_attr;
845 
846 
864 typedef struct pj_stun_uint_attr pj_stun_change_request_attr;
865 
876 typedef struct pj_stun_sockaddr_attr pj_stun_src_addr_attr;
877 
878 
888 typedef struct pj_stun_sockaddr_attr pj_stun_reflected_from_attr;
889 
890 
898 typedef struct pj_stun_string_attr pj_stun_username_attr;
899 
900 
906 typedef struct pj_stun_string_attr pj_stun_password_attr;
907 
908 
927 typedef struct pj_stun_uint_attr pj_stun_channel_number_attr;
928 
935 #define PJ_STUN_GET_CH_NB(u32) ((pj_uint16_t)(u32>>16))
936 
943 #define PJ_STUN_SET_CH_NB(chnum) (((pj_uint32_t)chnum) << 16)
944 
945 
953 typedef struct pj_stun_uint_attr pj_stun_lifetime_attr;
954 
955 
962 typedef struct pj_stun_uint_attr pj_stun_bandwidth_attr;
963 
964 
971 typedef struct pj_stun_sockaddr_attr pj_stun_xor_peer_addr_attr;
972 
973 
981 typedef struct pj_stun_binary_attr pj_stun_data_attr;
982 
983 
990 typedef struct pj_stun_sockaddr_attr pj_stun_xor_relayed_addr_attr;
991 
992 
1010 typedef struct pj_stun_uint_attr pj_stun_req_addr_type_attr;
1011 
1012 
1040 typedef struct pj_stun_uint_attr pj_stun_even_port_attr;
1041 
1042 
1071 typedef struct pj_stun_uint_attr pj_stun_req_transport_attr;
1072 
1076 #define PJ_STUN_GET_RT_PROTO(u32) (u32 >> 24)
1077 
1082 #define PJ_STUN_SET_RT_PROTO(proto) (((pj_uint32_t)(proto)) << 24)
1083 
1084 
1093 typedef struct pj_stun_empty_attr pj_stun_dont_fragment_attr;
1094 
1095 
1108 typedef struct pj_stun_uint64_attr pj_stun_res_token_attr;
1109 
1120 typedef struct pj_stun_sockaddr_attr pj_stun_xor_reflected_from_attr;
1121 
1129 typedef struct pj_stun_uint_attr pj_stun_priority_attr;
1130 
1138 typedef struct pj_stun_empty_attr pj_stun_use_candidate_attr;
1139 
1146 typedef struct pj_stun_uint_attr pj_stun_timer_val_attr;
1147 
1151 typedef struct pj_stun_uint64_attr pj_stun_ice_controlling_attr;
1152 
1156 typedef struct pj_stun_uint64_attr pj_stun_ice_controlled_attr;
1157 
1161 typedef struct pj_stun_uint_attr pj_stun_icmp_attr;
1162 
1168 typedef struct pj_stun_msg
1169 {
1174 
1178  unsigned attr_count;
1179 
1184 
1185 } pj_stun_msg;
1186 
1187 
1190 {
1196 
1203 
1210 
1218 };
1219 
1220 
1228 PJ_DECL(const char*) pj_stun_get_method_name(unsigned msg_type);
1229 
1230 
1238 PJ_DECL(const char*) pj_stun_get_class_name(unsigned msg_type);
1239 
1240 
1248 PJ_DECL(const char*) pj_stun_get_attr_name(unsigned attr_type);
1249 
1250 
1258 PJ_DECL(pj_str_t) pj_stun_get_err_reason(int err_code);
1259 
1260 
1267 PJ_DECL(int) pj_stun_set_padding_char(int chr);
1268 
1269 
1284  unsigned msg_type,
1286  const pj_uint8_t tsx_id[12]);
1287 
1302  unsigned msg_type,
1304  const pj_uint8_t tsx_id[12],
1305  pj_stun_msg **p_msg);
1306 
1315 PJ_DECL(pj_stun_msg*) pj_stun_msg_clone(pj_pool_t *pool,
1316  const pj_stun_msg *msg);
1317 
1335  const pj_stun_msg *req_msg,
1336  unsigned err_code,
1337  const pj_str_t *err_msg,
1338  pj_stun_msg **p_response);
1339 
1340 
1351  pj_stun_attr_hdr *attr);
1352 
1353 
1388  pj_uint8_t *pkt_buf,
1389  pj_size_t buf_size,
1390  unsigned options,
1391  const pj_str_t *key,
1392  pj_size_t *p_msg_len);
1393 
1413 PJ_DECL(pj_status_t) pj_stun_msg_check(const pj_uint8_t *pdu,
1414  pj_size_t pdu_len, unsigned options);
1415 
1416 
1439  const pj_uint8_t *pdu,
1440  pj_size_t pdu_len,
1441  unsigned options,
1442  pj_stun_msg **p_msg,
1443  pj_size_t *p_parsed_len,
1444  pj_stun_msg **p_response);
1445 
1458 #if PJ_LOG_MAX_LEVEL > 0
1459 PJ_DECL(char*) pj_stun_msg_dump(const pj_stun_msg *msg,
1460  char *buffer,
1461  unsigned length,
1462  unsigned *printed_len);
1463 #else
1464 # define pj_stun_msg_dump(msg, buf, length, printed_len) ""
1465 #endif
1466 
1467 
1482  int attr_type,
1483  unsigned start_index);
1484 
1485 
1495  const pj_stun_attr_hdr *attr);
1496 
1497 
1513  int attr_type,
1514  pj_bool_t xor_ed,
1515  const pj_sockaddr_t *addr,
1516  unsigned addr_len);
1517 
1534  int attr_type,
1535  pj_bool_t xor_ed,
1536  const pj_sockaddr_t *addr,
1537  unsigned addr_len,
1538  pj_stun_sockaddr_attr **p_attr);
1539 
1540 
1557  pj_stun_msg *msg,
1558  int attr_type,
1559  pj_bool_t xor_ed,
1560  const pj_sockaddr_t *addr,
1561  unsigned addr_len);
1562 
1575  pj_pool_t *pool,
1576  int attr_type,
1577  const pj_str_t *value);
1578 
1590  int attr_type,
1591  const pj_str_t *value,
1592  pj_stun_string_attr **p_attr);
1593 
1605  pj_stun_msg *msg,
1606  int attr_type,
1607  const pj_str_t *value);
1608 
1620  int attr_type,
1621  pj_uint32_t value,
1622  pj_stun_uint_attr **p_attr);
1623 
1635  pj_stun_msg *msg,
1636  int attr_type,
1637  pj_uint32_t value);
1638 
1639 
1651  int attr_type,
1652  const pj_timestamp *value,
1653  pj_stun_uint64_attr **p_attr);
1654 
1655 
1667  pj_stun_msg *msg,
1668  int attr_type,
1669  const pj_timestamp *value);
1670 
1680  pj_stun_msgint_attr **p_attr);
1681 
1691  pj_stun_msg *msg);
1692 
1705  int err_code,
1706  const pj_str_t *err_reason,
1707  pj_stun_errcode_attr **p_attr);
1708 
1709 
1722  pj_stun_msg *msg,
1723  int err_code,
1724  const pj_str_t *err_reason);
1725 
1738  unsigned attr_cnt,
1739  const pj_uint16_t attr[],
1740  pj_stun_unknown_attr **p_attr);
1741 
1753  pj_stun_msg *msg,
1754  unsigned attr_cnt,
1755  const pj_uint16_t attr[]);
1756 
1771  pj_pool_t *pool,
1772  int attr_type,
1773  const pj_uint8_t *data,
1774  unsigned length);
1775 
1790  int attr_type,
1791  const pj_uint8_t *data,
1792  unsigned length,
1793  pj_stun_binary_attr **p_attr);
1794 
1809  pj_stun_msg *msg,
1810  int attr_type,
1811  const pj_uint8_t *data,
1812  unsigned length);
1813 
1824  int attr_type,
1825  pj_stun_empty_attr **p_attr);
1826 
1837  pj_stun_msg *msg,
1838  int attr_type);
1839 
1846 
1847 
1848 #endif /* __PJNATH_STUN_MSG_H__ */
1849 
Definition: stun_msg.h:203
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[])
Definition: stun_msg.h:142
Definition: stun_msg.h:342
Definition: stun_msg.h:374
Definition: stun_msg.h:358
Definition: stun_msg.h:332
Definition: stun_msg.h:147
pj_uint32_t magic
Definition: stun_msg.h:640
pj_stun_attr_hdr hdr
Definition: stun_msg.h:667
Definition: stun_msg.h:414
Definition: stun_msg.h:349
Definition: stun_msg.h:402
Definition: stun_msg.h:304
Definition: stun_msg.h:1202
Definition: stun_msg.h:299
pj_stun_attr_hdr hdr
Definition: stun_msg.h:759
int pj_bool_t
Definition: stun_msg.h:343
Definition: stun_msg.h:213
pj_status_t pj_stun_msg_add_empty_attr(pj_pool_t *pool, pj_stun_msg *msg, int attr_type)
Definition: stun_msg.h:255
Definition: stun_msg.h:137
unsigned attr_count
Definition: stun_msg.h:1178
Definition: stun_msg.h:389
pj_timestamp value
Definition: stun_msg.h:620
Definition: stun_msg.h:373
Definition: stun_msg.h:98
Definition: stun_msg.h:341
Definition: stun_msg.h:331
Definition: stun_msg.h:320
Definition: stun_msg.h:629
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])
Definition: stun_msg.h:233
pj_uint16_t type
Definition: stun_msg.h:495
Definition: stun_msg.h:354
Definition: stun_msg.h:558
Definition: stun_msg.h:88
Definition: stun_msg.h:352
Definition: stun_msg.h:357
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)
pj_status_t pj_stun_msg_add_attr(pj_stun_msg *msg, pj_stun_attr_hdr *attr)
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_uint32_t value
Definition: stun_msg.h:601
Definition: stun_msg.h:410
Definition: stun_msg.h:283
Definition: stun_msg.h:404
pj_str_t reason
Definition: stun_msg.h:719
Definition: stun_msg.h:83
Definition: stun_msg.h:372
Definition: stun_msg.h:265
Definition: stun_msg.h:350
Definition: stun_msg.h:572
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_uint16_t length
Definition: stun_msg.h:503
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)
pj_stun_msg_type
Definition: stun_msg.h:198
Definition: stun_msg.h:388
Definition: stun_msg.h:93
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)
pj_stun_attr_hdr hdr
Definition: stun_msg.h:596
pj_stun_attr_hdr * pj_stun_attr_clone(pj_pool_t *pool, const pj_stun_attr_hdr *attr)
pj_stun_attr_hdr hdr
Definition: stun_msg.h:538
pj_stun_msg * pj_stun_msg_clone(pj_pool_t *pool, const pj_stun_msg *msg)
Definition: stun_msg.h:103
const char * pj_stun_get_method_name(unsigned msg_type)
int pj_status_t
Definition: stun_msg.h:333
pj_str_t value
Definition: stun_msg.h:582
const char * pj_stun_get_class_name(unsigned msg_type)
Definition: stun_msg.h:1209
pj_stun_attr_hdr hdr
Definition: stun_msg.h:634
Definition: stun_msg.h:704
void pj_sockaddr_t
Definition: stun_msg.h:442
Definition: stun_msg.h:408
Definition: stun_msg.h:361
Definition: stun_msg.h:412
Definition: stun_msg.h:1217
Definition: stun_msg.h:309
Definition: stun_msg.h:610
Definition: stun_msg.h:403
pj_stun_msg_class_e
Definition: stun_msg.h:127
Definition: stun_msg.h:387
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)
unsigned int pj_uint32_t
Definition: stun_msg.h:347
pj_status_t pj_stun_empty_attr_create(pj_pool_t *pool, int attr_type, pj_stun_empty_attr **p_attr)
pj_stun_status
Definition: stun_msg.h:384
pj_uint8_t tsx_id[12]
Definition: stun_msg.h:470
int err_code
Definition: stun_msg.h:714
Definition: stun_msg.h:244
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)
Definition: stun_msg.h:409
Definition: stun_msg.h:277
pj_status_t pj_stun_msg_add_uint_attr(pj_pool_t *pool, pj_stun_msg *msg, int attr_type, pj_uint32_t value)
#define PJ_END_DECL
Definition: stun_msg.h:228
Definition: stun_msg.h:334
Definition: stun_msg.h:591
Definition: stun_msg.h:348
pj_stun_attr_hdr hdr
Definition: stun_msg.h:563
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_msgint_attr_create(pj_pool_t *pool, pj_stun_msgint_attr **p_attr)
Definition: stun_msg.h:223
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)
Definition: stun_msg.h:108
Definition: stun_msg.h:353
Definition: stun_msg.h:249
Definition: stun_msg.h:416
Definition: stun_msg.h:113
Definition: stun_msg.h:293
Definition: stun_msg.h:370
const char * pj_stun_get_attr_name(unsigned attr_type)
pj_stun_attr_hdr hdr
Definition: stun_msg.h:577
Definition: stun_msg.h:533
Definition: stun_msg.h:360
Definition: stun_msg.h:339
unsigned attr_count
Definition: stun_msg.h:764
Definition: stun_msg.h:405
Definition: stun_msg.h:260
#define PJ_BEGIN_DECL
Definition: stun_msg.h:344
Definition: stun_msg.h:359
pj_stun_attr_hdr * pj_stun_msg_find_attr(const pj_stun_msg *msg, int attr_type, unsigned start_index)
pj_stun_attr_hdr hdr
Definition: stun_msg.h:709
pj_status_t pj_stun_msg_check(const pj_uint8_t *pdu, pj_size_t pdu_len, unsigned options)
Definition: stun_msg.h:662
Definition: stun_msg.h:407
Definition: stun_msg.h:336
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_add_msgint_attr(pj_pool_t *pool, pj_stun_msg *msg)
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)
#define PJ_STUN_MAX_ATTR
Definition: config.h:64
Definition: stun_msg.h:351
Definition: stun_msg.h:363
Definition: stun_msg.h:386
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_stun_decode_options
Definition: stun_msg.h:1189
unsigned char pj_uint8_t
Definition: stun_msg.h:390
Definition: stun_msg.h:754
Definition: stun_msg.h:355
Definition: stun_msg.h:208
Definition: stun_msg.h:271
Definition: stun_msg.h:369
char * pj_stun_msg_dump(const pj_stun_msg *msg, char *buffer, unsigned length, unsigned *printed_len)
pj_stun_method_e
Definition: stun_msg.h:53
Definition: stun_msg.h:288
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:329
Definition: stun_msg.h:338
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_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)
Definition: stun_msg.h:337
pj_stun_attr_hdr hdr
Definition: stun_msg.h:615
int pj_stun_set_padding_char(int chr)
Definition: stun_msg.h:239
Definition: stun_msg.h:490
Definition: stun_msg.h:1195
Definition: stun_msg.h:78
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_uint32_t magic
Definition: stun_msg.h:460
unsigned length
Definition: stun_msg.h:645
Definition: stun_msg.h:413
Definition: stun_msg.h:58
Definition: stun_msg.h:345
Definition: stun_msg.h:356
Definition: stun_msg.h:1168
pj_sockaddr sockaddr
Definition: stun_msg.h:549
Definition: stun_msg.h:335
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)
Definition: stun_msg.h:132
Definition: stun_msg.h:362
pj_uint16_t length
Definition: stun_msg.h:453
Definition: stun_msg.h:315
Definition: stun_msg.h:73
pj_stun_msg_hdr hdr
Definition: stun_msg.h:1173
pj_uint8_t * data
Definition: stun_msg.h:650
Definition: stun_msg.h:401
pj_bool_t xor_ed
Definition: stun_msg.h:544
Definition: stun_msg.h:218
unsigned short pj_uint16_t
Definition: stun_msg.h:346
pj_uint16_t type
Definition: stun_msg.h:447
Definition: stun_msg.h:340
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_str_t pj_stun_get_err_reason(int err_code)
Definition: stun_msg.h:63
size_t pj_size_t
Definition: stun_msg.h:68
Definition: stun_msg.h:371
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)

 


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