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 23 /** Kamailio core :: runtime configuration variables 24 * @file cfg_core.h 25 * @ingroup core 26 * 27 * Module: @ref core 28 * 29 * HOWTO: 30 * If you need a new configuration variable within the core, put it into 31 * struct cfg_goup_core, and define it in cfg_core.c:core_cfg_def array. 32 * The default value of the variable must be inserted into 33 * cfg_core.c:default_core_cfg 34 * Include this header file in your source code, and retrieve the 35 * value with cfg_get(core, core_cfg, variable_name). 36 */ 37 38 39 #ifndef _CFG_CORE_H 40 #define _CFG_CORE_H 41 42 #include "cfg/cfg.h" 43 44 extern void *core_cfg; 45 46 /*! \brief configuration default values */ 47 struct cfg_group_core { 48 int debug; 49 int log_facility; 50 int memdbg; /*!< log level for memory debugging messages */ 51 #ifdef USE_DST_BLACKLIST 52 /* blacklist */ 53 int use_dst_blacklist; /*!< 1 if blacklist is enabled */ 54 unsigned int blst_timeout; /*!< blacklist entry ttl */ 55 unsigned int blst_max_mem; /*!< maximum memory used for the 56 blacklist entries */ 57 unsigned int blst_udp_imask; /* ignore mask for udp */ 58 unsigned int blst_tcp_imask; /* ignore mask for tcp */ 59 unsigned int blst_tls_imask; /* ignore mask for tls */ 60 unsigned int blst_sctp_imask; /* ignore mask for sctp */ 61 #endif 62 /* resolver */ 63 int dns_try_ipv6; 64 int dns_try_naptr; 65 int dns_udp_pref; 66 int dns_tcp_pref; 67 int dns_tls_pref; 68 int dns_sctp_pref; 69 int dns_retr_time; 70 int dns_slow_query_ms; 71 int dns_retr_no; 72 int dns_servers_no; 73 int dns_search_list; 74 int dns_search_fmatch; 75 int dns_reinit; 76 int dns_naptr_ignore_rfc; 77 /* DNS cache */ 78 #ifdef USE_DNS_CACHE 79 int use_dns_cache; 80 int dns_cache_flags; 81 int use_dns_failover; 82 int dns_srv_lb; 83 unsigned int dns_neg_cache_ttl; 84 unsigned int dns_cache_min_ttl; 85 unsigned int dns_cache_max_ttl; 86 unsigned int dns_cache_max_mem; 87 int dns_cache_del_nonexp; 88 int dns_cache_rec_pref; 89 #endif 90 #ifdef PKG_MALLOC 91 int mem_dump_pkg; 92 #endif 93 int mem_dump_shm; 94 int max_while_loops; 95 int udp_mtu; /*!< maximum send size for udp, if > try another protocol*/ 96 int udp_mtu_try_proto; /*!< if packet> udp_mtu, try proto (e.g. TCP) */ 97 int udp4_raw; /* use raw sockets for sending on udp ipv 4 */ 98 int udp4_raw_mtu; /* mtu used when using udp raw socket */ 99 int udp4_raw_ttl; /* ttl used when using udp raw sockets */ 100 int force_rport; /*!< if set rport will always be forced*/ 101 int memlog; /*!< log level for memory status/summary info */ 102 int mem_summary; /*!< display memory status/summary info on exit */ 103 int mem_safety; /*!< memory safety control option */ 104 int mem_join; /*!< memory free fragments join option */ 105 int mem_status_mode; /*!< memory status printed for free/all fragments */ 106 int corelog; /*!< log level for non-critcal core error messages */ 107 int latency_cfg_log; /*!< log level for printing latency of routing blocks */ 108 int latency_log; /*!< log level for latency limits messages */ 109 int latency_limit_db; /*!< alert limit of running db commands */ 110 int latency_limit_action; /*!< alert limit of running cfg actions */ 111 int latency_limit_cfg; /*!< alert limit of running cfg routing script */ 112 int pv_cache_limit; /*!< alert limit of having too many vars in pv cache */ 113 int pv_cache_action; /*!< action to be taken on pv cache limit */ 114 }; 115 116 extern struct cfg_group_core default_core_cfg; 117 extern cfg_def_t core_cfg_def[]; 118 119 #endif /* _CFG_CORE_H */ 120