]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2902 in SNORT/snort3 from ~RUCOMBS/snort3:cleanup to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Wed, 25 Aug 2021 21:09:49 +0000 (21:09 +0000)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Wed, 25 Aug 2021 21:09:49 +0000 (21:09 +0000)
Squashed commit of the following:

commit 21d87e82a398504981aafc80de89f7c94ba2ea56
Author: russ <rucombs@cisco.com>
Date:   Wed Aug 11 16:23:14 2021 -0400

    build: update help for --enable-tsc-clock to include arm

    Thanks to liangxwa01 for reporting the issue.

commit 1bc12be15964930e688c8ee28593ba4687e6f21a
Author: russ <rucombs@cisco.com>
Date:   Sat Jun 5 20:10:49 2021 -0400

    style: remove C style (void) arglists

commit e03855cbd592afe0717d68cf96157379e61277bc
Author: russ <rucombs@cisco.com>
Date:   Sat May 29 05:43:05 2021 -0400

    sip: deprecate max_requestName_len in favor of max_request_name_len

commit ed31851fd733ef36f30042492bc692ae8a73943e
Author: Russ Combs <rucombs@cisco.com>
Date:   Fri May 21 11:51:00 2021 -0400

    dns, ssh: remove obsolete stream insert checks

commit 18b15b46f42fe83d3ba0bc5da332f951681e8d6d
Author: Russ Combs <rucombs@cisco.com>
Date:   Fri May 21 11:45:17 2021 -0400

    style: remove or update crufty preprocessor comments

commit 9dfff0600fac18652f3be6a5ee7025b79e04ce92
Author: Russ Combs <rucombs@cisco.com>
Date:   Wed May 12 15:51:13 2021 -0400

    README: mention vars in default config

commit c6baa917361b3651e30d7ec63f37c696ef29512c
Author: Russ Combs <rucombs@cisco.com>
Date:   Wed May 12 15:50:17 2021 -0400

    lua: update comments in the default config

commit ad0ae3d85affd820f4534704bca732e2129752ca
Author: Russ Combs <rucombs@cisco.com>
Date:   Wed May 12 15:24:27 2021 -0400

    style: remove crufty comments

66 files changed:
README.md
cmake/create_options.cmake
configure_cmake.sh
lua/snort.lua
lua/snort_defaults.lua
src/detection/detection_engine.cc
src/detection/fp_detect.cc
src/events/event_queue.cc
src/filters/sfrf.cc
src/flow/expect_cache.cc
src/ips_options/ips_byte_jump.cc
src/log/messages.cc
src/managers/action_manager.h
src/network_inspectors/appid/appid_session.cc
src/network_inspectors/appid/tp_appid_utils.cc
src/network_inspectors/arp_spoof/arp_spoof.cc
src/service_inspectors/cip/cip_definitions.h
src/service_inspectors/cip/cip_paf.cc
src/service_inspectors/cip/cip_paf.h
src/service_inspectors/cip/ips_cip_attribute.cc
src/service_inspectors/cip/ips_cip_class.cc
src/service_inspectors/cip/ips_cip_connpathclass.cc
src/service_inspectors/cip/ips_cip_enipcommand.cc
src/service_inspectors/cip/ips_cip_enipreq.cc
src/service_inspectors/cip/ips_cip_eniprsp.cc
src/service_inspectors/cip/ips_cip_instance.cc
src/service_inspectors/cip/ips_cip_req.cc
src/service_inspectors/cip/ips_cip_rsp.cc
src/service_inspectors/cip/ips_cip_service.cc
src/service_inspectors/cip/ips_cip_status.cc
src/service_inspectors/dce_rpc/dce_list.cc
src/service_inspectors/dce_rpc/dce_list.h
src/service_inspectors/dce_rpc/dce_smb2.cc
src/service_inspectors/dce_rpc/dce_smb2_file.cc
src/service_inspectors/dce_rpc/dce_smb2_session.cc
src/service_inspectors/dce_rpc/dce_smb2_tree.cc
src/service_inspectors/dce_rpc/dce_udp_processing.cc
src/service_inspectors/dce_rpc/dce_utils.h
src/service_inspectors/dce_rpc/ips_dce_opnum.cc
src/service_inspectors/dce_rpc/smb_message.cc
src/service_inspectors/dnp3/dnp3.cc
src/service_inspectors/dns/dns.cc
src/service_inspectors/dns/dns.h
src/service_inspectors/ftp_telnet/pp_ftp.cc
src/service_inspectors/ftp_telnet/pp_ftp.h
src/service_inspectors/ftp_telnet/pp_telnet.cc
src/service_inspectors/ftp_telnet/pp_telnet.h
src/service_inspectors/gtp/gtp.cc
src/service_inspectors/gtp/gtp_inspect.cc
src/service_inspectors/iec104/iec104_paf.cc
src/service_inspectors/iec104/iec104_paf.h
src/service_inspectors/imap/imap.cc
src/service_inspectors/modbus/modbus_decode.cc
src/service_inspectors/modbus/modbus_paf.cc
src/service_inspectors/modbus/modbus_paf.h
src/service_inspectors/pop/pop.cc
src/service_inspectors/rpc_decode/rpc_decode.cc
src/service_inspectors/s7commplus/s7comm_paf.cc
src/service_inspectors/s7commplus/s7comm_paf.h
src/service_inspectors/sip/sip.cc
src/service_inspectors/sip/sip_module.cc
src/service_inspectors/smtp/smtp.cc
src/service_inspectors/ssh/ssh.cc
src/service_inspectors/ssh/ssh.h
src/service_inspectors/ssl/ssl_inspector.cc
tools/snort2lua/preprocessor_states/pps_sip.cc

index 34126e39dce15fdfe864c055e096e9085bf3edec..c7b3280f70ae616d450aede7b5103a0e2002235c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -37,10 +37,10 @@ Here are some key features of Snort++:
 * Autogenerate reference documentation
 * Provide better cross platform support
 * Facilitate component testing
+* Use a shared network map
 
 Additional features on the roadmap include:
 
-* Use a shared network map
 * Support pipelining of packet processing
 * Support hardware offload and data plane integration
 * Support proxy mode
@@ -124,7 +124,9 @@ Follow these steps:
 
 # RUN SNORT
 
-Here are some examples.
+Here are some examples. If you are using Talos rules and/or configs, you
+should first set any needed variables at the top of snort.lua and
+snort_defaults.lua.
 
 * Snort++ provides lots of help from the command line, including:
 
@@ -205,8 +207,7 @@ It also covers new features not demonstrated here:
 # SQUEAL
 `o")~`
 
-We hope you are as excited about Snort++ as we are.  Although a lot of work
-remains, we wanted to give you a chance to try it out and let us know what
-you think on the snort-users list.  In the meantime, we'll keep our snout
-to the grindstone.
+We hope you are as excited about Snort++ as we are.  Let us know what you
+think on the snort-users list.  In the meantime, we'll keep our snout to
+the grindstone.
 
index 9c563d99a0cca05de642da70da5756d190896910..d1f7e9f47e8773238983b4fddc085b3081893695 100644 (file)
@@ -22,7 +22,7 @@ option ( ENABLE_PIGLET "enable piglet test harness" OFF )
 option ( ENABLE_COREFILES "Prevent Snort from generating core files" ON )
 option ( ENABLE_LARGE_PCAP "Enable support for pcaps larger than 2 GB" OFF )
 option ( ENABLE_STDLOG "Use file descriptor 3 instead of stdout for alerts" OFF )
-option ( ENABLE_TSC_CLOCK "Use timestamp counter register clock (x86 only)" OFF )
+option ( ENABLE_TSC_CLOCK "Use timestamp counter register clock (x86 and arm only)" OFF )
 
 # documentation
 option ( MAKE_HTML_DOC "Create the HTML documentation" ON )
index 4774712be89af404ae560e84cd60f211c8e772ec..b5c6dc39286e20e6e6d6f2bc0009aac6bd83cace 100755 (executable)
@@ -45,7 +45,7 @@ Optional Features:
     --enable-shell          enable command line shell support
     --enable-large-pcap     enable support for pcaps larger than 2 GB
     --enable-stdlog         use file descriptor 3 instead of stdout for alerts
-    --enable-tsc-clock      use timestamp counter register clock (x86 only)
+    --enable-tsc-clock      use timestamp counter register clock (x86 and arm only)
     --enable-debug-msgs     enable debug printing options (bugreports and
                             developers only)
     --enable-debug          enable debugging options (bugreports and developers
index e0b5a3d3d794c968f8729e323b514a67cb6850fc..10028f4f309ee4829ee582fcc5d9dc9e574e6fe2 100644 (file)
@@ -98,6 +98,8 @@ appid =
 reputation =
 {
     -- configure one or both of these, then uncomment reputation
+    -- (see also related path vars at the top of snort_defaults.lua)
+
     --blacklist = 'blacklist file name with ip lists'
     --whitelist = 'whitelist file name with ip lists'
 }
@@ -173,7 +175,7 @@ ips =
 
     -- use include for rules files; be sure to set your path
     -- note that rules files can include other rules files
-    --include = 'snort3-community.rules',
+    -- (see also related path vars at the top of snort_defaults.lua)
 
     variables = default_variables
 }
index 39f50389480af3a2a532352ce6f69b63ef89a1d0..36f42256fed56d5ed0caff618dbed1a4138a4c40 100644 (file)
@@ -1,27 +1,24 @@
 ---------------------------------------------------------------------------
 -- Snort++ defaults
---
--- include in your snort.lua with a dofile statement
+---------------------------------------------------------------------------
+
+-- this file defines the external defaults for Snort. all simple scalar
+-- types have a builtin default, including those in list items, however
+-- lists defaults are provided here instead of compiling them into the
+-- binary. this makes it easier to copy and paste or edit for your
+-- environment.
+
+-- include in your snort.lua
 -- after you set HOME_NET and EXTERNAL_NET
---
+
 -- use these by assignment, eg
 --     ftp_server = default_ftp_server
----------------------------------------------------------------------------
 
 ---------------------------------------------------------------------------
--- Set paths, ports, and nets:
---
--- variables with 'PATH' in the name are vars
--- variables with 'PORT' in the name are portvars
--- variables with 'NET' in the name are ipvars
--- variables with 'SERVER' in the name are ipvars
+-- default paths - used in Talos configs
 ---------------------------------------------------------------------------
 
----------------------------------------------------------------------------
--- default paths
----------------------------------------------------------------------------
 -- Path to your rules files (this can be a relative path)
-
 RULE_PATH = '../rules'
 BUILTIN_RULE_PATH = '../builtin_rules'
 PLUGIN_RULE_PATH = '../so_rules'
@@ -31,41 +28,30 @@ WHITE_LIST_PATH = '../lists'
 BLACK_LIST_PATH = '../lists'
 
 ---------------------------------------------------------------------------
--- default networks
+-- default networks - used in Talos rules
 ---------------------------------------------------------------------------
+-- define servers on your network you want to protect
 
--- List of DNS servers on your network
 DNS_SERVERS = HOME_NET
-
--- List of ftp servers on your network
 FTP_SERVERS = HOME_NET
-
--- List of web servers on your network
 HTTP_SERVERS = HOME_NET
-
--- List of sip servers on your network
 SIP_SERVERS = HOME_NET
-
--- List of SMTP servers on your network
 SMTP_SERVERS = HOME_NET
-
--- List of sql servers on your network
 SQL_SERVERS = HOME_NET
-
--- List of ssh servers on your network
 SSH_SERVERS = HOME_NET
-
--- List of telnet servers on your network
 TELNET_SERVERS = HOME_NET
 
 ---------------------------------------------------------------------------
 -- default ports - used in Talos rules
 ---------------------------------------------------------------------------
+-- define ports on your network you want to protect
+-- where possible, use the wizard for inspection instead of explicit port
+-- bindings. this gives you some port independence and allows you find c&c
+-- channels hard port bindings would miss. Talos rules will still use these
+-- ports if there is no match on service.
 
--- List of ports you run ftp servers on
 FTP_PORTS = ' 21 2100 3535'
 
--- List of ports you run web servers on
 HTTP_PORTS =
 [[
     80 81 311 383 591 593 901 1220 1414 1741 1830 2301 2381 2809 3037 3128
@@ -75,27 +61,24 @@ HTTP_PORTS =
     50002 55555
 ]]
 
--- List of ports you run mail servers on
 MAIL_PORTS = ' 110 143'
 
--- List of ports you might see oracle attacks on
 ORACLE_PORTS = ' 1024:'
 
--- List of ports you run SIP servers on
 SIP_PORTS = ' 5060 5061 5600'
 
--- List of ports you want to look for SSH connections on
 SSH_PORTS = ' 22'
 
--- List of ports for file inspection
 FILE_DATA_PORTS = HTTP_PORTS .. MAIL_PORTS
 
 ---------------------------------------------------------------------------
 -- default variables
 ---------------------------------------------------------------------------
 
-default_variables = {
-    nets = {
+default_variables =
+{
+    nets =
+    {
         HOME_NET = HOME_NET,
         EXTERNAL_NET = EXTERNAL_NET,
         DNS_SERVERS = DNS_SERVERS,
@@ -107,14 +90,16 @@ default_variables = {
         SSH_SERVERS = SSH_SERVERS,
         TELNET_SERVERS = TELNET_SERVERS,
     },
-    paths = {
+    paths =
+    {
         RULE_PATH = RULE_PATH,
         BUILTIN_RULE_PATH = BUILTIN_RULE_PATH,
         PLUGIN_RULE_PATH = PLUGIN_RULE_PATH,
         WHITE_LIST_PATH = WHITE_LIST_PATH,
         BLACK_LIST_PATH = BLACK_LIST_PATH,
     },
-    ports = {
+    ports =
+    {
         FTP_PORTS = FTP_PORTS,
         HTTP_PORTS = HTTP_PORTS,
         MAIL_PORTS = MAIL_PORTS,
index 46154430b037ca665f528c76c26ff07bf6e69beb..1598582fb8c2f0c1d5afd64f23ab6ef91d162397 100644 (file)
@@ -714,8 +714,8 @@ static int log_events(void* event, void* user)
 /*
 **  We return whether we logged events or not.  We've add a eventq user
 **  structure so we can track whether the events logged were rule events
-**  or preprocessor/decoder events.  The reason being that we don't want
-**  to flush a TCP stream for preprocessor/decoder events, and cause
+**  or builtin events.  The reason being that we don't want
+**  to flush a TCP stream for builtin events, and cause
 **  early flushing of the stream.
 */
 int DetectionEngine::log_events(Packet* p)
index 3b82f9c843d73b0f2b78e50f1d252308966e377f..fc24bbbb016bcd497034680396ef556482427970 100644 (file)
@@ -241,7 +241,7 @@ int fpLogEvent(const RuleTreeNode* rtn, const OptTreeNode* otn, Packet* p)
     }
 
     /* If this packet has been passed based on detection rules,
-     * check the decoder/preprocessor events (they have been added to Event queue already).
+     * check the builtin events (they have been added to Event queue already).
      * If its order is lower than 'pass', it should have been passed.
      * This is consistent with other detection rules */
     const SnortConfig* sc = p->context->conf;
index 595066b5b392fb90699893e07d2e5f1bc56d7b3b..eaa2d90b7acf790d76fe132284a08ca503949b68 100644 (file)
 **
 ** Notes:
 **  11/1/05  Updates to add support for rules for all events in
-**           decoders and preprocessors and the detection engine.
+**           decoders and inspectors and the detection engine.
 **           Added support for rule by rule flushing control via
 **           metadata. Also added code to check for an otn for every
 **           event (gid,sid pair).  This is now required to get events
-**           to be logged. The decoders and preprocessors are still
+**           to be logged. The decoders and inspectors are still
 **           configured independently, which allows them to inspect and
 **           call the alerting functions DetectionEngine::queue_event.
 **
 **           Any event that has no otn associated with it's gid,sid pair
-**           will/should not alert, even if the preprocessor or decoder is
+**           will/should not alert, even if the inspector or decoder is
 **           configured to detect an alertable event.
 **
 **           In the future, preporcessor may have an api that gets called
index 11f98c75f1c836fa62cf49125e4f92e249472eef..8d6dbbe69334bca7ffe35bb0b9a8b0aa1875dc2f 100644 (file)
@@ -467,7 +467,7 @@ int SFRF_TestThreshold(
     if ( gid >= SFRF_MAX_GENID )
         return status; /* bogus gid */
 
-    // Some events (like 'TCP connection closed' raised by preprocessor may
+    // Some events (like 'TCP connection closed' raised by inspector may
     // not have any configured threshold but may impact thresholds for other
     // events (like 'TCP connection opened'
     _updateDependentThresholds(config, gid, sid, sip, dip, curTime);
index 1f185780d2d52ddb641abdbc666ce4bd36c66482..6324dce0f0c823f9e4bdb7c9c1111eb13c21443e 100644 (file)
@@ -299,9 +299,9 @@ ExpectCache::~ExpectCache()
 
 /**Either expect or expect future session.
  *
- * Preprocessors may add sessions to be expected altogether or to be associated
- * with some data. For example, FTP preprocessor may add data channel that
- * should be expected. Alternatively, FTP preprocessor may add session with
+ * Inspectors may add sessions to be expected altogether or to be associated
+ * with some data. For example, FTP inspector may add data channel that
+ * should be expected. Alternatively, FTP inspector may add session with
  * snort protocol ID FTP-DATA.
  *
  * It is assumed that only one of cliPort or srvPort should be known (!0). This
@@ -310,7 +310,7 @@ ExpectCache::~ExpectCache()
  * therefore acceptable design optimization.
  *
  * Also, snort_protocol_id is assumed to be consistent between different
- * preprocessors.  Each session can be assigned only one snort protocol ID.
+ * inspectors.  Each session can be assigned only one snort protocol ID.
  * When new snort_protocol_id mismatches existing snort_protocol_id, new
  * snort_protocol_id and associated data is not stored.
  *
index 19a69ce2cec6bc6f478e0c4b038b2a6075f7c248..fc02f806ad39401a950c4d1afb9021dc1e44186f 100644 (file)
@@ -36,7 +36,7 @@
  *                             <value> and skip forward that number of bytes
  *      ["big"]: process data as big endian (default)
  *      ["little"]: process data as little endian
- *      ["dce"]: let the DCE/RPC 2 preprocessor determine the byte order of the
+ *      ["dce"]: let the DCE/RPC 2 inspector determine the byte order of the
  *               value to be converted
  *      ["string"]: converted bytes represented as a string needing conversion
  *      ["hex"]: converted string data is represented in hexadecimal
index ce48e9cc38a98ab1f7b17514bd95a8728b61e6a7..56be484b035da7c5140f1c0e7aa028555f1cc726 100644 (file)
@@ -188,16 +188,7 @@ static void WriteLogMessage(FILE* fh, bool prefer_fh, const char* format, va_lis
     syslog(LOG_DAEMON | LOG_NOTICE, "%s", buf);
 }
 
-/*
- * Function: LogMessage(const char *, ...)
- *
- * Purpose: Print a message to stdout or with logfacility.
- *
- * Arguments: format => the formatted error string to print out
- *            ... => format commands/fillers
- *
- * Returns: void function
- */
+// print an info message to stdout or syslog
 void LogMessage(const char* format,...)
 {
     if ( SnortConfig::log_quiet() )
@@ -224,16 +215,7 @@ void LogMessage(FILE* fh, const char* format,...)
     va_end(ap);
 }
 
-/*
- * Function: WarningMessage(const char *, ...)
- *
- * Purpose: Print a message to stderr or with logfacility.
- *
- * Arguments: format => the formatted error string to print out
- *            ... => format commands/fillers
- *
- * Returns: void function
- */
+// print a warning message to stderr or syslog
 void WarningMessage(const char* format,...)
 {
     va_list ap;
@@ -255,16 +237,7 @@ void WarningMessage(const char* format,...)
     va_end(ap);
 }
 
-/*
- * Function: ErrorMessage(const char *, ...)
- *
- * Purpose: Print a message to stderr.
- *
- * Arguments: format => the formatted error string to print out
- *            ... => format commands/fillers
- *
- * Returns: void function
- */
+// print a warning message to stderr or syslog
 void ErrorMessage(const char* format,...)
 {
     va_list ap;
@@ -285,17 +258,8 @@ void ErrorMessage(const char* format,...)
     va_end(ap);
 }
 
-/*
- * Function: FatalError(const char *, ...)
- *
- * Purpose: When a fatal error occurs, this function prints the error message
- *          and cleanly shuts down the program
- *
- * Arguments: format => the formatted error string to print out
- *            ... => format commands/fillers
- *
- * Returns: void function
- */
+// when a fatal error occurs, this function prints the error message
+// and cleanly shuts down the program
 [[noreturn]] void FatalError(const char* format,...)
 {
     char buf[STD_BUF+1];
index 990d2bbcd27904dec801ecb4f17b069c1060d551..0c297fedb75f5ffe757f6466862d9000ea4a1771 100644 (file)
@@ -73,7 +73,7 @@ public:
 
     static std::string get_action_string(Actions::Type);
     static Actions::Type get_action_type(const char*);
-    static Actions::Type get_max_action_types(void);
+    static Actions::Type get_max_action_types();
     static std::string get_action_priorities(bool);
 
     static void thread_init(const snort::SnortConfig*);
index ef39c79811121c306446bd6617ddc341bae4123b..41ee0b4ce5cea6ab3dcfe577a1221bd0bad122b5 100644 (file)
@@ -323,7 +323,7 @@ void AppIdSession::sync_with_snort_protocol_id(AppId newAppId, Packet* p)
     if (newAppId  <= APP_ID_NONE or newAppId >= SF_APPID_MAX)
         return;
 
-    // Certain AppIds are not useful to identifying snort preprocessor choices
+    // Certain AppIds are not useful to identifying snort inspector choices
     switch (newAppId)
     {
     case APP_ID_FTPS:
index a5c02837e73f1805393c7506408ce4631e443e63..3b3158ea3f3b1592f92621c79caabf3f58f36e0e 100644 (file)
@@ -626,8 +626,8 @@ bool do_tp_discovery(ThirdPartyAppIdContext& tp_appid_ctxt, AppIdSession& asd, I
         (Stream::get_snort_protocol_id(p->flow) ==
             asd.config.snort_proto_ids[PROTO_INDEX_FTP_DATA]))
     {
-        //  If we see SSL on an FTP data channel set tpAppId back
-        //  to APP_ID_NONE so the FTP preprocessor picks up the flow.
+        // If we see SSL on an FTP data channel set tpAppId back
+        // to APP_ID_NONE so the FTP inspector picks up the flow.
         tp_app_id = APP_ID_NONE;
     }
 
index 51e6210ae768c6dd41d73cb65be97aaff24774f0..8333d37655f0f0d3a8e7a3924db35a3da661c041 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-/* Snort ARPspoof Preprocessor Plugin
+/* Snort ARPspoof Plugin
  *   by Jeff Nathan <jeff@snort.org>
  *   Version 0.1.4
  *
  * Purpose:
  *
- * This preprocessor looks for anomalies in ARP traffic and attempts to
+ * This inspector looks for anomalies in ARP traffic and attempts to
  * maliciously overwrite  ARP cache information on hosts.
  *
  * Arguments:
index eebae3d3f510ea171afd67f6ac7a4da7577a62ae..582045a2b40036d876870c658a6be65d98312736 100644 (file)
@@ -18,7 +18,7 @@
 
 // cip_definitions.h author RA/Cisco
 
-/* Description: Common types for the CIP preprocessor. */
+/* Description: Common types for the CIP inspector. */
 
 #ifndef CIP_DEFINITIONS_H
 #define CIP_DEFINITIONS_H
@@ -33,7 +33,7 @@ struct Packet;
 #define MSEC_PER_SEC (1000)
 #define USEC_PER_SEC (1000000)
 
-// CIP preprocessor configuration
+// CIP inspector configuration
 struct CipProtoConf
 {
     // Unconnected timeout, seconds.
index 24bafb369afa168b12b5fcfa655afa559e40328e..5f28fd122334c32dd5358cd9281d99f8156cc732 100644 (file)
@@ -18,7 +18,7 @@
 
 // cip_paf.cc author RA/Cisco
 
-/* Description: Protocol-Aware Flushing (PAF) code for the CIP preprocessor.*/
+/* Description: Protocol-Aware Flushing (PAF) code for the CIP inspector. */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index ef321fb957a8b41c522bd836189fb5a45917e065..6e6d267afe9b346bedc9ea2640b0753b93668775 100644 (file)
@@ -18,7 +18,7 @@
 
 // cip_paf.h author RA/Cisco
 
-/* Description: Protocol-Aware Flushing (PAF) code for the CIP preprocessor. */
+/* Description: Protocol-Aware Flushing (PAF) code for the CIP inspector. */
 
 #ifndef CIP_PAF_H
 #define CIP_PAF_H
index 4b8fea5fc1d4117d6862474c84ba8f5952e0b656..b176694905b70e8ea7afb3984b50787020ea361e 100644 (file)
@@ -18,7 +18,7 @@
 
 // ips_cip_attribute.cc author Jian Wu <jiawu2@cisco.com>
 
-/* Description: Rule options for CIP preprocessor */
+/* Description: Rule options for CIP inspector */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index f76a265a643cf75027d9b9808524f5e8a0cc604a..0d03b6dedf63f25a08e05ed34febc776130a09a8 100644 (file)
@@ -18,7 +18,7 @@
 
 // ips_cip_class.cc author Jian Wu <jiawu2@cisco.com>
 
-/* Description: Rule options for CIP preprocessor */
+/* Description: Rule options for CIP inspector */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index a3e9bd34c20373125ea07ed13f4d980920f96052..2ba69b0d3e634500acfb871520567877dde95e1d 100644 (file)
@@ -18,7 +18,7 @@
 
 // ips_cip_connpathclass.cc author Jian Wu <jiawu2@cisco.com>
 
-/* Description: Rule options for CIP preprocessor */
+/* Description: Rule options for CIP inspector */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 99f8b76c10a3ab0531fef043643939e8b275f62a..c576a9dfdd4b6a8ad6c7a0392c2b4817dd57aaac 100644 (file)
@@ -18,7 +18,7 @@
 
 // ips_cip_enipcommand.cc author Jian Wu <jiawu2@cisco.com>
 
-/* Description: Rule options for CIP preprocessor */
+/* Description: Rule options for CIP inspector */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 777fe6cc8e7542a524ed0f9687c38c6c33dc4f74..e433081c53a66cb22352c5dafa57074286323e76 100644 (file)
@@ -18,7 +18,7 @@
 
 // ips_cip_enipreq.cc author Jian Wu <jiawu2@cisco.com>
 
-/* Description: Rule options for CIP preprocessor */
+/* Description: Rule options for CIP inspector */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 8d94916dfd4941e955b9521d1a45b60c5b5b5dd0..7c209ac733d455e7e3b2b5ed3f118c158eaa704a 100644 (file)
@@ -18,7 +18,7 @@
 
 // ips_cip_eniprsp.cc author Jian Wu <jiawu2@cisco.com>
 
-/* Description: Rule options for CIP preprocessor */
+/* Description: Rule options for CIP inspector */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index cdad051ed6745775a59d15bd9fe3997ce48abe98..2e31a4d876fbb954dd64241a038eb7a0b7e35835 100644 (file)
@@ -18,7 +18,7 @@
 
 // ips_cip_instance.cc author Jian Wu <jiawu2@cisco.com>
 
-/* Description: Rule options for CIP preprocessor */
+/* Description: Rule options for CIP inspector */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 4bc17e642659fa54bc2b094119a9faca7b5552e4..ff187e10577c8191be7094a794189c75b45a566f 100644 (file)
@@ -18,7 +18,7 @@
 
 // ips_cip_req.cc author Jian Wu <jiawu2@cisco.com>
 
-/* Description: Rule options for CIP preprocessor */
+/* Description: Rule options for CIP inspector */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 9853a82cd0771f898043743652fbf848649104f5..8f67bc263817859d180ea601ca68e6d973723a6a 100644 (file)
@@ -18,7 +18,7 @@
 
 // ips_cip_rsp.cc author Jian Wu <jiawu2@cisco.com>
 
-/* Description: Rule options for CIP preprocessor */
+/* Description: Rule options for CIP inspector */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 2d1a56f32acf6654b3aa079ecbee79d630549ae6..7b5e373eaa504374738ce5be18c7da18e83ef1d1 100644 (file)
@@ -18,7 +18,7 @@
 
 // ips_cip_service.cc author Jian Wu <jiawu2@cisco.com>
 
-/* Description: Rule options for CIP preprocessor */
+/* Description: Rule options for CIP inspector */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index ca021ef336da62a335829991f5cbb7c633bf3b1e..495f66586d50c544b93a2c1ebbe0df6a2baee2dd 100644 (file)
@@ -18,7 +18,7 @@
 
 // ips_cip_status.cc author Jian Wu <jiawu2@cisco.com>
 
-/* Description: Rule options for CIP preprocessor */
+/* Description: Rule options for CIP inspector */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 15598c3e571d6f007db494ce6a6d023bff1ec204..ff2a8013433a787cb80657082b4e97ba01610b2e 100644 (file)
@@ -19,7 +19,7 @@
 
 /****************************************************************************
  * Provides list, queue and stack data structures and methods for use
- * with the preprocessor.
+ * with the inspector.
  *
  * 8/17/2008 - Initial implementation ... Todd Wease <twease@sourcefire.com>
  *
index f3d332601ddc6a14da305bbcf9a2f4ddcc4c4a7e..dcfc08bc5911bc07b23958fd397d179c5c622861 100644 (file)
@@ -19,7 +19,7 @@
 
 /****************************************************************************
 * Provides list, queue and stack data structures and methods for use
-* with the preprocessor.
+* with the inspector.
 *
 * 8/17/2008 - Initial implementation ... Todd Wease <twease@sourcefire.com>
 *
index ebcde3a08cbec532395ea7501c544c56513255d4..e8f9527ffab45fd2bedb1e49870a8205f8aabb37 100644 (file)
@@ -109,7 +109,7 @@ Dce2Smb2SessionData::Dce2Smb2SessionData(const Packet* p,
     memory::MemoryCap::update_allocations(sizeof(*this));
 }
 
-Dce2Smb2SessionData::~Dce2Smb2SessionData(void)
+Dce2Smb2SessionData::~Dce2Smb2SessionData()
 {
     session_data_mutex.lock();
     for (auto it_session : connected_sessions)
index 167dff739713864db10e0d07e61d55d3717cefaf..9e13447736a58c4a91f0ac50045caaed0e73e0e7 100644 (file)
@@ -240,7 +240,7 @@ bool Dce2Smb2FileTracker::process_data(const uint32_t current_flow_key, const ui
     return true;
 }
 
-Dce2Smb2FileTracker::~Dce2Smb2FileTracker(void)
+Dce2Smb2FileTracker::~Dce2Smb2FileTracker()
 {
     if (smb_module_is_up and (is_packet_thread()))
     {
index f4ad56c70fb2322ce8adfbadc7ef14f9393db545..aa67f7432dc0417a45d5f10d72ec2251fc86cc0b 100644 (file)
@@ -189,7 +189,7 @@ void Dce2Smb2SessionTracker::unlink()
 }
 
 // Session Tracker is created and destroyed only from session cache
-Dce2Smb2SessionTracker::~Dce2Smb2SessionTracker(void)
+Dce2Smb2SessionTracker::~Dce2Smb2SessionTracker()
 {
     if (smb_module_is_up and (snort::is_packet_thread()))
     {
index 1c593071bab2db0e906515cc1f8b7534b1c08cf4..5dc9e10aabf53c8c19115e17697282bc1741ecf8 100644 (file)
@@ -526,7 +526,7 @@ void Dce2Smb2TreeTracker::process(uint16_t command, uint8_t command_type,
         remove_request(message_id, current_flow_key);
 }
 
-Dce2Smb2TreeTracker::~Dce2Smb2TreeTracker(void)
+Dce2Smb2TreeTracker::~Dce2Smb2TreeTracker()
 {
     if (smb_module_is_up and (is_packet_thread()))
     {
index 2a956b4e8202a7102f43335e960d2663fef92b6d..a9956524061fce276d79df6cf052e77316f0edc8 100644 (file)
@@ -24,7 +24,7 @@
 // functionality for tracking sub-sessions or activities within a
 // connectionless conversation and for tracking and reassembling fragments
 // within each activity.  Also sets appropriate data for use with
-// preprocessor rule options.
+// inspector rule options.
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 29d9aa3fb5f2e73933f6089a25e5b8dead908966..f2d8c6c2a1011882a8c2c9850300d57db39bef30 100644 (file)
@@ -138,22 +138,9 @@ void DCE2_BufferDestroy(DCE2_Buffer* buf);
 const char* DCE2_UuidToStr(
     const Uuid*, DceRpcBoFlag, char (&buf)[DCE2_UUID_BUF_SIZE]);
 
-/********************************************************************
- * Function: DCE2_IsSpaceChar()
- *
- * Determines if the character passed in is a character that
- * the preprocessor considers a to be a space character.
- *
- * Arguments:
- *  const char
- *      The character to make the determination on.
- *
- * Returns:
- *  bool
- *      true if a valid space character.
- *      false if not a valid space character.
- *
- ********************************************************************/
+// Determines if the character passed in is a character that
+// the inspector considers a to be a space character.
+
 inline bool DCE2_IsSpaceChar(const char c)
 {
     if (isspace((int)c))
@@ -161,23 +148,10 @@ inline bool DCE2_IsSpaceChar(const char c)
     return false;
 }
 
-/********************************************************************
- * Function: DCE2_IsConfigEndChar()
- *
- * Determines if the character passed in is a character that
- * the preprocessor considers a to be an end of configuration
- * character.
- *
- * Arguments:
- *  const char
- *      The character to make the determination on.
- *
- * Returns:
- *  bool
- *      true if a valid end of configuration character.
- *      false if not a valid end of configuration character.
- *
- ********************************************************************/
+// Determines if the character passed in is a character that
+// the inspector considers a to be an end of configuration
+// character.
+
 inline bool DCE2_IsConfigEndChar(const char c)
 {
     if (c == DCE2_CFG_TOK__END)
@@ -185,26 +159,9 @@ inline bool DCE2_IsConfigEndChar(const char c)
     return false;
 }
 
-/********************************************************************
- * Function: DCE2_PruneWhiteSpace()
- *
- * Prunes whitespace surrounding string.
- * String must be 0 terminated.
- *
- * Arguments:
- *  char *
- *      null terminated string to prune.
- *  int
- *      length of string
- *
- * Returns:
- *  char * - Pointer to the pruned string.  Note that the pointer
- *           still points within the original string.
- *
- * Side effects: Spaces at the end of the string passed in as an
- *               argument are replaced by null bytes.
- *
- ********************************************************************/
+// Prunes whitespace surrounding string.
+// String must be 0 terminated.
+
 inline char* DCE2_PruneWhiteSpace(char* str)
 {
     char* end;
@@ -227,20 +184,9 @@ inline char* DCE2_PruneWhiteSpace(char* str)
     return str;
 }
 
-/********************************************************************
- * Function: DCE2_IsEmptyStr()
- *
- * Checks if string is null, empty or just spaces.
- * String must be 0 terminated.
- *
- * Arguments: None
- *  char * - string to check
- *
- * Returns:
- *  true  if string is null, empty or just spaces
- *  false  otherwise
- *
- ********************************************************************/
+// Checks if string is null, empty or just spaces.
+// String must be 0 terminated.
+
 inline bool DCE2_IsEmptyStr(char* str)
 {
     char* end;
index 90fac9b5fb817776c25f0d40c58402fc23c2533e..00b8a85ed0421cd6ab19c8a93862980400a94ba1 100644 (file)
@@ -89,7 +89,7 @@ static THREAD_LOCAL ProfileStats dce2_opnum_perf_stats;
  * Function: DCE2_IsOpnumChar()
  *
  * Determines if the character passed in is a character that
- * the preprocessor considers a to be a valid character for a
+ * the inspector considers a to be a valid character for a
  * DCE/RPC opnum.
  *
  * Arguments:
index 5a0074c7e1d93449e828a3229973f0556dd7624b..a84b7ff5faa8f4be1129597d5ca741c6344b0dfa 100644 (file)
@@ -1013,7 +1013,7 @@ static void DCE2_SmbProcessCommand(DCE2_SmbSsnData* ssd, const SmbNtHdr* smb_hdr
  * Function: DCE2_SmbInspect()
  *
  * Purpose:
- *  Determines whether the SMB command is something the preprocessor
+ *  Determines whether the SMB command is something the inspector
  *  needs to inspect.
  *  This function returns a DCE2_SmbRequestTracker which tracks command
  *  requests / responses.
@@ -1926,9 +1926,9 @@ void DCE2_SmbInitGlobals()
             DCE2_SmbSetValidWordCount((uint8_t)com, SMB_TYPE__REQUEST, 16);
 
             // \PIPE\LANMAN
-            // Not something the preprocessor is looking at as it
+            // Not something the inspector is looking at as it
             // doesn't carry DCE/RPC but don't want to false positive
-            // on the preprocessor event.
+            // on the inspector event.
             DCE2_SmbSetValidWordCount((uint8_t)com, SMB_TYPE__REQUEST, 14);
 
             // Word count depends on setup count
index 9c8f8c1558fdaa016ebc03da5f270523616d8cf5..9ea3d5bc3d90c5ab06611a3ef62f2965efdc3fcd 100644 (file)
@@ -196,7 +196,6 @@ static void process_dnp3(const dnp3ProtoConf& config, Packet* p)
     else
         dnp3_sess->direction = DNP3_SERVER;
 
-    /* Do preprocessor-specific detection stuff here */
     if (p->has_tcp_data())
     {
         ++dnp3_stats.tcp_pdus;
index bcd1e2d8139d72f338c854fa0cf5c76ec59c5f2a..bafb17d21155090397a7ab7145405c2395f292c9 100644 (file)
@@ -966,10 +966,6 @@ static void snort_dns(Packet* p)
 
         if ( !Stream::is_stream_sequenced(p->flow, SSN_DIR_FROM_CLIENT) )
             return;
-
-        // If we're waiting on stream reassembly, don't process this packet.
-        if ( p->packet_flags & PKT_STREAM_INSERT )
-            return;
     }
 
     // Get the direction of the packet.
index 39c41bc75f78f20f0a410669fe1dd527bd480e7e..3beebf2519c9851c28b1a6c6632cc2e70684bbdb 100644 (file)
@@ -150,7 +150,7 @@ struct DNSNameState
 #define DNS_RESP_STATE_ADD_RR           0x60
 
 // Per-session data block containing current state
-// of the DNS preprocessor for the session.
+// of the DNS inspector for the session.
 struct DNSData
 {
     uint32_t state;               // The current state of the session.
index 946213a0f491322aa85a1ca4a80854a7f3a35af6..abf41eccd28751a6793991fe7d48ef89bef1b3d9 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-/* pp_ftp.c
- *
- * Purpose:  FTP sessions contain commands and responses.  Certain
- *           commands are vectors of attack.  This module checks
- *           those FTP client commands and their parameter values, as
- *           well as the server responses per the configuration.
- *
- * Arguments:  None
- *
- * Effect:  Alerts may be raised
- *
- * Comments:
- *
- */
-
-/* your preprocessor header file goes here */
+// FTP sessions contain commands and responses.  Certain commands are
+// vectors of attack.  This module checks those FTP client commands and
+// their parameter values, as well as the server responses per the
+// configuration.
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 409ce8cf5318cdccdb3d06f02190474411caa229..025f6ef576388aca1d4c80a162d311e0f11704e2 100644 (file)
@@ -26,9 +26,7 @@
 
 #include "ftpp_si.h"
 
-/* list of function prototypes for this preprocessor */
 extern int check_ftp(FTP_SESSION* session, snort::Packet* p, int iMode);
-
 extern int initialize_ftp(FTP_SESSION* session, snort::Packet* p, int iMode);
 
 #endif
index 258512dd5d2aacbb856f7c9ff44dc51b31ef607f..47e9f08bb34585e5116f6d901f6077fa84897c92 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-/* Snort Preprocessor for Telnet Negotiation Normalization*/
-
-/* pp_telnet.c
- *
- * Purpose:  Telnet sessions can contain telnet negotiation strings
- *           that can disrupt pattern matching.  This plugin detects
- *           negotiation strings in stream and "normalizes" them much like
- *           the http_decode preprocessor normalizes encoded URLs
- *
- *
- * official registry of options
- * http://www.iana.org/assignments/telnet-options
- *
- * Arguments:  None
- *
- * Effect:  The telnet negotiation data is removed from the data
- *
- * Comments:
- *
- */
 
-/* your preprocessor header file goes here */
+// Telnet sessions can contain telnet negotiation strings that can disrupt
+// pattern matching.  This plugin detects negotiation strings in stream and
+// normalizes them much like the http_inspect normalizes encoded URLs.
+//
+// official registry of options
+// http://www.iana.org/assignments/telnet-options
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -79,19 +64,6 @@ const uint8_t* get_telnet_buffer(Packet* p, unsigned& len)
     return len ? buf.data : nullptr;
 }
 
-/*
- * Function: normalize_telnet(Packet *)
- *
- * Purpose: Perform the preprocessor's intended function.  This can be
- *          simple (statistics collection) or complex (IP defragmentation)
- *          as you like.  Try not to destroy the performance of the whole
- *          system by trying to do too much....
- *
- * Arguments: p => pointer to the current packet data struct
- *
- * Returns: void function
- *
- */
 int normalize_telnet(
     TELNET_SESSION* tnssn, Packet* p, DataBuffer& buf,
     int iMode, char ignoreEraseCmds, bool on_ftp_channel)
index 2d17f4c9c42bbe9a11055cc87132b3054461947c..4e7608422fdaae814d0bb33990c97c62b6136a77 100644 (file)
@@ -61,8 +61,9 @@
 #define FTPP_IGNORE_TNC_ERASE_CMDS 1
 
 struct DataBuffer;
-/* list of function prototypes for this preprocessor */
-extern int normalize_telnet(TELNET_SESSION*, snort::Packet*, DataBuffer&, int iMode, char ignoreEraseCmd, bool on_ftp_channel);
+
+extern int normalize_telnet(
+    TELNET_SESSION*, snort::Packet*, DataBuffer&, int iMode, char ignoreEraseCmd, bool on_ftp_channel);
 
 void reset_telnet_buffer(snort::Packet*);
 const uint8_t* get_telnet_buffer(snort::Packet*, unsigned&);
index e9e68530f30456d67b64eb095ace2f7a70f9c909..6ea5f68c98ce2c81b74b795225462ffd330bf1e6 100644 (file)
@@ -18,7 +18,7 @@
 //--------------------------------------------------------------------------
 
 // gtp.cc author Hui Cao <hcao@sourcefire.com>
-// This is the main entry point for this preprocessor
+// This is the main entry point for this inspector
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -78,7 +78,7 @@ static GTP_Roptions* GTPGetNewSession(Packet* packetp)
     return pRopts;
 }
 
-// Main runtime entry point for GTP preprocessor.
+// Main runtime entry point for GTP inspector.
 void GTPmain(const GTPConfig& config, Packet* packetp)
 {
     /* Attempt to get a previously allocated GTP block. */
index aee0081de600e00f641b513a3bc43c38b9bbbab7..9f4c4ace903d7456e6386afc72d02fad8c5f16b6 100644 (file)
@@ -17,7 +17,6 @@
 //--------------------------------------------------------------------------
 
 // gtp_inspect.cc author Russ Combs <rucombs@cisco.com>
-// adapt 2x preprocessor code to 3x inspector
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 4c52c90f7c29cab44bb4ac159299dec452750001..3e801b3c93da1ccd3ecd64bc167c45a60610e534 100644 (file)
@@ -20,7 +20,7 @@
 // modeled after modbus_paf.cc (author Ryan Jordan)
 // modeled after s7comm_paf.cc (author Pradeep Damodharan <prdamodh@cisco.com>)
 
-// Protocol-Aware Flushing (PAF) code for the IEC104 preprocessor.
+// Protocol-Aware Flushing (PAF) code for the IEC104 inspector.
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 14129678189ec3302e28dc454dc369e02a25405d..f5600b66e75b5916dec1aadbcfdb3785c9c06cc5 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef IEC104_PAF__H
 #define IEC104_PAF__H
 
-// Protocol-Aware Flushing (PAF) code for the IEC104 preprocessor.
+// Protocol-Aware Flushing (PAF) code for the IEC104 inspector.
 
 #include "stream/stream_splitter.h"
 
index fb03f2e74137c8e39fabe08895cd8ad49b7cc606..35c6029fb1630ea31715f9dade1b72e519d6475c 100644 (file)
@@ -567,16 +567,8 @@ static void IMAP_ProcessServerPacket(Packet* p, IMAPData* imap_ssn)
     }
 }
 
-/* Main runtime entry point for IMAP preprocessor.
- * Analyzes IMAP packets for anomalies/exploits.
- *
- * PARAMETERS:
- *
- * p:    Pointer to current packet to process.
- * contextp:    Pointer to context block, not used.
- *
- * RETURNS:     Nothing.
- */
+// Analyzes IMAP packets for anomalies/exploits.
+
 static void snort_imap(IMAP_PROTO_CONF* config, Packet* p)
 {
     /* Attempt to get a previously allocated IMAP block. */
index 58828edc37c40991ad76f2ee57943c379ec565bf..c09d78d8dabce16cfcb461a2b6bf8d5a4246079f 100644 (file)
@@ -164,7 +164,7 @@ static void ModbusCheckRequestLengths(modbus_session_data_t* session, Packet* p)
             /* MEI Type 0x0E is covered under the Modbus spec as
                "Read Device Identification". Type 0x0D is defined in
                the spec as "CANopen General Reference Request and Response PDU"
-               and falls outside the scope of the Modbus preprocessor.
+               and falls outside the scope of the Modbus inspector.
 
                Other values are reserved.
             */
@@ -315,7 +315,7 @@ static void ModbusCheckResponseLengths(modbus_session_data_t* session, Packet* p
             /* MEI Type 0x0E is covered under the Modbus spec as
                "Read Device Identification". Type 0x0D is defined in
                the spec as "CANopen General Reference Request and Response PDU"
-               and falls outside the scope of the Modbus preprocessor.
+               and falls outside the scope of the Modbus inspector.
 
                Other values are reserved.
             */
index 9d1a93f0c55b69af42ae1de911c2870284dcbcc8..00e452add98c9d1312f057661fb51a8ca75b0cf4 100644 (file)
@@ -18,7 +18,7 @@
 //--------------------------------------------------------------------------
 
 // modbus_paf.cc author Ryan Jordan
-// Protocol-Aware Flushing (PAF) code for the Modbus preprocessor.
+// Protocol-Aware Flushing (PAF) code for the Modbus inspector.
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index e521dbbb97223f0bfee525a6b76f9fb52a9e64fd..568c894f70457ebc3f79418524d9d8861bfbe147 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef MODBUS_PAF__H
 #define MODBUS_PAF__H
 
-// Protocol-Aware Flushing (PAF) code for the Modbus preprocessor.
+// Protocol-Aware Flushing (PAF) code for the Modbus inspector.
 
 #include "stream/stream_splitter.h"
 
index e8ee1e0661f91370d867292b02de948a7ee16ee5..b09fc3f86668386575896e4259b07546c8fe3a6d 100644 (file)
@@ -506,16 +506,8 @@ static void POP_ProcessServerPacket(Packet* p, POPData* pop_ssn)
     }
 }
 
-/* Main runtime entry point for POP preprocessor.
- * Analyzes POP packets for anomalies/exploits.
- *
- * PARAMETERS:
- *
- * p:    Pointer to current packet to process.
- * contextp:    Pointer to context block, not used.
- *
- * RETURNS:     Nothing.
- */
+// Analyzes POP packets for anomalies/exploits.
 static void snort_pop(POP_PROTO_CONF* config, Packet* p)
 {
     /* Attempt to get a previously allocated POP block. */
index fb1312e8c9b361a2dc61a8d0a3bd3412eedeee15..7d1ffca449033129677553365359f2f247366baa 100644 (file)
@@ -22,7 +22,7 @@
  *
  * Purpose:
  *
- * This preprocessor normalizes the RPC requests from remote machines by
+ * This inspector normalizes the RPC requests from remote machines by
  * converting all fragments into one continuous stream.
  * This is very useful for doing things like defeating hostile attackers
  * trying to stealth themselves from IDSs by fragmenting the request so the
@@ -564,7 +564,7 @@ static RpcSsnData* RpcSsnDataNew(Packet* p)
  * The minimum "valid" packet for us is 8 fields * 4 bytes
  *
  * This decoder is ignorant of TCP state so we'll have to assume
- * that reassembled TCP stuff is reinjected to the preprocessor
+ * that reassembled TCP stuff is reinjected to the inspector
  * chain
  *
  * This decoder is also ignorant of multiple RPC requests in a
index bd9a3f518a7c3699d2f06be637c451767ef261ea..4d6c3519a59d7ca50a8128932a174de6c52a5557 100644 (file)
@@ -18,7 +18,7 @@
 
 // s7comm_paf.cc author Pradeep Damodharan <prdamodh@cisco.com>
 // based on work by Jeffrey Gu <jgu@cisco.com>
-// Protocol-Aware Flushing (PAF) code for the S7commplus preprocessor.
+// Protocol-Aware Flushing (PAF) code for the S7commplus inspector.
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 04aa9388d5c451fbd66b1a992a3e33ae55c0656a..117157cc26cdc256214f82dde47e67b5c4c9820b 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef S7COMM_PAF__H
 #define S7COMM_PAF__H
 
-// Protocol-Aware Flushing (PAF) code for the S7commplus preprocessor.
+// Protocol-Aware Flushing (PAF) code for the S7commplus inspector.
 
 #include "stream/stream_splitter.h"
 
index fb6bf5ed4e1087a508e092415fc7e2b2ba77618c..32e1650f7d908c358eed04a0788d34d8f830a05b 100644 (file)
@@ -146,16 +146,8 @@ static inline int SIP_Process(Packet* p, SIPData* sessp, SIP_PROTO_CONF* config)
     return status;
 }
 
-/* Main runtime entry point for SIP preprocessor.
- * Analyzes SIP packets for anomalies/exploits.
- *
- * PARAMETERS:
- *
- * p:    Pointer to current packet to process.
- * contextp:    Pointer to context block, not used.
- *
- * RETURNS:     Nothing.
- */
+// Main runtime entry point for SIP inspector.
+
 static void snort_sip(SIP_PROTO_CONF* config, Packet* p)
 {
     Profile profile(sipPerfStats);
@@ -233,7 +225,7 @@ void Sip::show(const SnortConfig*) const
     ConfigLogger::log_value("max_content_len", config->maxContentLen);
     ConfigLogger::log_value("max_dialogs", config->maxNumDialogsInSession);
     ConfigLogger::log_value("max_from_len", config->maxFromLen);
-    ConfigLogger::log_value("max_requestName_len", config->maxRequestNameLen);
+    ConfigLogger::log_value("max_request_name_len", config->maxRequestNameLen);
     ConfigLogger::log_value("max_to_len", config->maxToLen);
     ConfigLogger::log_value("max_uri_len", config->maxUriLen);
     ConfigLogger::log_value("max_via_len", config->maxViaLen);
index 87683eb54a22236e6cfddde3ced451147f1d8ccf..b7d20d6ecc21074acffb60569ddef3da15c41371 100644 (file)
@@ -78,9 +78,12 @@ static const Parameter s_params[] =
     { "max_from_len", Parameter::PT_INT, "0:65535", "256",
       "maximum from field size" },
 
-    { "max_requestName_len", Parameter::PT_INT, "0:65535", "20",
+    { "max_request_name_len", Parameter::PT_INT, "0:65535", "20",
       "maximum request name field size" },
 
+    { "max_requestName_len", Parameter::PT_INT, "0:65535", "20",
+      "deprecated - use max_request_name_len instead" },
+
     { "max_to_len", Parameter::PT_INT, "0:65535", "256",
       "maximum to field size" },
 
@@ -215,7 +218,8 @@ bool SipModule::set(const char*, Value& v, SnortConfig*)
     else if ( v.is("max_from_len") )
         conf->maxFromLen = v.get_uint16();
 
-    else if ( v.is("max_requestName_len") )
+    // FIXIT-L max_requestName_len is deprecated - delete
+    else if ( v.is("max_request_name_len") or v.is("max_requestName_len") )
         conf->maxRequestNameLen = v.get_uint16();
 
     else if ( v.is("max_to_len") )
index 9137e1a6af88ea4fd6c7402a903305fab5947a6b..10a07a65595495be4e93460cdac6b2cc7ccaf5d8 100644 (file)
@@ -1157,13 +1157,6 @@ static void SMTP_ProcessServerPacket(
     }
 }
 
-/*
- * Entry point to snort preprocessor for each packet
- *
- * @param   packet  standard Packet structure
- *
- * @return  none
- */
 static void snort_smtp(SmtpProtoConf* config, Packet* p)
 {
     int pkt_dir;
index c81634b4e2b38d65892fde9ae4793c1836276dfc..90d060bcaaa2898f2ab0191927291174f7772b6e 100644 (file)
@@ -18,7 +18,7 @@
 //--------------------------------------------------------------------------
 
 /*
- * SSH preprocessor
+ * SSH inspector
  * Author: Chris Sherwin
  * Contributors: Adam Keeton, Ryan Jordan
  */
@@ -111,16 +111,8 @@ static unsigned int SSHPacket_GetLength(const SSH2Packet* p, size_t buflen)
     return ssh_length;
 }
 
-/* Main runtime entry point for SSH preprocessor.
- * Analyzes SSH packets for anomalies/exploits.
- *
- * PARAMETERS:
- *
- * p:    Pointer to current packet to process.
- * contextp:    Pointer to context block, not used.
- *
- * RETURNS:     Nothing.
- */
+// Main runtime entry point for SSH inspector.
+
 static void snort_ssh(SSH_PROTO_CONF* config, Packet* p)
 {
     Profile profile(sshPerfStats);
@@ -132,11 +124,6 @@ static void snort_ssh(SSH_PROTO_CONF* config, Packet* p)
     if (sessp->state_flags & SSH_FLG_MISSED_PACKETS)
         return;
 
-    // Make sure this preprocessor should run.
-    // check if we're waiting on stream reassembly
-    if ( p->packet_flags & PKT_STREAM_INSERT )
-        return;
-
     // If we picked up mid-stream or missed any packets (midstream pick up
     // means we've already missed packets) set missed packets flag and make
     // sure we don't do any more reassembly on this session
index c0f6006543ea7f6288842c2844980f586a915740..ff3e0b895ad8eb95f2eaee8c73b8ede68e8e2058 100644 (file)
@@ -88,7 +88,7 @@
 #define SSH_VERSION_2       (0x2)
 
 // Per-session data block containing current state
-// of the SSH preprocessor for the session.
+// of the SSH inspector for the session.
 struct SSHData
 {
     uint8_t version = SSH_VERSION_UNKNOWN; // Version of SSH detected for this session
index 5af50c355242fa4d2e2f0907c124a4714b7d0c0d..44fc7ba8ecb20ac8efeead4b92e6261658a80399 100644 (file)
@@ -271,16 +271,8 @@ static inline void SSLPP_process_other(SSL_PROTO_CONF* config, SSLData* sd, uint
     }
 }
 
-/* Main runtime entry point for SSL preprocessor.
- * Analyzes SSL packets for anomalies/exploits.
- *
- * PARAMETERS:
- *
- * p:    Pointer to current packet to process.
- * contextp:    Pointer to context block, not used.
- *
- * RETURNS:     Nothing.
- */
+// Analyzes SSL packets for anomalies/exploits.
+
 static void snort_ssl(SSL_PROTO_CONF* config, Packet* p)
 {
     Profile profile(sslPerfStats);
index e128936b3e299d5dfb898ecc321169aa053fdf6e..d076f8355889cf3287ccbadf5c668a4ce4e7959d 100644 (file)
@@ -95,7 +95,8 @@ bool Sip::convert(std::istringstream& data_stream)
 
         else if (keyword == "max_requestName_len")
         {
-            tmpval = parse_int_option("max_requestName_len", arg_stream, false);
+            tmpval = parse_int_option("max_request_name_len", arg_stream, false);
+            table_api.add_diff_option_comment("max_requestName_len", "max_request_name_len");
         }
 
         else if (keyword == "max_sessions")