From b9851c740836760ab36c4862f82f3f8cc83fde27 Mon Sep 17 00:00:00 2001 From: Martin Mathieson Date: Sun, 19 Feb 2017 02:32:04 -0800 Subject: Snort: use GRegex to find pcre matches Change-Id: Ie08bc1f3139ebe5564365e662f89257ad8d5b129 Reviewed-on: https://code.wireshark.org/review/20177 Petri-Dish: Martin Mathieson Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson --- epan/dissectors/snort-config.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/snort-config.h') diff --git a/epan/dissectors/snort-config.h b/epan/dissectors/snort-config.h index ec0c23c761..acbd1fda7b 100644 --- a/epan/dissectors/snort-config.h +++ b/epan/dissectors/snort-config.h @@ -66,10 +66,13 @@ typedef struct content_t { gboolean http_client_body; gboolean http_cookie; - /* Pattern converted into bytes for matching against packet */ - guchar *binary_str; + /* 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; } content_t; /* This is to keep track of a variable referenced by a rule */ @@ -178,6 +181,8 @@ 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); +gboolean content_convert_pcre_for_regex(content_t *content); + #endif /* -- cgit v1.2.1