Home --> Documentations --> PJNATH Reference

config.h
1 /* $Id: config.h 5481 2016-11-14 06:13:01Z 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_CONFIG_H__
21 #define __PJNATH_CONFIG_H__
22 
23 
29 #include <pj/types.h>
30 
39 /* **************************************************************************
40  * GENERAL
41  */
42 
48 #ifndef PJNATH_ERROR_LEVEL
49 # define PJNATH_ERROR_LEVEL 1
50 #endif
51 
52 
53 /* **************************************************************************
54  * STUN CONFIGURATION
55  */
56 
63 #ifndef PJ_STUN_MAX_ATTR
64 # define PJ_STUN_MAX_ATTR 16
65 #endif
66 
75 #ifndef PJ_STUN_RTO_VALUE
76 # define PJ_STUN_RTO_VALUE 100
77 #endif
78 
79 
87 #ifndef PJ_STUN_TIMEOUT_VALUE
88 # define PJ_STUN_TIMEOUT_VALUE (16 * PJ_STUN_RTO_VALUE)
89 #endif
90 
91 
97 #ifndef PJ_STUN_MAX_TRANSMIT_COUNT
98 # define PJ_STUN_MAX_TRANSMIT_COUNT 7
99 #endif
100 
101 
107 #ifndef PJ_STUN_RES_CACHE_DURATION
108 # define PJ_STUN_RES_CACHE_DURATION 10000
109 #endif
110 
111 
115 #ifndef PJ_STUN_MAX_PKT_LEN
116 # define PJ_STUN_MAX_PKT_LEN 800
117 #endif
118 
119 
123 #define PJ_STUN_PORT 3478
124 
125 
131 #ifndef PJ_STUN_STRING_ATTR_PAD_CHR
132 # define PJ_STUN_STRING_ATTR_PAD_CHR 0
133 #endif
134 
135 
141 #ifndef PJ_STUN_OLD_STYLE_MI_FINGERPRINT
142 # define PJ_STUN_OLD_STYLE_MI_FINGERPRINT 0
143 #endif
144 
145 
146 /* **************************************************************************
147  * STUN TRANSPORT CONFIGURATION
148  */
149 
153 #ifndef PJ_STUN_SOCK_PKT_LEN
154 # define PJ_STUN_SOCK_PKT_LEN 2000
155 #endif
156 
157 
161 #ifndef PJ_STUN_KEEP_ALIVE_SEC
162 # define PJ_STUN_KEEP_ALIVE_SEC 15
163 #endif
164 
165 
166 /* **************************************************************************
167  * TURN CONFIGURATION
168  */
169 
173 #ifndef PJ_TURN_MAX_DNS_SRV_CNT
174 # define PJ_TURN_MAX_DNS_SRV_CNT 4
175 #endif
176 
177 
181 #ifndef PJ_TURN_MAX_PKT_LEN
182 # define PJ_TURN_MAX_PKT_LEN 3000
183 #endif
184 
185 
190 #ifndef PJ_TURN_PERM_TIMEOUT
191 # define PJ_TURN_PERM_TIMEOUT 300
192 #endif
193 
194 
199 #ifndef PJ_TURN_CHANNEL_TIMEOUT
200 # define PJ_TURN_CHANNEL_TIMEOUT 600
201 #endif
202 
203 
209 #ifndef PJ_TURN_REFRESH_SEC_BEFORE
210 # define PJ_TURN_REFRESH_SEC_BEFORE 60
211 #endif
212 
213 
219 #ifndef PJ_TURN_KEEP_ALIVE_SEC
220 # define PJ_TURN_KEEP_ALIVE_SEC 15
221 #endif
222 
223 
224 /* **************************************************************************
225  * ICE CONFIGURATION
226  */
227 
233 #ifndef PJ_ICE_MAX_CAND
234 # define PJ_ICE_MAX_CAND 16
235 #endif
236 
237 
243 #ifndef PJ_ICE_ST_MAX_CAND
244 # define PJ_ICE_ST_MAX_CAND 8
245 #endif
246 
247 
254 #ifndef PJ_ICE_MAX_STUN
255 # define PJ_ICE_MAX_STUN 2
256 #endif
257 
258 
265 #ifndef PJ_ICE_MAX_TURN
266 # define PJ_ICE_MAX_TURN 3
267 #endif
268 
269 
274 #ifndef PJ_ICE_COMP_BITS
275 # define PJ_ICE_COMP_BITS 1
276 #endif
277 
278 
282 #define PJ_ICE_MAX_COMP (2<<PJ_ICE_COMP_BITS)
283 
287 #ifndef PJNATH_ICE_PRIO_STD
288 # define PJNATH_ICE_PRIO_STD 1
289 #endif
290 
291 
295 #ifndef PJ_ICE_CAND_TYPE_PREF_BITS
296 # if PJNATH_ICE_PRIO_STD
297 # define PJ_ICE_CAND_TYPE_PREF_BITS 8
298 # else
299 # define PJ_ICE_CAND_TYPE_PREF_BITS 2
300 # endif
301 #endif
302 
303 
315 #ifndef PJ_ICE_LOCAL_PREF_BITS
316 # define PJ_ICE_LOCAL_PREF_BITS 0
317 #endif
318 
319 
325 #ifndef PJ_ICE_MAX_CHECKS
326 # define PJ_ICE_MAX_CHECKS 32
327 #endif
328 
329 
335 #ifndef PJ_ICE_TA_VAL
336 # define PJ_ICE_TA_VAL 20
337 #endif
338 
339 
354 #ifndef PJ_ICE_CANCEL_ALL
355 # define PJ_ICE_CANCEL_ALL 1
356 #endif
357 
358 
375 #ifndef ICE_CONTROLLED_AGENT_WAIT_NOMINATION_TIMEOUT
376 # define ICE_CONTROLLED_AGENT_WAIT_NOMINATION_TIMEOUT 10000
377 #endif
378 
379 
387 #ifndef PJ_ICE_NOMINATED_CHECK_DELAY
388 # define PJ_ICE_NOMINATED_CHECK_DELAY (4*PJ_STUN_RTO_VALUE)
389 #endif
390 
391 
402 #ifndef PJ_ICE_SESS_KEEP_ALIVE_MIN
403 # define PJ_ICE_SESS_KEEP_ALIVE_MIN 20
404 #endif
405 
406 /* Warn about deprecated macro */
407 #ifdef PJ_ICE_ST_KEEP_ALIVE_MIN
408 # error PJ_ICE_ST_KEEP_ALIVE_MIN is deprecated
409 #endif
410 
421 #ifndef PJ_ICE_SESS_KEEP_ALIVE_MAX_RAND
422 # define PJ_ICE_SESS_KEEP_ALIVE_MAX_RAND 5
423 #endif
424 
425 /* Warn about deprecated macro */
426 #ifdef PJ_ICE_ST_KEEP_ALIVE_MAX_RAND
427 # error PJ_ICE_ST_KEEP_ALIVE_MAX_RAND is deprecated
428 #endif
429 
430 
437 #ifndef PJ_ICE_UFRAG_LEN
438 # define PJ_ICE_UFRAG_LEN 8
439 #endif
440 
441 
443 #ifndef PJNATH_POOL_LEN_ICE_SESS
444 # define PJNATH_POOL_LEN_ICE_SESS 512
445 #endif
446 
448 #ifndef PJNATH_POOL_INC_ICE_SESS
449 # define PJNATH_POOL_INC_ICE_SESS 512
450 #endif
451 
453 #ifndef PJNATH_POOL_LEN_ICE_STRANS
454 # define PJNATH_POOL_LEN_ICE_STRANS 1000
455 #endif
456 
458 #ifndef PJNATH_POOL_INC_ICE_STRANS
459 # define PJNATH_POOL_INC_ICE_STRANS 512
460 #endif
461 
463 #ifndef PJNATH_POOL_LEN_NATCK
464 # define PJNATH_POOL_LEN_NATCK 512
465 #endif
466 
468 #ifndef PJNATH_POOL_INC_NATCK
469 # define PJNATH_POOL_INC_NATCK 512
470 #endif
471 
473 #ifndef PJNATH_POOL_LEN_STUN_SESS
474 # define PJNATH_POOL_LEN_STUN_SESS 1000
475 #endif
476 
478 #ifndef PJNATH_POOL_INC_STUN_SESS
479 # define PJNATH_POOL_INC_STUN_SESS 1000
480 #endif
481 
483 #ifndef PJNATH_POOL_LEN_STUN_TDATA
484 # define PJNATH_POOL_LEN_STUN_TDATA 1000
485 #endif
486 
488 #ifndef PJNATH_POOL_INC_STUN_TDATA
489 # define PJNATH_POOL_INC_STUN_TDATA 1000
490 #endif
491 
493 #ifndef PJNATH_POOL_LEN_TURN_SESS
494 # define PJNATH_POOL_LEN_TURN_SESS 1000
495 #endif
496 
498 #ifndef PJNATH_POOL_INC_TURN_SESS
499 # define PJNATH_POOL_INC_TURN_SESS 1000
500 #endif
501 
503 #ifndef PJNATH_POOL_LEN_TURN_SOCK
504 # define PJNATH_POOL_LEN_TURN_SOCK 1000
505 #endif
506 
508 #ifndef PJNATH_POOL_INC_TURN_SOCK
509 # define PJNATH_POOL_INC_TURN_SOCK 1000
510 #endif
511 
513 #ifndef PJNATH_STUN_SOFTWARE_NAME
514 # define PJNATH_MAKE_SW_NAME(a,b,c,d) "pjnath-" #a "." #b "." #c d
515 # define PJNATH_MAKE_SW_NAME2(a,b,c,d) PJNATH_MAKE_SW_NAME(a,b,c,d)
516 # define PJNATH_STUN_SOFTWARE_NAME PJNATH_MAKE_SW_NAME2( \
517  PJ_VERSION_NUM_MAJOR, \
518  PJ_VERSION_NUM_MINOR, \
519  PJ_VERSION_NUM_REV, \
520  PJ_VERSION_NUM_EXTRA)
521 #endif
522 
527 #endif /* __PJNATH_CONFIG_H__ */
528 

 


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