7 * Copyright (C) 2001-2003 FhG Fokus
9 * This file is part of ser, a free SIP server.
11 * ser is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version
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:
21 * ser is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
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 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 #include "poll_types.h"
46 extern char* mods_dir; /* directory with dyn. loadable modules */
47 extern char* cfg_file;
48 extern int config_check;
49 extern char* stat_file;
50 extern unsigned short port_no;
52 extern time_t up_since;
53 extern pid_t creator_pid; /* pid of first process before daemonization */
56 extern char* pid_file;
57 extern char* pgid_file;
58 extern int own_pgid; /* whether or not we have our own pgid (and it's ok to use kill(0, sig) */
60 extern int server_id; /* A unique ID of the SIP server */
62 extern struct socket_info* bind_address; /* pointer to the crt. proc.
64 extern struct socket_info* sendipv4; /* ipv4 socket to use when msg.
66 extern struct socket_info* sendipv6; /* same as above for ipv6 */
68 extern struct socket_info* sendipv4_tcp; /* ipv4 socket to use when msg.
70 extern struct socket_info* sendipv6_tcp; /* same as above for ipv6 */
71 extern int unix_tcp_sock; /* socket used for communication with tcp main*/
74 extern struct socket_info* sendipv4_tls; /* ipv4 socket to use when msg.
76 extern struct socket_info* sendipv6_tls; /* same as above for ipv6 */
79 extern unsigned int maxbuffer;
80 extern int children_no;
82 extern int tcp_main_pid;
83 extern int tcp_children_no;
84 extern int tcp_disable;
85 extern int tcp_accept_aliases;
86 extern int tcp_connect_timeout;
87 extern int tcp_send_timeout;
88 extern int tcp_con_lifetime; /* connection lifetime */
89 extern enum poll_types tcp_poll_method;
90 extern int tcp_max_connections;
93 extern int tls_disable;
94 extern unsigned short tls_port_no;
97 extern int dont_daemonize;
100 extern int received_dns;
101 extern int syn_branch;
102 /* extern int process_no; */
103 extern int child_rank;
104 extern int sip_warning;
105 extern int server_signature;
108 extern char* sock_user;
109 extern char* sock_group;
112 extern int sock_mode;
113 extern char* chroot_dir;
114 extern char* working_dir;
117 extern int mcast_loopback;
118 extern int mcast_ttl;
119 #endif /* USE_MCAST */
122 extern unsigned int stun_refresh_interval;
123 extern int stun_allow_stun;
124 extern int stun_allow_fp;
128 extern int pmtu_discovery;
131 * debug & log_stderr moved to dprint.h*/
133 /* extern process_bm_t process_bit; */
134 /* extern int *pids; -moved to pt.h */
136 extern int cfg_errors;
137 extern int cfg_warnings;
138 extern unsigned int msg_no;
140 extern unsigned long shm_mem_size;
142 /* AVP configuration */
143 extern char *avp_db_url; /* db url used by user preferences (AVPs) */
147 extern int process_no;
150 extern int reply_to_via;
153 extern int fixup_complete;
155 /* debugging level for dumping memory status */
157 /* debugging level for malloc debugging messages */
160 /* debugging level for timer debugging (see -DTIMER_DEBUG) */
163 /* looking up outbound interface ? */
166 /* command-line arguments */
168 extern char **my_argv;
170 /* pre-set addresses */
171 extern str default_global_address;
173 extern str default_global_port;
175 /* how much time to allow for shutdown, before killing everything */
176 extern int ser_kill_timeout;
178 /* core dump and file limits */
179 extern int disable_core_dump;
180 extern int open_files_limit;
182 /* memory lock/pre-fault */
183 extern int shm_force_alloc;
184 extern int mlock_pages;
186 /* real time stuff */
187 extern int real_time;
189 extern int rt_policy; /* SCHED_OTHER */
190 extern int rt_timer1_prio; /* "fast" timer */
191 extern int rt_timer2_prio; /* "slow" timer */
192 extern int rt_timer1_policy; /* "fast" timer, SCHED_OTHER */
193 extern int rt_timer2_policy; /* "slow" timer, SCHED_OTHER */
197 extern int dns_cache_init; /* if 0, the DNS cache is not initialized at startup */
198 extern unsigned int dns_timer_interval; /* gc timer interval in s */
199 extern int dns_flags; /* default flags used for the dns_*resolvehost
200 (compatibility wrappers) */
202 #ifdef USE_DNS_CACHE_STATS
203 struct t_dns_cache_stats{
204 unsigned long dns_req_cnt;
205 unsigned long dc_hits_cnt;
206 unsigned long dc_neg_hits_cnt;
207 unsigned long dc_lru_cnt;
209 extern struct t_dns_cache_stats* dns_cache_stats;
210 #endif /* USE_DNS_CACHE_STATS */
212 #ifdef USE_DST_BLACKLIST
213 extern int dst_blacklist_init; /* if 0, the dst blacklist is not initialized at startup */
214 extern unsigned int blst_timer_interval; /*blacklist gc timer interval (in s)*/
216 #ifdef USE_DST_BLACKLIST_STATS
217 struct t_dst_blacklist_stats{
218 unsigned long bkl_hit_cnt;
219 unsigned long bkl_lru_cnt;
221 extern struct t_dst_blacklist_stats* dst_blacklist_stats;
222 #endif /* USE_DST_BLACKLIST_STATS */