]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1215 in SNORT/snort3 from appid_header_fix to master
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Thu, 3 May 2018 22:53:27 +0000 (18:53 -0400)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Thu, 3 May 2018 22:53:27 +0000 (18:53 -0400)
Squashed commit of the following:

commit 1185586735fc9e4c516cf8beed416aad47e92f39
Author: deramada <deramada@cisco.com>
Date:   Thu May 3 16:38:28 2018 -0400

    appid: moved HttpFieldIds to appid_http_session

src/network_inspectors/appid/appid_http_session.h
src/network_inspectors/appid/detector_plugins/http_url_patterns.h

index b78ee54e7135eb1d3fd91ff52551c6797ccfd5a7..74bfd6733f9808d3975c30d06f519f251e0f3c9f 100644 (file)
 
 #include "appid_types.h"
 #include "application_ids.h"
-#include "detector_plugins/http_url_patterns.h"
 #include "http_xff_fields.h"
 
 class AppIdSession;
 class ChpMatchDescriptor;
 class HttpPatternMatchers;
-enum HttpFieldIds : uint8_t;
+
+// These values are used in Lua code as raw numbers. Do NOT reassign new values.
+enum HttpFieldIds : uint8_t
+{
+    // Request-side headers
+    REQ_AGENT_FID,          // 0
+    REQ_HOST_FID,           // 1
+    REQ_REFERER_FID,        // 2
+    REQ_URI_FID,            // 3
+    REQ_COOKIE_FID,         // 4
+    REQ_BODY_FID,           // 5
+    // Response-side headers
+    RSP_CONTENT_TYPE_FID,   // 6
+    RSP_LOCATION_FID,       // 7
+    RSP_BODY_FID,           // 8
+    MAX_HTTP_FIELD_ID,      // 9
+    MAX_PATTERN_TYPE = RSP_BODY_FID,
+    MAX_KEY_PATTERN = REQ_URI_FID,
+};
 
 #define RESPONSE_CODE_PACKET_THRESHHOLD 0
 
index eecf8fb4d042f67713f6c6621b9afd1de68f5083..28c760cdc53e1094fbbf2c52d12aef683cc7e63b 100644 (file)
 #include "search_engines/search_tool.h"
 #include "utils/util.h"
 
-#include "application_ids.h"
-#include "appid_utils/sf_multi_mpse.h"
+#include "appid_http_session.h"
 #include "appid_utils/sf_mlmp.h"
+#include "appid_utils/sf_multi_mpse.h"
+#include "application_ids.h"
 
 namespace snort
 {
@@ -164,25 +165,6 @@ enum ActionType
     MAX_ACTION_TYPE = DEFER_TO_SIMPLE_DETECT,
 };
 
-// These values are used in Lua code as raw numbers. Do NOT reassign new values.
-enum HttpFieldIds : uint8_t
-{
-    // Request-side headers
-    REQ_AGENT_FID,          // 0
-    REQ_HOST_FID,           // 1
-    REQ_REFERER_FID,        // 2
-    REQ_URI_FID,            // 3
-    REQ_COOKIE_FID,         // 4
-    REQ_BODY_FID,           // 5
-    // Response-side headers
-    RSP_CONTENT_TYPE_FID,   // 6
-    RSP_LOCATION_FID,       // 7
-    RSP_BODY_FID,           // 8
-    MAX_HTTP_FIELD_ID,      // 9
-    MAX_PATTERN_TYPE = RSP_BODY_FID,
-    MAX_KEY_PATTERN = REQ_URI_FID,
-};
-
 struct CHPApp
 {
     AppId appIdInstance; // * see note above