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

config.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_CONFIG_H__
20#define __PJNATH_CONFIG_H__
21
22
28#include <pj/types.h>
29
38/* **************************************************************************
39 * GENERAL
40 */
41
47#ifndef PJNATH_ERROR_LEVEL
48# define PJNATH_ERROR_LEVEL 1
49#endif
50
51
52/* **************************************************************************
53 * STUN CONFIGURATION
54 */
55
62#ifndef PJ_STUN_MAX_ATTR
63# define PJ_STUN_MAX_ATTR 16
64#endif
65
74#ifndef PJ_STUN_RTO_VALUE
75# define PJ_STUN_RTO_VALUE 100
76#endif
77
78
86#ifndef PJ_STUN_TIMEOUT_VALUE
87# define PJ_STUN_TIMEOUT_VALUE (16 * PJ_STUN_RTO_VALUE)
88#endif
89
90
96#ifndef PJ_STUN_MAX_TRANSMIT_COUNT
97# define PJ_STUN_MAX_TRANSMIT_COUNT 7
98#endif
99
100
106#ifndef PJ_STUN_RES_CACHE_DURATION
107# define PJ_STUN_RES_CACHE_DURATION 10000
108#endif
109
110
114#ifndef PJ_STUN_MAX_PKT_LEN
115# define PJ_STUN_MAX_PKT_LEN 800
116#endif
117
118
122#define PJ_STUN_PORT 3478
123
124
130#ifndef PJ_STUN_STRING_ATTR_PAD_CHR
131# define PJ_STUN_STRING_ATTR_PAD_CHR 0
132#endif
133
134
140#ifndef PJ_STUN_OLD_STYLE_MI_FINGERPRINT
141# define PJ_STUN_OLD_STYLE_MI_FINGERPRINT 0
142#endif
143
144
145/* **************************************************************************
146 * STUN TRANSPORT CONFIGURATION
147 */
148
152#ifndef PJ_STUN_SOCK_PKT_LEN
153# define PJ_STUN_SOCK_PKT_LEN 2000
154#endif
155
156
160#ifndef PJ_STUN_KEEP_ALIVE_SEC
161# define PJ_STUN_KEEP_ALIVE_SEC 15
162#endif
163
164
165/* **************************************************************************
166 * TURN CONFIGURATION
167 */
168
172#ifndef PJ_TURN_MAX_DNS_SRV_CNT
173# define PJ_TURN_MAX_DNS_SRV_CNT 4
174#endif
175
176
180#ifndef PJ_TURN_MAX_PKT_LEN
181# define PJ_TURN_MAX_PKT_LEN 3000
182#endif
183
184
189#ifndef PJ_TURN_PERM_TIMEOUT
190# define PJ_TURN_PERM_TIMEOUT 300
191#endif
192
193
198#ifndef PJ_TURN_CHANNEL_TIMEOUT
199# define PJ_TURN_CHANNEL_TIMEOUT 600
200#endif
201
202
208#ifndef PJ_TURN_REFRESH_SEC_BEFORE
209# define PJ_TURN_REFRESH_SEC_BEFORE 60
210#endif
211
212
218#ifndef PJ_TURN_KEEP_ALIVE_SEC
219# define PJ_TURN_KEEP_ALIVE_SEC 15
220#endif
221
226#ifndef PJ_TURN_MAX_TCP_CONN_CNT
227# define PJ_TURN_MAX_TCP_CONN_CNT 8
228#endif
229
230/* **************************************************************************
231 * ICE CONFIGURATION
232 */
233
239#ifndef PJ_ICE_MAX_CAND
240# define PJ_ICE_MAX_CAND 16
241#endif
242
243
249#ifndef PJ_ICE_ST_MAX_CAND
250# define PJ_ICE_ST_MAX_CAND 8
251#endif
252
253
260#ifndef PJ_ICE_MAX_STUN
261# define PJ_ICE_MAX_STUN 2
262#endif
263
264
271#ifndef PJ_ICE_MAX_TURN
272# define PJ_ICE_MAX_TURN 3
273#endif
274
275
280#ifndef PJ_ICE_COMP_BITS
281# define PJ_ICE_COMP_BITS 1
282#endif
283
284
288#define PJ_ICE_MAX_COMP (1<<PJ_ICE_COMP_BITS)
289
293#ifndef PJNATH_ICE_PRIO_STD
294# define PJNATH_ICE_PRIO_STD 1
295#endif
296
297
301#ifndef PJ_ICE_CAND_TYPE_PREF_BITS
302# if PJNATH_ICE_PRIO_STD
303# define PJ_ICE_CAND_TYPE_PREF_BITS 8
304# else
305# define PJ_ICE_CAND_TYPE_PREF_BITS 2
306# endif
307#endif
308
309
321#ifndef PJ_ICE_LOCAL_PREF_BITS
322# define PJ_ICE_LOCAL_PREF_BITS 0
323#endif
324
325
331#ifndef PJ_ICE_MAX_CHECKS
332# define PJ_ICE_MAX_CHECKS 32
333#endif
334
335
341#ifndef PJ_ICE_TA_VAL
342# define PJ_ICE_TA_VAL 20
343#endif
344
345
360#ifndef PJ_ICE_CANCEL_ALL
361# define PJ_ICE_CANCEL_ALL 1
362#endif
363
364
381#ifndef ICE_CONTROLLED_AGENT_WAIT_NOMINATION_TIMEOUT
382# define ICE_CONTROLLED_AGENT_WAIT_NOMINATION_TIMEOUT 10000
383#endif
384
385
393#ifndef PJ_ICE_NOMINATED_CHECK_DELAY
394# define PJ_ICE_NOMINATED_CHECK_DELAY (4*PJ_STUN_RTO_VALUE)
395#endif
396
397
408#ifndef PJ_ICE_SESS_KEEP_ALIVE_MIN
409# define PJ_ICE_SESS_KEEP_ALIVE_MIN 20
410#endif
411
412/* Warn about deprecated macro */
413#ifdef PJ_ICE_ST_KEEP_ALIVE_MIN
414# error PJ_ICE_ST_KEEP_ALIVE_MIN is deprecated
415#endif
416
427#ifndef PJ_ICE_SESS_KEEP_ALIVE_MAX_RAND
428# define PJ_ICE_SESS_KEEP_ALIVE_MAX_RAND 5
429#endif
430
431/* Warn about deprecated macro */
432#ifdef PJ_ICE_ST_KEEP_ALIVE_MAX_RAND
433# error PJ_ICE_ST_KEEP_ALIVE_MAX_RAND is deprecated
434#endif
435
436
443#ifndef PJ_ICE_UFRAG_LEN
444# define PJ_ICE_UFRAG_LEN 8
445#endif
446
447
454#ifndef PJ_ICE_PWD_LEN
455# define PJ_ICE_PWD_LEN 24
456#endif
457
458
465#ifndef PJ_ICE_ST_USE_TURN_PERMANENT_PERM
466# define PJ_ICE_ST_USE_TURN_PERMANENT_PERM PJ_FALSE
467#endif
468
469
489#ifndef PJ_TRICKLE_ICE_END_OF_CAND_TIMEOUT
490# define PJ_TRICKLE_ICE_END_OF_CAND_TIMEOUT 40
491#endif
492
493
495#ifndef PJNATH_POOL_LEN_ICE_SESS
496# define PJNATH_POOL_LEN_ICE_SESS 512
497#endif
498
500#ifndef PJNATH_POOL_INC_ICE_SESS
501# define PJNATH_POOL_INC_ICE_SESS 512
502#endif
503
505#ifndef PJNATH_POOL_LEN_ICE_STRANS
506# define PJNATH_POOL_LEN_ICE_STRANS 1000
507#endif
508
510#ifndef PJNATH_POOL_INC_ICE_STRANS
511# define PJNATH_POOL_INC_ICE_STRANS 512
512#endif
513
515#ifndef PJNATH_POOL_LEN_NATCK
516# define PJNATH_POOL_LEN_NATCK 512
517#endif
518
520#ifndef PJNATH_POOL_INC_NATCK
521# define PJNATH_POOL_INC_NATCK 512
522#endif
523
525#ifndef PJNATH_POOL_LEN_STUN_SESS
526# define PJNATH_POOL_LEN_STUN_SESS 1000
527#endif
528
530#ifndef PJNATH_POOL_INC_STUN_SESS
531# define PJNATH_POOL_INC_STUN_SESS 1000
532#endif
533
535#ifndef PJNATH_POOL_LEN_STUN_TDATA
536# define PJNATH_POOL_LEN_STUN_TDATA 1000
537#endif
538
540#ifndef PJNATH_POOL_INC_STUN_TDATA
541# define PJNATH_POOL_INC_STUN_TDATA 1000
542#endif
543
545#ifndef PJNATH_POOL_LEN_TURN_SESS
546# define PJNATH_POOL_LEN_TURN_SESS 1000
547#endif
548
550#ifndef PJNATH_POOL_INC_TURN_SESS
551# define PJNATH_POOL_INC_TURN_SESS 1000
552#endif
553
555#ifndef PJNATH_POOL_LEN_TURN_SOCK
556# define PJNATH_POOL_LEN_TURN_SOCK 1000
557#endif
558
560#ifndef PJNATH_POOL_INC_TURN_SOCK
561# define PJNATH_POOL_INC_TURN_SOCK 1000
562#endif
563
565#ifndef PJNATH_STUN_SOFTWARE_NAME
567# define PJNATH_MAKE_SW_NAME(a,b,c,d) "pjnath-" #a "." #b "." #c d
569# define PJNATH_MAKE_SW_NAME2(a,b,c,d) PJNATH_MAKE_SW_NAME(a,b,c,d)
571# define PJNATH_STUN_SOFTWARE_NAME PJNATH_MAKE_SW_NAME2( \
572 PJ_VERSION_NUM_MAJOR, \
573 PJ_VERSION_NUM_MINOR, \
574 PJ_VERSION_NUM_REV, \
575 PJ_VERSION_NUM_EXTRA)
576#endif
577
578
579/* **************************************************************************
580 * UPnP
581 */
582
586#ifndef PJ_UPNP_DEFAULT_SEARCH_TIME
587# define PJ_UPNP_DEFAULT_SEARCH_TIME 5
588#endif
589
590
595#endif /* __PJNATH_CONFIG_H__ */
596

 


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