Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,247 +0,0 @@
1
-/*
2
- * global variables
3
- *
4
- *
5
- * Copyright (C) 2001-2003 FhG Fokus
6
- *
7
- * This file is part of Kamailio, a free SIP server.
8
- *
9
- * Kamailio is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version
13
- *
14
- * Kamailio is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, write to the Free Software
21
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22
- */
23
-/*!
24
-* \file
25
-* \brief Kamailio core :: Global variables
26
-* \ingroup core
27
-* Module: \ref core
28
-*/
29
-
30
-
31
-
32
-#ifndef globals_h
33
-#define globals_h
34
-
35
-#include "types.h"
36
-#include "ip_addr.h"
37
-#include "str.h"
38
-#include "poll_types.h"
39
-
40
-#define NO_DNS     0
41
-#define DO_DNS     1
42
-#define DO_REV_DNS 2
43
-
44
-
45
-extern char* mods_dir;   /* directory with dyn. loadable modules */
46
-extern int mods_dir_cmd; /* marker if mods dir was set in command line */
47
-extern char* cfg_file;
48
-extern int config_check;
49
-extern char* stat_file;
50
-extern unsigned short port_no;
51
-
52
-extern unsigned int sr_dst_max_branches; /* max number of branches per transaction */
53
-
54
-extern time_t up_since;
55
-extern pid_t creator_pid;  /* pid of first process before daemonization */
56
-extern int uid;
57
-extern int gid;
58
-extern char* pid_file;
59
-extern char* pgid_file;
60
-extern int own_pgid; /* whether or not we have our own pgid (and it's ok to use kill(0, sig) */
61
-
62
-extern int server_id; /* A unique ID of the SIP server */
63
-
64
-extern struct socket_info* bind_address; /* pointer to the crt. proc.
65
-											listening address */
66
-extern struct socket_info* sendipv4; /* ipv4 socket to use when msg.
67
-										comes from ipv6*/
68
-extern struct socket_info* sendipv6; /* same as above for ipv6 */
69
-#ifdef USE_RAW_SOCKS
70
-extern int raw_udp4_send_sock;
71
-#endif /* USE_RAW_SOCKS */
72
-
73
-#ifdef USE_TCP
74
-extern struct socket_info* sendipv4_tcp; /* ipv4 socket to use when msg.
75
-										comes from ipv6*/
76
-extern struct socket_info* sendipv6_tcp; /* same as above for ipv6 */
77
-extern int unix_tcp_sock; /* socket used for communication with tcp main*/
78
-#endif
79
-#ifdef USE_TLS
80
-extern struct socket_info* sendipv4_tls; /* ipv4 socket to use when msg.
81
-										comes from ipv6*/
82
-extern struct socket_info* sendipv6_tls; /* same as above for ipv6 */
83
-#endif
84
-#ifdef USE_SCTP
85
-extern struct socket_info* sendipv4_sctp; /* ipv4 socket to use when msg.
86
-										comes from ipv6*/
87
-extern struct socket_info* sendipv6_sctp; /* same as above for ipv6 */
88
-#endif
89
-
90
-extern unsigned int maxbuffer;
91
-extern unsigned int sql_buffer_size;
92
-extern int children_no;
93
-extern int socket_workers;
94
-#ifdef USE_TCP
95
-extern int tcp_main_pid;
96
-extern int tcp_cfg_children_no;
97
-extern int tcp_children_no;
98
-extern int tcp_disable;
99
-extern enum poll_types tcp_poll_method;
100
-extern int tcp_max_connections; /* maximum tcp connections, hard limit */
101
-extern int tls_max_connections; /* maximum tls connections, hard limit */
102
-#endif
103
-#ifdef USE_TLS
104
-extern int tls_disable;
105
-extern unsigned short tls_port_no;
106
-#endif
107
-#ifdef USE_SCTP
108
-extern int sctp_disable;
109
-extern int sctp_children_no;
110
-#endif
111
-extern int dont_fork;
112
-extern int dont_daemonize;
113
-extern int check_via;
114
-extern int phone2tel;
115
-extern int received_dns;
116
-/* extern int process_no; */
117
-extern int child_rank;
118
-extern int sip_warning;
119
-extern int server_signature;
120
-extern str server_hdr;
121
-extern str user_agent_hdr;
122
-extern char* user;
123
-extern char* group;
124
-extern char* sock_user;
125
-extern char* sock_group;
126
-extern int sock_uid;
127
-extern int sock_gid;
128
-extern int sock_mode;
129
-extern char* chroot_dir;
130
-extern char* working_dir;
131
-extern char* runtime_dir;
132
-extern int sr_auto_aliases;
133
-extern int sr_msg_time;
134
-extern str version_table;
135
-
136
-#ifdef USE_MCAST
137
-extern int mcast_loopback;
138
-extern int mcast_ttl;
139
-extern char* mcast;
140
-#endif /* USE_MCAST */
141
-
142
-extern int auto_bind_ipv6;
143
-
144
-extern int tos;
145
-extern int pmtu_discovery;
146
-
147
-/*
148
- * debug & log_stderr moved to dprint.h*/
149
-
150
-/* extern process_bm_t process_bit; */
151
-/* extern int *pids; -moved to pt.h */
152
-
153
-extern int cfg_errors;
154
-extern int cfg_warnings;
155
-extern unsigned int msg_no;
156
-
157
-extern unsigned long shm_mem_size;
158
-extern unsigned long pkg_mem_size;
159
-
160
-/* AVP configuration */
161
-extern char *avp_db_url;  /* db url used by user preferences (AVPs) */
162
-
163
-/* moved to pt.h
164
-extern int *pids;
165
-extern int process_no;
166
-*/
167
-
168
-extern int reply_to_via;
169
-
170
-extern int is_main;
171
-extern int fixup_complete;
172
-
173
-/* debugging level for dumping memory status */
174
-extern int memlog;
175
-/* debugging level for malloc debugging messages */
176
-extern int memdbg;
177
-
178
-/* debugging level for timer debugging (see -DTIMER_DEBUG) */
179
-extern int timerlog;
180
-
181
-/* looking up outbound interface ? */
182
-extern int mhomed;
183
-
184
-/* command-line arguments */
185
-extern int my_argc;
186
-extern char **my_argv;
187
-
188
-/* pre-set addresses */
189
-extern str default_global_address;
190
-/* pre-ser ports */
191
-extern str default_global_port;
192
-
193
-/* how much time to allow for shutdown, before killing everything */
194
-extern int ser_kill_timeout;
195
-
196
-/* core dump and file limits */
197
-extern int disable_core_dump;
198
-extern int open_files_limit;
199
-
200
-/* memory lock/pre-fault */
201
-extern int shm_force_alloc;
202
-extern int mlock_pages;
203
-
204
-/* execute onsend_route for replies */
205
-extern int onsend_route_reply;
206
-
207
-/* real time stuff */
208
-extern int real_time;
209
-extern int rt_prio;
210
-extern int rt_policy; /* SCHED_OTHER */
211
-extern int rt_timer1_prio;  /* "fast" timer */
212
-extern int rt_timer2_prio;  /* "slow" timer */
213
-extern int rt_timer1_policy; /* "fast" timer, SCHED_OTHER */
214
-extern int rt_timer2_policy; /* "slow" timer, SCHED_OTHER */
215
-
216
-extern int http_reply_parse;
217
-
218
-#ifdef USE_DNS_CACHE
219
-extern int dns_cache_init; /* if 0, the DNS cache is not initialized at startup */
220
-extern unsigned int dns_timer_interval; /* gc timer interval in s */
221
-extern int dns_flags; /* default flags used for the  dns_*resolvehost
222
-                    (compatibility wrappers) */
223
-
224
-#ifdef USE_DNS_CACHE_STATS
225
-struct t_dns_cache_stats{
226
-	unsigned long dns_req_cnt;
227
-	unsigned long dc_hits_cnt;
228
-	unsigned long dc_neg_hits_cnt;
229
-	unsigned long dc_lru_cnt;
230
-};
231
-extern struct t_dns_cache_stats* dns_cache_stats;
232
-#endif /* USE_DNS_CACHE_STATS */
233
-#endif
234
-#ifdef USE_DST_BLACKLIST
235
-extern int dst_blacklist_init; /* if 0, the dst blacklist is not initialized at startup */
236
-extern unsigned int blst_timer_interval; /*blacklist gc timer interval (in s)*/
237
-
238
-#ifdef USE_DST_BLACKLIST_STATS
239
-struct t_dst_blacklist_stats{
240
-	unsigned long bkl_hit_cnt;
241
-	unsigned long bkl_lru_cnt;
242
-};
243
-extern struct t_dst_blacklist_stats* dst_blacklist_stats;
244
-#endif /* USE_DST_BLACKLIST_STATS */
245
-#endif
246
-
247
-#endif
Browse code

core: added mcast to select interface for multicast

- You can now define a mcast parameter before a listen parameter that
contains a multicast address. After each listen parameter mcast gets
reset. mcast must contain the name of an interface, eg `eth1`.

Issue GH#813

Timmo Verlaan authored on 07/10/2016 09:53:30
Showing 1 changed files
... ...
@@ -136,6 +136,7 @@ extern str version_table;
136 136
 #ifdef USE_MCAST
137 137
 extern int mcast_loopback;
138 138
 extern int mcast_ttl;
139
+extern char* mcast;
139 140
 #endif /* USE_MCAST */
140 141
 
141 142
 extern int auto_bind_ipv6;
Browse code

core: added global parameter run_dir

- to be used to build the path for runtime files (fifo, ctl)

Daniel-Constantin Mierla authored on 21/04/2015 19:20:10
Showing 1 changed files
... ...
@@ -128,6 +128,7 @@ extern int sock_gid;
128 128
 extern int sock_mode;
129 129
 extern char* chroot_dir;
130 130
 extern char* working_dir;
131
+extern char* runtime_dir;
131 132
 extern int sr_auto_aliases;
132 133
 extern int sr_msg_time;
133 134
 extern str version_table;
Browse code

core : Update include files - delete IDs, update doxygen, delete history

Olle E. Johansson authored on 03/01/2015 10:55:48
Showing 1 changed files
... ...
@@ -1,24 +1,17 @@
1 1
 /*
2
- * $Id$
3
- *
4 2
  * global variables
5 3
  *
6 4
  *
7 5
  * Copyright (C) 2001-2003 FhG Fokus
8 6
  *
9
- * This file is part of ser, a free SIP server.
7
+ * This file is part of Kamailio, a free SIP server.
10 8
  *
11
- * ser is free software; you can redistribute it and/or modify
9
+ * Kamailio is free software; you can redistribute it and/or modify
12 10
  * it under the terms of the GNU General Public License as published by
13 11
  * the Free Software Foundation; either version 2 of the License, or
14 12
  * (at your option) any later version
15 13
  *
16
- * For a license to use the ser software under conditions
17
- * other than those described here, or to purchase support for this
18
- * software, please contact iptel.org by e-mail at the following addresses:
19
- *    info@iptel.org
20
- *
21
- * ser is distributed in the hope that it will be useful,
14
+ * Kamailio is distributed in the hope that it will be useful,
22 15
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 16
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 17
  * GNU General Public License for more details.
... ...
@@ -27,6 +20,12 @@
27 20
  * along with this program; if not, write to the Free Software
28 21
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
29 22
  */
23
+/*!
24
+* \file
25
+* \brief Kamailio core :: Global variables
26
+* \ingroup core
27
+* Module: \ref core
28
+*/
30 29
 
31 30
 
32 31
 
Browse code

core: new parameter - max_branches

- the maximum number of uac branches can be set via config
- default value is 12 (old static value for MAX_BRNACHES)
- the upper limit is 31, it has to be at least 1
- example:
max_branches=16

Daniel-Constantin Mierla authored on 17/10/2014 09:04:23
Showing 1 changed files
... ...
@@ -50,6 +50,8 @@ extern int config_check;
50 50
 extern char* stat_file;
51 51
 extern unsigned short port_no;
52 52
 
53
+extern unsigned int sr_dst_max_branches; /* max number of branches per transaction */
54
+
53 55
 extern time_t up_since;
54 56
 extern pid_t creator_pid;  /* pid of first process before daemonization */
55 57
 extern int uid;
Browse code

core: execute onsend_route for replies before sending out

- control execution of onsend_route block for replies via parameter
onsend_route_reply

Lucian Balaceanu authored on 12/10/2014 08:28:29 • Daniel-Constantin Mierla committed on 12/10/2014 08:28:29
Showing 1 changed files
... ...
@@ -198,6 +198,9 @@ extern int open_files_limit;
198 198
 extern int shm_force_alloc;
199 199
 extern int mlock_pages;
200 200
 
201
+/* execute onsend_route for replies */
202
+extern int onsend_route_reply;
203
+
201 204
 /* real time stuff */
202 205
 extern int real_time;
203 206
 extern int rt_prio;
Browse code

core: fixed overwriting mpath value given in command line via config

- -L is in the group of options evaluated before config

Daniel-Constantin Mierla authored on 01/10/2014 14:53:44
Showing 1 changed files
... ...
@@ -44,6 +44,7 @@
44 44
 
45 45
 
46 46
 extern char* mods_dir;   /* directory with dyn. loadable modules */
47
+extern int mods_dir_cmd; /* marker if mods dir was set in command line */
47 48
 extern char* cfg_file;
48 49
 extern int config_check;
49 50
 extern char* stat_file;
Browse code

all: updated FSF address in GPL text

Anthony Messina authored on 04/07/2014 09:36:37 • Daniel-Constantin Mierla committed on 04/07/2014 09:37:36
Showing 1 changed files
... ...
@@ -25,7 +25,7 @@
25 25
  *
26 26
  * You should have received a copy of the GNU General Public License
27 27
  * along with this program; if not, write to the Free Software
28
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
29 29
  */
30 30
 
31 31
 
Browse code

core: aliased http_reply_hack to http_reply_parse

- a more relevant name for the core parameter that enables parsing http
replies

Daniel-Constantin Mierla authored on 23/09/2013 16:42:54
Showing 1 changed files
... ...
@@ -206,7 +206,7 @@ extern int rt_timer2_prio;  /* "slow" timer */
206 206
 extern int rt_timer1_policy; /* "fast" timer, SCHED_OTHER */
207 207
 extern int rt_timer2_policy; /* "slow" timer, SCHED_OTHER */
208 208
 
209
-extern int http_reply_hack;
209
+extern int http_reply_parse;
210 210
 
211 211
 #ifdef USE_DNS_CACHE
212 212
 extern int dns_cache_init; /* if 0, the DNS cache is not initialized at startup */
Browse code

core: remove syn_branch functionality for calculating Via branch parameter

* remove syn_branch parameter and functionality from core and tm module for
calculating the Via branch parameter
* reported from Richard Brady, rnbrady at gmail dot com to sr-dev
* kamailio is not standard compliant with this setting enabled (RFC 3261,
17.2.3 and 16.11) for stateless forwarding of replies
* the performance reason that motivated this functionality are today not
valid anymore, even embedded systems have more than enough power to
calculate MD5 and other modules uses more expensive operations anyway
* adapt a bunch of example and test configuration that used this parameter,
it has been also removed from the core cookbook wiki

Henning Westerholt authored on 24/05/2013 13:38:03
Showing 1 changed files
... ...
@@ -111,7 +111,6 @@ extern int dont_daemonize;
111 111
 extern int check_via;
112 112
 extern int phone2tel;
113 113
 extern int received_dns;
114
-extern int syn_branch;
115 114
 /* extern int process_no; */
116 115
 extern int child_rank;
117 116
 extern int sip_warning;
Browse code

core and modules: make IPv6 default, remove compile time flags

* Make IPv6 the default in the core and affected modules
* it has been default switched on since a long time, and was introduced in 2002
* even on embedded systems one probably want now proper IPv6 support
* there was an issue in cygwin in 2008, but IPv6 is there also available since v1.7
* remove over 160 #ifdefs, cleanup the code a lot and removes many of rarely
tested alternative code paths to ease support of the codebase
* note for gentoo maintainer: please review your packages, they will maybe not
work now correctly anymore if somebody specified -ipv6 in the use flags

Henning Westerholt authored on 18/05/2013 08:07:25
Showing 1 changed files
... ...
@@ -136,9 +136,7 @@ extern int mcast_loopback;
136 136
 extern int mcast_ttl;
137 137
 #endif /* USE_MCAST */
138 138
 
139
-#ifdef USE_IPV6
140 139
 extern int auto_bind_ipv6;
141
-#endif
142 140
 
143 141
 extern int tos;
144 142
 extern int pmtu_discovery;
Browse code

core: removed STUN from core

- Added hooks so that STUN messages can be passed to a module
- Removed STUN configuration file parameters

Peter Dunkley authored on 29/03/2013 21:47:57
Showing 1 changed files
... ...
@@ -136,12 +136,6 @@ extern int mcast_loopback;
136 136
 extern int mcast_ttl;
137 137
 #endif /* USE_MCAST */
138 138
 
139
-#ifdef USE_STUN
140
-extern unsigned int stun_refresh_interval;
141
-extern int stun_allow_stun;
142
-extern int stun_allow_fp;
143
-#endif
144
-
145 139
 #ifdef USE_IPV6
146 140
 extern int auto_bind_ipv6;
147 141
 #endif
Browse code

core: make database version table name configurable from script

When kamailio is part of a bigger project and is sharing its database with
it, it is nice to have a less generic table name than "version".

Also usefull when upgrading kamailio, where the new version has (backwards
compatibel) changes in the database definition. If each kamailio version uses
its own version table, they can all use the same database.

Alex Hermann authored on 08/01/2013 18:09:48
Showing 1 changed files
... ...
@@ -129,6 +129,7 @@ extern char* chroot_dir;
129 129
 extern char* working_dir;
130 130
 extern int sr_auto_aliases;
131 131
 extern int sr_msg_time;
132
+extern str version_table;
132 133
 
133 134
 #ifdef USE_MCAST
134 135
 extern int mcast_loopback;
Browse code

core: added timeval field inside sip_msg_t

- new parameter msg_time to set the timeval value at receive time (1
(on) by default, set to 0 to disable)
- the value is set automatically at received time based if msg_time=1 or
first time when it is accessed
- the field should bring coherence regarting time of the message - it
should be the same no matter where is processed

Daniel-Constantin Mierla authored on 18/04/2012 17:54:41
Showing 1 changed files
... ...
@@ -128,6 +128,7 @@ extern int sock_mode;
128 128
 extern char* chroot_dir;
129 129
 extern char* working_dir;
130 130
 extern int sr_auto_aliases;
131
+extern int sr_msg_time;
131 132
 
132 133
 #ifdef USE_MCAST
133 134
 extern int mcast_loopback;
Browse code

core: Changed HTTP_REPLY_HACK from a compile-time to a run-time option

- By default it is off, to turn it on set http_reply_hack=yes in kamailio.cfg
- You need to turn this on if you use xhttp _and_ event_route[sl:local-response].
This is because HTTP responses are stateless responses and when the
event_route is run it has to parse the response. Without HTTP_REPLY_HACK
Kamailio can't actually parse HTTP responses.

Peter Dunkley authored on 06/03/2012 18:33:42
Showing 1 changed files
... ...
@@ -213,6 +213,7 @@ extern int rt_timer2_prio;  /* "slow" timer */
213 213
 extern int rt_timer1_policy; /* "fast" timer, SCHED_OTHER */
214 214
 extern int rt_timer2_policy; /* "slow" timer, SCHED_OTHER */
215 215
 
216
+extern int http_reply_hack;
216 217
 
217 218
 #ifdef USE_DNS_CACHE
218 219
 extern int dns_cache_init; /* if 0, the DNS cache is not initialized at startup */
Browse code

core: option to set number of workers per listen socket

- new cfg global parameter: socket_workers - set the number of worker
processes for the next listen socket
- used before listen on udp and sctp socket - overwrites
children/sctp_children value for that socket
- used bofer listen on tcp and tls socket - adds extra tcp workers,
these handling traffic only on that socket
- socket_workers is reset with next listen socket that is added, thus
use it for each listen socket where you want custom number of workers
- if this parameter is not used at all, it is the same behaviour as so
far

Example for udp sockets:

children=4
socket_workers=2
listen=udp:127.0.0.1:5080
listen=udp:127.0.0.1:5070
listen=udp:127.0.0.1:5060

- it will start 2 workers to handle traffic on udp:127.0.0.1:5080 and 4
for each of udp:127.0.0.1:5070 and udp:127.0.0.1:5060. In total there
are 10 worker processes

Example for tcp sockets:

children=4
socket_workers=2
listen=tcp:127.0.0.1:5080
listen=tcp:127.0.0.1:5070
listen=tcp:127.0.0.1:5060

- it will start 2 workers to handle traffic on tcp:127.0.0.1:5080 and 4
to handle traffic on both tcp:127.0.0.1:5070 and tcp:127.0.0.1:5060.
In total there are 6 worker processes

Daniel-Constantin Mierla authored on 12/01/2012 17:55:22
Showing 1 changed files
... ...
@@ -88,8 +88,10 @@ extern struct socket_info* sendipv6_sctp; /* same as above for ipv6 */
88 88
 extern unsigned int maxbuffer;
89 89
 extern unsigned int sql_buffer_size;
90 90
 extern int children_no;
91
+extern int socket_workers;
91 92
 #ifdef USE_TCP
92 93
 extern int tcp_main_pid;
94
+extern int tcp_cfg_children_no;
93 95
 extern int tcp_children_no;
94 96
 extern int tcp_disable;
95 97
 extern enum poll_types tcp_poll_method;
Browse code

core/tcp/tls: added tls_max_connections global parameter

- set a limit to active tls connections
- its management is done in tcp code, as tls is encryption layer over
tcp
- tls connections are still counted as tcp connections, thus this limit
cannot exceed tcp_max_connections
- default value 2048
- core.tcp_options lists also the tls connections number

Daniel-Constantin Mierla authored on 13/12/2011 22:01:48
Showing 1 changed files
... ...
@@ -93,7 +93,8 @@ extern int tcp_main_pid;
93 93
 extern int tcp_children_no;
94 94
 extern int tcp_disable;
95 95
 extern enum poll_types tcp_poll_method;
96
-extern int tcp_max_connections; /* maximum connections, hard limit */
96
+extern int tcp_max_connections; /* maximum tcp connections, hard limit */
97
+extern int tls_max_connections; /* maximum tls connections, hard limit */
97 98
 #endif
98 99
 #ifdef USE_TLS
99 100
 extern int tls_disable;
Browse code

core: auto_bind_ipv6 : changed param from cfg framework to normal global parameter as setting it at run time doesn't change anything

Marius Zbihlei authored on 14/10/2011 08:37:20
Showing 1 changed files
... ...
@@ -137,6 +137,10 @@ extern int stun_allow_stun;
137 137
 extern int stun_allow_fp;
138 138
 #endif
139 139
 
140
+#ifdef USE_IPV6
141
+extern int auto_bind_ipv6;
142
+#endif
143
+
140 144
 extern int tos;
141 145
 extern int pmtu_discovery;
142 146
 
Browse code

core, srdb1, modules/db_*, modules_k/db_*: Added support for configuring SQL buffer size and mediumblob/mediumtext in MySQL

- Currently the SQL buffer size is hard-coded to 64k. This isn't
enough in some cases. For example, it is easily possible for
resource lists (which can be Network Address Books) to be larger
than 64k.
- The default buffer size is still 64k, but this can be overriden
with the new "sql_buffer_size" configuration option.
- Support added for mediumblob/mediumtext in MySQL as the blob/text
types that are currently supported are limited to 64k.
- Feature added by Andrew Miller at Crocodile RCS

pd authored on 27/07/2011 10:50:20
Showing 1 changed files
... ...
@@ -86,6 +86,7 @@ extern struct socket_info* sendipv6_sctp; /* same as above for ipv6 */
86 86
 #endif
87 87
 
88 88
 extern unsigned int maxbuffer;
89
+extern unsigned int sql_buffer_size;
89 90
 extern int children_no;
90 91
 #ifdef USE_TCP
91 92
 extern int tcp_main_pid;
Browse code

core: pkg mem size configurable form the cmd line

The pkg mem size used can be configured by using the "-M"
parameter on the command line, e.g.:
ser -M 8 -f test.cfg # start ser with 8mb of pkg memory
The default remains 4Mb.

Andrei Pelinescu-Onciul authored on 12/04/2011 19:54:07
Showing 1 changed files
... ...
@@ -150,6 +150,7 @@ extern int cfg_warnings;
150 150
 extern unsigned int msg_no;
151 151
 
152 152
 extern unsigned long shm_mem_size;
153
+extern unsigned long pkg_mem_size;
153 154
 
154 155
 /* AVP configuration */
155 156
 extern char *avp_db_url;  /* db url used by user preferences (AVPs) */
Browse code

raw sockets: runtime config support

Usage of raw sockets for send and the used mtu can now be set
at runtime via the 2 new added core config variables:
udp4_raw and udp4_raw_mtu.
udp4_raw can have 3 values: disabled (0), on (1) and auto (-1). If
set to auto raw sockets will be used if possible.

E.g.:
sercmd cfg.set_now_int core udp4_raw_mtu 576

Andrei Pelinescu-Onciul authored on 15/06/2010 14:31:16
Showing 1 changed files
... ...
@@ -64,6 +64,10 @@ extern struct socket_info* bind_address; /* pointer to the crt. proc.
64 64
 extern struct socket_info* sendipv4; /* ipv4 socket to use when msg.
65 65
 										comes from ipv6*/
66 66
 extern struct socket_info* sendipv6; /* same as above for ipv6 */
67
+#ifdef USE_RAW_SOCKS
68
+extern int raw_udp4_send_sock;
69
+#endif /* USE_RAW_SOCKS */
70
+
67 71
 #ifdef USE_TCP
68 72
 extern struct socket_info* sendipv4_tcp; /* ipv4 socket to use when msg.
69 73
 										comes from ipv6*/
Browse code

core: server signature value can be set via param

- server and user agent signature were only defines so far
- two new parameters server_header and user_agent_header allow
to define them via cfg parameters
- default values are the same so far

Daniel-Constantin Mierla authored on 20/08/2009 08:49:14
Showing 1 changed files
... ...
@@ -108,6 +108,8 @@ extern int syn_branch;
108 108
 extern int child_rank;
109 109
 extern int sip_warning;
110 110
 extern int server_signature;
111
+extern str server_hdr;
112
+extern str user_agent_hdr;
111 113
 extern char* user;
112 114
 extern char* group;
113 115
 extern char* sock_user;
Browse code

core: auto_aliases to control rev DNS aliases

- parameter takes boolean value
- if set, rev dns results are added to aliases list
- default is set

Daniel-Constantin Mierla authored on 03/05/2009 11:04:49
Showing 1 changed files
... ...
@@ -117,6 +117,7 @@ extern int sock_gid;
117 117
 extern int sock_mode;
118 118
 extern char* chroot_dir;
119 119
 extern char* working_dir;
120
+extern int sr_auto_aliases;
120 121
 
121 122
 #ifdef USE_MCAST
122 123
 extern int mcast_loopback;
Browse code

tcp: use dynamic config framework, part 2

- added tcp_connect_timeout, tcp_send_timeout,
tcp_connection_lifetime, tcp_max_connections, tcp_accept_aliases
to the config framework.

- added 2 new tcp related variables: tcp alias_flags and tcp
new_conn_alias_flags

Andrei Pelinescu-Onciul authored on 05/03/2009 17:20:42
Showing 1 changed files
... ...
@@ -87,12 +87,8 @@ extern int children_no;
87 87
 extern int tcp_main_pid;
88 88
 extern int tcp_children_no;
89 89
 extern int tcp_disable;
90
-extern int tcp_accept_aliases;
91
-extern int tcp_connect_timeout;
92
-extern int tcp_send_timeout;
93
-extern int tcp_con_lifetime; /* connection lifetime */
94 90
 extern enum poll_types tcp_poll_method;
95
-extern int tcp_max_connections;
91
+extern int tcp_max_connections; /* maximum connections, hard limit */
96 92
 #endif
97 93
 #ifdef USE_TLS
98 94
 extern int tls_disable;
Browse code

- core sctp support

Andrei Pelinescu-Onciul authored on 08/08/2008 20:47:53
Showing 1 changed files
... ...
@@ -75,6 +75,11 @@ extern struct socket_info* sendipv4_tls; /* ipv4 socket to use when msg.
75 75
 										comes from ipv6*/
76 76
 extern struct socket_info* sendipv6_tls; /* same as above for ipv6 */
77 77
 #endif
78
+#ifdef USE_SCTP
79
+extern struct socket_info* sendipv4_sctp; /* ipv4 socket to use when msg.
80
+										comes from ipv6*/
81
+extern struct socket_info* sendipv6_sctp; /* same as above for ipv6 */
82
+#endif
78 83
 
79 84
 extern unsigned int maxbuffer;
80 85
 extern int children_no;
... ...
@@ -93,6 +98,10 @@ extern int tcp_max_connections;
93 98
 extern int tls_disable;
94 99
 extern unsigned short tls_port_no;
95 100
 #endif
101
+#ifdef USE_SCTP
102
+extern int sctp_disable;
103
+extern int sctp_children_no;
104
+#endif
96 105
 extern int dont_fork;
97 106
 extern int dont_daemonize;
98 107
 extern int check_via;
Browse code

- publishing up_since as core variable

Tomas Mandys authored on 10/06/2008 15:03:35
Showing 1 changed files
... ...
@@ -49,6 +49,7 @@ extern int config_check;
49 49
 extern char* stat_file;
50 50
 extern unsigned short port_no;
51 51
 
52
+extern time_t up_since;
52 53
 extern pid_t creator_pid;  /* pid of first process before daemonization */
53 54
 extern int uid;
54 55
 extern int gid;
Browse code

- new configuration option server_id added, this option can be used to discriminate servers within a cluster, to be used by modules like acc_db and usrloc

Jan Janak authored on 14/04/2008 01:46:03
Showing 1 changed files
... ...
@@ -56,6 +56,8 @@ extern char* pid_file;
56 56
 extern char* pgid_file;
57 57
 extern int own_pgid; /* whether or not we have our own pgid (and it's ok to use kill(0, sig) */
58 58
 
59
+extern int server_id; /* A unique ID of the SIP server */
60
+
59 61
 extern struct socket_info* bind_address; /* pointer to the crt. proc.
60 62
 											listening address */
61 63
 extern struct socket_info* sendipv4; /* ipv4 socket to use when msg.
Browse code

- use_dns_cache can be enabled/disabled runtime - dns_cache_init is introduced: if set to 0, the dns cache is not initialized, and cannot be enabled later (default is 1) - dst_blacklist_init is introduced: if set to 0, the dst blacklist is not initialized (similar to dns_cache_init) (default is 1)

Miklos Tirpak authored on 11/02/2008 17:11:59
Showing 1 changed files
... ...
@@ -191,7 +191,7 @@ extern int rt_timer2_policy; /* "slow" timer, SCHED_OTHER */
191 191
 
192 192
 
193 193
 #ifdef USE_DNS_CACHE
194
-extern int use_dns_cache; /* 1 if the cache is enabled, 0 otherwise */
194
+extern int dns_cache_init; /* if 0, the DNS cache is not initialized at startup */
195 195
 extern unsigned int dns_timer_interval; /* gc timer interval in s */
196 196
 extern int dns_flags; /* default flags used for the  dns_*resolvehost
197 197
                     (compatibility wrappers) */
... ...
@@ -207,6 +207,7 @@ extern struct t_dns_cache_stats* dns_cache_stats;
207 207
 #endif /* USE_DNS_CACHE_STATS */
208 208
 #endif
209 209
 #ifdef USE_DST_BLACKLIST
210
+extern int dst_blacklist_init; /* if 0, the dst blacklist is not initialized at startup */
210 211
 extern unsigned int blst_timer_interval; /*blacklist gc timer interval (in s)*/
211 212
 
212 213
 #ifdef USE_DST_BLACKLIST_STATS
Browse code

DNS resolver and cache parameters use the configuration framework that makes the config variables changeable on-the-fly.

- The resolver is reinitialized by each child process separately
when dns_retr_time, dns_retr_no, dns_servers_no, or dns_use_search_list
is changed.

- dns_reinit is introduced: the resolver is reinitialized when the
variable is set to 1, and the variable is reseted to 0 again.
It can be set via RPC for example, when /etc/resolv.conf changes,
but none of the SER config parameters are affected.

- A callback function is called by each child process after the resolver
has been reinitialized, if DNS_WATCHDOG_SUPPORT is enabled.

- socket_types is changed to be a global variable, and set by
fix_all_socket_lists(), because we have to remember for
the socket types, and do not allow dns_try_ipv6 to be enabled if there
is no ipv6 interface.

- minor bug is corrected: the expiration check is removed from
dns_cache_clean() function, when non-expired entries are deleted.

Miklos Tirpak authored on 11/02/2008 09:58:29
Showing 1 changed files
... ...
@@ -190,26 +190,11 @@ extern int rt_timer1_policy; /* "fast" timer, SCHED_OTHER */
190 190
 extern int rt_timer2_policy; /* "slow" timer, SCHED_OTHER */
191 191
 
192 192
 
193
-
194
-/* resolver */
195
-extern int dns_retr_time;
196
-extern int dns_retr_no;
197
-extern int dns_servers_no;
198
-extern int dns_search_list;
199
-extern int dns_search_fmatch;
200 193
 #ifdef USE_DNS_CACHE
201 194
 extern int use_dns_cache; /* 1 if the cache is enabled, 0 otherwise */
202
-extern int use_dns_failover; /* 1 if failover is enabled, 0 otherwise */
203
-extern unsigned int dns_cache_max_mem; /* maximum memory used for the cached
204
-										  entries*/
205
-extern unsigned int dns_neg_cache_ttl; /* neg. cache ttl */
206
-extern unsigned int dns_cache_max_ttl; /* maximum ttl */
207
-extern unsigned int dns_cache_min_ttl; /* minimum ttl */
208 195
 extern unsigned int dns_timer_interval; /* gc timer interval in s */
209 196
 extern int dns_flags; /* default flags used for the  dns_*resolvehost
210 197
                     (compatibility wrappers) */
211
-extern int dns_srv_lb; /* default SRV LB support value */
212
-extern int dns_cache_del_nonexp; /* delete non-expired values from the cache when it is full */
213 198
 
214 199
 #ifdef USE_DNS_CACHE_STATS
215 200
 struct t_dns_cache_stats{
Browse code

Destination blacklist parameters have been updated to the config framework, the following variables are changeable runtime:

- use_dst_blacklist
- dst_blacklist_expire
- dst_blacklist_mem

Miklos Tirpak authored on 13/12/2007 15:29:55
Showing 1 changed files
... ...
@@ -222,10 +222,6 @@ extern struct t_dns_cache_stats* dns_cache_stats;
222 222
 #endif /* USE_DNS_CACHE_STATS */
223 223
 #endif
224 224
 #ifdef USE_DST_BLACKLIST
225
-extern int use_dst_blacklist; /* 1 if the blacklist is enabled */
226
-extern unsigned int  blst_max_mem; /* maximum memory used for the blacklist
227
-									  entries*/
228
-extern unsigned int blst_timeout; /* blacklist entry ttl */
229 225
 extern unsigned int blst_timer_interval; /*blacklist gc timer interval (in s)*/
230 226
 
231 227
 #ifdef USE_DST_BLACKLIST_STATS
Browse code

fixes SER-321 patch reflecting comments applied

Change to DNS subsystem: if search list used (not recomended) and name
was resolved using the search list, the link between the short name (query)
and the long name (answer) is stored in DNS cache as fake CNAME record.

New config script setting available (dns_search_full_match) which controls,
whether SER will check if the extension of the name is present in search list
(defualt) or blindly accepted (faster, but little bit risky for spoofed
DNS replies)

Michal Matyska authored on 12/10/2007 22:25:40
Showing 1 changed files
... ...
@@ -196,6 +196,7 @@ extern int dns_retr_time;
196 196
 extern int dns_retr_no;
197 197
 extern int dns_servers_no;
198 198
 extern int dns_search_list;
199
+extern int dns_search_fmatch;
199 200
 #ifdef USE_DNS_CACHE
200 201
 extern int use_dns_cache; /* 1 if the cache is enabled, 0 otherwise */
201 202
 extern int use_dns_failover; /* 1 if failover is enabled, 0 otherwise */
Browse code

Makefile.defs: * added MODS_DIR macro

globals.h:
* added mods_dir variable

main.c:
* added `-L dir' option

* fixed Usage message which referred to the non-existent
`-p port' option

* fixed parsing of command-line options - options with missing
arguments were incorrectly reported as unknown options

sr_module.c:
* load_module() - added possibilty to load modules by name,
the path to the module file is <mods_dir>/<name>.so
(if EXTRA_DEBUG macro is defined <mods_dir>/<name>/<name>.so
is tried too) where <mods_dir> can be specified using `-L dir'
option on the command-line, otherwise the default value MODS_DIR
is used

Ondrej Martinek authored on 04/10/2007 18:09:24
Showing 1 changed files
... ...
@@ -43,10 +43,10 @@
43 43
 #define DO_REV_DNS 2
44 44
 
45 45
 
46
-
47
-extern char * cfg_file;
46
+extern char* mods_dir;   /* directory with dyn. loadable modules */
47
+extern char* cfg_file;
48 48
 extern int config_check;
49
-extern char *stat_file;
49
+extern char* stat_file;
50 50
 extern unsigned short port_no;
51 51
 
52 52
 extern pid_t creator_pid;  /* pid of first process before daemonization */
Browse code

on behalf of Jiri, patch adopted from 2.0 branch

* 2007-09-10 introduced phone2uri option which allows NOT to consider
* user=phone URIs as TEL URIs

Michal Matyska authored on 10/09/2007 22:26:59
Showing 1 changed files
... ...
@@ -93,6 +93,7 @@ extern unsigned short tls_port_no;
93 93
 extern int dont_fork;
94 94
 extern int dont_daemonize;
95 95
 extern int check_via;
96
+extern int phone2tel;
96 97
 extern int received_dns;
97 98
 extern int syn_branch;
98 99
 /* extern int process_no; */
Browse code

- disable by default path MTU discovery on linux (unfortunately on linux path MTU discovery is enabled by default even for udp, which produces packets with the DF flag set). It can be re-enabled using the new pmtu_discovery config option. Patch from Hendrik Scholz (hscholz). Closes SER-275.

Andrei Pelinescu-Onciul authored on 27/08/2007 23:05:59
Showing 1 changed files
... ...
@@ -121,6 +121,7 @@ extern int stun_allow_fp;
121 121
 #endif
122 122
 
123 123
 extern int tos;
124
+extern int pmtu_discovery;
124 125
 
125 126
 /*
126 127
  * debug & log_stderr moved to dprint.h*/
Browse code

dns_cache_del_nonexp configuration option is introduced: it allows deletion of non-expired records from the DNS cache when the cache becomes full. Disabled by default.

Miklos Tirpak authored on 21/08/2007 11:08:15
Showing 1 changed files
... ...
@@ -206,6 +206,7 @@ extern unsigned int dns_timer_interval; /* gc timer interval in s */
206 206
 extern int dns_flags; /* default flags used for the  dns_*resolvehost
207 207
                     (compatibility wrappers) */
208 208
 extern int dns_srv_lb; /* default SRV LB support value */
209
+extern int dns_cache_del_nonexp; /* delete non-expired values from the cache when it is full */
209 210
 
210 211
 #ifdef USE_DNS_CACHE_STATS
211 212
 struct t_dns_cache_stats{
Browse code

- dst blacklist and DNS cache measurements added

Gergely Kovacs authored on 31/07/2007 13:26:05
Showing 1 changed files
... ...
@@ -23,8 +23,8 @@
23 23
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 24
  * GNU General Public License for more details.
25 25
  *
26
- * You should have received a copy of the GNU General Public License 
27
- * along with this program; if not, write to the Free Software 
26
+ * You should have received a copy of the GNU General Public License
27
+ * along with this program; if not, write to the Free Software
28 28
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29 29
  */
30 30
 
... ...
@@ -179,7 +179,7 @@ extern int shm_force_alloc;
179 179
 extern int mlock_pages;
180 180
 
181 181
 /* real time stuff */
182
-extern int real_time; 
182
+extern int real_time;
183 183
 extern int rt_prio;
184 184
 extern int rt_policy; /* SCHED_OTHER */
185 185
 extern int rt_timer1_prio;  /* "fast" timer */
... ...
@@ -197,23 +197,40 @@ extern int dns_search_list;
197 197
 #ifdef USE_DNS_CACHE
198 198
 extern int use_dns_cache; /* 1 if the cache is enabled, 0 otherwise */
199 199
 extern int use_dns_failover; /* 1 if failover is enabled, 0 otherwise */
200
-extern unsigned int dns_cache_max_mem; /* maximum memory used for the cached 
200
+extern unsigned int dns_cache_max_mem; /* maximum memory used for the cached
201 201
 										  entries*/
202 202
 extern unsigned int dns_neg_cache_ttl; /* neg. cache ttl */
203 203
 extern unsigned int dns_cache_max_ttl; /* maximum ttl */
204 204
 extern unsigned int dns_cache_min_ttl; /* minimum ttl */
205 205
 extern unsigned int dns_timer_interval; /* gc timer interval in s */
206
-extern int dns_flags; /* default flags used for the  dns_*resolvehost 
206
+extern int dns_flags; /* default flags used for the  dns_*resolvehost
207 207
                     (compatibility wrappers) */
208 208
 extern int dns_srv_lb; /* default SRV LB support value */
209 209
 
210
+#ifdef USE_DNS_CACHE_STATS
211
+struct t_dns_cache_stats{
212
+	unsigned long dns_req_cnt;
213
+	unsigned long dc_hits_cnt;
214
+	unsigned long dc_neg_hits_cnt;
215
+	unsigned long dc_lru_cnt;
216
+};
217
+extern struct t_dns_cache_stats* dns_cache_stats;
218
+#endif /* USE_DNS_CACHE_STATS */
210 219
 #endif
211 220
 #ifdef USE_DST_BLACKLIST
212 221
 extern int use_dst_blacklist; /* 1 if the blacklist is enabled */
213
-extern unsigned int  blst_max_mem; /* maximum memory used for the blacklist 
222
+extern unsigned int  blst_max_mem; /* maximum memory used for the blacklist
214 223
 									  entries*/
215 224
 extern unsigned int blst_timeout; /* blacklist entry ttl */
216 225
 extern unsigned int blst_timer_interval; /*blacklist gc timer interval (in s)*/
226
+
227
+#ifdef USE_DST_BLACKLIST_STATS
228
+struct t_dst_blacklist_stats{
229
+	unsigned long bkl_hit_cnt;
230
+	unsigned long bkl_lru_cnt;
231
+};
232
+extern struct t_dst_blacklist_stats* dst_blacklist_stats;
233
+#endif /* USE_DST_BLACKLIST_STATS */
217 234
 #endif
218 235
 
219 236
 #endif
Browse code

Removing conflicting declarations, they are not needed anymore, and SER failed to compile because of them.

Miklos Tirpak authored on 26/07/2007 12:06:30
Showing 1 changed files
... ...
@@ -85,12 +85,6 @@ extern int tcp_send_timeout;
85 85
 extern int tcp_con_lifetime; /* connection lifetime */
86 86
 extern enum poll_types tcp_poll_method;
87 87
 extern int tcp_max_connections;
88
-extern int tcp_use_source_ipv4;
89
-extern struct sockaddr_in tcp_source_ipv4;
90
-#ifdef USE_IPV6
91
-extern int tcp_use_source_ipv6;
92
-extern struct sockaddr_in6 tcp_source_ipv6;
93
-#endif
94 88
 #endif
95 89
 #ifdef USE_TLS
96 90
 extern int tls_disable;
Browse code

- added register_fds(no), used to register the maximum numbers of fds opened by a module (on a per process basis). Needed for code that needs to know the maximum possible open fd number (like the tcp code). - added get_max_open_fds()

Andrei Pelinescu-Onciul authored on 04/07/2007 17:27:33
Showing 1 changed files
... ...
@@ -84,7 +84,6 @@ extern int tcp_connect_timeout;
84 84
 extern int tcp_send_timeout;
85 85
 extern int tcp_con_lifetime; /* connection lifetime */
86 86
 extern enum poll_types tcp_poll_method;
87
-extern int tcp_max_fd_no;
88 87
 extern int tcp_max_connections;
89 88
 extern int tcp_use_source_ipv4;
90 89
 extern struct sockaddr_in tcp_source_ipv4;
Browse code

- dns naptr support (off by default) - dns naptr related config options: dns_try_naptr (off by default), dns_udp_pref, dns_tcp_pref. dns_tls_pref (protocol preferences for naptr record selection) - dns srv load balancing config options: dns_srv_lb (off by default) - dns resolver & cache api change (to support getting the protocol via naptr) - fix: dns iteration through A & AAAA records was not correct

For more info see doc/dns.txt.

Andrei Pelinescu-Onciul authored on 18/06/2007 21:20:58
Showing 1 changed files
... ...
@@ -212,6 +212,8 @@ extern unsigned int dns_cache_min_ttl; /* minimum ttl */
212 212
 extern unsigned int dns_timer_interval; /* gc timer interval in s */
213 213
 extern int dns_flags; /* default flags used for the  dns_*resolvehost 
214 214
                     (compatibility wrappers) */
215
+extern int dns_srv_lb; /* default SRV LB support value */
216
+
215 217
 #endif
216 218
 #ifdef USE_DST_BLACKLIST
217 219
 extern int use_dst_blacklist; /* 1 if the blacklist is enabled */
Browse code

- added the new PROC_INIT rank and the init_child(PROC_INIT) calls (see doc/modules_init.txt for more info) - introduced new options for locking pages in memory, pre-faulting the shared memory pages and real time mode

Andrei Pelinescu-Onciul authored on 07/06/2007 21:40:14
Showing 1 changed files
... ...
@@ -175,12 +175,27 @@ extern str default_global_address;
175 175
 extern str default_global_port;
176 176
 
177 177
 /* how much time to allow for shutdown, before killing everything */
178
-int ser_kill_timeout;
178
+extern int ser_kill_timeout;
179 179
 
180 180
 /* core dump and file limits */
181 181
 extern int disable_core_dump;
182 182
 extern int open_files_limit;
183 183
 
184
+/* memory lock/pre-fault */
185
+extern int shm_force_alloc;
186
+extern int mlock_pages;
187
+
188
+/* real time stuff */
189
+extern int real_time; 
190
+extern int rt_prio;
191
+extern int rt_policy; /* SCHED_OTHER */
192
+extern int rt_timer1_prio;  /* "fast" timer */
193
+extern int rt_timer2_prio;  /* "slow" timer */
194
+extern int rt_timer1_policy; /* "fast" timer, SCHED_OTHER */
195
+extern int rt_timer2_policy; /* "slow" timer, SCHED_OTHER */
196
+
197
+
198
+
184 199
 /* resolver */
185 200
 extern int dns_retr_time;
186 201
 extern int dns_retr_no;
... ...
@@ -189,19 +204,21 @@ extern int dns_search_list;
189 204
 #ifdef USE_DNS_CACHE
190 205
 extern int use_dns_cache; /* 1 if the cache is enabled, 0 otherwise */
191 206
 extern int use_dns_failover; /* 1 if failover is enabled, 0 otherwise */
192
-unsigned int dns_cache_max_mem; /* maximum memory used for the cached entries*/
193
-unsigned int dns_neg_cache_ttl; /* neg. cache ttl */
194
-unsigned int dns_cache_max_ttl; /* maximum ttl */
195
-unsigned int dns_cache_min_ttl; /* minimum ttl */
196
-unsigned int dns_timer_interval; /* gc timer interval in s */
197
-int dns_flags; /* default flags used for the  dns_*resolvehost 
207
+extern unsigned int dns_cache_max_mem; /* maximum memory used for the cached 
208
+										  entries*/
209
+extern unsigned int dns_neg_cache_ttl; /* neg. cache ttl */
210
+extern unsigned int dns_cache_max_ttl; /* maximum ttl */
211
+extern unsigned int dns_cache_min_ttl; /* minimum ttl */
212
+extern unsigned int dns_timer_interval; /* gc timer interval in s */
213
+extern int dns_flags; /* default flags used for the  dns_*resolvehost 
198 214
                     (compatibility wrappers) */
199 215
 #endif
200 216
 #ifdef USE_DST_BLACKLIST
201 217
 extern int use_dst_blacklist; /* 1 if the blacklist is enabled */
202
-unsigned int  blst_max_mem; /* maximum memory used for the blacklist entries*/
203
-unsigned int blst_timeout; /* blacklist entry ttl */
204
-unsigned int blst_timer_interval; /* blacklist gc timer interval (in s)*/
218
+extern unsigned int  blst_max_mem; /* maximum memory used for the blacklist 
219
+									  entries*/
220
+extern unsigned int blst_timeout; /* blacklist entry ttl */
221
+extern unsigned int blst_timer_interval; /*blacklist gc timer interval (in s)*/
205 222
 #endif
206 223
 
207 224
 #endif
Browse code

Add two new config variables to set source IP on outbound TCP connections. As Jan stated this is useful for HA setups with virtual IPs.

Patch provided by Jan Andres <jan.andres@freenet-ag.de>
Closes SER-277

Hendrik Scholz authored on 30/05/2007 12:48:24
Showing 1 changed files
... ...
@@ -86,6 +86,12 @@ extern int tcp_con_lifetime; /* connection lifetime */
86 86
 extern enum poll_types tcp_poll_method;
87 87
 extern int tcp_max_fd_no;
88 88
 extern int tcp_max_connections;
89
+extern int tcp_use_source_ipv4;
90
+extern struct sockaddr_in tcp_source_ipv4;
91
+#ifdef USE_IPV6
92
+extern int tcp_use_source_ipv6;
93
+extern struct sockaddr_in6 tcp_source_ipv6;
94
+#endif
89 95
 #endif
90 96
 #ifdef USE_TLS
91 97
 extern int tls_disable;
Browse code

- relax db_init BUG check (allow db init from fixup functions)

(SER-227 related)

Andrei Pelinescu-Onciul authored on 23/02/2007 21:03:38
Showing 1 changed files
... ...
@@ -146,6 +146,7 @@ extern int process_no;
146 146
 extern int reply_to_via;
147 147
 
148 148
 extern int is_main;
149
+extern int fixup_complete;
149 150
 
150 151
 /* debugging level for dumping memory status */
151 152
 extern int memlog;
Browse code

- init_childs(PROC_MAIN) moved before starting tcp_main to allow possible tcp usage from module started processes - fork_process() sanity checks & debugging: fail & log a bug if called with make_sock==1 from a process != main or if called after tcp was started; reset is_main for children - fork_tcp_process() sanity checks as above - init_pt(): initialize tcp comm. fds to -1, fix description writing for main/attendant.

Andrei Pelinescu-Onciul authored on 25/10/2006 18:44:36
Showing 1 changed files
... ...
@@ -76,6 +76,7 @@ extern struct socket_info* sendipv6_tls; /* same as above for ipv6 */
76 76
 extern unsigned int maxbuffer;
77 77
 extern int children_no;
78 78
 #ifdef USE_TCP
79
+extern int tcp_main_pid;
79 80
 extern int tcp_children_no;
80 81
 extern int tcp_disable;
81 82
 extern int tcp_accept_aliases;
Browse code

- log messages in children signal handlers off if NO_SIG_DEBUG is defined (safer, but not default for now) - new config param.: exit_timeout (how much time ser will wait for its shutdown to complete, when it expires it will kill everything) - missing timeout added to SIGTERM triggered shutdown

Andrei Pelinescu-Onciul authored on 25/10/2006 16:44:21
Showing 1 changed files
... ...
@@ -166,6 +166,9 @@ extern str default_global_address;
166 166
 /* pre-ser ports */
167 167
 extern str default_global_port;
168 168
 
169
+/* how much time to allow for shutdown, before killing everything */
170
+int ser_kill_timeout;
171
+
169 172
 /* core dump and file limits */
170 173
 extern int disable_core_dump;
171 174
 extern int open_files_limit;
Browse code

- added STUN keep-alive functionality in accordance with draft-ietf-behave-rfc3489bis-04.txt

Vladimir Marek authored on 13/10/2006 13:08:42
Showing 1 changed files
... ...
@@ -114,6 +114,12 @@ extern int mcast_loopback;
114 114
 extern int mcast_ttl;
115 115
 #endif /* USE_MCAST */
116 116
 
117
+#ifdef USE_STUN
118
+extern unsigned int stun_refresh_interval;
119
+extern int stun_allow_stun;
120
+extern int stun_allow_fp;
121
+#endif
122
+
117 123
 extern int tos;
118 124
 
119 125
 /*
Browse code

- dns cache support (ser will cache both positive and negative responses if turned on, see doc/dns.txt for more details & config options) - dns failover support: when a name resolves to more then 1 ip (either multiple A or AAAA records or multiple SRVs) and sending to the first ip fails, ser will retry with the others. By default is off. See doc/dns.txt for more details/config options a.s.o. - destination blacklist: when sending to some destination (defined by ip:port and protocol) fails, ser will temporarily add this destination in a blacklist giving future sends the opportunity of immediately failing. Destination are also added to the blacklist on tm invite timeouts (when no response is received in the fr_timer interval). By default is off, see doc/dst_blacklist.txt form more details/config options. - small makefile fixes (in mode=debug) - resolver get_record api changes (updated enum)

WARNING: there are a lot of changes in tm

Andrei Pelinescu-Onciul authored on 15/09/2006 10:37:44
Showing 1 changed files
... ...
@@ -123,6 +123,7 @@ extern int tos;
123 123
 /* extern int *pids; -moved to pt.h */
124 124
 
125 125
 extern int cfg_errors;
126
+extern int cfg_warnings;
126 127
 extern unsigned int msg_no;
127 128
 
128 129
 extern unsigned long shm_mem_size;