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 pid_t creator_pid; /* pid of first process before daemonization */
55 extern char* pid_file;
56 extern char* pgid_file;
57 extern int own_pgid; /* whether or not we have our own pgid (and it's ok to use kill(0, sig) */
59 extern struct socket_info* bind_address; /* pointer to the crt. proc.
61 extern struct socket_info* sendipv4; /* ipv4 socket to use when msg.
63 extern struct socket_info* sendipv6; /* same as above for ipv6 */
65 extern struct socket_info* sendipv4_tcp; /* ipv4 socket to use when msg.
67 extern struct socket_info* sendipv6_tcp; /* same as above for ipv6 */
68 extern int unix_tcp_sock; /* socket used for communication with tcp main*/
71 extern struct socket_info* sendipv4_tls; /* ipv4 socket to use when msg.
73 extern struct socket_info* sendipv6_tls; /* same as above for ipv6 */
76 extern unsigned int maxbuffer;
77 extern int children_no;
79 extern int tcp_main_pid;
80 extern int tcp_children_no;
81 extern int tcp_disable;
82 extern int tcp_accept_aliases;
83 extern int tcp_connect_timeout;
84 extern int tcp_send_timeout;
85 extern int tcp_con_lifetime; /* connection lifetime */
86 extern enum poll_types tcp_poll_method;
87 extern int tcp_max_connections;
90 extern int tls_disable;
91 extern unsigned short tls_port_no;
94 extern int dont_daemonize;
97 extern int received_dns;
98 extern int syn_branch;
99 /* extern int process_no; */
100 extern int child_rank;
101 extern int sip_warning;
102 extern int server_signature;
105 extern char* sock_user;
106 extern char* sock_group;
109 extern int sock_mode;
110 extern char* chroot_dir;
111 extern char* working_dir;
114 extern int mcast_loopback;
115 extern int mcast_ttl;
116 #endif /* USE_MCAST */
119 extern unsigned int stun_refresh_interval;
120 extern int stun_allow_stun;
121 extern int stun_allow_fp;
125 extern int pmtu_discovery;
128 * debug & log_stderr moved to dprint.h*/
130 /* extern process_bm_t process_bit; */
131 /* extern int *pids; -moved to pt.h */
133 extern int cfg_errors;
134 extern int cfg_warnings;
135 extern unsigned int msg_no;
137 extern unsigned long shm_mem_size;
139 /* AVP configuration */
140 extern char *avp_db_url; /* db url used by user preferences (AVPs) */
144 extern int process_no;
147 extern int reply_to_via;
150 extern int fixup_complete;
152 /* debugging level for dumping memory status */
154 /* debugging level for malloc debugging messages */
157 /* debugging level for timer debugging (see -DTIMER_DEBUG) */
160 /* looking up outbound interface ? */
163 /* command-line arguments */
165 extern char **my_argv;
167 /* pre-set addresses */
168 extern str default_global_address;
170 extern str default_global_port;
172 /* how much time to allow for shutdown, before killing everything */
173 extern int ser_kill_timeout;
175 /* core dump and file limits */
176 extern int disable_core_dump;
177 extern int open_files_limit;
179 /* memory lock/pre-fault */
180 extern int shm_force_alloc;
181 extern int mlock_pages;
183 /* real time stuff */
184 extern int real_time;
186 extern int rt_policy; /* SCHED_OTHER */
187 extern int rt_timer1_prio; /* "fast" timer */
188 extern int rt_timer2_prio; /* "slow" timer */
189 extern int rt_timer1_policy; /* "fast" timer, SCHED_OTHER */
190 extern int rt_timer2_policy; /* "slow" timer, SCHED_OTHER */
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;
201 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
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 extern unsigned int dns_timer_interval; /* gc timer interval in s */
209 extern int dns_flags; /* default flags used for the dns_*resolvehost
210 (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 */
214 #ifdef USE_DNS_CACHE_STATS
215 struct t_dns_cache_stats{
216 unsigned long dns_req_cnt;
217 unsigned long dc_hits_cnt;
218 unsigned long dc_neg_hits_cnt;
219 unsigned long dc_lru_cnt;
221 extern struct t_dns_cache_stats* dns_cache_stats;
222 #endif /* USE_DNS_CACHE_STATS */
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
228 extern unsigned int blst_timeout; /* blacklist entry ttl */
229 extern unsigned int blst_timer_interval; /*blacklist gc timer interval (in s)*/
231 #ifdef USE_DST_BLACKLIST_STATS
232 struct t_dst_blacklist_stats{
233 unsigned long bkl_hit_cnt;
234 unsigned long bkl_lru_cnt;
236 extern struct t_dst_blacklist_stats* dst_blacklist_stats;
237 #endif /* USE_DST_BLACKLIST_STATS */