cfg_core.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2007 iptelorg GmbH
  5. *
  6. * This file is part of ser, a free SIP server.
  7. *
  8. * ser is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version
  12. *
  13. * For a license to use the ser software under conditions
  14. * other than those described here, or to purchase support for this
  15. * software, please contact iptel.org by e-mail at the following addresses:
  16. * [email protected]
  17. *
  18. * ser is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  26. *
  27. * HOWTO:
  28. * If you need a new configuration variable within the core, put it into
  29. * struct cfg_goup_core, and define it in cfg_core.c:core_cfg_def array.
  30. * The default value of the variable must be inserted into
  31. * cfg_core.c:default_core_cfg
  32. * Include this header file in your source code, and retrieve the
  33. * value with cfg_get(core, core_cfg, variable_name).
  34. *
  35. * History
  36. * -------
  37. * 2007-12-03 Initial version (Miklos)
  38. */
  39. /** core runtime config.
  40. * @file cfg_core.h
  41. * @ingroup core
  42. *
  43. * Module: @ref core
  44. */
  45. #ifndef _CFG_CORE_H
  46. #define _CFG_CORE_H
  47. #include "cfg/cfg.h"
  48. extern void *core_cfg;
  49. /*! \brief configuration default values */
  50. struct cfg_group_core {
  51. int debug;
  52. int log_facility;
  53. int memdbg; /*!< log level for memory debugging messages */
  54. #ifdef USE_DST_BLACKLIST
  55. /* blacklist */
  56. int use_dst_blacklist; /*!< 1 if blacklist is enabled */
  57. unsigned int blst_timeout; /*!< blacklist entry ttl */
  58. unsigned int blst_max_mem; /*!< maximum memory used for the
  59. blacklist entries */
  60. unsigned int blst_udp_imask; /* ignore mask for udp */
  61. unsigned int blst_tcp_imask; /* ignore mask for tcp */
  62. unsigned int blst_tls_imask; /* ignore mask for tls */
  63. unsigned int blst_sctp_imask; /* ignore mask for sctp */
  64. #endif
  65. /* resolver */
  66. int dns_try_ipv6;
  67. int dns_try_naptr;
  68. int dns_udp_pref;
  69. int dns_tcp_pref;
  70. int dns_tls_pref;
  71. int dns_sctp_pref;
  72. int dns_retr_time;
  73. int dns_retr_no;
  74. int dns_servers_no;
  75. int dns_search_list;
  76. int dns_search_fmatch;
  77. int dns_reinit;
  78. int dns_naptr_ignore_rfc;
  79. /* DNS cache */
  80. #ifdef USE_DNS_CACHE
  81. int use_dns_cache;
  82. int dns_cache_flags;
  83. int use_dns_failover;
  84. int dns_srv_lb;
  85. unsigned int dns_neg_cache_ttl;
  86. unsigned int dns_cache_min_ttl;
  87. unsigned int dns_cache_max_ttl;
  88. unsigned int dns_cache_max_mem;
  89. int dns_cache_del_nonexp;
  90. int dns_cache_rec_pref;
  91. #endif
  92. #ifdef PKG_MALLOC
  93. int mem_dump_pkg;
  94. #endif
  95. #ifdef SHM_MEM
  96. int mem_dump_shm;
  97. #endif
  98. int max_while_loops;
  99. int udp_mtu; /*!< maximum send size for udp, if > try another protocol*/
  100. int udp_mtu_try_proto; /*!< if packet> udp_mtu, try proto (e.g. TCP) */
  101. int udp4_raw; /* use raw sockets for sending on udp ipv 4 */
  102. int udp4_raw_mtu; /* mtu used when using udp raw socket */
  103. int udp4_raw_ttl; /* ttl used when using udp raw sockets */
  104. int force_rport; /*!< if set rport will always be forced*/
  105. int memlog; /*!< log level for memory status/summary info */
  106. int mem_summary; /*!< display memory status/summary info on exit */
  107. int mem_safety; /*!< memory safety control option */
  108. int mem_join; /*!< memory free fragments join option */
  109. int corelog; /*!< log level for non-critcal core error messages */
  110. int latency_log; /*!< log level for latency limits messages */
  111. int latency_limit_db; /*!< alert limit of running db commands */
  112. int latency_limit_action; /*!< alert limit of running cfg actions */
  113. };
  114. extern struct cfg_group_core default_core_cfg;
  115. extern cfg_def_t core_cfg_def[];
  116. #endif /* _CFG_CORE_H */