-
Notifications
You must be signed in to change notification settings - Fork 0
/
globals.h
172 lines (144 loc) · 4.86 KB
/
globals.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/*
* $Id$
*
* Copyright (C) 2001-2003 FhG Fokus
*
* This file is part of opensips, a free SIP server.
*
* opensips is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version
*
* opensips is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*!
* \file
* \brief Global variables
*/
#ifndef globals_h
#define globals_h
#include "ip_addr.h"
#include "str.h"
#include "poll_types.h"
#define DO_DNS 1
#define DO_REV_DNS 2
extern char * cfg_file;
extern int config_check;
extern char *stat_file;
extern unsigned short port_no;
extern char* pid_file;
extern char* pgid_file;
extern struct socket_info* bind_address; /*!< pointer to the crt. proc. listening address */
extern struct socket_info* sendipv4; /*!< ipv4 socket to use when msg. comes from ipv6*/
extern struct socket_info* sendipv6; /*!< same as above for ipv6 */
#ifdef USE_TCP
extern struct socket_info* sendipv4_tcp; /*!< ipv4 socket to use when msg. comes from ipv6*/
extern struct socket_info* sendipv6_tcp; /*!< same as above for ipv6 */
extern int unix_tcp_sock; /*!< socket used for communication with tcp main*/
#endif
#ifdef USE_TLS
extern struct socket_info* sendipv4_tls; /*!< ipv4 socket to use when msg. comes from ipv6*/
extern struct socket_info* sendipv6_tls; /*!< same as above for ipv6 */
#endif
#ifdef USE_SCTP
extern struct socket_info* sendipv4_sctp; /*!< ipv4 socket to use when msg. comes from ipv6*/
extern struct socket_info* sendipv6_sctp; /*!< same as above for ipv6 */
#endif
extern int auto_aliases;
extern unsigned int maxbuffer;
extern int children_no;
#ifdef USE_TCP
extern int tcp_children_no;
extern int tcp_disable;
extern int tcp_accept_aliases;
extern int tcp_connect_timeout;
extern int tcp_send_timeout;
extern int tcp_con_lifetime; /*!< connection lifetime */
extern int tcp_listen_backlog;
extern enum poll_types tcp_poll_method;
extern int tcp_max_fd_no;
extern int tcp_max_connections;
extern int tcp_crlf_pingpong;
extern int tcp_keepalive;
extern int tcp_keepcount;
extern int tcp_keepidle;
extern int tcp_keepinterval;
extern int tcp_max_msg_chunks;
extern int tcp_max_msg_time;
extern int tcp_async;
extern int tcp_async_local_connect_timeout;
extern int tcp_async_local_write_timeout;
extern int tcp_async_max_postponed_chunks;
#endif
#ifdef USE_TLS
extern int tls_disable;
extern unsigned short tls_port_no;
#endif
#ifdef USE_SCTP
extern int sctp_disable;
#endif
extern int dont_fork;
extern int no_daemon_mode;
extern int check_via;
extern int received_dns;
/* extern int process_no; */
extern int sip_warning;
extern int server_signature;
extern str server_header;
extern str user_agent_header;
extern char* user;
extern char* group;
extern char* sock_user;
extern char* sock_group;
extern int sock_uid;
extern int sock_gid;
extern int sock_mode;
extern char* chroot_dir;
extern char* working_dir;
#ifdef USE_MCAST
extern int mcast_loopback;
extern int mcast_ttl;
#endif /* USE_MCAST */
extern int tos;
extern int disable_dns_failover;
extern int disable_dns_blacklist;
extern int cfg_errors;
extern unsigned long shm_mem_size;
extern unsigned int shm_hash_split_percentage;
extern unsigned int shm_hash_split_factor;
extern unsigned int shm_secondary_hash_size;
extern unsigned long pkg_mem_size;
extern int reply_to_via;
extern int is_main;
extern int memlog; /*!< debugging level for printing memory debugs */
extern int memdump; /*!< debugging level for dumping memory status */
extern int execmsgthreshold; /*!< Maximum number of microseconds a SIP msg processing can last
before triggering Warning log */
extern int execdnsthreshold;
extern int tcpthreshold;
extern int mhomed; /*!< looking up outbound interface ? */
extern int my_argc; /*!< command-line arguments */
extern char **my_argv;
extern str default_global_address; /*!< pre-set addresses */
extern str default_global_port; /*!< pre-ser ports */
extern int disable_core_dump; /*!< core dump limits */
extern int open_files_limit; /*!< file limits */
extern int dns_retr_time; /*!< DNS resolver: Retry time */
extern int dns_retr_no; /*!< DNS resolver : Retry # */
extern int dns_servers_no; /*!< DNS resolver: Server no */
extern int dns_search_list; /*!< DNS resolver: Search list */
extern int max_while_loops;
extern int sl_fwd_disabled;
extern time_t startup_time;
extern char *db_version_table;
extern char *db_default_url;
extern int disable_503_translation;
#endif