globals.h
1b1b19d8
 /*
4bd1673d
  * $Id$
1b1b19d8
  *
  * global variables
  *
7dd0b342
  *
53c7e0f1
  * Copyright (C) 2001-2003 FhG Fokus
7dd0b342
  *
  * 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"
0ba367ec
 #include "poll_types.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;
1b1b19d8
 extern unsigned short port_no;
19710544
 
c03cc017
 extern int uid;
 extern int gid;
 char* pid_file;
9a428799
 char* pgid_file;
c03cc017
 extern int own_pgid; /* whether or not we have our own pgid (and it's ok
 >--->--->--->--->--->--->--->--->--->--->--- to use kill(0, sig) */
 
e3fc93f4
 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*/
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;
59653eb8
 extern int tcp_accept_aliases;
bc977837
 extern int tcp_connect_timeout;
 extern int tcp_send_timeout;
55d8155e
 extern int tcp_con_lifetime; /* connection lifetime */
0ba367ec
 extern enum poll_types tcp_poll_method;
 extern int tcp_max_fd_no;
55d8155e
 extern int tcp_max_connections;
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;
71fd3ebd
 extern char* sock_user;
 extern char* sock_group;
 extern int sock_uid;
 extern int sock_gid;
 extern int sock_mode;
3e8c3475
 extern char* chroot_dir;
 extern char* working_dir;
 
2ba73117
 #ifdef USE_MCAST
 extern int mcast_loopback;
956d111a
 extern int mcast_ttl;
2ba73117
 #endif /* USE_MCAST */
 
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
 
c082177a
 extern unsigned long shm_mem_size;
40a8d9dd
 
caf80ae6
 /* FIFO server config */
0ba367ec
 extern char *fifo; /* FIFO name */
caf80ae6
 extern int fifo_mode;
0ba367ec
 extern char *fifo_dir; /* dir. where  reply fifos are allowed */
ed7856ed
 extern char *fifo_db_url;  /* db url used by db_fifo interface */
caf80ae6
 
58ec33d5
 /* UNIX domain socket configuration */
 extern char *unixsock_name;   /* The name of the socket */
 extern int unixsock_children; /* The number of listening children */
9a4cec7f
 extern int unixsock_tx_timeout; /* Timeout (in ms) used when sending data */
58ec33d5
 
1580c821
 /* AVP configuration */
 extern char *avp_db_url;  /* db url used by user preferences (AVPs) */
 
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;
 
385c63eb
 /* core dump and file limits */
 extern int disable_core_dump;
 extern int open_files_limit;
 
878fc194
 /* resolver */
 extern int dns_retr_time;
 extern int dns_retr_no;
 extern int dns_servers_no;
 extern int dns_search_list;
 
1b1b19d8
 #endif