OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / user / ser / globals.h
1 /*
2  * $Id: globals.h,v 1.52 2004/11/10 21:51:24 andrei Exp $
3  *
4  * global variables
5  *
6  *
7  * Copyright (C) 2001-2003 FhG Fokus
8  *
9  * This file is part of ser, a free SIP server.
10  *
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
15  *
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,
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.
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 
28  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29  */
30
31
32
33 #ifndef globals_h
34 #define globals_h
35
36 #include "types.h"
37 #include "ip_addr.h"
38 #include "str.h"
39
40 #define NO_DNS     0
41 #define DO_DNS     1
42 #define DO_REV_DNS 2
43
44
45
46 extern char * cfg_file;
47 extern int config_check;
48 extern char *stat_file;
49 extern unsigned short port_no;
50
51 extern int uid;
52 extern int gid;
53 char* pid_file;
54 char* pgid_file;
55 extern int own_pgid; /* whether or not we have our own pgid (and it's ok
56 >--->--->--->--->--->--->--->--->--->--->--- to use kill(0, sig) */
57
58 extern struct socket_info* bind_address; /* pointer to the crt. proc.
59                                                                                         listening address */
60 extern struct socket_info* sendipv4; /* ipv4 socket to use when msg.
61                                                                                 comes from ipv6*/
62 extern struct socket_info* sendipv6; /* same as above for ipv6 */
63 #ifdef USE_TCP
64 extern struct socket_info* sendipv4_tcp; /* ipv4 socket to use when msg.
65                                                                                 comes from ipv6*/
66 extern struct socket_info* sendipv6_tcp; /* same as above for ipv6 */
67 extern int unix_tcp_sock; /* socket used for communication with tcp main*/
68 #endif
69 #ifdef USE_TLS
70 extern struct socket_info* sendipv4_tls; /* ipv4 socket to use when msg.
71                                                                                 comes from ipv6*/
72 extern struct socket_info* sendipv6_tls; /* same as above for ipv6 */
73 #endif
74
75 extern unsigned int maxbuffer;
76 extern int children_no;
77 #ifdef USE_TCP
78 extern int tcp_children_no;
79 extern int tcp_disable;
80 extern int tcp_accept_aliases;
81 extern int tcp_connect_timeout;
82 extern int tcp_send_timeout;
83 #endif
84 #ifdef USE_TLS
85 extern int tls_disable;
86 extern unsigned short tls_port_no;
87 #endif
88 extern int dont_fork;
89 extern int check_via;
90 extern int received_dns;
91 extern int syn_branch;
92 /* extern int process_no; */
93 extern int sip_warning;
94 extern int server_signature;
95 extern char* user;
96 extern char* group;
97 extern char* sock_user;
98 extern char* sock_group;
99 extern int sock_uid;
100 extern int sock_gid;
101 extern int sock_mode;
102 extern char* chroot_dir;
103 extern char* working_dir;
104
105 #ifdef USE_MCAST
106 extern int mcast_loopback;
107 extern int mcast_ttl;
108 #endif /* USE_MCAST */
109
110 /*
111  * debug & log_stderr moved to dprint.h*/
112
113 /* extern process_bm_t process_bit; */
114 /* extern int *pids; -moved to pt.h */
115
116 extern int cfg_errors;
117 extern unsigned int msg_no;
118
119 extern unsigned long shm_mem_size;
120
121 /* FIFO server config */
122 char extern *fifo; /* FIFO name */
123 extern int fifo_mode;
124 char extern *fifo_dir; /* dir. where  reply fifos are allowed */
125 extern char *fifo_db_url;  /* db url used by db_fifo interface */
126
127 /* UNIX domain socket configuration */
128 extern char *unixsock_name;   /* The name of the socket */
129 extern int unixsock_children; /* The number of listening children */
130 extern int unixsock_tx_timeout; /* Timeout (in ms) used when sending data */
131
132 /* AVP configuration */
133 extern char *avp_db_url;  /* db url used by user preferences (AVPs) */
134
135 /* moved to pt.h
136 extern int *pids;
137 extern int process_no;
138 */
139
140 extern int reply_to_via;
141
142 extern int is_main;
143
144 /* debugging level for dumping memory status */
145 extern int memlog;
146
147 /* looking up outbound interface ? */
148 extern int mhomed;
149
150 /* command-line arguments */
151 extern int my_argc;
152 extern char **my_argv;
153
154 /* pre-set addresses */
155 extern str default_global_address;
156 /* pre-ser ports */
157 extern str default_global_port;
158
159 /* core dump and file limits */
160 extern int disable_core_dump;
161 extern int open_files_limit;
162
163 #endif