summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-snort-config.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-snort-config.h
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-snort-config.h')
-rw-r--r--epan/dissectors/packet-snort-config.h72
1 files changed, 36 insertions, 36 deletions
diff --git a/epan/dissectors/packet-snort-config.h b/epan/dissectors/packet-snort-config.h
index 619e9811..186cf1d5 100644
--- a/epan/dissectors/packet-snort-config.h
+++ b/epan/dissectors/packet-snort-config.h
@@ -37,39 +37,39 @@ typedef struct content_t {
content_type_t content_type;
char *str;
- gboolean negation; /* i.e. pattern must not appear */
- gboolean nocase; /* when set, do case insensitive match */
+ bool negation; /* i.e. pattern must not appear */
+ bool nocase; /* when set, do case insensitive match */
- gboolean offset_set; /* Where to start looking within packet. -65535 -> 65535 */
- gint offset;
+ bool offset_set; /* Where to start looking within packet. -65535 -> 65535 */
+ int offset;
- guint depth; /* How far to look into packet. Can't be 0 */
+ unsigned depth; /* How far to look into packet. Can't be 0 */
- gboolean distance_set;
- gint distance; /* Same as offset but relative to last match. -65535 -> 65535 */
+ bool distance_set;
+ int distance; /* Same as offset but relative to last match. -65535 -> 65535 */
- guint within; /* Most bytes from end of previous match. Max 65535 */
+ unsigned within; /* Most bytes from end of previous match. Max 65535 */
- gboolean fastpattern; /* Is most distinctive content in rule */
+ bool fastpattern; /* Is most distinctive content in rule */
- gboolean rawbytes; /* Match should be done against raw bytes (which we do anyway) */
+ bool rawbytes; /* Match should be done against raw bytes (which we do anyway) */
/* http preprocessor modifiers */
- gboolean http_method;
- gboolean http_client_body;
- gboolean http_cookie;
- gboolean http_user_agent;
+ bool http_method;
+ bool http_client_body;
+ bool http_cookie;
+ bool http_user_agent;
/* Pattern converted into bytes for matching against packet.
Used for regular patterns and PCREs alike. */
- guchar *translated_str;
- gboolean translated;
- guint translated_length;
-
- gboolean pcre_case_insensitive;
- gboolean pcre_dot_includes_newline;
- gboolean pcre_raw;
- gboolean pcre_multiline;
+ unsigned char *translated_str;
+ bool translated;
+ unsigned translated_length;
+
+ bool pcre_case_insensitive;
+ bool pcre_dot_includes_newline;
+ bool pcre_raw;
+ bool pcre_multiline;
} content_t;
/* This is to keep track of a variable referenced by a rule */
@@ -80,14 +80,14 @@ typedef struct used_variable_t {
/* The collection of variables referenced by a rule */
typedef struct relevant_vars_t {
- gboolean relevant_vars_set;
+ bool relevant_vars_set;
#define MAX_RULE_PORT_VARS 6
- guint num_port_vars;
+ unsigned num_port_vars;
used_variable_t port_vars[MAX_RULE_PORT_VARS];
#define MAX_RULE_IP_VARS 6
- guint num_ip_vars;
+ unsigned num_ip_vars;
used_variable_t ip_vars[MAX_RULE_IP_VARS];
} relevant_vars_t;
@@ -98,11 +98,11 @@ typedef struct Rule_t {
char *rule_string; /* The whole rule as read from the rule file */
char *file; /* Name of the rule file */
- guint line_number; /* Line number of rule within rule file */
+ unsigned line_number; /* Line number of rule within rule file */
char *msg; /* Description of the rule */
char *classtype;
- guint32 sid, rev;
+ uint32_t sid, rev;
char *protocol;
@@ -122,7 +122,7 @@ typedef struct Rule_t {
relevant_vars_t relevant_vars;
/* Statistics */
- guint matches_seen;
+ unsigned matches_seen;
} Rule_t;
@@ -136,7 +136,7 @@ typedef struct SnortConfig_t
GHashTable *portvars;
char *rule_path;
- gboolean rule_path_is_absolute;
+ bool rule_path_is_absolute;
/* (sid -> Rule_t*) table */
GHashTable *rules;
@@ -144,9 +144,9 @@ typedef struct SnortConfig_t
GHashTable *references_prefixes;
/* Statistics (that may be reset) */
- guint stat_rules_files;
- guint stat_rules;
- guint stat_alerts_detected;
+ unsigned stat_rules_files;
+ unsigned stat_rules;
+ unsigned stat_alerts_detected;
} SnortConfig_t;
@@ -158,8 +158,8 @@ void create_config(SnortConfig_t **snort_config, const char *snort_config_file);
void delete_config(SnortConfig_t **snort_config);
/* Look up rule by SID */
-Rule_t *get_rule(SnortConfig_t *snort_config, guint32 sid);
-void rule_set_alert(SnortConfig_t *snort_config, Rule_t *rule, guint *global_match_number, guint *rule_match_number);
+Rule_t *get_rule(SnortConfig_t *snort_config, uint32_t sid);
+void rule_set_alert(SnortConfig_t *snort_config, Rule_t *rule, unsigned *global_match_number, unsigned *rule_match_number);
/* IP and port vars */
void rule_set_relevant_vars(SnortConfig_t *snort_config, Rule_t *rule);
@@ -174,9 +174,9 @@ void get_global_rule_stats(SnortConfig_t *snort_config, unsigned int sid,
void reset_global_rule_stats(SnortConfig_t *snort_config);
/* Expanding a content field string to the expected binary bytes */
-guint content_convert_to_binary(content_t *content);
+unsigned content_convert_to_binary(content_t *content);
-gboolean content_convert_pcre_for_regex(content_t *content);
+bool content_convert_pcre_for_regex(content_t *content);
#endif