cfg_core.h 3.7 KB

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