12 #ifndef __PACKET_SNORT_CONFIG_H__
13 #define __PACKET_SNORT_CONFIG_H__
18 #ifdef SNORT_CONFIG_DEBUG
20 #define snort_debug_printf printf
22 #define snort_debug_printf(...)
28 typedef enum content_type_t {
37 content_type_t content_type;
48 gboolean distance_set;
59 gboolean http_client_body;
61 gboolean http_user_agent;
65 guchar *translated_str;
67 guint translated_length;
69 gboolean pcre_case_insensitive;
70 gboolean pcre_dot_includes_newline;
72 gboolean pcre_multiline;
83 gboolean relevant_vars_set;
85 #define MAX_RULE_PORT_VARS 6
89 #define MAX_RULE_IP_VARS 6
110 unsigned int number_contents;
111 #define MAX_CONTENT_ENTRIES 30
118 unsigned int number_references;
119 #define MAX_REFERENCE_ENTRIES 20
120 char *references[MAX_REFERENCE_ENTRIES];
136 GHashTable *portvars;
139 gboolean rule_path_is_absolute;
144 GHashTable *references_prefixes;
147 guint stat_rules_files;
149 guint stat_alerts_detected;
157 void create_config(
SnortConfig_t **snort_config,
const char *snort_config_file);
162 void rule_set_alert(
SnortConfig_t *snort_config,
Rule_t *rule, guint *global_match_number, guint *rule_match_number);
168 char *expand_reference(
SnortConfig_t *snort_config,
char *reference);
171 void get_global_rule_stats(
SnortConfig_t *snort_config,
unsigned int sid,
172 unsigned int *number_rules_files,
unsigned int *number_rules,
173 unsigned int *alerts_detected,
unsigned int *this_rule_alerts_detected);
177 guint content_convert_to_binary(
content_t *content);
179 gboolean content_convert_pcre_for_regex(
content_t *content);
Definition: packet-snort-config.h:97
Definition: packet-snort-config.h:132
Definition: packet-snort-config.h:35
Definition: packet-snort-config.h:82
Definition: packet-snort-config.h:76