globals.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * $Id$
  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. * [email protected]
  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. #ifndef globals_h
  31. #define globals_h
  32. #include "types.h"
  33. #include "ip_addr.h"
  34. #include "str.h"
  35. #define NO_DNS 0
  36. #define DO_DNS 1
  37. #define DO_REV_DNS 2
  38. extern char * cfg_file;
  39. extern char *stat_file;
  40. extern struct socket_info sock_info[]; /* all addresses we listen/send from*/
  41. extern struct socket_info tcp_info[]; /* all tcp sockets we listen on*/
  42. extern int sock_no; /* number of addresses/open sockets*/
  43. extern unsigned short port_no;
  44. /*
  45. extern char port_no_str[];
  46. extern int port_no_str_len;
  47. */
  48. /*
  49. extern char * names[];
  50. extern int names_len[];
  51. extern struct ip_addr addresses[];
  52. extern int addresses_no;
  53. */
  54. extern struct socket_info* bind_address; /* pointer to the crt. proc.
  55. listening address */
  56. extern int bind_idx; /* same as above but index in the bound[] array */
  57. extern struct socket_info* sendipv4; /* ipv4 socket to use when msg.
  58. comes from ipv6*/
  59. extern struct socket_info* sendipv6; /* same as above for ipv6 */
  60. #ifdef USE_TCP
  61. extern struct socket_info* sendipv4_tcp; /* ipv4 socket to use when msg.
  62. comes from ipv6*/
  63. extern struct socket_info* sendipv6_tcp; /* same as above for ipv6 */
  64. extern int unix_tcp_sock; /* socket used for communication with tcp main*/
  65. #endif
  66. extern unsigned int maxbuffer;
  67. extern int children_no;
  68. #ifdef USE_TCP
  69. extern int tcp_children_no;
  70. #endif
  71. extern int dont_fork;
  72. extern int check_via;
  73. extern int received_dns;
  74. extern int syn_branch;
  75. /* extern int process_no; */
  76. extern int sip_warning;
  77. extern int server_signature;
  78. extern char* user;
  79. extern char* group;
  80. /*
  81. * debug & log_stderr moved to dprint.h*/
  82. /* extern process_bm_t process_bit; */
  83. /* extern int *pids; -moved to pt.h */
  84. extern int cfg_errors;
  85. extern unsigned int msg_no;
  86. extern unsigned int shm_mem_size;
  87. /* FIFO server config */
  88. char extern *fifo; /* FIFO name */
  89. extern int fifo_mode;
  90. /* moved to pt.h
  91. extern int *pids;
  92. extern int process_no;
  93. */
  94. extern int reply_to_via;
  95. extern int is_main;
  96. /* debugging level for dumping memory status */
  97. extern int memlog;
  98. #endif