~ubuntu-branches/ubuntu/vivid/sflphone/vivid

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/pjlib-util/include/pjlib-util/config.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2013-06-30 11:40:56 UTC
  • mfrom: (4.1.18 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130630114056-0np50jkyqo6vnmii
Tags: 1.2.3-2
* changeset_r92d62cfc54732bbbcfff2b1d36c096b120b981a5.diff 
  - fixes automatic endian detection 
* Update Vcs: fixes vcs-field-not-canonical

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: config.h 3553 2011-05-05 06:14:19Z 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 __PJLIB_UTIL_CONFIG_H__
 
21
#define __PJLIB_UTIL_CONFIG_H__
 
22
 
 
23
 
 
24
/**
 
25
 * @file config.h
 
26
 * @brief Compile time settings
 
27
 */
 
28
 
 
29
/**
 
30
 * @defgroup PJLIB_UTIL_CONFIG Configuration
 
31
 * @ingroup PJLIB_UTIL_BASE
 
32
 * @{
 
33
 */
 
34
 
 
35
 
 
36
/* **************************************************************************
 
37
 * DNS CONFIGURATION
 
38
 */
 
39
 
 
40
/**
 
41
 * Maximum number of IP addresses in DNS A response.
 
42
 */
 
43
#ifndef PJ_DNS_MAX_IP_IN_A_REC
 
44
#   define PJ_DNS_MAX_IP_IN_A_REC   8
 
45
#endif
 
46
 
 
47
 
 
48
/**
 
49
 * Maximum server address entries per one SRV record
 
50
 */
 
51
#ifndef PJ_DNS_SRV_MAX_ADDR
 
52
#   define PJ_DNS_SRV_MAX_ADDR      8
 
53
#endif
 
54
 
 
55
 
 
56
/**
 
57
 * This constant specifies the maximum names to keep in the temporary name
 
58
 * table when performing name compression scheme when duplicating DNS packet
 
59
 * (the #pj_dns_packet_dup() function).
 
60
 *
 
61
 * Generally name compression is desired, since it saves some memory (see
 
62
 * PJ_DNS_RESOLVER_RES_BUF_SIZE setting). However it comes at the expense of
 
63
 * a little processing overhead to perform name scanning and also a little
 
64
 * bit more stack usage (8 bytes per entry on 32bit platform).
 
65
 *
 
66
 * Default: 16
 
67
 */
 
68
#ifndef PJ_DNS_MAX_NAMES_IN_NAMETABLE
 
69
#   define PJ_DNS_MAX_NAMES_IN_NAMETABLE            16
 
70
#endif
 
71
 
 
72
 
 
73
/* **************************************************************************
 
74
 * RESOLVER CONFIGURATION
 
75
 */
 
76
 
 
77
 
 
78
/**
 
79
 * Maximum numbers of DNS nameservers that can be configured in resolver.
 
80
 */
 
81
#ifndef PJ_DNS_RESOLVER_MAX_NS
 
82
#   define PJ_DNS_RESOLVER_MAX_NS                   16
 
83
#endif
 
84
 
 
85
 
 
86
/**
 
87
 * Default retransmission delay, in miliseconds. The combination of
 
88
 * retransmission delay and count determines the query timeout.
 
89
 *
 
90
 * Default: 2000 (2 seconds, according to RFC 1035)
 
91
 */
 
92
#ifndef PJ_DNS_RESOLVER_QUERY_RETRANSMIT_DELAY
 
93
#   define PJ_DNS_RESOLVER_QUERY_RETRANSMIT_DELAY   2000
 
94
#endif
 
95
 
 
96
 
 
97
/**
 
98
 * Maximum number of transmissions before timeout is declared for
 
99
 * the query.
 
100
 *
 
101
 * Default: 5
 
102
 */
 
103
#ifndef PJ_DNS_RESOLVER_QUERY_RETRANSMIT_COUNT
 
104
#   define PJ_DNS_RESOLVER_QUERY_RETRANSMIT_COUNT   5
 
105
#endif
 
106
 
 
107
 
 
108
/**
 
109
 * Maximum life-time of DNS response in the resolver response cache,
 
110
 * in seconds. If the value is zero, then DNS response caching will be
 
111
 * disabled.
 
112
 *
 
113
 * Default is 300 seconds (5 minutes).
 
114
 *
 
115
 * @see PJ_DNS_RESOLVER_INVALID_TTL
 
116
 */
 
117
#ifndef PJ_DNS_RESOLVER_MAX_TTL
 
118
#   define PJ_DNS_RESOLVER_MAX_TTL                  (5*60)
 
119
#endif
 
120
 
 
121
/**
 
122
 * The life-time of invalid DNS response in the resolver response cache.
 
123
 * An invalid DNS response is a response which RCODE is non-zero and
 
124
 * response without any answer section. These responses can be put in
 
125
 * the cache too to minimize message round-trip.
 
126
 *
 
127
 * Default: 60 (one minute).
 
128
 *
 
129
 * @see PJ_DNS_RESOLVER_MAX_TTL
 
130
 */
 
131
#ifndef PJ_DNS_RESOLVER_INVALID_TTL
 
132
#   define PJ_DNS_RESOLVER_INVALID_TTL              60
 
133
#endif
 
134
 
 
135
/**
 
136
 * The interval on which nameservers which are known to be good to be
 
137
 * probed again to determine whether they are still good. Note that
 
138
 * this applies to both active nameserver (the one currently being used)
 
139
 * and idle nameservers (good nameservers that are not currently selected).
 
140
 * The probing to query the "goodness" of nameservers involves sending
 
141
 * the same query to multiple servers, so it's probably not a good idea
 
142
 * to send this probing too often.
 
143
 *
 
144
 * Default: 600 (ten minutes)
 
145
 *
 
146
 * @see PJ_DNS_RESOLVER_BAD_NS_TTL
 
147
 */
 
148
#ifndef PJ_DNS_RESOLVER_GOOD_NS_TTL
 
149
#   define PJ_DNS_RESOLVER_GOOD_NS_TTL              (10*60)
 
150
#endif
 
151
 
 
152
/**
 
153
 * The interval on which nameservers which known to be bad to be probed
 
154
 * again to determine whether it is still bad.
 
155
 *
 
156
 * Default: 60 (one minute)
 
157
 *
 
158
 * @see PJ_DNS_RESOLVER_GOOD_NS_TTL
 
159
 */
 
160
#ifndef PJ_DNS_RESOLVER_BAD_NS_TTL
 
161
#   define PJ_DNS_RESOLVER_BAD_NS_TTL               (1*60)
 
162
#endif
 
163
 
 
164
 
 
165
/**
 
166
 * Maximum size of UDP packet. RFC 1035 states that maximum size of
 
167
 * DNS packet carried over UDP is 512 bytes.
 
168
 *
 
169
 * Default: 512 byes
 
170
 */
 
171
#ifndef PJ_DNS_RESOLVER_MAX_UDP_SIZE
 
172
#   define PJ_DNS_RESOLVER_MAX_UDP_SIZE             512
 
173
#endif
 
174
 
 
175
 
 
176
/**
 
177
 * Size of memory pool allocated for each individual DNS response cache.
 
178
 * This value here should be more or less the same as maximum UDP packet
 
179
 * size (PJ_DNS_RESOLVER_MAX_UDP_SIZE), since the DNS replicator function
 
180
 * (#pj_dns_packet_dup()) is also capable of performing name compressions.
 
181
 *
 
182
 * Default: 512
 
183
 */
 
184
#ifndef PJ_DNS_RESOLVER_RES_BUF_SIZE
 
185
#   define PJ_DNS_RESOLVER_RES_BUF_SIZE             512
 
186
#endif
 
187
 
 
188
 
 
189
/**
 
190
 * Size of temporary pool buffer for parsing DNS packets in resolver.
 
191
 *
 
192
 * default: 4000
 
193
 */
 
194
#ifndef PJ_DNS_RESOLVER_TMP_BUF_SIZE
 
195
#   define PJ_DNS_RESOLVER_TMP_BUF_SIZE             4000
 
196
#endif
 
197
 
 
198
 
 
199
/* **************************************************************************
 
200
 * SCANNER CONFIGURATION
 
201
 */
 
202
 
 
203
 
 
204
/**
 
205
 * Macro PJ_SCANNER_USE_BITWISE is defined and non-zero (by default yes)
 
206
 * will enable the use of bitwise for character input specification (cis).
 
207
 * This would save several kilobytes of .bss memory in the SIP parser.
 
208
 */
 
209
#ifndef PJ_SCANNER_USE_BITWISE
 
210
#  define PJ_SCANNER_USE_BITWISE                    1
 
211
#endif
 
212
 
 
213
 
 
214
 
 
215
/* **************************************************************************
 
216
 * STUN CLIENT CONFIGURATION
 
217
 */
 
218
 
 
219
/**
 
220
 * Maximum number of attributes in the STUN packet (for the old STUN
 
221
 * library).
 
222
 *
 
223
 * Default: 16
 
224
 */
 
225
#ifndef PJSTUN_MAX_ATTR
 
226
#   define PJSTUN_MAX_ATTR                          16
 
227
#endif
 
228
 
 
229
 
 
230
/**
 
231
 * Maximum number of attributes in the STUN packet (for the new STUN
 
232
 * library).
 
233
 *
 
234
 * Default: 16
 
235
 */
 
236
#ifndef PJ_STUN_MAX_ATTR
 
237
#   define PJ_STUN_MAX_ATTR                         16
 
238
#endif
 
239
 
 
240
 
 
241
/* **************************************************************************
 
242
 * ENCRYPTION
 
243
 */
 
244
 
 
245
/**
 
246
 * Specifies whether CRC32 algorithm should use the table based lookup table
 
247
 * for faster calculation, at the expense of about 1KB table size on the
 
248
 * executable. If zero, the CRC32 will use non-table based which is more than
 
249
 * an order of magnitude slower.
 
250
 *
 
251
 * Default: 1
 
252
 */
 
253
#ifndef PJ_CRC32_HAS_TABLES
 
254
#   define PJ_CRC32_HAS_TABLES                      1
 
255
#endif
 
256
 
 
257
 
 
258
/* **************************************************************************
 
259
 * HTTP Client configuration
 
260
 */
 
261
/**
 
262
 * Timeout value for HTTP request operation. The value is in ms.
 
263
 * Default: 60000ms
 
264
 */
 
265
#ifndef PJ_HTTP_DEFAULT_TIMEOUT
 
266
#   define PJ_HTTP_DEFAULT_TIMEOUT         (60000)
 
267
#endif
 
268
 
 
269
/**
 
270
 * @}
 
271
 */
 
272
 
 
273
#endif  /* __PJLIB_UTIL_CONFIG_H__ */