+85
+-- swapped use of range and deflt for PT_TABLE and PT_LIST Parameters
+ (Parameter* is now in range so that deflt may be used for tabl/list
+ defaults)
+
84
-- pulled in latest codecs
-- removed src/mempool/
{
// bool values
case PT_BOOL:
- return valid_bool(v, range);
+ return valid_bool(v, (const char*)range);
// num values
case PT_PORT:
return valid_int(v, "0:65535");
// if a range was given fall thru
case PT_INT:
- return valid_int(v, range);
+ return valid_int(v, (const char*)range);
case PT_REAL:
- return valid_real(v, range);
+ return valid_real(v, (const char*)range);
// string values
case PT_STRING:
- return valid_string(v, range);
+ return valid_string(v, (const char*)range);
case PT_SELECT:
- return valid_select(v, range);
+ return valid_select(v, (const char*)range);
case PT_MULTI:
- return valid_multi(v, range);
+ return valid_multi(v, (const char*)range);
case PT_ENUM:
- return valid_enum(v, range);
+ return valid_enum(v, (const char*)range);
// address values
case PT_MAC:
- return valid_mac(v, range);
+ return valid_mac(v, (const char*)range);
case PT_IP4:
- return valid_ip4(v, range);
+ return valid_ip4(v, (const char*)range);
case PT_ADDR:
- return valid_addr(v, range);
+ return valid_addr(v, (const char*)range);
// list values
case PT_BIT_LIST:
- return valid_bit_list(v, range);
+ return valid_bit_list(v, (const char*)range);
case PT_ADDR_LIST:
return true;
{
enum Type
{
- PT_TABLE, // deflt is Parameter*
- PT_LIST, // deflt is Parameter*, range is max
+ PT_TABLE, // range is Parameter*, deflt is TBD
+ PT_LIST, // range is Parameter*, deflt is TBD
PT_BOOL, // if you are reading this, get more coffee
PT_INT, // signed 64 bits or less determined by range
PT_REAL, // double
};
const char* name;
Type type;
- const char* range;
- const void* deflt; // nullptr|const char*|const Parameter*
+ const void* range; // nullptr|const char*|const Parameter*
+ const char* deflt;
const char* help;
const char* get_type() const;
"avg_ticks_per_match | avg_ticks_per_no_match",
"avg_ticks", "sort by given field" },
- { "file", Parameter::PT_TABLE, nullptr, profile_file_params,
+ { "file", Parameter::PT_TABLE, profile_file_params, nullptr,
"file config" },
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
"checks | avg_ticks | total_ticks", "avg_ticks",
"sort by given field" },
- { "file", Parameter::PT_TABLE, nullptr, profile_file_params,
+ { "file", Parameter::PT_TABLE, profile_file_params, nullptr,
"file config" },
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
static const Parameter profile_params[] =
{
- { "rules", Parameter::PT_TABLE, nullptr, profile_rule_params,
+ { "rules", Parameter::PT_TABLE, profile_rule_params, nullptr,
"" },
- { "preprocs", Parameter::PT_TABLE, nullptr, profile_preproc_params,
+ { "preprocs", Parameter::PT_TABLE, profile_preproc_params, nullptr,
"" },
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
{ "log_ipv6_extra_data", Parameter::PT_BOOL, nullptr, "false",
"log IPv6 source and destination addresses as unified2 extra data records" },
- { "event_trace", Parameter::PT_TABLE, nullptr, output_event_trace_params,
+ { "event_trace", Parameter::PT_TABLE, output_event_trace_params, nullptr,
"" },
{ "quiet", Parameter::PT_BOOL, nullptr, "false",
static const Parameter binder_params[] =
{
- { "when", Parameter::PT_TABLE, nullptr, binder_when_params,
+ { "when", Parameter::PT_TABLE, binder_when_params, nullptr,
"match criteria" },
- { "use", Parameter::PT_TABLE, nullptr, binder_use_params,
+ { "use", Parameter::PT_TABLE, binder_use_params, nullptr,
"target configuration" },
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
{ "tcp_policy", Parameter::PT_ENUM, tcp_policies, "linux",
"tcp reassembly policy" },
- { "services", Parameter::PT_LIST, nullptr, service_params,
+ { "services", Parameter::PT_LIST, service_params, nullptr,
"list of service parameters" },
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
// we dump just one list entry
if ( p->type == Parameter::PT_TABLE ||
p->type == Parameter::PT_LIST )
- dump_table(key, pfx, (Parameter*)p->deflt);
+ dump_table(key, pfx, (Parameter*)p->range);
else if ( !pfx || !strncmp(key.c_str(), pfx, strlen(pfx)) )
{
p->type != Parameter::PT_LIST )
return p;
- p = (const Parameter*)p->deflt;
+ p = (const Parameter*)p->range;
return get_params(sfx, p);
}
{ "unicast", Parameter::PT_BOOL, nullptr, "false",
"help" },
- { "hosts", Parameter::PT_LIST, nullptr, arp_spoof_hosts_params,
+ { "hosts", Parameter::PT_LIST, arp_spoof_hosts_params, nullptr,
"help" },
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
static const Parameter normalize_params[] =
{
- { "ip4", Parameter::PT_TABLE, nullptr, norm_ip4_params,
+ { "ip4", Parameter::PT_TABLE, norm_ip4_params, nullptr,
"set ip4 normalization options" },
- { "tcp", Parameter::PT_TABLE, nullptr, norm_tcp_params,
+ { "tcp", Parameter::PT_TABLE, norm_tcp_params, nullptr,
"set tcp normalization options" },
{ "ip6", Parameter::PT_BOOL, nullptr, "false",
{ "bounce", Parameter::PT_BOOL, nullptr, "false",
"check for bounces" },
- { "bounce_to", Parameter::PT_TABLE, nullptr, client_bounce_params,
+ { "bounce_to", Parameter::PT_TABLE, client_bounce_params, nullptr,
"allow bounces to CIDRs / ports" },
{ "ignore_telnet_erase_cmds", Parameter::PT_BOOL, nullptr, "false",
static const Parameter ftp_server_params[] =
{
- { "alt_max_param", Parameter::PT_LIST, nullptr, ftp_server_alt_max_params,
+ { "alt_max_param", Parameter::PT_LIST, ftp_server_alt_max_params, nullptr,
"specify non-default maximum command lengths" },
{ "chk_str_fmt", Parameter::PT_STRING, nullptr, nullptr,
{ "data_xfer_cmds", Parameter::PT_STRING, nullptr, nullptr,
"check the formatting of the given commands" },
- { "directory_cmds", Parameter::PT_LIST, nullptr, ftp_directory_params,
+ { "directory_cmds", Parameter::PT_LIST, ftp_directory_params, nullptr,
"specify command-response pairs" },
{ "file_put_cmds", Parameter::PT_STRING, nullptr, nullptr,
{ "check_encrypted", Parameter::PT_BOOL, nullptr, "false",
"check for end of encryption" },
- { "cmd_validity", Parameter::PT_LIST, nullptr, ftp_server_validity_params,
+ { "cmd_validity", Parameter::PT_LIST, ftp_server_validity_params, nullptr,
"specify command formats" },
{ "def_max_param_len", Parameter::PT_INT, "1:", "100",
{ "compress_depth", Parameter::PT_INT, "1:65535", "1460",
"maximum amount of packet payload to decompress" },
- { "decode", Parameter::PT_TABLE, nullptr, hi_decode_params,
+ { "decode", Parameter::PT_TABLE, hi_decode_params, nullptr,
"help" },
{ "decompress_depth", Parameter::PT_INT, "1:65535", "2920",
{ "memcap", Parameter::PT_INT, "2304:", "150994944",
"limit of memory used for logging extra data" },
- //{ "mime", Parameter::PT_TABLE, nullptr, hi_mime_params,
+ //{ "mime", Parameter::PT_TABLE, hi_mime_params, nullptr,
// "help" },
{ "proxy_alert", Parameter::PT_BOOL, nullptr, "false",
"alert on proxy usage for servers without allow_proxy_use" },
- { "unicode_map", Parameter::PT_TABLE, nullptr, hi_umap_params,
+ { "unicode_map", Parameter::PT_TABLE, hi_umap_params, nullptr,
"help" },
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
{ "iis_unicode", Parameter::PT_BOOL, nullptr, "false",
"enable unicode code point mapping using unicode_map settings" },
- { "iis_unicode_map", Parameter::PT_TABLE, nullptr, hi_umap_params,
+ { "iis_unicode_map", Parameter::PT_TABLE, hi_umap_params, nullptr,
"help" },
{ "inspect_gzip", Parameter::PT_BOOL, nullptr, "false",
{ "u_encode", Parameter::PT_BOOL, nullptr, "false",
"decode %uXXXX character sequences" },
- { "unicode_map", Parameter::PT_TABLE, nullptr, hi_umap_params,
+ { "unicode_map", Parameter::PT_TABLE, hi_umap_params, nullptr,
"help" },
{ "unlimited_decompress", Parameter::PT_INT, nullptr, "false",
static const Parameter stream_params[] =
{
- { "icmp_cache", Parameter::PT_TABLE, nullptr, proto_params,
+ { "icmp_cache", Parameter::PT_TABLE, proto_params, nullptr,
"configure icmp cache limits" },
- { "ip_cache", Parameter::PT_TABLE, nullptr, proto_params,
+ { "ip_cache", Parameter::PT_TABLE, proto_params, nullptr,
"configure ip cache limits" },
- { "tcp_cache", Parameter::PT_TABLE, nullptr, proto_params,
+ { "tcp_cache", Parameter::PT_TABLE, proto_params, nullptr,
"configure tcp cache limits" },
- { "udp_cache", Parameter::PT_TABLE, nullptr, proto_params,
+ { "udp_cache", Parameter::PT_TABLE, proto_params, nullptr,
"configure udp cache limits" },
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
t_stats.alerts++;
}
+#if 0
static int FragPolicyIdFromName(char *name)
{
if (!name)
}
return FRAG_POLICY_DEFAULT;
}
+#endif
/**
* Check to see if a FragTracker has timed out
{ "show_rebuilt_packets", Parameter::PT_BOOL, nullptr, "false",
"enable cmg like output of reassembled packets" },
- { "queue_limit", Parameter::PT_TABLE, nullptr, stream_queue_limit_params,
+ { "queue_limit", Parameter::PT_TABLE, stream_queue_limit_params, nullptr,
"limit amount of segment data queued" },
- { "small_segments", Parameter::PT_TABLE, nullptr, stream_tcp_small_params,
+ { "small_segments", Parameter::PT_TABLE, stream_tcp_small_params, nullptr,
"limit number of small segments queued" },
{ "session_timeout", Parameter::PT_INT, "1:86400", "30",