globals.h
1b1b19d8
 /*
4bd1673d
  * $Id$
1b1b19d8
  *
  * global variables
  *
7dd0b342
  *
  * Copyright (C) 2001-2003 Fhg Fokus
  *
  * This file is part of ser, a free SIP server.
  *
  * ser 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
  *
  * For a license to use the ser software under conditions
  * other than those described here, or to purchase support for this
  * software, please contact iptel.org by e-mail at the following addresses:
  *    info@iptel.org
  *
  * ser 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
1b1b19d8
  */
 
 
7dd0b342
 
1b1b19d8
 #ifndef globals_h
 #define globals_h
 
4bd1673d
 #include "types.h"
4e2fdd79
 #include "ip_addr.h"
36ef0329
 #include "str.h"
4bd1673d
 
1b1b19d8
 #define NO_DNS     0
 #define DO_DNS     1
 #define DO_REV_DNS 2
 
 
36ef0329
 
1b1b19d8
 extern char * cfg_file;
dda578ba
 extern int config_check;
f571aa35
 extern char *stat_file;
beb35d95
 extern struct socket_info sock_info[]; /* all addresses we listen/send from*/
 #ifdef USE_TCP
 extern struct socket_info tcp_info[]; /* all tcp sockets we listen on*/
 #endif
 #ifdef USE_TLS
 extern struct socket_info tls_info[]; /* tcp-tls sockets */
 #endif
 extern int sock_no; /* number of addresses/open sockets*/
1b1b19d8
 extern unsigned short port_no;
19710544
 
e3fc93f4
 extern struct socket_info* bind_address; /* pointer to the crt. proc.
 											listening address */
beb35d95
 extern int bind_idx; /* same as above but index in the bound[] array */
e3fc93f4
 extern struct socket_info* sendipv4; /* ipv4 socket to use when msg.
 										comes from ipv6*/
36ef0329
 extern struct socket_info* sendipv6; /* same as above for ipv6 */
0c5da34b
 #ifdef USE_TCP
f2f969dd
 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 */
0c5da34b
 extern int unix_tcp_sock; /* socket used for communication with tcp main*/
 #endif
e9b02e8e
 #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
0c5da34b
 
36ef0329
 extern unsigned int maxbuffer;
7268726e
 extern int children_no;
5b532c7f
 #ifdef USE_TCP
 extern int tcp_children_no;
5dcfb23d
 extern int tcp_disable;
beb35d95
 extern int tcp_connect_timeout;
 extern int tcp_send_timeout;
5b532c7f
 #endif
28427aa4
 #ifdef USE_TLS
 extern int tls_disable;
057f0454
 extern unsigned short tls_port_no;
28427aa4
 #endif
1b1b19d8
 extern int dont_fork;
 extern int check_via;
 extern int received_dns;
caf80ae6
 extern int syn_branch;
d9e14035
 /* extern int process_no; */
caf80ae6
 extern int sip_warning;
 extern int server_signature;
054cb6cf
 extern char* user;
 extern char* group;
3e8c3475
 extern char* chroot_dir;
 extern char* working_dir;
 
4e2fdd79
 /*
  * debug & log_stderr moved to dprint.h*/
4bd1673d
 
a76545c8
 /* extern process_bm_t process_bit; */
d9e14035
 /* extern int *pids; -moved to pt.h */
1b1b19d8
 
63fa628f
 extern int cfg_errors;
e72b5b50
 extern unsigned int msg_no;
1b1b19d8
 
40a8d9dd
 extern unsigned int shm_mem_size;
 
caf80ae6
 /* FIFO server config */
 char extern *fifo; /* FIFO name */
 extern int fifo_mode;
 
d9e14035
 /* moved to pt.h
caf80ae6
 extern int *pids;
 extern int process_no;
d9e14035
 */
caf80ae6
 
 extern int reply_to_via;
 
71bb231e
 extern int is_main;
 
609ada42
 /* debugging level for dumping memory status */
 extern int memlog;
 
2d4b798e
 /* looking up outbound interface ? */
 extern int mhomed;
 
049f64c2
 /* command-line arguments */
 extern int my_argc;
 extern char **my_argv;
 
6bfaa042
 /* pre-set addresses */
 extern str default_global_address;
 /* pre-ser ports */
 extern str default_global_port;
 
1b1b19d8
 #endif