]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fixed author and includes
authorRuss Combs <rucombs@cisco.com>
Mon, 11 Aug 2014 12:00:06 +0000 (08:00 -0400)
committerRuss Combs <rucombs@cisco.com>
Mon, 11 Aug 2014 12:00:06 +0000 (08:00 -0400)
37 files changed:
src/ips_options/CMakeLists.txt
src/ips_options/Makefile.am
src/ips_options/ips_ack.cc
src/ips_options/ips_bufferlen.cc
src/ips_options/ips_classtype.cc
src/ips_options/ips_dsize.cc
src/ips_options/ips_file_data.cc
src/ips_options/ips_fragoffset.cc
src/ips_options/ips_gid.cc
src/ips_options/ips_http.cc
src/ips_options/ips_http_header.cc
src/ips_options/ips_icmp_id.cc
src/ips_options/ips_icmp_seq.cc
src/ips_options/ips_icode.cc
src/ips_options/ips_id.cc
src/ips_options/ips_itype.cc
src/ips_options/ips_luajit.cc
src/ips_options/ips_metadata.cc
src/ips_options/ips_msg.cc
src/ips_options/ips_options.cc
src/ips_options/ips_pkt_data.cc
src/ips_options/ips_priority.cc
src/ips_options/ips_raw_data.cc
src/ips_options/ips_react.cc
src/ips_options/ips_reference.cc
src/ips_options/ips_rem.cc
src/ips_options/ips_resp.cc
src/ips_options/ips_rev.cc
src/ips_options/ips_seq.cc
src/ips_options/ips_sid.cc
src/ips_options/ips_so.cc
src/ips_options/ips_soid.cc
src/ips_options/ips_tag.cc
src/ips_options/ips_tos.cc
src/ips_options/ips_ttl.cc
src/ips_options/ips_window.cc
src/ips_options/range.cc

index 19410f37e9173d444b22e45b597a452cb8e6c7e8..11bf37ee0aa73eb711dd1230453c5fb7f2215b8e 100644 (file)
@@ -7,6 +7,7 @@ SET( PLUGIN_LIST
     asn1_detect.cc
     asn1_detect.h
     ips_base64.cc
+    ips_bufferlen.cc
     ips_byte_test.cc
     ips_byte_jump.cc
     ips_classtype.cc
@@ -45,7 +46,6 @@ SET( PLUGIN_LIST
     ips_tos.cc
     ips_ttl.cc
     ips_window.cc
-    ips_bufferlen.cc
     range.cc
     range.h
 )
@@ -93,6 +93,7 @@ else (STATIC_IPS_OPTIONS)
     add_shared_library(ips_ack ips_options ips_ack.cc range.cc range.h)
     add_shared_library(ips_asn1 ips_options ips_asn1.cc asn1_detect.cc asn1_detect.h)
     add_shared_library(ips_base64 ips_options ips_base64.cc)
+    add_shared_library(ips_bufferlen ips_options range.cc range.h)
     add_shared_library(ips_byte_test ips_options ips_byte_test.cc)
     add_shared_library(ips_byte_jump ips_options ips_byte_jump.cc)
     add_shared_library(ips_cvs ips_options ips_cvs.cc)
@@ -119,7 +120,6 @@ else (STATIC_IPS_OPTIONS)
     add_shared_library(ips_tos ips_options ips_tos.cc range.cc range.h)
     add_shared_library(ips_ttl ips_options ips_ttl.cc range.cc range.h)
     add_shared_library(ips_window ips_options ips_window.cc range.cc range.h)
-    add_shared_library(ips_bufferlen ips_options ips_bufferlen.cc)
 
 
 endif (STATIC_IPS_OPTIONS)
index 01479046095d287075d7aaaa4e5014badd9f8e78..3343ceb0b52a50c2fbcb4b6a7bdda72649957ab2 100644 (file)
@@ -84,6 +84,11 @@ libips_base64_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
 libips_base64_la_LDFLAGS = -export-dynamic -shared
 libips_base64_la_SOURCES = ips_base64.cc
 
+optlib_LTLIBRARIES += libips_bufferlen.la
+libips_bufferlen_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
+libips_bufferlen_la_LDFLAGS = -export-dynamic -shared
+libips_bufferlen_la_SOURCES = ips_bufferlen.cc range.cc range.h
+
 optlib_LTLIBRARIES += libips_byte_test.la
 libips_byte_test_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
 libips_byte_test_la_LDFLAGS = -export-dynamic -shared
@@ -273,11 +278,6 @@ optlib_LTLIBRARIES += libips_window.la
 libips_window_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
 libips_window_la_LDFLAGS = -export-dynamic -shared
 libips_window_la_SOURCES = ips_window.cc range.cc range.h
-
-optlib_LTLIBRARIES += libips_bufferlen.la
-libips_bufferlen_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
-libips_bufferlen_la_LDFLAGS = -export-dynamic -shared
-libips_bufferlen_la_SOURCES = ips_bufferlen.cc ips_bufferlen.h
 endif
 
 AM_CXXFLAGS = @AM_CXXFLAGS@
index 8cdc867e86976a3513b834fe9285fd775f7fe4c5..fbdb95022ccdbddcfbe6d00f1b45f9aa1c5d13cf 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
@@ -18,6 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_ack.cc author Russ Combs <rucombs@cisco.com>
 
 #include <sys/types.h>
 
index eab8c608994bddd0c4deb519c7a850ac0d6d9af9..3c96092b4bbd71b215c79d5143ac58a5d96f4fc7 100644 (file)
@@ -1,6 +1,5 @@
 /*
-** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
- ** Copyright (C) 2005-2013 Sourcefire, Inc.
+ ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
  **
  ** This program is free software; you can redistribute it and/or modify
  ** it under the terms of the GNU General Public License Version 2 as
@@ -18,6 +17,7 @@
  ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
  ** USA
  */
+// ips_bufferlen.cc author Russ Combs <rucombs@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 
 #include <ctype.h>
 #include <stdlib.h>
-#include <string.h>
 
 #include "snort_types.h"
-#include "treenodes.h"
-#include "protocols/packet.h"
 #include "snort_debug.h"
-#include "parser.h"
-#include "util.h"
 #include "sfhashfcn.h"
-#include "mstring.h"
 #include "snort.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "sfhashfcn.h"
 #include "detection/detection_defines.h"
-#include "detection_util.h"
+#include "range.h"
 #include "framework/ips_option.h"
 #include "framework/inspector.h"
 #include "framework/cursor.h"
 #include "framework/module.h"
-#include "flow/flow.h"
 
 static const char* s_name = "bufferlen";
 
 static THREAD_LOCAL ProfileStats lenCheckPerfStats;
 
-#define LEN_CHECK_EQ 1
-#define LEN_CHECK_GT 2
-#define LEN_CHECK_LT 3
-#define LEN_CHECK_RG 4
-
-struct LenCheckData 
-{
-    uint16_t len;
-    uint16_t len2;
-    char oper;
-};
-
 class LenOption : public IpsOption
 {
 public:
-    LenOption(const LenCheckData& c) :
+    LenOption(const RangeCheck& c) :
         IpsOption(s_name)
     { config = c; };
 
@@ -76,7 +56,7 @@ public:
     int eval(Cursor&, Packet*);
 
 private:
-    LenCheckData config;
+    RangeCheck config;
 };
 
 //-------------------------------------------------------------------------
@@ -86,11 +66,10 @@ private:
 uint32_t LenOption::hash() const
 {
     uint32_t a,b,c;
-    const LenCheckData *data = &config;
 
-    a = data->len;
-    b = data->len2;
-    c = data->oper;
+    a = config.op;
+    b = config.min;
+    c = config.max;
 
     mix_str(a,b,c,get_name());
     final(a,b,c);
@@ -104,161 +83,27 @@ bool LenOption::operator==(const IpsOption& ips) const
         return false;
 
     LenOption& rhs = (LenOption&)ips;
-    LenCheckData *left = (LenCheckData*)&config;
-    LenCheckData *right = (LenCheckData*)&rhs.config;
-
-    if ( (left->len == right->len)
-            && (left->len2 == right->len2)
-            && (left->oper == right->oper) )
-    {
-        return true;
-    }
-
-    return false;
+    return ( config == rhs.config );
 }
 
 int LenOption::eval(Cursor& c, Packet*)
 {
-    LenCheckData *udata = &config;
     int rval = DETECTION_OPTION_NO_MATCH;
 
     PROFILE_VARS;
     MODULE_PROFILE_START(lenCheckPerfStats);
 
-    switch (udata->oper)
-    {
-        case LEN_CHECK_EQ:
-            if (udata->len == c.size())
-                rval = DETECTION_OPTION_MATCH;
-            break;
-        case LEN_CHECK_GT:
-            if (udata->len < c.size())
-                rval = DETECTION_OPTION_MATCH;
-            break;
-        case LEN_CHECK_LT:
-            if (udata->len > c.size())
-                rval = DETECTION_OPTION_MATCH;
-            break;
-        case LEN_CHECK_RG:
-            if ((udata->len <= c.size()) && (udata->len2 >= c.size()))
-                rval = DETECTION_OPTION_MATCH;
-            break;
-        default:
-            break;
-    }
+    if ( config.eval(c.length()) )
+        rval = DETECTION_OPTION_MATCH;
 
     MODULE_PROFILE_END(lenCheckPerfStats);
     return rval;
 }
 
 //-------------------------------------------------------------------------
-// module methods
+// module
 //-------------------------------------------------------------------------
 
-static void len_parse(const char* argp, LenCheckData* ds_ptr)
-{
-    char* curp = NULL;
-    char **toks;
-    int num_toks;
-
-    toks = mSplit(argp, ",", 2, &num_toks, '\\');
-    if (!num_toks)
-    {
-        ParseError("'%s' requires arguments.", s_name);
-    }
-
-    curp = toks[0];
-
-    /* Parse the string */
-    if (isdigit((int)*curp) && strstr(curp, "<>"))
-    {
-        char **mtoks;
-        int num_mtoks;
-        char* endp = NULL;
-        long int val;
-
-        mtoks = mSplit(curp, "<>", 2, &num_mtoks, '\\');
-        if (num_mtoks != 2)
-        {
-            ParseError("Invalid '%s' argument.", s_name);
-        }
-
-        val = strtol(mtoks[0], &endp, 0);
-        if ((val < 0) || *endp || (val > UINT16_MAX))
-        {
-            ParseError("Invalid '%s' argument.", s_name);
-        }
-
-        ds_ptr->len = (uint16_t)val;
-
-        val = strtol(mtoks[1], &endp, 0);
-        if ((val < 0) || *endp || (val > UINT16_MAX))
-        {
-            ParseError("Invalid '%s' argument.", s_name);
-        }
-
-        ds_ptr->len2 = (uint16_t)val;
-
-        if (ds_ptr->len2 < ds_ptr->len)
-        {
-            uint16_t tmp = ds_ptr->len;
-            ds_ptr->len = ds_ptr->len2;
-            ds_ptr->len2 = tmp;
-        }
-
-        ds_ptr->oper = LEN_CHECK_RG;
-
-        mSplitFree(&mtoks, num_mtoks);
-    }
-    else
-    {
-        char* endp = NULL;
-        long int val;
-
-        if(*curp == '>')
-        {
-            curp++;
-            ds_ptr->oper = LEN_CHECK_GT;
-        }
-        else if(*curp == '<')
-        {
-            curp++;
-            ds_ptr->oper = LEN_CHECK_LT;
-        }
-        else
-        {
-            ds_ptr->oper = LEN_CHECK_EQ;
-        }
-
-        while(isspace((int)*curp)) curp++;
-
-        if (!*curp)
-        {
-            ParseError("Invalid '%s' argument.", s_name);
-        }
-
-        val = strtol(curp, &endp, 0);
-        if ((val < 0) || *endp || (val > UINT16_MAX))
-        {
-            ParseError("Invalid '%s' argument.", s_name);
-        }
-
-        if ((ds_ptr->oper == LEN_CHECK_LT) && (val == 0))
-        {
-            ParseError("Invalid '%s' argument.", s_name);
-        }
-
-        ds_ptr->len = (uint16_t)val;
-    }
-
-    if (num_toks > 1 || strchr(argp, ','))
-    {
-        ParseError("Invalid '%s' argument.", s_name);
-    }
-
-    mSplitFree(&toks, num_toks);
-}
-
 static const Parameter len_params[] =
 {
     { "~range", Parameter::PT_STRING, nullptr, nullptr,
@@ -278,12 +123,12 @@ public:
     ProfileStats* get_profile() const
     { return &lenCheckPerfStats; };
 
-    LenCheckData data;
+    RangeCheck data;
 };
 
 bool LenModule::begin(const char*, int, SnortConfig*)
 {
-    memset(&data, 0, sizeof(data));
+    data.init();
     return true;
 }
 
@@ -292,8 +137,7 @@ bool LenModule::set(const char*, Value& v, SnortConfig*)
     if ( !v.is("~range") )
         return false;
 
-    len_parse(v.get_string(), &data);
-    return true;
+    return data.parse(v.get_string());
 }
 
 //-------------------------------------------------------------------------
index 15c1964127165170e6018408d15923d0eb2d6acf..7fd8a88b8cc17f4250beccc060a498551eb57d5c 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
index 61511943a00795134ca6fb497ca778c0038e320b..5831f2c00ee786dc005ef5cd845f1e335afa1b33 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
@@ -18,6 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_dsize.cc author Russ Combs <rucombs@cisco.com>
 
 #include <ctype.h>
 
index 3e49f086579fc20d6b0d0d579de28ba39177e74c..ac1453a537bca9b294c356a77f4f40a2a6558d46 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
+ ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
  ** Copyright (C) 1998-2013 Sourcefire, Inc.
  **
  ** This program is free software; you can redistribute it and/or modify
@@ -17,6 +17,7 @@
  ** along with this program; if not, write to the Free Software
  ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+// ips_filedata.cc author Russ Combs <rucombs@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #include <errno.h>
 
 #include "snort_types.h"
-#include "snort_bounds.h"
-#include "protocols/packet.h"
-#include "parser.h"
 #include "snort_debug.h"
-#include "util.h"
-#include "mstring.h"
-#include "snort.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "detection/detection_defines.h"
 #include "detection/detection_util.h"
 #include "framework/cursor.h"
index e1074e1c738c653a3b808335c655113cd7317fae..177183933ea24d4df545a8315620df0b2511ef9d 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
@@ -18,6 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_fragoffset.cc author Russ Combs <rucombs@cisco.com>
 
 #include <sys/types.h>
 
 
 #include <stdlib.h>
 #include <ctype.h>
-#include <string.h>
 
 #include "snort_types.h"
-#include "detection/treenodes.h"
 #include "protocols/packet.h"
-#include "parser.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "profiler.h"
-#include "detection/fpdetect.h"
 #include "sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
 #include "range.h"
 
-#define GREATER_THAN            1
-#define LESS_THAN               2
-
-#define FB_NORMAL   0
-#define FB_ALL      1
-#define FB_ANY      2
-#define FB_NOT      3
-
-#define FB_RB  0x8000
-#define FB_DF  0x4000
-#define FB_MF  0x2000
-
 static const char* s_name = "fragoffset";
 
 static THREAD_LOCAL ProfileStats fragOffsetPerfStats;
index d059c614620f8f3aa2c331a5a65a787d4893500f..1d494ca134ce4e48eb697499a1bdc87a88320b03 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "snort_types.h"
 #include "detection/treenodes.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index 5f1a3c176274c85ce68dad093122d090282e19d5..ca866e9f5a94522bd17390f8e2268d172640a092 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
 #include "snort_types.h"
-#include "treenodes.h"
 #include "protocols/packet.h"
-#include "parser.h"
-#include "util.h"
 #include "snort_debug.h"
 #include "snort.h"
 #include "profiler.h"
index 966efafe19372b04addb91b8bdb08d30b638f686..495429dd56241b720505da8492849362b85cda83 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
 #include <string>
 using namespace std;
 
 #include "snort_types.h"
-#include "treenodes.h"
-#include "protocols/packet.h"
 #include "parser.h"
-#include "util.h"
 #include "snort_debug.h"
 #include "snort.h"
 #include "profiler.h"
index 04d6a958479bd2ae6ad89072212b8955ef95546f..3b34a74ab2649a5e232fef18d017406281d59b97 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
@@ -18,6 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_icmp_id.cc author Russ Combs <rucombs@cisco.com>
 
 /* sp_icmp_id
  *
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "snort_types.h"
-#include "detection/treenodes.h"
 #include "protocols/packet.h"
-#include "parser.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "profiler.h"
 #include "sfhashfcn.h"
index d40399b0b8fa693d1e38871045478af86d580567..c0df4e0a8aca4f2dd00cd5f8509ef14fed6b7153 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
@@ -18,6 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_icmp_seq.cc author Russ Combs <rucombs@cisco.com>
 
 /* sp_icmp_seq_check
  *
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <ctype.h>
 
 #include "snort_types.h"
-#include "detection/treenodes.h"
 #include "protocols/packet.h"
-#include "parser.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "profiler.h"
 #include "detection/fpdetect.h"
index 77b9cdcbda052667ca5b0eb930a0df3f970e10c0..76a52ef23d305b7de296093f96b95496d23cdb62 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
@@ -18,6 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_icode.cc author Russ Combs <rucombs@cisco.com>
 
 #include <stdlib.h>
 
 #include <ctype.h>
 
 #include "snort_types.h"
-#include "treenodes.h"
 #include "protocols/packet.h"
-#include "parser.h"
-#include "util.h"
 #include "snort_debug.h"
 #include "sfhashfcn.h"
 #include "snort.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
@@ -76,7 +71,6 @@ uint32_t IcodeOption::hash() const
     b = config.min;
     c = config.max;
 
-    mix(a,b,c);
     mix_str(a,b,c,get_name());
     final(a,b,c);
 
index 27519f5f4f4fa4bb63b3de4bcea0f3926ab82317..47fecaade466b236b9721e3862fa998929e5992d 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_id.cc author Russ Combs <rucombs@cisco.com>
 
 #include <sys/types.h>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "snort_types.h"
-#include "treenodes.h"
 #include "protocols/packet.h"
-#include "parser.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index 260debe96f96e38f8fa9d126708afcc4be7575fe..dd0d8239a4ab5ff092220a13e2c8601937000b7f 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+// ips_itype.cc author Russ Combs <rucombs@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #include "snort_types.h"
-#include "treenodes.h"
 #include "protocols/packet.h"
-#include "parser.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "sfhashfcn.h"
 #include "snort.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index cfed49d44b740d38bf5ddbe05cddc8f0bfdf0125..1612add66b791926b9b743f99b48998045113fc2 100644 (file)
@@ -1,6 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2013-2013 Sourcefire, Inc.
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
@@ -17,6 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_luajit.cc author Russ Combs <rucombs@cisco.com>
 
 #include "ips_luajit.h"
 
index 8df5ed4189dd142e4af533cbb51a901e79f6e746..ea2601e305c8315297ce1a1316356d8361954133 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 */
 // ips_metadata.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include <string>
 #include <vector>
 using namespace std;
 
 #include "snort_types.h"
-#include "detection/treenodes.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index cc46b17e603b7d46a7b1604a88e34ddd765d766e..b3de3ae7c460b055c7883b96de9ee14396be0ead 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include <string>
 
 #include "snort_types.h"
 #include "detection/treenodes.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index b45215705e81dd11e49684a494833f30b6a053f4..89ca1c88b78f8089efad60de1a6f8fd01c4beb6e 100644 (file)
@@ -1,6 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2013-2013 Sourcefire, Inc.
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
@@ -17,6 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_options.cc author Russ Combs <rucombs@cisco.com>
 
 #include "ips_options.h"
 
index 833bf0eed7a99b013f7c8505a45e877a374a9863..565753c421020a8dff55c99f0c0e22d8061531d9 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
- ** Copyright (C) 1998-2013 Sourcefire, Inc.
+ ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
  **
  ** This program is free software; you can redistribute it and/or modify
  ** it under the terms of the GNU General Public License Version 2 as
  ** along with this program; if not, write to the Free Software
  ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+// ips_options.cc author Russ Combs <rucombs@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
 #include "snort_types.h"
 #include "snort_bounds.h"
 #include "protocols/packet.h"
-#include "parser.h"
 #include "snort_debug.h"
-#include "util.h"
-#include "mstring.h"
 #include "snort.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
index fcfc5294021940eee58e077d08126d123dcf15f3..6270a99407992ba8593a02f4cdc4659138ff7f1e 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "snort_types.h"
 #include "detection/treenodes.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index 722c2471959dc32c70220265ff402781cead9264..a0557fcc9e92ed948140396bba03ddd8eb060288 100644 (file)
@@ -1,6 +1,5 @@
 /*
-** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
- ** Copyright (C) 1998-2013 Sourcefire, Inc.
+ ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
  **
  ** This program is free software; you can redistribute it and/or modify
  ** it under the terms of the GNU General Public License Version 2 as
  ** along with this program; if not, write to the Free Software
  ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+// ips_priority.cc author Russ Combs <rucombs@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
 #include "snort_types.h"
-#include "snort_bounds.h"
 #include "protocols/packet.h"
-#include "parser.h"
 #include "snort_debug.h"
-#include "util.h"
-#include "mstring.h"
 #include "snort.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "detection/detection_defines.h"
 #include "detection_util.h"
 #include "framework/cursor.h"
index 8206d9a813dc05be493ec4762fa9e5153a16065c..49e45bea7289032d970e5a309069e3d03ed60098 100644 (file)
@@ -1,7 +1,5 @@
 /****************************************************************************
- *
-** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
- * Copyright (C) 2005-2013 Sourcefire, Inc.
+ * Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License Version 2 as
@@ -19,9 +17,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  ****************************************************************************/
-
-// @file    sp_react.c
-// @author  Russ Combs <rcombs@sourcefire.com>
+// ips_react.cc author Russ Combs <rucombs@cisco.com>
 
 /* The original Snort React Plugin was contributed by Maciej Szarpak, Warsaw
  * University of Technology.  The module has been entirely rewritten by
@@ -61,9 +57,8 @@
 #include "protocols/packet.h"
 #include "managers/packet_manager.h"
 #include "detection/detection_defines.h"
-#include "parser.h"
+#include "parser/parser.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "packet_io/active.h"
 #include "sfhashfcn.h"
 #include "snort.h"
index 385d722bc6eb1a4674b7c17770844d68e0e1be7a..bc2cd35e6054d5776451ce621fd387bc5d5760a8 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 */
 // ips_reference.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include <string>
 
 #include "snort_types.h"
 #include "detection/treenodes.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index 1d717f24fdb24c93facb1c2a79b5226ea4a3e90d..ef8240a62a7fe1e70ecbb543a4926128c75ce03b 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "snort_types.h"
-#include "detection/treenodes.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index 2a274eb6af934702324d5d7b3e30e0d0f2fcb02b..81753976e8e4cc2fde3707b211c869971d529316 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
  *
-** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
+ * Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
  * Copyright (C) 2005-2013 Sourcefire, Inc.
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -47,8 +47,7 @@
  * - if a resp3 rule is also a drop rule, the drop processing takes precedence.
  */
 
-// @file    sp_respond3.c
-// @author  Russ Combs <rcombs@sourcefire.com>
+// ips_resp.cc author Russ Combs <rucombs@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 219d5a5bf0bf1ff1e877897b5391152172822448..7aac51a7e4a0392ff96e539e91149f896e1bf7c7 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 */
 // ips_rev.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "snort_types.h"
 #include "detection/treenodes.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index 7fd07b22462db269ff284401b28f33ec9e824bc6..23b879f2f5cf7b396f59d4f1972701a4724ca4cd 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_seq.cc author Russ Combs <rucombs@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #include "snort_types.h"
-#include "treenodes.h"
 #include "protocols/packet.h"
-#include "parser.h"
-#include "util.h"
 #include "snort_debug.h"
 #include "snort.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index 2df25c5c708a29143325c666b9fbdda2ec6d5973..d9cd16d970241c77cbcc22a6903232b8fae5a5f0 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 */
 // ips_sid.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "snort_types.h"
 #include "detection/treenodes.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index f48309ff4a5a828140b5aa5113112b3ce2d6f182..62c63694432c0b0c5b3e7588ebd31d54bc32ce05 100644 (file)
@@ -1,6 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2013-2013 Sourcefire, Inc.
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
@@ -17,6 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_so.cc author Russ Combs <rucombs@cisco.com>
 
 #include "framework/so_rule.h"
 
index a9f223111bca03e2afb7858a6851969a53bdd215..a00649430ad551092d29e61e6c943b2fac122a85 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include <string>
 
 #include "snort_types.h"
 #include "detection/treenodes.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
+#include "packet.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/parameter.h"
index 55dd0477a1e1b2a0c23059289ad5ed4e8f26f353..bf707b277a1084367e81ea3461e575b8871240d5 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "snort_types.h"
 #include "detection/treenodes.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "detection/detection_defines.h"
 #include "detection/tag.h"
index 726f2d0757bc6023629d4bc454e027245a7fdc28..6d1acfcd53e421f09e07183575f3bb640522dcc8 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_tag.cc author Russ Combs <rucombs@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-
 #include "protocols/packet.h"
-#include "parser.h"
 #include "snort_debug.h"
-#include "util.h"
 #include "snort.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index b83dca3ea8efa225ce462962caf084dd72b663bf..243df77db9c1de0ac1b84a60f7722eddb47bdbed 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_tag.cc author Russ Combs <rucombs@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-#include <ctype.h>
-
 #include "snort_types.h"
-#include "treenodes.h"
 #include "protocols/packet.h"
 #include "snort_debug.h"
-#include "parser.h"
-#include "util.h"
 #include "sfhashfcn.h"
 #include "snort.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index ab28325964e8552aaa4c7e38453af0edfd5a8d3c..e0c2c9641b6499e087f2aa48495dea3649c10fb0 100644 (file)
@@ -1,7 +1,5 @@
 /*
 ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
-** Copyright (C) 2002-2013 Sourcefire, Inc.
-** Copyright (C) 1998-2002 Martin Roesch <roesch@sourcefire.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License Version 2 as
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ips_tag.cc author Russ Combs <rucombs@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
 #include "snort_types.h"
-#include "treenodes.h"
 #include "protocols/packet.h"
-#include "parser.h"
-#include "util.h"
 #include "snort_debug.h"
 #include "snort.h"
 #include "profiler.h"
-#include "fpdetect.h"
 #include "sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
index c36b1ae729bd5e6888f3a5b8edea63278c9d4aba..275eadb0ff98f49ecaa82f4b3304edad6626beb6 100644 (file)
@@ -128,25 +128,25 @@ bool RangeCheck::eval(long c)
 {
     switch ( op )
     {
-        case EQ:
+    case EQ:
         return ( min == c );
 
-        case NOT:
+    case NOT:
         return ( min != c );
 
-        case LT:
+    case LT:
         return ( min < c );
 
-        case LE:
+    case LE:
         return ( min <= c );
 
-        case GT:
+    case GT:
         return ( min > c );
 
-        case GE:
+    case GE:
         return ( min >= c );
 
-        case LG:
+    case LG:
         return ( min < c && c < max );
 
     default: