]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
as_hex consolidation
authorTom Peters <thopeter@cisco.com>
Mon, 29 Sep 2014 21:35:22 +0000 (17:35 -0400)
committerTom Peters <thopeter@cisco.com>
Mon, 29 Sep 2014 21:35:22 +0000 (17:35 -0400)
src/service_inspectors/nhttp_inspect/nhttp_enum.h
src/service_inspectors/nhttp_inspect/nhttp_splitter.h
src/service_inspectors/nhttp_inspect/nhttp_tables.cc
src/service_inspectors/nhttp_inspect/nhttp_uri_norm.h
src/service_inspectors/nhttp_inspect/nhttp_uri_tables.cc

index a4842d250f57f9c08d0b9274d7f684f9d6ecb367..8db7d8b17916975f78a8e6a59ca28b9974509fdf 100644 (file)
@@ -165,6 +165,8 @@ typedef enum
     EVENT_MAXVALUE
 } EventSid;
 
+extern const int8_t as_hex[256];
+
 } // end namespace NHttpEnums
 
 #endif
index ecf745a7a1eedc730b9cde7c1c4614b3c416603a..a1b1a234f6905a995198829d31ac52b290f9ee73 100644 (file)
@@ -45,8 +45,6 @@ public:
     virtual uint32_t get_octets_seen() { return octets_seen; };
 
 protected:
-    static const int8_t as_hex[256];
-
     uint32_t octets_seen = 0;
     uint32_t num_crlf = 0;
     uint32_t num_flush = 0;
index 5f637fa70bfad0be640d4c5dce815c08638a7683..85536b5f29acac65cd673673b691dd78b009e095 100644 (file)
@@ -302,7 +302,7 @@ const RuleMap NHttpModule::nhttp_events[] =
     { 0, nullptr }
 };
 
-const int8_t NHttpSplitter::as_hex[256] = {
+const int8_t NHttpEnums::as_hex[256] = {
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
 
index 8a1f121095a22dcbeee4330eb233b564b32d92b1..9f77426529f3fbc1f83c64e3b73c2961dc4059e8 100644 (file)
@@ -38,7 +38,6 @@ public:
 
 private:
     static const NHttpEnums::CharAction uri_char[256];
-    static const int8_t as_hex[256];
     static const bool good_percent[256];
 
     static bool no_path_check(const uint8_t* in_buf, int32_t in_length, uint64_t& infractions);
index 542b5409d77e3b7a80c8b650bd00c8e3a0c26620..920b42c895fb450186d75d988983d033bde00a83 100644 (file)
@@ -76,31 +76,6 @@ const CharAction UriNormalizer::uri_char[256] = {
    CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT,
    CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT,  CHAR_EIGHTBIT };
 
-const int8_t UriNormalizer::as_hex[256] = {
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-    0,  1,  2,  3,  4,  5,  6,  7,  8,  9, -1, -1, -1, -1, -1, -1,
-
-   -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-
-   -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1  };
-
 const bool UriNormalizer::good_percent[256] = {
    false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false,
    false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false,