Home --> Documentations --> PJNATH Reference

stun_msg.h
Go to the documentation of this file.
1 /* $Id: stun_msg.h 5527 2017-01-18 03:50:32Z ming $ */
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 };
100 
101 
106 #define PJ_STUN_GET_METHOD(msg_type) ((msg_type) & 0xFEEF)
107 
108 
113 {
118 
123 
128 
133 };
134 
135 
139 #define PJ_STUN_IS_REQUEST(msg_type) (((msg_type) & 0x0110) == 0x0000)
140 
141 
145 #define PJ_STUN_IS_SUCCESS_RESPONSE(msg_type) (((msg_type) & 0x0110) == 0x0100)
146 
150 #define PJ_STUN_SUCCESS_RESPONSE_BIT (0x0100)
151 
152 
156 #define PJ_STUN_IS_ERROR_RESPONSE(msg_type) (((msg_type) & 0x0110) == 0x0110)
157 
161 #define PJ_STUN_ERROR_RESPONSE_BIT (0x0110)
162 
166 #define PJ_STUN_IS_RESPONSE(msg_type) (((msg_type) & 0x0100) == 0x0100)
167 
168 
172 #define PJ_STUN_IS_INDICATION(msg_type) (((msg_type) & 0x0110) == 0x0010)
173 
177 #define PJ_STUN_INDICATION_BIT (0x0010)
178 
179 
183 typedef enum pj_stun_msg_type
184 {
189 
194 
199 
204 
209 
214 
219 
220 
225 
230 
235 
236 
241 
246 
251 
252 
257 
258 
263 
264 
269 
274 
279 
280 
285 
290 
295 
297 
298 
299 
303 typedef enum pj_stun_attr_type
304 {
338  PJ_STUN_ATTR_END_MANDATORY_ATTR,
339 
340  PJ_STUN_ATTR_START_EXTENDED_ATTR= 0x8021,
341 
349  PJ_STUN_ATTR_END_EXTENDED_ATTR
350 
352 
353 
357 typedef enum pj_stun_status
358 {
364 #if 0
365  /* These were obsolete in recent rfc3489bis */
366  //PJ_STUN_SC_STALE_CREDENTIALS = 430, /**< Stale Credentials */
367  //PJ_STUN_SC_INTEGRITY_CHECK_FAILURE= 431, /**< Integrity Chk Fail */
368  //PJ_STUN_SC_MISSING_USERNAME = 432, /**< Missing Username */
369  //PJ_STUN_SC_USE_TLS = 433, /**< Use TLS */
370  //PJ_STUN_SC_MISSING_REALM = 434, /**< Missing Realm */
371  //PJ_STUN_SC_MISSING_NONCE = 435, /**< Missing Nonce */
372  //PJ_STUN_SC_UNKNOWN_USERNAME = 436, /**< Unknown Username */
373 #endif
391 
392 
415 typedef struct pj_stun_msg_hdr
416 {
421 
427 
434 
444 
446 
447 
463 typedef struct pj_stun_attr_hdr
464 {
469 
477 
479 
480 
506 typedef struct pj_stun_sockaddr_attr
507 {
512 
518 
523 
525 
526 
531 typedef struct pj_stun_empty_attr
532 {
537 
539 
540 
545 typedef struct pj_stun_string_attr
546 {
551 
556 
558 
559 
564 typedef struct pj_stun_uint_attr
565 {
570 
575 
577 
578 
583 typedef struct pj_stun_uint64_attr
584 {
589 
594 
596 
597 
602 typedef struct pj_stun_binary_attr
603 {
608 
614 
618  unsigned length;
619 
624 
626 
627 
635 typedef struct pj_stun_msgint_attr
636 {
641 
646 
648 
649 
656 typedef struct pj_stun_uint_attr pj_stun_fingerprint_attr;
657 
658 
677 typedef struct pj_stun_errcode_attr
678 {
683 
687  int err_code;
688 
693 
695 
696 
704 typedef struct pj_stun_string_attr pj_stun_realm_attr;
705 
706 
714 typedef struct pj_stun_string_attr pj_stun_nonce_attr;
715 
716 
727 typedef struct pj_stun_unknown_attr
728 {
733 
737  unsigned attr_count;
738 
743 
745 
746 
751 typedef struct pj_stun_sockaddr_attr pj_stun_mapped_addr_attr;
752 
753 
763 typedef struct pj_stun_sockaddr_attr pj_stun_xor_mapped_addr_attr;
764 
765 
772 typedef struct pj_stun_string_attr pj_stun_software_attr;
773 
774 
781 typedef struct pj_stun_sockaddr_attr pj_stun_alt_server_attr;
782 
783 
790 typedef struct pj_stun_uint_attr pj_stun_refresh_interval_attr;
791 
792 
802 typedef struct pj_stun_sockaddr_attr pj_stun_response_addr_attr;
803 
804 
817 typedef struct pj_stun_sockaddr_attr pj_stun_changed_addr_attr;
818 
819 
837 typedef struct pj_stun_uint_attr pj_stun_change_request_attr;
838 
849 typedef struct pj_stun_sockaddr_attr pj_stun_src_addr_attr;
850 
851 
861 typedef struct pj_stun_sockaddr_attr pj_stun_reflected_from_attr;
862 
863 
871 typedef struct pj_stun_string_attr pj_stun_username_attr;
872 
873 
879 typedef struct pj_stun_string_attr pj_stun_password_attr;
880 
881 
900 typedef struct pj_stun_uint_attr pj_stun_channel_number_attr;
901 
908 #define PJ_STUN_GET_CH_NB(u32) ((pj_uint16_t)(u32>>16))
909 
916 #define PJ_STUN_SET_CH_NB(chnum) (((pj_uint32_t)chnum) << 16)
917 
918 
926 typedef struct pj_stun_uint_attr pj_stun_lifetime_attr;
927 
928 
935 typedef struct pj_stun_uint_attr pj_stun_bandwidth_attr;
936 
937 
944 typedef struct pj_stun_sockaddr_attr pj_stun_xor_peer_addr_attr;
945 
946 
954 typedef struct pj_stun_binary_attr pj_stun_data_attr;
955 
956 
963 typedef struct pj_stun_sockaddr_attr pj_stun_xor_relayed_addr_attr;
964 
965 
983 typedef struct pj_stun_uint_attr pj_stun_req_addr_type_attr;
984 
985 
1013 typedef struct pj_stun_uint_attr pj_stun_even_port_attr;
1014 
1015 
1044 typedef struct pj_stun_uint_attr pj_stun_req_transport_attr;
1045 
1049 #define PJ_STUN_GET_RT_PROTO(u32) (u32 >> 24)
1050 
1055 #define PJ_STUN_SET_RT_PROTO(proto) (((pj_uint32_t)(proto)) << 24)
1056 
1057 
1066 typedef struct pj_stun_empty_attr pj_stun_dont_fragment_attr;
1067 
1068 
1081 typedef struct pj_stun_uint64_attr pj_stun_res_token_attr;
1082 
1093 typedef struct pj_stun_sockaddr_attr pj_stun_xor_reflected_from_attr;
1094 
1102 typedef struct pj_stun_uint_attr pj_stun_priority_attr;
1103 
1111 typedef struct pj_stun_empty_attr pj_stun_use_candidate_attr;
1112 
1119 typedef struct pj_stun_uint_attr pj_stun_timer_val_attr;
1120 
1124 typedef struct pj_stun_uint64_attr pj_stun_ice_controlling_attr;
1125 
1129 typedef struct pj_stun_uint64_attr pj_stun_ice_controlled_attr;
1130 
1134 typedef struct pj_stun_uint_attr pj_stun_icmp_attr;
1135 
1141 typedef struct pj_stun_msg
1142 {
1147 
1151  unsigned attr_count;
1152 
1157 
1158 } pj_stun_msg;
1159 
1160 
1163 {
1169 
1176 
1183 
1191 };
1192 
1193 
1201 PJ_DECL(const char*) pj_stun_get_method_name(unsigned msg_type);
1202 
1203 
1211 PJ_DECL(const char*) pj_stun_get_class_name(unsigned msg_type);
1212 
1213 
1221 PJ_DECL(const char*) pj_stun_get_attr_name(unsigned attr_type);
1222 
1223 
1231 PJ_DECL(pj_str_t) pj_stun_get_err_reason(int err_code);
1232 
1233 
1240 PJ_DECL(int) pj_stun_set_padding_char(int chr);
1241 
1242 
1257  unsigned msg_type,
1258  pj_uint32_t magic,
1259  const pj_uint8_t tsx_id[12]);
1260 
1275  unsigned msg_type,
1276  pj_uint32_t magic,
1277  const pj_uint8_t tsx_id[12],
1278  pj_stun_msg **p_msg);
1279 
1288 PJ_DECL(pj_stun_msg*) pj_stun_msg_clone(pj_pool_t *pool,
1289  const pj_stun_msg *msg);
1290 
1308  const pj_stun_msg *req_msg,
1309  unsigned err_code,
1310  const pj_str_t *err_msg,
1311  pj_stun_msg **p_response);
1312 
1313 
1324  pj_stun_attr_hdr *attr);
1325 
1326 
1361  pj_uint8_t *pkt_buf,
1362  pj_size_t buf_size,
1363  unsigned options,
1364  const pj_str_t *key,
1365  pj_size_t *p_msg_len);
1366 
1386 PJ_DECL(pj_status_t) pj_stun_msg_check(const pj_uint8_t *pdu,
1387  pj_size_t pdu_len, unsigned options);
1388 
1389 
1412  const pj_uint8_t *pdu,
1413  pj_size_t pdu_len,
1414  unsigned options,
1415  pj_stun_msg **p_msg,
1416  pj_size_t *p_parsed_len,
1417  pj_stun_msg **p_response);
1418 
1431 #if PJ_LOG_MAX_LEVEL > 0
1432 PJ_DECL(char*) pj_stun_msg_dump(const pj_stun_msg *msg,
1433  char *buffer,
1434  unsigned length,
1435  unsigned *printed_len);
1436 #else
1437 # define pj_stun_msg_dump(msg, buf, length, printed_len) ""
1438 #endif
1439 
1440 
1455  int attr_type,
1456  unsigned start_index);
1457 
1458 
1468  const pj_stun_attr_hdr *attr);
1469 
1470 
1486  int attr_type,
1487  pj_bool_t xor_ed,
1488  const pj_sockaddr_t *addr,
1489  unsigned addr_len);
1490 
1507  int attr_type,
1508  pj_bool_t xor_ed,
1509  const pj_sockaddr_t *addr,
1510  unsigned addr_len,
1511  pj_stun_sockaddr_attr **p_attr);
1512 
1513 
1530  pj_stun_msg *msg,
1531  int attr_type,
1532  pj_bool_t xor_ed,
1533  const pj_sockaddr_t *addr,
1534  unsigned addr_len);
1535 
1548  pj_pool_t *pool,
1549  int attr_type,
1550  const pj_str_t *value);
1551 
1563  int attr_type,
1564  const pj_str_t *value,
1565  pj_stun_string_attr **p_attr);
1566 
1578  pj_stun_msg *msg,
1579  int attr_type,
1580  const pj_str_t *value);
1581 
1593  int attr_type,
1594  pj_uint32_t value,
1595  pj_stun_uint_attr **p_attr);
1596 
1608  pj_stun_msg *msg,
1609  int attr_type,
1610  pj_uint32_t value);
1611 
1612 
1624  int attr_type,
1625  const pj_timestamp *value,
1626  pj_stun_uint64_attr **p_attr);
1627 
1628 
1640  pj_stun_msg *msg,
1641  int attr_type,
1642  const pj_timestamp *value);
1643 
1653  pj_stun_msgint_attr **p_attr);
1654 
1664  pj_stun_msg *msg);
1665 
1678  int err_code,
1679  const pj_str_t *err_reason,
1680  pj_stun_errcode_attr **p_attr);
1681 
1682 
1695  pj_stun_msg *msg,
1696  int err_code,
1697  const pj_str_t *err_reason);
1698 
1711  unsigned attr_cnt,
1712  const pj_uint16_t attr[],
1713  pj_stun_unknown_attr **p_attr);
1714 
1726  pj_stun_msg *msg,
1727  unsigned attr_cnt,
1728  const pj_uint16_t attr[]);
1729 
1744  pj_pool_t *pool,
1745  int attr_type,
1746  const pj_uint8_t *data,
1747  unsigned length);
1748 
1763  int attr_type,
1764  const pj_uint8_t *data,
1765  unsigned length,
1766  pj_stun_binary_attr **p_attr);
1767 
1782  pj_stun_msg *msg,
1783  int attr_type,
1784  const pj_uint8_t *data,
1785  unsigned length);
1786 
1797  int attr_type,
1798  pj_stun_empty_attr **p_attr);
1799 
1810  pj_stun_msg *msg,
1811  int attr_type);
1812 
1818 PJ_END_DECL
1819 
1820 
1821 #endif /* __PJNATH_STUN_MSG_H__ */
1822 
Definition: stun_msg.h:188
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:127
Definition: stun_msg.h:316
Definition: stun_msg.h:347
Definition: stun_msg.h:332
Definition: stun_msg.h:306
Definition: stun_msg.h:132
pj_uint32_t magic
Definition: stun_msg.h:613
pj_stun_attr_hdr hdr
Definition: stun_msg.h:640
Definition: stun_msg.h:387
Definition: stun_msg.h:323
Definition: stun_msg.h:375
Definition: stun_msg.h:289
Definition: stun_msg.h:1175
Definition: stun_msg.h:284
pj_stun_attr_hdr hdr
Definition: stun_msg.h:732
int pj_bool_t
Definition: stun_msg.h:317
Definition: stun_msg.h:198
pj_status_t pj_stun_msg_add_empty_attr(pj_pool_t *pool, pj_stun_msg *msg, int attr_type)
Definition: stun_msg.h:240
Definition: stun_msg.h:122
unsigned attr_count
Definition: stun_msg.h:1151
Definition: stun_msg.h:362
pj_timestamp value
Definition: stun_msg.h:593
Definition: stun_msg.h:346
Definition: stun_msg.h:315
pj_uint16_t attrs[PJ_STUN_MAX_ATTR]
Definition: stun_msg.h:742
Definition: stun_msg.h:305
Definition: stun_msg.h:602
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:218
pj_uint16_t type
Definition: stun_msg.h:468
Definition: stun_msg.h:328
Definition: stun_msg.h:531
Definition: stun_msg.h:88
Definition: stun_msg.h:326
Definition: stun_msg.h:331
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:574
Definition: stun_msg.h:383
Definition: stun_msg.h:268
Definition: stun_msg.h:377
pj_str_t reason
Definition: stun_msg.h:692
Definition: stun_msg.h:83
Definition: stun_msg.h:345
Definition: stun_msg.h:250
Definition: stun_msg.h:324
Definition: stun_msg.h:545
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:476
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:183
Definition: stun_msg.h:361
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:569
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:511
pj_stun_msg * pj_stun_msg_clone(pj_pool_t *pool, const pj_stun_msg *msg)
pj_stun_attr_hdr * attr[PJ_STUN_MAX_ATTR]
Definition: stun_msg.h:1156
const char * pj_stun_get_method_name(unsigned msg_type)
int pj_status_t
Definition: stun_msg.h:307
pj_str_t value
Definition: stun_msg.h:555
const char * pj_stun_get_class_name(unsigned msg_type)
Definition: stun_msg.h:1182
pj_stun_attr_hdr hdr
Definition: stun_msg.h:607
Definition: stun_msg.h:677
void pj_sockaddr_t
Definition: stun_msg.h:415
Definition: stun_msg.h:381
Definition: stun_msg.h:335
Definition: stun_msg.h:385
Definition: stun_msg.h:1190
Definition: stun_msg.h:294
Definition: stun_msg.h:583
Definition: stun_msg.h:376
pj_stun_msg_class_e
Definition: stun_msg.h:112
Definition: stun_msg.h:360
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:321
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:357
pj_uint8_t tsx_id[12]
Definition: stun_msg.h:443
int err_code
Definition: stun_msg.h:687
Definition: stun_msg.h:229
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:382
Definition: stun_msg.h:262
pj_status_t pj_stun_msg_add_uint_attr(pj_pool_t *pool, pj_stun_msg *msg, int attr_type, pj_uint32_t value)
Definition: stun_msg.h:213
Definition: stun_msg.h:308
Definition: stun_msg.h:564
Definition: stun_msg.h:322
pj_stun_attr_hdr hdr
Definition: stun_msg.h:536
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:208
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:327
Definition: stun_msg.h:234
Definition: stun_msg.h:389
Definition: stun_msg.h:98
Definition: stun_msg.h:278
Definition: stun_msg.h:343
const char * pj_stun_get_attr_name(unsigned attr_type)
pj_stun_attr_hdr hdr
Definition: stun_msg.h:550
Definition: stun_msg.h:506
Definition: stun_msg.h:334
Definition: stun_msg.h:313
unsigned attr_count
Definition: stun_msg.h:737
pj_uint8_t hmac[20]
Definition: stun_msg.h:645
Definition: stun_msg.h:378
Definition: stun_msg.h:245
#define PJ_BEGIN_DECL
Definition: stun_msg.h:318
Definition: stun_msg.h:333
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:682
pj_status_t pj_stun_msg_check(const pj_uint8_t *pdu, pj_size_t pdu_len, unsigned options)
Definition: stun_msg.h:635
Definition: stun_msg.h:380
Definition: stun_msg.h:310
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:325
Definition: stun_msg.h:336
Definition: stun_msg.h:359
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:1162
unsigned char pj_uint8_t
Definition: stun_msg.h:363
Definition: stun_msg.h:727
Definition: stun_msg.h:329
Definition: stun_msg.h:193
Definition: stun_msg.h:256
Definition: stun_msg.h:342
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:273
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:303
Definition: stun_msg.h:312
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:311
pj_stun_attr_hdr hdr
Definition: stun_msg.h:588
int pj_stun_set_padding_char(int chr)
Definition: stun_msg.h:224
Definition: stun_msg.h:463
Definition: stun_msg.h:1168
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:433
unsigned length
Definition: stun_msg.h:618
Definition: stun_msg.h:386
Definition: stun_msg.h:58
Definition: stun_msg.h:319
Definition: stun_msg.h:330
Definition: stun_msg.h:1141
pj_sockaddr sockaddr
Definition: stun_msg.h:522
Definition: stun_msg.h:309
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:117
pj_uint16_t length
Definition: stun_msg.h:426
Definition: stun_msg.h:73
pj_stun_msg_hdr hdr
Definition: stun_msg.h:1146
pj_uint8_t * data
Definition: stun_msg.h:623
Definition: stun_msg.h:374
pj_bool_t xor_ed
Definition: stun_msg.h:517
Definition: stun_msg.h:203
unsigned short pj_uint16_t
Definition: stun_msg.h:320
pj_uint16_t type
Definition: stun_msg.h:420
Definition: stun_msg.h:314
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:344
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.