]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #877 in SNORT/snort3 from spell to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 1 May 2017 20:18:10 +0000 (16:18 -0400)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 1 May 2017 20:18:10 +0000 (16:18 -0400)
Squashed commit of the following:

commit c07087e3943f18b3d2ac32b7267e91fa23b73f00
Author: Russ Combs <rucombs@cisco.com>
Date:   Mon May 1 11:50:42 2017 -0400

    spell check user manual text files

commit d0a970845da721f3cf35219186f5e4d706796887
Author: Russ Combs <rucombs@cisco.com>
Date:   Mon May 1 08:47:48 2017 -0400

    go with endianness

commit 269c1c0b93b84b18a46c92da3a277ba3f47251bc
Author: Russ Combs <rucombs@cisco.com>
Date:   Sat Apr 29 12:44:49 2017 -0400

    fix typos in comments

commit ff18dc38fded36310c99ebbdad8a1be0e195f112
Author: Russ Combs <rucombs@cisco.com>
Date:   Sat Apr 29 10:36:04 2017 -0400

    fix typos in strings

commit 5f8d717c58f3e1c89e031f0d42b6023246272fd2
Author: Russ Combs <rucombs@cisco.com>
Date:   Sat Apr 29 10:35:35 2017 -0400

    disable spell check on hex foo

224 files changed:
doc/connectors.txt
doc/dcerpc.txt
doc/file_processing.txt
doc/high_availability.txt
doc/http_inspect.txt
doc/perf_monitor.txt
doc/side_channel.txt
doc/snort2lua.txt
doc/style.txt
extra/src/codecs/cd_token_ring/cd_token_ring.cc
extra/src/loggers/alert_unixsock/alert_unixsock.cc
extra/src/search_engines/lowmem/sfksearch.cc
src/codecs/codec_api.cc
src/codecs/ip/cd_auth.cc
src/codecs/ip/cd_frag.cc
src/codecs/ip/cd_icmp4.cc
src/codecs/ip/cd_ipv4.cc
src/codecs/ip/cd_ipv6.cc
src/codecs/ip/cd_tcp.cc
src/codecs/ip/cd_udp.cc
src/codecs/ip/checksum.h
src/codecs/link/cd_ciscometadata.cc
src/codecs/link/cd_pppoe.cc
src/codecs/misc/cd_default.cc
src/codecs/misc/cd_gtp.cc
src/codecs/misc/cd_icmp4_ip.cc
src/connectors/tcp_connector/tcp_connector.cc
src/decompress/file_decomp.cc
src/decompress/file_decomp.h
src/decompress/file_decomp_pdf.cc
src/detection/detect.cc
src/detection/fp_create.cc
src/detection/fp_detect.cc
src/detection/fp_utils.cc
src/detection/pattern_match_data.h
src/detection/pcrm.cc
src/detection/pcrm.h
src/detection/service_map.h
src/detection/tag.cc
src/events/event_queue.cc
src/events/event_wrapper.cc
src/file_api/file_capture.h
src/file_api/file_enforcer.h
src/filters/sfthd.cc
src/filters/sfthd.h
src/flow/flow_key.cc
src/flow/ha.cc
src/framework/codec.h
src/hash/sfghash.cc
src/hash/sfhashfcn.cc
src/hash/sfprimetable.cc
src/hash/sfxhash.cc
src/hash/sfxhash.h
src/hash/test/lru_cache_shared_test.cc
src/host_tracker/host_tracker.h
src/ips_options/asn1_detect.cc
src/ips_options/asn1_util.cc
src/ips_options/extract.cc
src/ips_options/extract.h
src/ips_options/ips_byte_extract.cc
src/ips_options/ips_byte_jump.cc
src/ips_options/ips_byte_test.cc
src/ips_options/ips_cvs.cc
src/ips_options/ips_flags.cc
src/ips_options/ips_fragbits.cc
src/ips_options/ips_ipopts.cc
src/ips_options/ips_isdataat.cc
src/ips_options/ips_pcre.cc
src/ips_options/ips_session.cc
src/log/log_text.cc
src/loggers/unified2.cc
src/main.cc
src/main/policy.h
src/main/snort_config.h
src/managers/codec_manager.cc
src/managers/codec_manager.h
src/managers/module_manager.cc
src/memory/memory_cap.cc
src/mime/file_mime_log.cc
src/mime/file_mime_paf.cc
src/mime/file_mime_process.cc
src/network_inspectors/appid/appid_api.h
src/network_inspectors/appid/appid_stats_counter.cc
src/network_inspectors/appid/appid_utils/sf_mlmp.cc
src/network_inspectors/appid/client_plugins/client_app_timbuktu.cc
src/network_inspectors/appid/detector_plugins/detector_dns.cc
src/network_inspectors/appid/lua_detector_api.cc
src/network_inspectors/appid/lua_detector_module.cc
src/network_inspectors/appid/service_plugins/service_discovery.cc
src/network_inspectors/appid/service_plugins/service_ftp.cc
src/network_inspectors/appid/service_plugins/service_mdns.cc
src/network_inspectors/appid/service_plugins/service_rtmp.cc
src/network_inspectors/appid/service_state.h
src/network_inspectors/arp_spoof/arp_spoof.cc
src/network_inspectors/normalize/norm.cc
src/network_inspectors/packet_capture/packet_capture.cc
src/network_inspectors/perf_monitor/perf_tracker.h
src/network_inspectors/port_scan/ipobj.cc
src/network_inspectors/port_scan/ipobj.h
src/network_inspectors/port_scan/port_scan.cc
src/network_inspectors/port_scan/ps_detect.cc
src/packet_io/sfdaq.cc
src/packet_io/trough.h
src/parser/config_file.cc
src/parser/mstring.cc
src/parser/parse_ports.cc
src/parser/parse_rule.cc
src/parser/parser.cc
src/parser/vars.cc
src/piglet_plugins/pp_codec_iface.cc
src/piglet_plugins/pp_raw_buffer_iface.cc
src/ports/port_table.cc
src/protocols/icmp4.h
src/protocols/ipv4.h
src/protocols/ipv4_options.h
src/protocols/ipv6.h
src/protocols/layer.cc
src/protocols/layer.h
src/protocols/packet.h
src/protocols/packet_manager.cc
src/protocols/packet_manager.h
src/protocols/protocol_ids.h
src/protocols/ssl.cc
src/protocols/tcp_options.cc
src/protocols/tcp_options.h
src/protocols/wlan.h
src/search_engines/acsmx.cc
src/search_engines/acsmx2.cc
src/search_engines/acsmx2.h
src/search_engines/bnfa_search.cc
src/search_engines/bnfa_search.h
src/service_inspectors/dce_rpc/dce_co.cc
src/service_inspectors/dce_rpc/dce_co.h
src/service_inspectors/dce_rpc/dce_smb_commands.cc
src/service_inspectors/dce_rpc/dce_smb_utils.cc
src/service_inspectors/dce_rpc/dce_utils.cc
src/service_inspectors/dce_rpc/smb_common.h
src/service_inspectors/dce_rpc/smb_message.cc
src/service_inspectors/dns/dns.cc
src/service_inspectors/ftp_telnet/ftp_data.cc
src/service_inspectors/ftp_telnet/ftp_parse.h
src/service_inspectors/ftp_telnet/ftpp_si.h
src/service_inspectors/ftp_telnet/pp_telnet.cc
src/service_inspectors/ftp_telnet/pp_telnet.h
src/service_inspectors/gtp/gtp_parser.cc
src/service_inspectors/http_inspect/http_cutter.cc
src/service_inspectors/http_inspect/http_enum.h
src/service_inspectors/http_inspect/http_msg_head_shared.h
src/service_inspectors/http_inspect/http_uri_norm.cc
src/service_inspectors/imap/imap_paf.cc
src/service_inspectors/imap/imap_paf.h
src/service_inspectors/modbus/modbus.h
src/service_inspectors/pop/pop_paf.cc
src/service_inspectors/rpc_decode/rpc_decode.cc
src/service_inspectors/sip/sip_config.h
src/service_inspectors/smtp/smtp.cc
src/service_inspectors/smtp/smtp_normalize.cc
src/service_inspectors/ssh/ssh.cc
src/sfip/sf_cidr.cc
src/sfip/sf_ip.cc
src/sfip/sf_ipvar.cc
src/sfip/sf_ipvar.h
src/sfip/sfip_test.cc
src/sfrt/sfrt.cc
src/sfrt/sfrt_dir.cc
src/sfrt/sfrt_dir.h
src/sfrt/sfrt_flat.cc
src/stream/ip/ip_defrag.cc
src/stream/ip/ip_session.h
src/stream/libtcp/tcp_stream_session.cc
src/stream/stream.cc
src/stream/stream.h
src/stream/tcp/segment_overlap_editor.cc
src/stream/tcp/tcp_normalizer.cc
src/stream/tcp/tcp_normalizers.cc
src/stream/tcp/tcp_reassembler.cc
src/stream/tcp/tcp_session.cc
src/target_based/sftarget_hostentry.cc
src/time/timersub.h
src/utils/kmap.cc
src/utils/kmap.h
src/utils/stats.cc
src/utils/util_cstring.cc
tools/flatbuffers/fbstreamer.cc
tools/snort2lua/config_states/config_default_rule_state.cc
tools/snort2lua/config_states/config_ignore_ports.cc
tools/snort2lua/conversion_defines.h
tools/snort2lua/conversion_state.h
tools/snort2lua/data/data_types/dt_comment.cc
tools/snort2lua/data/data_types/dt_comment.h
tools/snort2lua/data/data_types/dt_var.cc
tools/snort2lua/data/dt_data.cc
tools/snort2lua/data/dt_data.h
tools/snort2lua/data/dt_rule_api.cc
tools/snort2lua/data/dt_rule_api.h
tools/snort2lua/data/dt_table_api.cc
tools/snort2lua/data/dt_table_api.h
tools/snort2lua/helpers/converter.cc
tools/snort2lua/helpers/converter.h
tools/snort2lua/helpers/parse_cmd_line.cc
tools/snort2lua/helpers/parse_cmd_line.h
tools/snort2lua/helpers/s2l_util.cc
tools/snort2lua/helpers/s2l_util.h
tools/snort2lua/helpers/util_binder.h
tools/snort2lua/keyword_states/kws_attribute_table.cc
tools/snort2lua/keyword_states/kws_include.cc
tools/snort2lua/keyword_states/kws_rule.cc
tools/snort2lua/keyword_states/kws_ruletype.cc
tools/snort2lua/output_states/out_fast.cc
tools/snort2lua/preprocessor_states/pps_dcerpc_server.cc
tools/snort2lua/preprocessor_states/pps_frag3_global.cc
tools/snort2lua/preprocessor_states/pps_ftp_telnet_protocol.cc
tools/snort2lua/preprocessor_states/pps_reputation.cc
tools/snort2lua/preprocessor_states/pps_sfportscan.cc
tools/snort2lua/preprocessor_states/pps_sip.cc
tools/snort2lua/preprocessor_states/pps_ssl.cc
tools/snort2lua/preprocessor_states/pps_stream5_global.cc
tools/snort2lua/preprocessor_states/pps_stream5_tcp.cc
tools/snort2lua/rule_states/rule_content.cc
tools/snort2lua/rule_states/rule_convert_comma_list.cc
tools/snort2lua/rule_states/rule_dnp3_obj.cc
tools/snort2lua/rule_states/rule_react.cc
tools/snort2lua/rule_states/rule_resp.cc
tools/u2spewfoo/u2spewfoo.cc

index 6be0306e404fcf1d35013b24727256c8e80762a8..020bbab2fde07e6c75fb8880eda898f9f49cd349 100644 (file)
@@ -14,7 +14,7 @@ The TcpConnector is duplex while the FileConnector is simplex.
 
 All subtypes of Connector have a 'direction' configuration element and a
 'connector' element.  The 'connector' string is the key used to identify the
-element for sidechannel configiration.  The 'direction' element may have a
+element for sidechannel configuration.  The 'direction' element may have a
 default value, for instance TcpConnector's are 'duplex'.
 
 
@@ -62,7 +62,7 @@ CONN_TRANSMIT or CONN_RECEIVE.
 
 FileConnector configuration adds two additional element:
 
-* name = string - used as part of the messsage file name
+* name = string - used as part of the message file name
 
 * format = 'text' or 'binary' - FileConnector supports two file types
 
index adbe17861bf3c7b38ac9c697ebfdab0125bce0ab..d9d6bc2691474acbf9cb20f1cf1973465b3d987f 100644 (file)
@@ -170,12 +170,12 @@ effectively disabling SMB file inspection in rules.  An argument of 0 to
  
 ==== TCP
 
-dce_tcp inspector supports defragementation, reassembling, and policy that is 
+dce_tcp inspector supports defragmentation, reassembling, and policy that is 
 similar to SMB.
 
 ==== UDP
 
-dce_udp is a very simple inspector that only supports defragementation
+dce_udp is a very simple inspector that only supports defragmentation
 
 ==== Rule Options
 
index 6b15c0d2b0dc5af5b949b383e240fca7737ffb8e..fc8b76088927abdcc56e6cf7613f4410d9252e90 100644 (file)
@@ -74,7 +74,7 @@ Example:
      magic = { { content = "| 47 49 46 38 39 61 |",offset = 0 } } },
 
 The previous two rules define GIF format, because two file magics are 
-different. File magics are specifed by content and offset, which look
+different. File magics are specified by content and offset, which look
 at content at particular file offset to identify the file type. In this
 case, two magics look at the beginning of the file. You can use character
 if it is printable or hex value in between "|".
index e57d842c8d0446e1bce9b2e845fcccbab07e261e..8f1ee2d25f5e338ccf8aab3d6fb71d6c2fd506f8 100644 (file)
@@ -1,4 +1,4 @@
-HighAvailability (or HA) is a Snort module that provides state coherancy
+HighAvailability (or HA) is a Snort module that provides state coherency
 between two partner snort instances.  It uses SideChannel for messaging.
 
 There can be multiple types of HA within Snort and Snort plugins.  HA
index e169051e4806a3353705f9e89c1837f9be6e0cf7..275470064f6af36de390d7204f1c545a843dc301 100644 (file)
@@ -228,7 +228,7 @@ is on by default and you should not turn it off unless you have no interest
 in URI paths.
 
 backslash_to_slash is a tweak to path simplification for servers that allow
-directories to be separated by backslashs:
+directories to be separated by backslashes:
 
     /this/is/the/normal/way/to/write/a/path
 
@@ -377,7 +377,7 @@ If you don't specify a header you get all of the headers except for the
 cookie headers Cookie and Set-Cookie. http_raw_header includes the
 unmodified header names and values as they appeared in the original
 message. http_header is the same except percent encodings are removed and
-pathes are simplified exactly as if the headers were a URI.
+paths are simplified exactly as if the headers were a URI.
 
 In most cases specifying individual headers creates a more efficient and
 accurate rule. It is recommended that new rules be written using individual
@@ -436,7 +436,7 @@ message. This is usually "HTTP/1.0" or "HTTP/1.1".
 These are the unmodified first header line of the HTTP request and response
 messages respectively. These rule options are a safety valve in case you
 need to do something you cannot otherwise do. In most cases it is better to
-use a rule option for a specifc part of the first header line. For a
+use a rule option for a specific part of the first header line. For a
 request message those are http_method, http_raw_uri, and http_version. For
 a response message those are http_version, http_stat_code, and
 http_stat_msg.
index be65f9c1ab5dee1d4ffe304d2e5167f2175b70df..98c9bb4c63b916318373bc927762059e98db46d5 100644 (file)
@@ -100,6 +100,6 @@ format is also available if Flatbuffers is present at build. A utility for
 accessing the statistics generated in this format has been included for
 convenience (see fbstreamer in tools). This tool generates a YAML array of
 records found, allowing the data to be read by humans or passed into other
-analysis tools. For information on working direclty with the Flatbuffers file
+analysis tools. For information on working directly with the Flatbuffers file
 format used by Performance monitor, see the developer notes for Performance
 monitor or the code provided for fbstreamer.
index 3a3d3320b79337ec43c9aed9a91e239351dd8815..74b9f824997cc9d62f386b82cfcc0d3fe0589296 100644 (file)
@@ -24,9 +24,9 @@ applications.
 The SideChannel configuration mostly serves to map a port number to a Connector
 or set of connectors.  Each port mapping can have at most one transmit plus
 one receive connector or one duplex connector.  Multiple SideChannel's
-may be configured and instatiated to support multiple applications.
+may be configured and instantiated to support multiple applications.
 
-An example SideChannel configuration along with the corresponing Connector
+An example SideChannel configuration along with the corresponding Connector
 configuration:
 
     side_channel =
index 790a2df9ca59a680a9c7217f8419514878ef476b..25046c27dd89c5da7827dfb5d77f5e0cc2b9bb63 100644 (file)
@@ -69,9 +69,9 @@ that variable in the Lua string.
 
 *  Snort2Lua currently does not handle variables well. First, that means
 variables will not always be parsed correctly.  Second, sometimes a
-variables value will be outoput in the lua file rather than a variable
+variables value will be output in the lua file rather than a variable
 For instance, if Snort2Lua attempted to convert the line
-'include $RULE_PATH/example.rule', the output may ouput
+'include $RULE_PATH/example.rule', the output may output
 'include /etc/rules/example.rule' instead.
 
 *  When Snort2Lua parses a â€˜binding’ configuration file, the rules and
@@ -81,7 +81,7 @@ extension.  There is currently no way to specify or change that files name.
 
 *  If a rule's action is a custom ruletype, that rule action will be silently
 converted to the rultype's 'type'. No warnings or errors are currently
-emmitted. Additionally, the custom ruletypes outputs will be silently
+emitted. Additionally, the custom ruletypes outputs will be silently
 discarded.
 
 *  If the original configuration contains a binding that points to another
index 1b087f5907ab34406a5d5741183dd0f7a8a797b0..f95957584dab35a9dcba77226ef42811a907b720 100644 (file)
@@ -163,7 +163,7 @@ yet firm so feedback is welcome to get something we can live with.
   multiple error returns.  The C-style use of zero for success and -1 for
   error is less readable and often leads to messy code that either ignores
   the various errors anyway or needlessly and ineffectively tries to do
-  something aobut them.  Generally that code is not updated if new errors
+  something about them.  Generally that code is not updated if new errors
   are added.
 
 === Macros (aka defines)
index 165f98d3bf7aabb050a5cb640969186900040710..8451fc1681464a15695c33af0a343152784ee327 100644 (file)
@@ -130,7 +130,7 @@ bool TrCodec::decode(const RawData& raw, CodecData& codec, DecodeData&)
         /*
          * DSAP != SSAP != 0xAA .. either we are having frame which doesn't
          * carry IP datagrams or has RIF information present. We assume
-         * lattest ...
+         * the latter ...
          */
 
         if (cap_len < (sizeof(token_ring::Trh_hdr) + sizeof(token_ring::Trh_llc) +
index e397c88b12ff24d8d851d311939e306af02304de..0c5855541c323fee26ead58e8d04647fe7263820 100644 (file)
@@ -52,8 +52,7 @@ struct Alertpkt
     uint32_t nethdr;       /* network header offset. (ip etc...) */
     uint32_t transhdr;     /* transport header offset (tcp/udp/icmp ..) */
     uint32_t data;
-    uint32_t val;  /* which fields are valid. (NULL could be
-                    * valids also) */
+    uint32_t val;          /* which fields are valid. (NULL could be valid also) */
     /* Packet struct --> was null */
 #define NOPACKET_STRUCT 0x1
     /* no transport headers in packet */
index eadbfa9508143dbd17d436a93851c7103d79e063..8945bf10437ac01e6c045d04a9037c6c4263b889 100644 (file)
@@ -26,7 +26,7 @@
 *     - use for token testing after parsing the language tokens using lex or the like.
 *
 *  Keyword-Search: searches the input text for one of multiple keywords,
-*  and supports case sensitivite and case insensitive patterns.
+*  and supports case sensitive and case insensitive patterns.
 */
 
 #include "sfksearch.h"
@@ -334,7 +334,7 @@ static int KTrieInsert(KTRIE_STRUCT* ts, KTRIEPATTERN* px)
         else
         {
             /*
-            *  Start a new sibling bracnch to finish this Keyword
+            *  Start a new sibling branch to finish this Keyword
             */
             root->sibling= KTrieCreateNode(ts);
             if ( !root->sibling )
@@ -396,7 +396,7 @@ static void Build_Bad_Character_Shifts(KTRIE_STRUCT* kt)
     }
 
     /*
-    *  Initialze the Bad Character shift table.
+    *  Initialize the Bad Character shift table.
     */
     for ( int i = 0; i < KTRIE_ROOT_NODES; i++ )
     {
index bd0b06a096c6613faf757466079f4236f54b19da..6bde3f5fd9890c9cc97cb5ffac7dee95777002ed 100644 (file)
@@ -28,9 +28,9 @@
 
 extern const BaseApi* cd_ipv4[];    // static due to dependence on fpdetect
 extern const BaseApi* cd_hopopts[]; // static to ensure the symbols CheckIPV6HopOptions
-                                    // and CheckIPv6ExtensionOrder the final executuable.
+                                    // and CheckIPv6ExtensionOrder the final executable.
 extern const BaseApi* cd_tcp[];     // static because only file that specific functions
-                                    // (symbols will be removed from final executabel)
+                                    // (symbols will be removed from final executable)
 
 #ifdef STATIC_CODECS
 extern const BaseApi* cd_ah[];
index 19d0bf91ff70f8d323f2f6bfda823ac813b88dd9..b6b4bba150ef24df477caa07a806a702bb5efa20 100644 (file)
@@ -72,7 +72,7 @@ struct AuthHdr
 };
 
 constexpr uint8_t MIN_AUTH_LEN = 16; // this is in minimum number of bytes ...
-// no relatino to the AuthHdr.len field.
+// no relation to the AuthHdr.len field.
 } // anonymous namespace
 
 void AuthCodec::get_protocol_ids(std::vector<ProtocolId>& v)
index ef37e594443c90d5e489f48fb45d4fe81ce031cc..b8cb4ee5d2aec3a16bcb1c98f0f838567d2faa17 100644 (file)
@@ -81,7 +81,7 @@ bool Ipv6FragCodec::decode(const RawData& raw, CodecData& codec, DecodeData& sno
         data.decode_flags |= DECODE_RF;
 #endif
 
-    // three least signifigant bits are all flags
+    // three least significant bits are all flags
     const uint16_t frag_offset = ip6frag_hdr->off();
 
     if (frag_offset || (snort.decode_flags & DECODE_MF))
index aa656604eea14452bdddadf8c70fdbca84e38e5a..4c3357ac56d8d5ba05a0c333c5dab7e0f747743a 100644 (file)
@@ -450,7 +450,7 @@ void Icmp4Codec::log(TextLog* const log, const uint8_t* raw_pkt,
         break;
 
     case icmp::IcmpType::ROUTER_ADVERTISE:
-        TextLog_Print(log, "ROUTER ADVERTISMENT: "
+        TextLog_Print(log, "ROUTER ADVERTISEMENT: "
             "Num addrs: %d Addr entry size: %d Lifetime: %u",
             icmph->s_icmp_num_addrs, icmph->s_icmp_wpa,
             ntohs(icmph->s_icmp_lifetime));
index 2fea855f2cc3f93cb25dfb2392a76aaeddc0aedb..4e7a9e7a4d3a72d04e3a7e1233dce3dd3b44a6c8 100644 (file)
@@ -485,7 +485,7 @@ default_case:
             if ((tot_len + 1) >= o_len)
                 code = tcp::OPT_TRUNC;
 
-            /* RFC sez that we MUST have atleast this much data */
+            /* RFC says that we MUST have at least this much data */
             else if (option->len < 2)
                 code = tcp::OPT_BADLEN;
 
index 2aced27b838b733a648301ab28bfa433f5952afb..d1236bc10e1e1b1733332242e25ea7125dfd513c 100644 (file)
@@ -444,7 +444,7 @@ void Ipv6Codec::CheckIPV6Multicast(const ip::IP6Hdr* const ip6h, const CodecData
         else if ((ntohl(ip6h->ip6_dst.u6_addr32[3]) >= 0x80000000) &&
             (ntohl(ip6h->ip6_dst.u6_addr32[3]) <= 0xFFFFFFFF))
         {
-            return; // Dynamiclly allocated by hosts when needed
+            return; // Dynamically allocated by hosts when needed
         }
         else
         {
index e6d7b44a4232833b8bea21142ce2c86b0abb2e4c..ec77ea4747b23692c69611d656d263cd44558316 100644 (file)
@@ -503,7 +503,7 @@ int TcpCodec::OptLenValidate(const tcp::TcpOption* const opt,
     }
     else /* expected_len < 0 (i.e. variable length) */
     {
-        /* RFC sez that we MUST have atleast this much data */
+        /* RFC says that we MUST have at least this much data */
         if (opt->len < 2)
             return tcp::OPT_BADLEN;
 
index 70a3a402fe2d56743613a97f17aeae1e4412fa66..870f85c4ad7cd8ea6ba24e1009a9a18192864058 100644 (file)
@@ -341,7 +341,7 @@ void UdpCodec::log(TextLog* const text_log, const uint8_t* raw_pkt,
 bool UdpCodec::encode(const uint8_t* const raw_in, const uint16_t /*raw_len*/,
     EncState& enc, Buffer& buf, Flow*)
 {
-    // If we enter this function, this packe is some sort of tunnel.
+    // If we enter this function, this packet is some sort of tunnel.
 
     if (!buf.allocate(udp::UDP_HEADER_LEN))
         return false;
index 7fcff77bed5213cdfdbb452ae5539f427f173c4e..8e4afbd614108489ff006a80cf16c41c8283a422 100644 (file)
@@ -59,13 +59,13 @@ inline uint16_t ip_cksum(const uint16_t* buf, std::size_t len);
  *          is to either include all of the checksum details in a header,
  *          or ensure I include these symbols for every linker which
  *          can be used. Obviously, setting correct linker flags is
- *          signifigantly more difficult, so these functions will all
+ *          significantly more difficult, so these functions will all
  *          stay in a header file
  */
 
 /*
  *  IT IS HIGHLY RECOMMENDED to use the above API. Rathern than calling
- *  any of of the following recomendations directly
+ *  any of of the following recommendations directly
  */
 namespace detail
 {
index a5029ce72210b3029c1d638e3900492a06c740cb..6d7816904d5103a5047c103b1cf8aad9b77c4e1b 100644 (file)
@@ -98,7 +98,7 @@ bool CiscoMetaDataCodec::decode(const RawData& raw, CodecData& codec, DecodeData
     const CiscoMetaDataOpt* cmd_options =
         reinterpret_cast<const CiscoMetaDataOpt*>(raw.data + sizeof(CiscoMetaDataHdr));
     // validate options, lengths, and SGTs
-    cmdh_rem_len -= sizeof(CiscoMetaDataHdr) + sizeof(uint16_t); //2 octects for ethertype
+    cmdh_rem_len -= sizeof(CiscoMetaDataHdr) + sizeof(uint16_t); //2 octets for ethertype
     if(cmdh_rem_len == 0)
         cmd_options = nullptr;
 
index 6249b4373e959177489fd8abe484b65a46f13812..ffd1f4af808a96710c5d8a8bf83317f7b2a7185f 100644 (file)
@@ -320,7 +320,7 @@ public:
 
 // ***  NOTE: THE CODEC AND MODULE HAVE A DIFFERENT NAME!
 // since the module is only creating a rule stub and is NOT
-// used for configurtion, it doesn't matter. However, if you want to use the module
+// used for configuration, it doesn't matter. However, if you want to use the module
 // for configuration, ensure the names are identical before continuing!
 static Module* mod_ctor()
 { return new PPPoEModule; }
index 36c641be784b2ca0df55cccbb8d59c57a1a30e97..eeaa67b399d5bd64702e5e07df75a80282cecc22 100644 (file)
@@ -24,7 +24,7 @@
 #include "framework/codec.h"
 
 #define CD_DEFAULT_NAME "unknown"
-#define CD_DEFAULT_HELP "support for unkown protocols"
+#define CD_DEFAULT_HELP "support for unknown protocols"
 
 namespace
 {
index 036b6ba5b086a43a0fcc9513a4a02c54ac9b79ba..756609ce3a4586f8d051d2646642ee83803f2bf1 100644 (file)
@@ -28,7 +28,7 @@
 #include "packet_io/active.h"
 
 #define CD_GTP_NAME "gtp"
-#define CD_GTP_HELP "support for general-packet-radio-service tunnelling protocol"
+#define CD_GTP_HELP "support for general-packet-radio-service tunneling protocol"
 
 namespace
 {
index 71b895359f9df839f75b0f4ba8586bcf89c5b19a..f28253b71c5b1ab7c2792a0b34dde12fece00c2d 100644 (file)
@@ -146,7 +146,7 @@ void Icmp4IpCodec::log(TextLog* const text_log, const uint8_t* raw_pkt,
     TextLog_NewLine(text_log);
     TextLog_Puts(text_log, "\tIPv4\n\t\t");
 
-    // COPIED DIRECTLY FROM ipv4 CODEC.  This is specificially replicated since
+    // COPIED DIRECTLY FROM ipv4 CODEC.  This is specifically replicated since
     //      the two are not necessarily the same.
 
     // FIXIT-H this does NOT obfuscate correctly
index 6121fca96f5db0f7ffe2a0ad2ca516cbb62ffdd9..5852ba509acb57ce50596a737223af103347a477 100644 (file)
@@ -253,7 +253,7 @@ bool TcpConnector::transmit_message(ConnectorMsgHandle* msg)
 
     if ( sock_fd < 0 )
     {
-        ErrorMessage("TcpConnector: tranmitting to a closed socket\n");
+        ErrorMessage("TcpConnector: transmitting to a closed socket\n");
         delete tmsg;
         return false;
     }
index 95644beeece2770721485188c85e3e3c836184ab..61fa34dc737110d3df20591caa682b97d0fe7e31 100644 (file)
@@ -117,7 +117,7 @@ static fd_status_t Locate_Sig_Here(fd_session_p_t SessionPtr)
               at least MAX_SIG_LENGTH bytes in the output buffer.  This assumption
               is valid for the current implementation where the signature only
               occurs at the beginning of the file.  For the generic case of the sig
-              begin embedded with the file, the seach will need to modified.*/
+              begin embedded with the file, the search will need to modified.*/
     while ( 1 )
     {
         /* if we get to the end of the sig table (or the table is empty),
index 8fb559decbdd4856d0d792e54448b8c756217f20..c8fda014554503cd93bb023b66988fc0d5b5bda7 100644 (file)
@@ -56,7 +56,7 @@ enum file_compression_type_t
     FILE_COMPRESSION_TYPE_MAX
 };
 
-/* Potential decompression modes, passed in at initalization time. */
+/* Potential decompression modes, passed in at initialization time. */
 #define FILE_SWF_LZMA_BIT    (0x00000001)
 #define FILE_SWF_ZLIB_BIT    (0x00000002)
 #define FILE_PDF_DEFL_BIT    (0x00000004)
@@ -189,7 +189,7 @@ inline bool Get_1(fd_session_p_t SessionPtr, uint8_t* c)
 }
 
 /* If available, get N bytes from the input queue.  All N must be
-   availble for this call to succeed. */
+   available for this call to succeed. */
 inline bool Get_N(fd_session_p_t SessionPtr, uint8_t** c, uint16_t N)
 {
     if ( (SessionPtr->Next_In != NULL) && (SessionPtr->Avail_In >= N) )
index ef03e9198e400a82a930185c254ead601fffbe8f..152529ac84a668bbff4f6d1ea2ac2599684d36e7 100644 (file)
@@ -178,7 +178,7 @@ static inline void Process_One_Filter(fd_session_p_t SessionPtr, uint8_t* Token,
 }
 
 /* Parse the buffered Filter_Spec and create a stream decompression
-   mode and/or event alerts.  Return File_Decomp_OK if successfui.
+   mode and/or event alerts.  Return File_Decomp_OK if successful.
    Return File_Decomp_Error for a parsing error. */
 static fd_status_t Process_Filter_Spec(fd_session_p_t SessionPtr)
 {
@@ -279,7 +279,7 @@ static inline void Init_Parser(fd_session_p_t SessionPtr)
     fd_PDF_Parse_p_t p = &(SessionPtr->PDF->Parse);
     /* The parser starts in the P_COMMENT state we start
        parsing the file just after the signature is located
-       and the signature is syntactially a comment. */
+       and the signature is syntactically a comment. */
     p->State = P_COMMENT;
     p->Parse_Stack_Index = 0; // Stack is empty
 }
@@ -729,7 +729,7 @@ static inline fd_status_t Handle_State_XREF(fd_session_p_t SessionPtr, uint8_t c
     if ( p->State != P_XREF )
     {
         p->Sub_State = P_XREF_TOKEN;
-        p->Elem_Index = 1;  // Aready matched the first char in START state
+        p->Elem_Index = 1;  // already matched the first char in START state
         p->State = P_XREF;
         Xref_Tok = (uint8_t*)((c == TOK_XRF_XREF[0]) ? TOK_XRF_XREF : TOK_XRF_STARTXREF);
         return( File_Decomp_OK );
@@ -978,7 +978,7 @@ static fd_status_t Decomp_Stream(fd_session_p_t SessionPtr)
     return( File_Decomp_OK );
 }
 
-/* After processing a stream, close the decompession engine
+/* After processing a stream, close the decompression engine
    and return the state of the parser. */
 static fd_status_t Close_Stream(fd_session_p_t SessionPtr)
 {
index 6a103f51d2df54ecf82bfc2ba57442cba520a31f..60f3e5c870dbe667d1d38e55dbd9ab11ddc18127 100644 (file)
@@ -261,7 +261,7 @@ bool snort_detect(Packet* p)
     }
 
     // FIXIT-M restrict detect to current ip layer
-    // Curently, if a rule is found on any IP layer, we perform the detect routine
+    // Currently, if a rule is found on any IP layer, we perform the detect routine
     // on the entire packet. Instead, we should only perform detect on that layer!!
     switch ( p->type() )
     {
index d623489cb3908d832224a3f0b5ce52394d70dbed..cae065c25b7cc92bafb04e4b9795946237210251 100644 (file)
@@ -512,7 +512,7 @@ static int fpAddPortGroupRule(
  *
  * PORT_RULE_MAP -> srcPortGroup,dstPortGroup,genericPortGroup
  * PortGroup     -> pgPatData, pgPatDataUri (acsm objects), (also rule_node lists 1/rule,
- *                  not neeed).  each rule content added to an acsm object has a PMX data ptr
+ *                  not needed).  each rule content added to an acsm object has a PMX data ptr
  *                  associated with it.
  * RULE_NODE     -> iRuleNodeID (used for bitmap object index)
  * PMX           -> RULE_NODE(->otn), PatternMatchData
@@ -531,7 +531,7 @@ static int fpAddPortGroupRule(
  * Implementation:
  *
  *    Each PortList Object will be translated into a PortGroup, then pointed to by the
- *    PortGroup array in the PORT_RULE_MAP for the procotocol
+ *    PortGroup array in the PORT_RULE_MAP for the protocol
  *
  *    protocol = tcp, udp, ip, icmp - one port_rule_map for each of these protocols
  *    { create a port_rule_map
@@ -561,7 +561,7 @@ static int fpAddPortGroupRule(
 /*
 **  Build a Pattern group for the Uri-Content rules in this group
 **
-**  The patterns added for each rule must be suffcient so if we find any of them
+**  The patterns added for each rule must be sufficient so if we find any of them
 **  we proceed to fully analyze the OTN and RTN against the packet.
 **
 */
@@ -727,7 +727,7 @@ static int fpGetFinalPattern(
     // pattern matcher as is since the content won't be evaluated as a rule
     // option.
     //
-    // 2. negated contents since truncating them could inadvertantly
+    // 2. negated contents since truncating them could inadvertently
     // disable evaluation of a rule - the shorter pattern may be found,
     // while the unaltered pattern may not be found, disabling inspection
     // of a rule we should inspect.
@@ -767,7 +767,7 @@ static int fpGetFinalPattern(
 
             if (bytes < (int)pmd->pattern_size)
             {
-                /* The patten is all '\0' - use the whole pattern
+                /* The pattern is all '\0' - use the whole pattern
                  * XXX This potentially hurts the performance boost
                  * gained by stripping leading zeros */
                 if (bytes == 0)
@@ -817,7 +817,7 @@ static void fpDeletePMX(void* pv)
 }
 
 /*
- *  Create the PortGroup for these PortObject2 entitiies
+ *  Create the PortGroup for these PortObject2 entities
  *
  *  This builds the 1st pass multi-pattern state machines for
  *  content and uricontent based on the rules in the PortObjects
@@ -952,7 +952,7 @@ static int fpCreatePortTablePortGroups(
  *  Create port group objects for all port tables
  *
  *  note: any ports are standard PortObjects not PortObject2s so we have to
- *  uprade them for the create port group function
+ *  upgrade them for the create port group function
  */
 static int fpCreatePortGroups(SnortConfig* sc, RulePortTables* p)
 {
@@ -1169,7 +1169,7 @@ static void fpBuildServicePortGroupByServiceOtnList(
  * For each service we create a PortGroup based on the otn's defined to
  * be applicable to that service by the metadata option.
  *
- * Then we lookup the protocol/srvc oridinal in the target-based area
+ * Then we lookup the protocol/srvc ordinal in the target-based area
  * and assign the PortGroup for the srvc to it.
  *
  * spg - service port group (lookup should be by service id/tag)
index 39e27a1f319a026429149bbc1716a9e504a7e3c7..04faad4d5bde5ce757ee783751f66ba291966b4f 100644 (file)
@@ -234,7 +234,7 @@ int fpLogEvent(const RuleTreeNode* rtn, const OptTreeNode* otn, Packet* p)
 **    Add and Event to the appropriate Match Queue: Alert, Pass, or Log.
 **    This allows us to find multiple events per packet and pick the 'best'
 **    one.  This function also allows us to change the order of alert,
-**    pass, and log signatures by cacheing them for decision later.
+**    pass, and log signatures by caching them for decision later.
 **
 **    IMPORTANT NOTE:
 **    fpAddMatch must be called even when the queue has been maxed
@@ -418,7 +418,7 @@ static int rule_tree_match(
     if (eval_data.flowbit_failed)
         return -1;
 
-    /* If this is for an IP rule set, evalute the rules from
+    /* If this is for an IP rule set, evaluate the rules from
      * the inner IP offset as well */
     if (eval_data.p->packet_flags & PKT_IP_RULE)
     {
@@ -433,7 +433,7 @@ static int rule_tree_match(
             const uint8_t* tmp_data = eval_data.p->data;
             uint16_t tmp_dsize = eval_data.p->dsize;
 
-            /* clear so we dont keep recursing */
+            /* clear so we don't keep recursing */
             eval_data.p->packet_flags &= ~PKT_IP_RULE;
             eval_data.p->packet_flags |= PKT_IP_RULE_2ND;
 
@@ -627,7 +627,7 @@ static inline int fpSessionAlerted(Packet* p, const OptTreeNode* otn)
 **    flag causes any drop/sdrop/reject rules to be loaded as alert rules.
 **    The default has been to ignore them on parsing.
 **
-**    If this is less than clear, herese the $.02 version:
+**    If this is less than clear, here's the $.02 version:
 **    default order -> pass drop alert log ( --alert-before-pass reverts
 **    to -> drop alert pass log ) the 1st action-type of events in the rule
 **    ordering to be seen gets logged by default the --flush-all-events
@@ -662,7 +662,7 @@ static inline int fpFinalSelectEvent(OTNX_MATCH_DATA* o, Packet* p)
     for ( i = 0; i < o->iMatchInfoArraySize; i++ )
     {
         /* bail if were not dumping events in all the action groups,
-         * and we've alresady got some events */
+         * and we've already got some events */
         if (!SnortConfig::process_all_events() && (tcnt > 0))
             return 1;
 
@@ -671,7 +671,7 @@ static inline int fpFinalSelectEvent(OTNX_MATCH_DATA* o, Packet* p)
             /*
              * We must always sort so if we que 8 and log 3 and they are
              * all from the same action group we want them sorted so we get
-             * the highest 3 in priority, priority and lenght sort do NOT
+             * the highest 3 in priority, priority and length sort do NOT
              * take precedence over 'alert drop pass ...' ordering.  If
              * order is 'drop alert', and we log 3 for drop alerts do not
              * get logged.  IF order is 'alert drop', and we log 3 for
@@ -951,7 +951,7 @@ static int fp_search(
 **
 **  FORMAL OUTPUTS
 **    int - 0 for failed pattern match
-**          1 for sucessful pattern match
+**          1 for successful pattern match
 **
 */
 static inline int fpEvalHeaderSW(PortGroup* port_group, Packet* p,
@@ -1158,7 +1158,7 @@ static inline bool fpEvalHeaderSvc(Packet* p, OTNX_MATCH_DATA* omd, int proto)
             "file:%p\n",p->ptrs.sp,p->ptrs.dp,proto_ordinal,proto,(void*)svc,(void*)file);
     }
     // FIXIT-P put alert service rules with file data fp in alert file group and
-    // verfiy ports and service during rule eval to avoid searching file data 2x.
+    // verify ports and service during rule eval to avoid searching file data 2x.
     int check_ports = (proto == SNORT_PROTO_USER) ? 2 : 1;
 
     if ( file )
index e3f0abd9e6f685d6596302102dac01ba91b8577c..eeb8550495fd714de995e93aa28059c1e19ca8d4 100644 (file)
@@ -137,7 +137,7 @@ bool is_fast_pattern_only(OptFpList* ofl)
   *
   * returns
   *   length - of trimmed pattern
-  *   buff - ptr to new beggining of trimmed buffer
+  *   buff - ptr to new beginning of trimmed buffer
   */
 int flp_trim(const char* p, int plen, const char** buff)
 {
index 9678854ac53a39a79f06d279a10bf6b1b766b78c..d57595f7e84274dea7ff72a285ccb8e44e2a28d8 100644 (file)
@@ -41,7 +41,7 @@ struct PatternMatchData
     // FIXIT-L wasting some memory here:
     // - this is not used by content option logic directly
     // - and only used on current eval (not across packets)
-    // (partly mitigated by only allocating if excpetion_flag is set)
+    // (partly mitigated by only allocating if exception_flag is set)
     //
     /* Set if fast pattern matcher found a content in the packet,
        but the rule option specifies a negated content. Only
index 779337fb4ca1071d8ac955424f7072ad61319006..81774eeebde7c97fcb21c5c60b1777f8ac9f8e92 100644 (file)
@@ -25,8 +25,7 @@
 **  NOTES
 **  5.15.02   - Initial version of pcrm.c distributed. - Norton/Roelker
 **
-**  Packet Classificationa and Rule Manager
-**
+**  Packet Classification and Rule Manager
 **
 **  A Fast Packet Classification method for Rule and Pattern Matching in SNORT
 **  --------------------------------------------------------------------------
@@ -112,7 +111,7 @@ static int prmFindRuleGroup(
 
 /*
 **  The following functions are wrappers to the pcrm routines,
-**  that utilize the variables that we have intialized by
+**  that utilize the variables that we have initialized by
 **  calling fpCreateFastPacketDetection().  These functions
 **  are also used in the file fpdetect.c, where we do lookups
 **  on the initialized variables.
index dd751fa2f6cc0054eeecb032b61cbf545ce337bc..c2fa51cb22cf2bb72a84aef3384416d0e7072564 100644 (file)
@@ -26,7 +26,7 @@
 #define PCRM_H
 
 // Packet Classification-Rule Manager
-// runle groups by source and dest ports as well as any
+// rule groups by source and dest ports as well as any
 // (generic refers to any)
 
 #include "ports/port_group.h"
index bde842ca779a6cfcaf957ca04b588afb250b5f03..0eebd44b6d6c5fc7dd6a8932dac6afa49ca7380c 100644 (file)
@@ -52,7 +52,7 @@ void ServicePortGroupMapFree(srmm_table_t*);
 void fpPrintServicePortGroupSummary(SnortConfig*, srmm_table_t*);
 int fpCreateServiceMaps(SnortConfig*);
 
-//  Service/Protocol Oridinal To PortGroup table
+//  Service/Protocol Ordinal To PortGroup table
 typedef std::vector<PortGroup*> PortGroupVector;
 
 struct sopg_table_t
index 7e1b8f8c77fcf67e1f3e351d5654ba501ee47455..6f1e33e113ab3a1a4e7be6c71e118bfcb7f51e80 100644 (file)
@@ -154,7 +154,7 @@ static inline unsigned int memory_per_node(
 
 /** Allocate a TagNode
  *
- * Alocates a TagNode while guaranteeing that total memory usage remains within TAG_MEMCAP.
+ * Allocates a TagNode while guaranteeing that total memory usage remains within TAG_MEMCAP.
  * Least used nodes may be deleted from ssn_tag_cache and host_tag_cache to make space if
  * the limit is being exceeded.
  *
index ce4a308cbaa7341f9b04435e7937942a6a5a048f..4b64c5d578235044af574c26203205df5a3c7af4 100644 (file)
@@ -31,7 +31,7 @@
 **  11/1/05  Updates to add support for rules for all events in
 **           decoders and preprocessors and the detection engine.
 **           Added support for rule by rule flushing control via
-**           metadata. Also added code to check fo an otn for every
+**           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
 **           configured independently, which allows them to inspect and
@@ -39,8 +39,8 @@
 **           and GenerateEvent2() for portscan.cc.  The GenerateSnortEvent()
 **           function now finds and otn and calls fpLogEvent.
 **
-**           Any event that has no otn associated with it's gid,sid pair,
-**           will/should not alert, even if the preprocessor or decoiderr is
+**           Any event that has no otn associated with it's gid,sid pair
+**           will/should not alert, even if the preprocessor or decoder is
 **           configured to detect an alertable event.
 **
 **           In the future, preporcessor may have an api that gets called
index 9f756ac02ec3ad83698981ebd5838c6038bc574d..4a50b00f9b1773fa742bfc533c98c0a875553ee7 100644 (file)
@@ -50,7 +50,7 @@
  * This function has been updated to find an otn and route the call to fpLogEvent
  * if possible.  This requires a rule be written for each decoder event,
  * and possibly some preporcessor events.  The bulk of eventing is handled vie the
- * SnortEventqAdd() and SnortEventLog() functions - whichalready  route the events to
+ * SnortEventqAdd() and SnortEventLog() functions - which already  route the events to
  * the fpLogEvent()function.
  */
 uint32_t GenerateSnortEvent(Packet* p, uint32_t gid, uint32_t sid)
index ef8d8a726edefa0ecc47d65c186a9f3a5581f05b..62105657768cd8a0f168c9688ebf641b62fb78c6 100644 (file)
@@ -29,7 +29,7 @@
 //    allow file data remains in mempool. Even if a session is closed, the file
 //     data will stay in the mempool.
 // 3) Then file data can be read through file_capture_read()
-// 4) Finally, fila data must be released from mempool file_capture_release()
+// 4) Finally, file data must be released from mempool file_capture_release()
 
 #include <condition_variable>
 #include <mutex>
@@ -84,7 +84,7 @@ public:
     // Store file to disk asynchronously
     void store_file_async();
 
-    // Log file capture mempoofile_contentl usage
+    // Log file capture mempool usage
     static void print_mem_usage();
 
     // Exit file capture, release all file capture memory etc,
index c9fd696beea36a57d462db278c529c4fccdd1928..1e30bc2b37485552b092f2959a09c56efaf58a85 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef FILE_ENFORCER_H
 #define FILE_ENFORCER_H
 
-// If a file transfered through HTTP is blocked, a new session might be created
+// If a file transferred through HTTP is blocked, a new session might be created
 // to request the file data left. To block the new session, we use URL and IPs
 // to continue blocking the same file.
 
index a951afa1b6d397aaa1d0cec0851a4a4c1ab91f2e..dfee6280392c29a7e9a76fd0f38d47a638f63e93 100644 (file)
@@ -275,15 +275,15 @@ the current event should be logged or dropped.
 
 @param thd Threshold object from sfthd_new()
 @param gen_id Generator id
-@param sig_id Signauture id
+@param sig_id Signature id
 @param tracking Selects tracking by src ip or by dst ip
-@param type  Thresholding type: Limit, Threshold, or Limt+Threshold, Suppress
+@param type  Thresholding type: Limit, Threshold, or Limit+Threshold, Suppress
 @param priority Assigns a relative priority to this object, higher numbers imply higher priority
 
 @param count Number of events
 @param seconds Time duration over which this threshold object acts.
-@param ip      IP address, for supression
-@param ip-mask IP mask, applied with ip_mask, for supression
+@param ip      IP address, for suppression
+@param ip-mask IP mask, applied with ip_mask, for suppression
 
 @return integer
 @retval  0 successfully added the thresholding object
@@ -386,7 +386,7 @@ static int sfthd_create_threshold_local(
             return -10;
         }
         p = (THD_NODE*)sfthd_item->sfthd_node_list->tail->ndata;
-        if (p) /* just to be safe- if thers a tail, there is is node data */
+        if (p) /* just to be safe- if there is a tail, there is is node data */
         {
             if ( p->type != THD_TYPE_SUPPRESS && config->type != THD_TYPE_SUPPRESS )
             {
@@ -405,7 +405,7 @@ static int sfthd_create_threshold_local(
     /* Create a THD_NODE for this THD_ITEM (Object) */
     sfthd_node = (THD_NODE*)snort_calloc(sizeof(THD_NODE));
 
-    /* Limit priorities to force supression nodes to highest priority */
+    /* Limit priorities to force suppression nodes to highest priority */
     if ( config->priority >= THD_PRIORITY_SUPPRESS )
     {
         config->priority  = THD_PRIORITY_SUPPRESS - 1;
@@ -436,7 +436,7 @@ static int sfthd_create_threshold_local(
       objects is done above.
 
       Suppressions have the highest priority and are at the front of the
-      list, the tail node is either a supprssion node or the only pure
+      list, the tail node is either a suppression node or the only pure
       thresholding node.
     */
     {
@@ -577,15 +577,15 @@ the current event should be logged or dropped.
 
 @param thd Threshold object from sfthd_new()
 @param gen_id Generator id
-@param sig_id Signauture id
+@param sig_id Signature id
 @param tracking Selects tracking by src ip or by dst ip
-@param type  Thresholding type: Limit, Threshold, or Limt+Threshold, Suppress
+@param type  Thresholding type: Limit, Threshold, or Limit+Threshold, Suppress
 @param priority Assigns a relative priority to this object, higher numbers imply higher priority
 
 @param count Number of events
 @param seconds Time duration over which this threshold object acts.
-@param ip      IP address, for supression
-@param ip-mask IP mask, applied with ip_mask, for supression
+@param ip      IP address, for suppression
+@param ip-mask IP mask, applied with ip_mask, for suppression
 
 @return integer
 @retval  0 successfully added the thresholding object
@@ -1178,7 +1178,7 @@ int sfthd_test_threshold(
 
     /*
      * Test for a global threshold object
-     * we're here cause ther were no threshold objects for this gen_id/sig_id pair
+     * we're here cause there were no threshold objects for this gen_id/sig_id pair
      */
 global_test:
 
index f32cff1d87f733f83b9ba8f5c3183fa13a5c7a1f..0efe1d297cc492bae7126879c6579d1cb2149240 100644 (file)
@@ -176,7 +176,7 @@ struct tThdItemKey
 
     The main thresholding data structure.
 
-    Local and global threshold thd_id's are all unqiue, so we use just one
+    Local and global threshold thd_id's are all unique, so we use just one
     ip_nodes lookup table
  */
 struct THD_STRUCT
index 8b8a1b6be7637aaecf0626042fc3141403c73b1c..20036b2d840a119fc288bba07d847312b7aede58 100644 (file)
@@ -295,7 +295,7 @@ uint32_t FlowKey::hash(SFHASHFCN* hf, unsigned char* p, int)
 
     a += d[9];   // vlan tag, packet type, & version
     b += d[10];  // mpls label
-    c += d[11];  // address space id and 16bits of zero'd pad
+    c += d[11];  // address space id and 16bits of zeroed pad
 
     finalize(a, b, c);
 
index bfdc2a4d324a251fcbeff11d09ac598d53d97da4..08a9f47331fccc90c75f547d19b0194035e5fa09 100644 (file)
@@ -79,7 +79,7 @@ FlowHAState::FlowHAState()
     state |= (NEW | NEW_SESSION);
     pending = NONE_PENDING;
 
-    // Set the initial upate time to now+min_session_lifetime
+    // Set the initial update time to now+min_session_lifetime
     packet_gettimeofday(&next_update);
     next_update.tv_usec += min_session_lifetime.tv_usec;
     if (next_update.tv_usec > USEC_PER_SEC)
@@ -380,7 +380,7 @@ static void consume_receive_update_message(HAMessage* msg)
 
         if ( (content_end - msg->cursor + 1) < header->length )
         {
-            ErrorMessage("Consuming HA Update memssage - message too short\n");
+            ErrorMessage("Consuming HA Update message - message too short\n");
             break;
         }
 
index c1132d5f6bab14fa574c32e2cfd89877e452bc9a..902dc24399cfda084c6fbeefcdfcb76bcba1cb9c 100644 (file)
@@ -87,7 +87,7 @@ constexpr uint16_t CODEC_SAVE_LAYER = 0x0004;
 // DECODE_ENCAP_LAYER for the next layer (and only the next layer).
 constexpr uint16_t CODEC_ENCAP_LAYER = (CODEC_SAVE_LAYER | CODEC_UNSURE_ENCAP );
 
-// used to check ip6 extensino order
+// used to check ip6 extension order
 constexpr uint16_t CODEC_ROUTING_SEEN = 0x0008;
 
 // used by icmp4 for alerting
@@ -120,7 +120,7 @@ struct CodecData
 
     /* Reset before each decode of packet begins */
 
-    /*  Codec specific fields.  These fields are only relevent to codecs. */
+    /*  Codec specific fields.  These fields are only relevant to codecs. */
     uint16_t proto_bits;    /* protocols contained within this packet
                                  -- will be propogated to Snort++ Packet struct*/
     uint16_t codec_flags;   /* flags used while decoding */
@@ -129,7 +129,7 @@ struct CodecData
     /*  The following values have junk values after initialization */
     uint8_t ip6_extension_count; /* initialized in cd_ipv6.cc */
     uint8_t curr_ip6_extension;  /* initialized in cd_ipv6.cc */
-    IpProtocol ip6_csum_proto;      /* initalized in cd_ipv6.cc.  Used for IPv6 checksums */
+    IpProtocol ip6_csum_proto;      /* initialized in cd_ipv6.cc.  Used for IPv6 checksums */
 
     CodecData(ProtocolId init_prot) : next_prot_id(init_prot), lyr_len(0),
         invalid_bytes(0), proto_bits(0), codec_flags(0), ip_layer_cnt(0)
@@ -264,7 +264,7 @@ public:
      * Main decoding function!  Will get called when decoding a packet.
      *
      * PARAMS:
-     *      const RawData& = struct containing informatin about the
+     *      const RawData& = struct containing information about the
      *                      current packet's raw data
      *
      *      CodecData& = Pass information the PacketManager and other
@@ -311,12 +311,12 @@ public:
      *              like IPv4 (original ipv4 header may contain invalid options
      *              which we don't want to copy) and GTP have dynamic lengths.
      *              So, this parameter ensure the encode() function doesn't
-     *              need to revalidatae and recalculate the length.
+     *              need to revalidate and recalculate the length.
      *        EncState& = The current EncState struct
      *        Buffer& = the packet which will be sent. All inward layers will already
      *              be set.
      *
-     * NOTE:  all funtions MUST call the Buffer.allocate() function before
+     * NOTE:  all functions MUST call the Buffer.allocate() function before
      *          manipulating memory.
      */
     virtual bool encode(const uint8_t* const /*raw_in */,
index d4db34702cc77ab2fb0d63d83a003ff54b101bb4..2156de4e1117b71be9fcf3c406b9d9d6f5648125 100644 (file)
@@ -484,7 +484,7 @@ static void sfghash_next(SFGHASH* t)
     }
 
     /* Next row
-       Get 1st node in next non-emtoy row/node list */
+       Get 1st node in next non-empty row/node list */
     for ( t->crow++; t->crow < t->nrows; t->crow++ )
     {
         t->cnode = t->table[ t->crow ];
@@ -547,7 +547,7 @@ SFGHASH_NODE* sfghash_findnext(SFGHASH* t)
  *
  * @param h sfhashfcn ptr
  * @param hash_fcn user specified hash function
- * @param keycmp_fcn user specified key comparisoin function
+ * @param keycmp_fcn user specified key comparison function
  */
 
 int sfghash_set_keyops(SFGHASH* h,
index 161b44fe07c13dd955e4a4b11f7d6d564d420260..f12102b18d1b9166f03ea424d2a7f431c64679c2 100644 (file)
@@ -97,7 +97,7 @@ unsigned sfhashfcn_hash(SFHASHFCN* p, unsigned char* d, int n)
  *
  * @param h sfhashfcn ptr
  * @param hash_fcn user specified hash function
- * @param keycmp_fcn user specified key comparisoin function
+ * @param keycmp_fcn user specified key comparison function
  */
 int sfhashfcn_set_keyops(SFHASHFCN* h,
     unsigned (* hash_fcn)(SFHASHFCN* p, unsigned char* d, int n),
index 2d3fa0a11f70626cd79b8de766e159c2e75c33f5..ea73063503e53e3a804f3b249d62ed9e5e856826 100644 (file)
@@ -22,7 +22,7 @@
 *
 * Prime number calculation via Table lookups.
 *
-* This was implemented for use with the hasing functions
+* This was implemented for use with the hashing functions
 * in sfghash, and sfxhash.
 *
 */
index 2e551a280a91e68c344c91a408ff4419d928c1db..ff0391d97b9844165d4eb646146e9f31ed087a74 100644 (file)
  *  This table incorporates a memory manager (memcap.c) to provide a memory cap,
  *  and an automatic node recovery system for out of memory management. Keys and
  *  Data are copied into the hash table during the add operation. The data may
- *  be allocated and free'd by the user (by setting the datasize to zero ). A
+ *  be allocated and freed by the user (by setting the datasize to zero ). A
  *  user callback is provided to allow the user to do cleanup whenever a node
- *  is released, by either the ANR system or the relase() function.
+ *  is released, by either the ANR system or the release() function.
  *
  *  Users can and should delete nodes when they know they are not needed anymore,
  *  but this custom table is designed for the case where nodes are allocated
  *  permanently, we have to limit memory, and we wish to recycle old nodes.
- *  Many problems have a natural node ageing paradigm working in our favor,
+ *  Many problems have a natural node aging paradigm working in our favor,
  *  so automated node aging makes sense. i.e. thresholding, tcp state.
  *
  *  This hash table maps keys to data.  All keys must be unique.
- *  Uniqueness is enforcedby the code.
+ *  Uniqueness is enforced by the code.
  *
  *  Features:
  *
@@ -556,7 +556,7 @@ static SFXHASH_NODE* sfxhash_newnode(SFXHASH* t)
      */
     if ( !hnode && t->anr_flag && t->gtail )
     {
-        /* Find the oldes node the users willing to let go. */
+        /* Find the oldest node the users willing to let go. */
         for (hnode = t->gtail; hnode; hnode = hnode->gprev )
         {
             if ( t->anrfree ) /* User has provided a permission+release callback function */
@@ -590,7 +590,7 @@ static SFXHASH_NODE* sfxhash_newnode(SFXHASH* t)
  *
  *  Find a Node based on the key, return the node and the index.
  *  The index is valid even if the return value is nullptr, in which
- *  case the index is the corect row in which the node should be
+ *  case the index is the correct row in which the node should be
  *  created.
  *
  */
@@ -640,7 +640,7 @@ static SFXHASH_NODE* sfxhash_find_node_row(SFXHASH* t, const void* key, int* rin
  * key  users key pointer
  * data  users data pointer
  *
- * eturn integer
+ * return integer
  * retval SFXHASH_OK      success
  * retval SFXHASH_INTABLE already in the table, t->cnode points to the node
  * retval SFXHASH_NOMEM   not enough memory
@@ -1066,7 +1066,7 @@ static void sfxhash_next(SFXHASH* t)
     }
 
     /* Next row
-       Get 1st node in next non-emtoy row/node list */
+       Get 1st node in next non-empty row/node list */
     for ( t->crow++; t->crow < t->nrows; t->crow++ )
     {
         t->cnode = t->table[ t->crow ];
@@ -1181,9 +1181,9 @@ int usrfree(void* key, void* data)
 /*
    Auto Node Recovery Callback - optional
 
-   This is called to ask the user to kill a node, if it reutrns !0 than the hash
+   This is called to ask the user to kill a node, if it returns !0 than the hash
    library does not kill this node.  If the user os willing to let the node die,
-   the user must do any free'ing or clean up on the node during this call.
+   the user must do any freeing or clean up on the node during this call.
 */
 int anrfree(void* key, void* data)
 {
index 2371deac9ea39345164337b59ddc1a6b64d51f52..ca10fc53d8632eb96e1f9de169a22c3bf16e2119 100644 (file)
@@ -37,7 +37,7 @@ struct SFHASHFCN;
 
 struct SFXHASH_NODE
 {
-    struct SFXHASH_NODE* gnext; // global node list - used for ageing nodes
+    struct SFXHASH_NODE* gnext; // global node list - used for aging nodes
     struct SFXHASH_NODE* gprev;
     struct SFXHASH_NODE* next;  // row node list
     struct SFXHASH_NODE* prev;
@@ -73,7 +73,7 @@ struct SFXHASH
     unsigned find_success;
 
     SFXHASH_NODE* ghead, * gtail;  // global - root of all nodes allocated in table
-    SFXHASH_NODE* fhead, * ftail;  // list of free nodes, which are recyled
+    SFXHASH_NODE* fhead, * ftail;  // list of free nodes, which are recycled
     SFXHASH_NODE* gnode;           // gfirst/gnext node ptr */
     int recycle_nodes;             // recycle nodes. Nodes are not freed, but are used for
                                    // subsequent new nodes
@@ -83,7 +83,7 @@ struct SFXHASH
      * the new node. anr_tries indicates # of ANR tries.*/
 
     unsigned anr_tries;
-    unsigned anr_count;      // # ANR ops performaed
+    unsigned anr_count;      // # ANR ops performed
     int anr_flag;            // 0=off, !0=on
 
     SFXHASH_FREE_FCN anrfree;
@@ -118,11 +118,11 @@ inline unsigned sfxhash_anr_count(SFXHASH* t)
 inline unsigned sfxhash_find_total(SFXHASH* t)
 { return t->find_success + t->find_fail; }
 
-//  Get the # unsucessful finds
+//  Get the # unsuccessful finds
 inline unsigned sfxhash_find_fail(SFXHASH* t)
 { return t->find_fail; }
 
-//  Get the # sucessful finds
+//  Get the # successful finds
 inline unsigned sfxhash_find_success(SFXHASH* t)
 { return t->find_success; }
 
index c5ad7c988d8389450ed66e7665bbfff06d8c6123..50e2cd904f0b77b61bba0c4620bc784fae53319b 100644 (file)
@@ -71,9 +71,9 @@ TEST(lru_cache_shared, insert_test)
     CHECK(false == lru_cache.find(3, data));
 
     //  Verify that insert will replace data if key exists already.
-    lru_cache.insert(1, "newone");
+    lru_cache.insert(1, "new one");
     CHECK(true == lru_cache.find(1, data));
-    CHECK("newone" == data);
+    CHECK("new one" == data);
 
     //  Verify current number of entries in cache.
     CHECK(3 == lru_cache.size());
@@ -81,7 +81,7 @@ TEST(lru_cache_shared, insert_test)
     //  Verify that the data is in LRU order.
     auto vec = lru_cache.get_all_data();
     CHECK(3 == vec.size());
-    CHECK((vec[0] == std::make_pair(1, std::string("newone"))));
+    CHECK((vec[0] == std::make_pair(1, std::string("new one"))));
     CHECK((vec[1] == std::make_pair(2, std::string("two"))));
     CHECK((vec[2] == std::make_pair(0, std::string("zero"))));
 }
@@ -185,7 +185,7 @@ TEST(lru_cache_shared, stats_test)
     lru_cache.find(8, data);    //  Misses now that they're removed.
     lru_cache.find(9, data);
 
-    lru_cache.remove(100);  //  Removing a non-existant entry does not
+    lru_cache.remove(100);  //  Removing a non-existent entry does not
                             //  increase remove count.
 
     lru_cache.clear();
index 833a3bf418c976c629477df462abe4471a6324a2..12e4348704f672f44a7a698db6e376b31f194a62 100644 (file)
@@ -35,7 +35,7 @@
 #include "sfip/sf_ip.h"
 
 //  FIXIT-M For now this emulates the Snort++ attribute table.
-//  Need to add in sfrnaincludes/host_tracker.h data eventually.
+//  Need to add in host_tracker.h data eventually.
 
 typedef uint16_t Port;
 typedef uint16_t Protocol;
index 5862df0b3f40eb133b3c00601ba6890b2cd8b089..e3aa21bd4d07f7a0279f9338d63406f4a52f8116 100644 (file)
@@ -65,7 +65,7 @@
 **    BitStringOverflow::
 */
 /**
-**  The neccessary info to detect possible bitstring overflows.  Thanks
+**  The necessary info to detect possible bitstring overflows.  Thanks
 **  once again to microsoft for keeping us in business.
 **
 **  @return integer
@@ -139,7 +139,7 @@ static int DoubleOverflow(ASN1_TYPE* asn1, void*)
     /*
     **  Here's what this does.
     **
-    **  There is a vulnerablity in the MSASN1 library when decoding
+    **  There is a vulnerability in the MSASN1 library when decoding
     **  a double (real) type.  If the encoding is ASCII (specified by
     **  not setting bit 7 or 8), and the buffer is greater than 256,
     **  then you overflow the array in the function.
index 96e75744f1a84e31b3283f4c070dbd8a66a3221a..a15536a3762d7ef6d9f42bb4a6bd04ee6440faa8 100644 (file)
@@ -544,7 +544,7 @@ static int asn1_decode_type(const u_char** data, u_int* len, ASN1_TYPE** asn1_ty
     }
 
     /*
-    **  Set this varible here, so we can set the data_len for
+    **  Set this variable here, so we can set the data_len for
     **  indeterminate constructs.
     */
     uiRawLen = asn1data.end - asn1data.data;
@@ -686,7 +686,7 @@ int asn1_decode(const u_char* data, u_int len, ASN1_TYPE** asn1_type)
         /*
         **  This is where we decode the ASN.1 constructs.  We do while()
         **  because we may have back to back constructs.  We bail on the
-        **  first indentifier that isn't a construct.
+        **  first identifier that isn't a construct.
         */
         while (cur && cur->ident.flag == SF_ASN1_FLAG_CONSTRUCT)
         {
index 9ac373a9ecf8701afda31c06e06b628b7436631f..900af9474c2419cd30c303a92f2887b9dc42e381 100644 (file)
@@ -51,7 +51,7 @@ void set_byte_order(uint8_t& order, uint8_t flag, const char* opt)
  * This method will read either a big or little endian value in binary
  * data from the packet and return an uint32_t value.
  *
- * @param endianess value to read the byte as
+ * @param endianness value to read the byte as
  * @param bytes_to_grab how many bytes should we grab from the packet
  * @param data pointer to where to grab the data from
  * @param start pointer to start range of buffer
@@ -60,11 +60,11 @@ void set_byte_order(uint8_t& order, uint8_t flag, const char* opt)
  *
  * @returns 0 on success, otherwise failure
  */
-int byte_extract(int endianess, int bytes_to_grab, const uint8_t* ptr,
+int byte_extract(int endianness, int bytes_to_grab, const uint8_t* ptr,
     const uint8_t* start, const uint8_t* end,
     uint32_t* value)
 {
-    if (endianess != ENDIAN_LITTLE && endianess != ENDIAN_BIG)
+    if (endianness != ENDIAN_LITTLE && endianness != ENDIAN_BIG)
     {
         /* we only support 2 byte formats */
         return -2;
@@ -91,7 +91,7 @@ int byte_extract(int endianess, int bytes_to_grab, const uint8_t* ptr,
         *value =  (*ptr) & 0xFF;
         break;
     case 2:
-        if (endianess == ENDIAN_LITTLE)
+        if (endianness == ENDIAN_LITTLE)
         {
             *value = (*ptr) & 0xFF;
             *value |= (*(ptr + 1) & 0xFF) << 8;
@@ -103,7 +103,7 @@ int byte_extract(int endianess, int bytes_to_grab, const uint8_t* ptr,
         }
         break;
     case 3:
-        if (endianess == ENDIAN_LITTLE)
+        if (endianness == ENDIAN_LITTLE)
         {
             *value = (*ptr) & 0xFF;
             *value |= ((*(ptr + 1)) & 0xFF) << 8;
@@ -117,7 +117,7 @@ int byte_extract(int endianess, int bytes_to_grab, const uint8_t* ptr,
         }
         break;
     case 4:
-        if (endianess == ENDIAN_LITTLE)
+        if (endianness == ENDIAN_LITTLE)
         {
             *value = (*ptr) & 0xFF;
             *value |= ((*(ptr + 1)) & 0xFF) << 8;
index 0f745cbde1f0e69a70cbd10748ecc77751a4a625..d06048d1da37e5fd75068c257269a9a661ad2a37 100644 (file)
@@ -34,7 +34,7 @@ SO_PUBLIC int string_extract(
     const uint8_t* start, const uint8_t* end, uint32_t* value);
 
 SO_PUBLIC int byte_extract(
-    int endianess, int bytes_to_grab, const uint8_t* ptr,
+    int endianness, int bytes_to_grab, const uint8_t* ptr,
     const uint8_t* start, const uint8_t* end, uint32_t* value);
 
 SO_PUBLIC void set_byte_order(uint8_t& order, uint8_t flag, const char* opt);
index eeb80fb6cf5a4421e49b309f9dcdcdfecf39c741..e8510d1b616ffaf072cfa5804d34cc3bd067325f 100644 (file)
@@ -52,7 +52,7 @@ struct ByteExtractData
     uint8_t relative_flag;
     uint8_t data_string_convert_flag;
     uint8_t align;
-    uint8_t endianess;
+    uint8_t endianness;
     uint32_t base;
     uint32_t multiplier;
     uint32_t bitmask_val;
@@ -106,7 +106,7 @@ uint32_t ByteExtractOption::hash() const
     a += (data->relative_flag << 24 |
         data->data_string_convert_flag << 16 |
         data->align << 8 |
-        data->endianess);
+        data->endianness);
     b += data->multiplier;
     c += data->var_number;
 
@@ -134,7 +134,7 @@ bool ByteExtractOption::operator==(const IpsOption& ips) const
         (left->relative_flag == right->relative_flag) &&
         (left->data_string_convert_flag == right->data_string_convert_flag) &&
         (left->align == right->align) &&
-        (left->endianess == right->endianess) &&
+        (left->endianness == right->endianness) &&
         (left->base == right->base) &&
         (left->multiplier == right->multiplier) &&
         (left->var_number == right->var_number) &&
@@ -168,8 +168,8 @@ int ByteExtractOption::eval(Cursor& c, Packet* p)
     if (ptr < start || ptr >= end)
         return DETECTION_OPTION_NO_MATCH;
 
-    uint8_t endian = data->endianess;
-    if (data->endianess == ENDIAN_FUNC)
+    uint8_t endian = data->endianness;
+    if (data->endianness == ENDIAN_FUNC)
     {
         if (!p->endianness ||
             !p->endianness->get_offset_endianness(ptr - p->data, endian))
@@ -207,7 +207,7 @@ int ByteExtractOption::eval(Cursor& c, Packet* p)
         }
     }
 
-    /* mulitply */
+    /* multiply */
     *value *= data->multiplier;
 
     /* align to next 32-bit or 16-bit boundary */
@@ -462,8 +462,8 @@ bool ExtractModule::begin(const char*, int, SnortConfig*)
 
 bool ExtractModule::end(const char*, int, SnortConfig*)
 {
-    if ( !data.endianess )
-        data.endianess = ENDIAN_BIG;
+    if ( !data.endianness )
+        data.endianness = ENDIAN_BIG;
     return ByteExtractVerify(&data);
 }
 
@@ -488,13 +488,13 @@ bool ExtractModule::set(const char*, Value& v, SnortConfig*)
         data.multiplier = v.get_long();
 
     else if ( v.is("big") )
-        set_byte_order(data.endianess, ENDIAN_BIG, "byte_extract");
+        set_byte_order(data.endianness, ENDIAN_BIG, "byte_extract");
 
     else if ( v.is("little") )
-        set_byte_order(data.endianess, ENDIAN_LITTLE, "byte_extract");
+        set_byte_order(data.endianness, ENDIAN_LITTLE, "byte_extract");
 
     else if ( v.is("dce") )
-        set_byte_order(data.endianess, ENDIAN_FUNC, "byte_extract");
+        set_byte_order(data.endianness, ENDIAN_FUNC, "byte_extract");
 
     else if ( v.is("string") )
     {
index b547ac60a7d48cfc23697a69f1443e19485bb460..0481053f3da4e65a43a747b9271e7b00945145a8 100644 (file)
  *      ["dce"]: let the DCE/RPC 2 preprocessor 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 hexidecimal
+ *      ["hex"]: converted string data is represented in hexadecimal
  *      ["dec"]: converted string data is represented in decimal
  *      ["oct"]: converted string data is represented in octal
  *      ["align"]: round the number of converted bytes up to the next
- *                 32-bit boundry
+ *                 32-bit boundary
  *      ["post_offset"]: number of bytes to adjust after applying
  *      ["from beginning"]: Skip forward from the beginning of the packet
  *                          payload instead of from the current position in
@@ -104,7 +104,7 @@ typedef struct _ByteJumpData
     uint8_t data_string_convert_flag;
     uint8_t from_beginning_flag;
     uint8_t align_flag;
-    uint8_t endianess;
+    uint8_t endianness;
     uint32_t base;
     uint32_t multiplier;
     int32_t post_offset;
@@ -155,7 +155,7 @@ uint32_t ByteJumpOption::hash() const
         data->data_string_convert_flag << 16 |
         data->from_beginning_flag << 8 |
         data->align_flag);
-    b += data->endianess;
+    b += data->endianness;
     c += data->multiplier;
 
     mix(a,b,c);
@@ -188,7 +188,7 @@ bool ByteJumpOption::operator==(const IpsOption& ips) const
         ( left->data_string_convert_flag == right->data_string_convert_flag) &&
         ( left->from_beginning_flag == right->from_beginning_flag) &&
         ( left->align_flag == right->align_flag) &&
-        ( left->endianess == right->endianess) &&
+        ( left->endianness == right->endianness) &&
         ( left->base == right->base) &&
         ( left->multiplier == right->multiplier) &&
         ( left->post_offset == right->post_offset) &&
@@ -229,7 +229,7 @@ int ByteJumpOption::eval(Cursor& c, Packet* p)
 
     uint32_t jump = 0;
     uint32_t payload_bytes_grabbed = 0;
-    uint8_t endian = bjd->endianess;
+    uint8_t endian = bjd->endianness;
 
     if (endian == ENDIAN_FUNC)
     {
@@ -280,7 +280,7 @@ int ByteJumpOption::eval(Cursor& c, Packet* p)
         if (bjd->multiplier)
             jump *= bjd->multiplier;
 
-        // if we need to align on 32-bit boundries, round up to the next 32-bit value
+        // if we need to align on 32-bit boundaries, round up to the next 32-bit value
         if (bjd->align_flag)
         {
             if ((jump % 4) != 0)
@@ -407,8 +407,8 @@ bool ByteJumpModule::end(const char*, int, SnortConfig*)
             return false;
         }
     }
-    if ( !data.endianess )
-        data.endianess = ENDIAN_BIG;
+    if ( !data.endianness )
+        data.endianness = ENDIAN_BIG;
 
     if (data.from_beginning_flag && data.from_end_flag)
     {
@@ -462,13 +462,13 @@ bool ByteJumpModule::set(const char*, Value& v, SnortConfig*)
         data.post_offset = v.get_long();
 
     else if ( v.is("big") )
-        set_byte_order(data.endianess, ENDIAN_BIG, "byte_jump");
+        set_byte_order(data.endianness, ENDIAN_BIG, "byte_jump");
 
     else if ( v.is("little") )
-        set_byte_order(data.endianess, ENDIAN_LITTLE, "byte_jump");
+        set_byte_order(data.endianness, ENDIAN_LITTLE, "byte_jump");
 
     else if ( v.is("dce") )
-        set_byte_order(data.endianess, ENDIAN_FUNC, "byte_jump");
+        set_byte_order(data.endianness, ENDIAN_FUNC, "byte_jump");
 
     else if ( v.is("string") )
     {
index 6ecb6a4d7f552e77f022fd20d2bb73d01c721da9..a9305feb97a5f273537abb18059f9f867b664981 100644 (file)
@@ -22,7 +22,7 @@
  *
  * Purpose:
  *      Test a byte field against a specific value (with opcode).  Capable
- *      of testing binary values or converting represenative byte strings
+ *      of testing binary values or converting representative byte strings
  *      to their binary equivalent and testing them.
  *
  *
@@ -37,7 +37,7 @@
  *      ["big"]: process data as big endian (default)
  *      ["little"]: process data as little endian
  *      ["string"]: converted bytes represented as a string needing conversion
- *      ["hex"]: converted string data is represented in hexidecimal
+ *      ["hex"]: converted string data is represented in hexadecimal
  *      ["dec"]: converted string data is represented in decimal
  *      ["oct"]: converted string data is represented in octal
  *      ["bitmask"]: applies the AND operator on the bytes converted. The
@@ -140,7 +140,7 @@ typedef struct _ByteTestData
     uint8_t not_flag;
     uint8_t relative_flag;
     uint8_t data_string_convert_flag;
-    uint8_t endianess;
+    uint8_t endianness;
     uint32_t base;
     uint32_t bitmask_val;
     int8_t cmp_value_var;
@@ -248,7 +248,7 @@ uint32_t ByteTestOption::hash() const
     b += (data->not_flag << 24 |
         data->relative_flag << 16 |
         data->data_string_convert_flag << 8 |
-        data->endianess);
+        data->endianness);
     c += data->base;
 
     mix(a,b,c);
@@ -280,7 +280,7 @@ bool ByteTestOption::operator==(const IpsOption& ips) const
         ( left->not_flag == right->not_flag) &&
         ( left->relative_flag == right->relative_flag) &&
         ( left->data_string_convert_flag == right->data_string_convert_flag) &&
-        ( left->endianess == right->endianess) &&
+        ( left->endianness == right->endianness) &&
         ( left->base == right->base) &&
         ( left->cmp_value_var == right->cmp_value_var) &&
         ( left->offset_var == right->offset_var) &&
@@ -323,7 +323,7 @@ int ByteTestOption::eval(Cursor& c, Packet* p)
     const uint8_t* start_ptr = btd->relative_flag ? c.start() : c.buffer();
     start_ptr += offset;
 
-    uint8_t endian = btd->endianess;
+    uint8_t endian = btd->endianness;
     if (endian == ENDIAN_FUNC)
     {
         if (!p->endianness ||
@@ -538,8 +538,8 @@ bool ByteTestModule::end(const char*, int, SnortConfig*)
             return false;
         }
     }
-    if ( !data.endianess )
-        data.endianess = ENDIAN_BIG;
+    if ( !data.endianness )
+        data.endianness = ENDIAN_BIG;
 
     if (numBytesInBitmask(data.bitmask_val) > data.bytes_to_compare)
     {
@@ -578,13 +578,13 @@ bool ByteTestModule::set(const char*, Value& v, SnortConfig*)
         data.relative_flag = 1;
 
     else if ( v.is("big") )
-        set_byte_order(data.endianess, ENDIAN_BIG, "byte_test");
+        set_byte_order(data.endianness, ENDIAN_BIG, "byte_test");
 
     else if ( v.is("little") )
-        set_byte_order(data.endianess, ENDIAN_LITTLE, "byte_test");
+        set_byte_order(data.endianness, ENDIAN_LITTLE, "byte_test");
 
     else if ( v.is("dce") )
-        set_byte_order(data.endianess, ENDIAN_FUNC, "byte_test");
+        set_byte_order(data.endianness, ENDIAN_FUNC, "byte_test");
 
     else if ( v.is("string") )
     {
index 2dc9026f505b3698cfd29f6ff9696df66f08237c..ad39204a9101d6e5042778f9ca8dc18fe091d46d 100644 (file)
@@ -195,7 +195,7 @@ static int CvsDecode(const uint8_t* data, uint16_t data_len,
             return CVS_NO_ALERT;
 
         DebugFormat(DEBUG_IPS_OPTION, "CVS command\n"
-            "  comand: %.*s\n"
+            " command: %.*s\n"
             "argument: %.*s\n",
             command.cmd_str_len, (char*)command.cmd_str,
             command.cmd_arg == NULL ? 4 : command.cmd_arg_len,
index 03390c3835337bb12cff176e2ce2a9b119f5cfa8..9edebab9153ae1433353071cfe2e542e344074bd 100644 (file)
@@ -198,7 +198,7 @@ static void flags_parse_test(const char* rule, TcpFlagCheckData* idx)
 
     fptr = rule;
 
-    /* make sure there is atleast a split pointer */
+    /* make sure there is at least a split pointer */
     if (fptr == NULL)
     {
         ParseError("flags missing in TCP flag rule");
@@ -284,7 +284,7 @@ static void flags_parse_test(const char* rule, TcpFlagCheckData* idx)
         default:
             ParseError(
                 "bad TCP flag = '%c'"
-                "Valid otions: UAPRSFCE or 0 for NO flags (e.g. NULL scan),"
+                "Valid options: UAPRSFCE or 0 for NO flags (e.g. NULL scan),"
                 " and !, + or * for modifiers",
                 *fptr);
             return;
@@ -301,7 +301,7 @@ static void flags_parse_mask(const char* rule, TcpFlagCheckData* idx)
 
     fptr = rule;
 
-    /* make sure there is atleast a split pointer */
+    /* make sure there is at least a split pointer */
     if (fptr == NULL)
     {
         ParseError("flags missing in TCP flag rule");
@@ -367,7 +367,7 @@ static void flags_parse_mask(const char* rule, TcpFlagCheckData* idx)
             idx->tcp_mask |= R_ECE;     /* ECN echo, RFC 3168 */
             break;
         default:
-            ParseError("bad TCP flag = '%c'. Valid otions: UAPRSFCE", *fptr);
+            ParseError("bad TCP flag = '%c'. Valid options: UAPRSFCE", *fptr);
             return;
         }
 
index 3d414b5ae264e4f56d685db9ddef061d497269dd..9a6c2003fd189ee3dfe31fb63a0296592067ec32 100644 (file)
@@ -230,7 +230,7 @@ void FragBitsData::parse_fragbits(const char* data)
 
         switch ( bit_string.at( a ) )
         {
-        case 'd': // dont fragment
+        case 'd': // don't fragment
         case 'D':
             set_dont_fragment_bit();
             break;
index 96009b46e095ccee9e13524d9549eed0665e9149..5f4b76b597f73e798554add6f678ffd453caf03f 100644 (file)
@@ -105,7 +105,7 @@ int IpOptOption::eval(Cursor&, Packet* p)
     DebugMessage(DEBUG_IPS_OPTION, "CheckIpOptions:");
 
     if ( !p->is_ip4() )
-        // if error occured while ip header
+        // if error occurred while ip header
         // was processed, return 0 automatically.
         return DETECTION_OPTION_NO_MATCH;
 
index 0c7a093bf2d64fb7f0511e48ed73cdc3182c058a..55a038665c34384570a5c1ec7612fea5bdc9acb0 100644 (file)
@@ -20,7 +20,7 @@
 /* sp_isdataat
  *
  * Purpose:
- *    Test a specific byte to see if there is data.  (Basicly, rule keyword
+ *    Test a specific byte to see if there is data.  (Basically, rule keyword
  *    into inBounds)
  *
  * Arguments:
index 42331194634fdcf43ae065d17011cf7390113756..c1d1fbcdb03111496bde2c471262e431ebf4bf3e 100644 (file)
@@ -65,7 +65,7 @@ struct PcreData
     pcre* re;           /* compiled regex */
     pcre_extra* pe;     /* studied regex foo */
     bool free_pe;
-    int options;        /* sp_pcre specfic options (relative & inverse) */
+    int options;        /* sp_pcre specific options (relative & inverse) */
     char* expression;
 };
 
@@ -80,7 +80,7 @@ struct PcreData
 // exactly correct is obviated and thus the need to reload as well.
 
 /* Since SO rules are loaded 1 time at startup, regardless of
- * configuraton, we won't pcre_capture count again, so save the max.  */
+ * configuration, we won't pcre_capture count again, so save the max.  */
 static int s_ovector_max = 0;
 
 // this is a temporary value used during parsing and set in snort conf
@@ -147,7 +147,7 @@ static void pcre_check_anchored(PcreData* pcre_data)
 
     if ((options & PCRE_ANCHORED) && !(options & PCRE_MULTILINE))
     {
-        /* This means that this pcre rule option shouldn't be reevaluted
+        /* This means that this pcre rule option shouldn't be reevaluated
          * even if any of it's relative children should fail to match.
          * It is anchored to the cursor set by the previous cursor setting
          * rule option */
@@ -356,7 +356,7 @@ syntax:
  * @param len size of buffer
  * @param found_offset pointer to an integer so that we know where the search ended
  *
- * *found_offset will be set to -1 when the find is unsucessful OR the routine is inverted
+ * *found_offset will be set to -1 when the find is unsuccessful OR the routine is inverted
  *
  * @return 1 when we find the string, 0 when we don't (unless we've been passed a flag to invert)
  */
index bfeecbf4ac3f39b08d8650f67d172af6a693a4cc..c3f77e7b5e28b37ce7dd153c3334691b89ab15de 100644 (file)
@@ -32,7 +32,7 @@
  * This plugin can take two arguments:
  *    printable => only log the "printable" ASCII characters.
  *    all       => log all traffic in the session, logging non-printable
- *                 chars in "\xNN" hexidecimal format
+ *                 chars in "\xNN" hexadecimal format
  *
  * Effect:
  *
@@ -281,7 +281,7 @@ static void DumpSessionData(FILE* fp, Packet* p, SessionData* sessionData)
         {
             if ((*idx > 0x1f && *idx < 0x7f) || *idx == 0x0a || *idx == 0x0d)
             {
-                /* Escape all occurences of '\' */
+                /* Escape all occurrences of '\' */
                 if (*idx == '\\')
                     fputc('\\', fp);
                 fputc(*idx, fp);
index addffae61c58ac0f237ebdec02d91f50bd75b99c..eb990294a1fc145aa909098924a30351f6a877dd 100644 (file)
@@ -143,7 +143,7 @@ static void LogGREHeader(TextLog* log, Packet* p)
 /*--------------------------------------------------------------------
  * Function: Log2ndHeader(TextLog* , Packet p)
  *
- * Purpose: Log2ndHeader -- prints second layber  header info.
+ * Purpose: Log2ndHeader -- prints second layer  header info.
  *
  * Arguments: log => pointer to TextLog to print to
  *
@@ -1019,7 +1019,7 @@ void LogICMPHeader(TextLog* log, Packet* p)
         break;
 
     case ICMP_ROUTER_ADVERTISE:
-        TextLog_Print(log, "ROUTER ADVERTISMENT: "
+        TextLog_Print(log, "ROUTER ADVERTISEMENT: "
             "Num addrs: %d Addr entry size: %d Lifetime: %u",
             p->ptrs.icmph->s_icmp_num_addrs, p->ptrs.icmph->s_icmp_wpa,
             ntohs(p->ptrs.icmph->s_icmp_lifetime));
index c8ecebf7d330fc2349208a3209f8782646a6dabd..d61b9e3dd6e2cb6b2ba9ca7667ce719cacf2e08c 100644 (file)
@@ -21,7 +21,7 @@
  * Adam Keeton
  *
  * 09/26/06
- * This file is litterally unified.c converted to write unified2
+ * This file is literally unified.c converted to write unified2
  *
  */
 
@@ -611,7 +611,7 @@ static void Unified2Write(uint8_t* buf, uint32_t buf_len, Unified2Config* config
         ((ffstatus = fflush(u2.stream)) != 0))
     {
         /* errno is saved just to avoid other intervening calls
-         * (e.g. ErrorMessage) potentially reseting it to something else. */
+         * (e.g. ErrorMessage) potentially resetting it to something else. */
         int error = errno;
         int max_retries = 3;
 
index e7830c03fecc79dd86c60bd56898e0a08c135c88..6bae350a8d3630138c72e2075fa976ae311fe350 100644 (file)
@@ -572,7 +572,7 @@ static bool set_mode()
     }
 #endif
 #ifdef UNIT_TEST
-    // FIXIT-M X we should move this out of set_mode and not do Snort bringup/teardown at all
+    // FIXIT-M X we should move this out of set_mode and not do Snort bring up/teardown at all
     if ( catch_enabled() )
     {
         main_exit_code = catch_test();
index 46b51fd3e1fc676273705715f3f92ffdc88eb802..cb156e64ea36b12c641a4bbfe4809b1da030d9bd 100644 (file)
@@ -163,7 +163,7 @@ public:  // FIXIT-M make impl private
 //-------------------------------------------------------------------------
 
 // FIXIT-L may be inlined at some point; on lockdown for now
-// FIXIT-L SO_PUBLIC requierd because SnortConfig::inline_mode(), etc. uses the function
+// FIXIT-L SO_PUBLIC required because SnortConfig::inline_mode(), etc. uses the function
 SO_PUBLIC NetworkPolicy* get_network_policy();
 SO_PUBLIC InspectionPolicy* get_inspection_policy();
 SO_PUBLIC IpsPolicy* get_ips_policy();
index 338e572fa2e42194900d41bf0bd76504cd220601..7b41cf24c45a20d9a71ea8791bb89b7d6d7f1658 100644 (file)
@@ -303,7 +303,7 @@ public:
 
     srmm_table_t* srmmTable = nullptr;   /* srvc rule map master table */
     srmm_table_t* spgmmTable = nullptr;  /* srvc port_group map master table */
-    sopg_table_t* sopgTable = nullptr;   /* service-oridnal to port_group table */
+    sopg_table_t* sopgTable = nullptr;   /* service-ordinal to port_group table */
 
     SFXHASH* detection_option_hash_table = nullptr;
     SFXHASH* detection_option_tree_hash_table = nullptr;
@@ -393,7 +393,7 @@ public:
     void free_rule_state_list();
 
     //------------------------------------------------------
-    // Static convenience accesor methods
+    // Static convenience accessor methods
 
     static long int get_mpls_stack_depth()
     { return snort_conf->mpls_stack_depth; }
index a532e3557712b32efeb84a15b84e0a369987f13c..d7c1f4fa747753661b167a5ac93cccfa2ad0f92e 100644 (file)
@@ -63,9 +63,9 @@ static THREAD_LOCAL rand_t* s_rand = NULL;
 /*
  * Begin search from index 1.  0 is a special case in that it is the default
  * codec and is actually a duplicate. i.e., we can find the 0 indexed
- * codec somehwere else in the array too.
+ * codec somewhere else in the array too.
  *
- * Returns: 0 on failure, induex on success
+ * Returns: 0 on failure, index on success
  */
 uint8_t CodecManager::get_codec(const char* const keyword)
 {
@@ -116,7 +116,7 @@ void CodecManager::release_plugins()
         if (wrap.api->pterm)
         {
             wrap.api->pterm();
-            wrap.init = false; // Future proofing this functin.
+            wrap.init = false; // Future proofing this function.
         }
 
         uint8_t index = get_codec(wrap.api->base.name);
@@ -235,7 +235,7 @@ void CodecManager::thread_init(SnortConfig* sc)
     if ( s_rand )
         rand_close(s_rand);
 
-    // rand_open() can yield valgriind errors because the
+    // rand_open() can yield valgrind errors because the
     // starting seed may come from "random stack contents"
     // (see man 3 dnet)
     s_rand = rand_open();
index 2b0359e59f41723ec72476dadcd438007fca6ff3..6a94427f9b3abbbf388058109059ec0a91bf92de 100644 (file)
@@ -104,7 +104,7 @@ private:
 
     /*
      * Private helper functions.  These are all declared here
-     * because they need access to private varaibles.
+     * because they need access to private variables.
      */
 
     // Private struct defined in an anonymous namespace.
index 269fedfafb6fff26bcb0313cc409004cee2c7087..9b502f1744ecd26033fd439bfb95cd4ade07375a 100644 (file)
@@ -457,7 +457,7 @@ static bool set_value(const char* fqn, Value& v)
         bool found = set_var(fqn, v);
 
         if ( !found && !ignored(fqn) )
-            ParseWarning(WARN_SYMBOLS, "uknown symbol %s", fqn);
+            ParseWarning(WARN_SYMBOLS, "unknown symbol %s", fqn);
         return found;
     }
 
index 86ac7a446cd233cc6874aeb09b9f7d739e8463f6..74742000c51145201f628a7445043c2a57a940d3 100644 (file)
@@ -190,7 +190,7 @@ void MemoryCap::calculate(unsigned num_threads)
     {
         preemptive_threshold = memory::calculate_threshold(thread_cap, config.threshold);
         DebugFormat(DEBUG_MEMORY,
-            "per-thread pre-emptive action threshold set to %zu\n", preemptive_threshold);
+            "per-thread preemptive action threshold set to %zu\n", preemptive_threshold);
     }
 }
 
index f9bb6eaf74d8af397d958d2f4b1e2f3cfa686803..9f52c43078ff019ceb5711c6717f4b9219121f3f 100644 (file)
@@ -185,7 +185,7 @@ void MailLogState::set_file_name_from_log(Flow* flow)
     }
 }
 
-/* Accumulate EOL seperated headers, one or more at a time */
+/* Accumulate EOL separated headers, one or more at a time */
 int MailLogState::log_email_hdrs(const uint8_t* start, int length)
 {
     int log_avail = 0;
index f615b84297b20cf569c5aca7299bbe40f832a5e4..0b1528b4d38b3e9410c726dc094b843f9ad0336d 100644 (file)
@@ -32,7 +32,7 @@
 
 static const char* boundary_str = "boundary=";
 
-/* Save the bounday string into paf state*/
+/* Save the boundary string into paf state*/
 static inline bool store_boundary(MimeDataPafInfo* data_info,  uint8_t val)
 {
     if (!data_info->boundary_search)
@@ -92,7 +92,7 @@ static inline bool store_boundary(MimeDataPafInfo* data_info,  uint8_t val)
     return false;
 }
 
-/* check the bounday string in the mail body*/
+/* check the boundary string in the mail body*/
 static inline bool check_boundary(MimeDataPafInfo* data_info,  uint8_t data)
 {
     /* Search for boundary signature "--"*/
@@ -153,11 +153,11 @@ bool process_mime_paf_data(MimeDataPafInfo* data_info,  uint8_t data)
     switch (data_info->data_state)
     {
     case MIME_PAF_FINDING_BOUNDARY_STATE:
-        /* Search for boundary Store bounday string in PAF state*/
+        /* Search for boundary Store boundary string in PAF state*/
         if (store_boundary(data_info, data))
         {
             /* End of boundary, move to MIME_PAF_FOUND_BOUNDARY_STATE*/
-            DebugFormat(DEBUG_FILE, "Create boudary string: %s\n", data_info->boundary);
+            DebugFormat(DEBUG_FILE, "Create boundary string: %s\n", data_info->boundary);
             data_info->data_state = MIME_PAF_FOUND_BOUNDARY_STATE;
         }
         break;
@@ -166,7 +166,7 @@ bool process_mime_paf_data(MimeDataPafInfo* data_info,  uint8_t data)
         if (check_boundary(data_info,  data))
         {
             /* End of boundary, move to MIME_PAF_FOUND_BOUNDARY_STATE*/
-            DebugFormat(DEBUG_FILE, "Found Boudary string: %s\n", data_info->boundary);
+            DebugFormat(DEBUG_FILE, "Found boundary string: %s\n", data_info->boundary);
             return true;
         }
         break;
index 387c92325abb8a6eec1f9a1f522a644f669c55b0..b3e32f5541755755672703c0b03d4d61ec79100d 100644 (file)
@@ -339,7 +339,7 @@ const uint8_t* MimeSession::process_mime_header(const uint8_t* ptr,
         /* check if we're in a content-type header and not folding. if so we have the whole
          * header line/lines for content-type - see if we got a multipart with boundary
          * we don't check each folded line, but wait until we have the complete header
-         * because boundary=BOUNDARY can be split across mulitple folded lines before
+         * because boundary=BOUNDARY can be split across multiple folded lines before
          * or after the '=' */
         if ((state_flags &
                 (MIME_FLAG_IN_CONTENT_TYPE | MIME_FLAG_FOLDING)) == MIME_FLAG_IN_CONTENT_TYPE)
index a0aa85fe846afab3986ea01504e6f134d282ecb9..c2edd16e8cfed8ede12f9cebb89a4845f8e4d444 100644 (file)
@@ -45,7 +45,7 @@ enum class IpProtocol : uint8_t;
 #define APPID_SESSION_HTTP_SESSION          (1ULL << 13)
 /**Service protocol was detected */
 #define APPID_SESSION_SERVICE_DETECTED      (1ULL << 14)
-/**Finsihed with client app detection */
+/**Finished with client app detection */
 #define APPID_SESSION_CLIENT_DETECTED       (1ULL << 15)
 /**Flow is a data connection not a service */
 #define APPID_SESSION_NOT_A_SERVICE         (1ULL << 16)
index c592002d994bc30b3c3663e720873c295efd8635..ab35de9ce2c5475f53cc530851fff8770ecb587d 100644 (file)
@@ -17,7 +17,7 @@
 //--------------------------------------------------------------------------
 
 // appid_module.cc author Steve Chew <stechew@cisco.com>
-// Created on: Auguest 18, 2016
+// Created on: August 18, 2016
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 96c5ecf66bfeee1fe03a28e8c6d388301c7c8df4..410ac1c9ab725c2e7592de75ad3ad0723f628415 100644 (file)
@@ -43,7 +43,7 @@ struct tPatternNode
     /**Total number of parts.*/
     uint32_t partTotal;
 
-    /**Uniq non-zero identifier to tie parts of a multi-part patterns together. */
+    /**Unique non-zero identifier to tie parts of a multi-part patterns together. */
     uint32_t patternId;
 
     tPatternNode* nextPattern;
@@ -184,7 +184,7 @@ void mlmpDump(tMlmpTree* root)
 }
 
 /**tMlmpPattern comparator: compares patterns based on pattern, patternSize. This will
- * result in alphabatical order. Notice that patternId is ignored here.
+ * result in alphabetical order. Notice that patternId is ignored here.
  */
 static int compareMlmpPatterns(const void* p1, const void* p2)
 {
index 0d359e7e9d45afb96d2bf39a29975695e1e8b25d..c2e140ca444780b1cd6296aa590694d6126541c5 100644 (file)
@@ -124,7 +124,7 @@ int TimbuktuClientDetector::validate(AppIdDiscoveryArgs& args)
             }
             fd->pos++;
             break;
-        /* cheeck any 2 bytes fisrt */
+        /* check any 2 bytes first */
         case TIMBUKTU_STATE_ANY_MESSAGE_LEN:
             fd->pos++;
             if (fd->pos >= MAX_ANY_SIZE)
index 4bba2e2792885c232791721787cd54f9f6b4e67a..717663b4d30d11356933601ca7f04f5f3b63cd7e 100644 (file)
@@ -676,7 +676,7 @@ inprocess:
         add_app(args.asd, APP_ID_NONE, APP_ID_DNS, nullptr);
         service_inprocess(args.asd, args.pkt, args.dir);
         // FIXIT - incrementing stat early so its counted in case of blocks... not great solution
-        //         refer to this PR for more details on the issue and possible soluitons:
+        //         refer to this PR for more details on the issue and possible solutions:
         // https://bitbucket-eng-rtp1.cisco.com/bitbucket/projects/SNORT/repos/snort3/pull-requests/779/overview
         appid_stats.dns_udp_flows++;
         return APPID_INPROCESS;
index 5a988e46c9511342e90578fa9ef14c2e4a162c70..20a486684e7aab67a8a7f390f2c5355f50e2b7d8 100644 (file)
@@ -291,7 +291,7 @@ static int service_analyze_payload(lua_State* L)
 // FIXIT-M - the comments and code below for service_get_service_id don't appear to be useful
 //           the ud->server.service_id field is set to APP_ID_UNKNOWN at init time and never updated
 //           is this function ever used?
-/**design: dont store service_id in detector structure since a single detector
+/**design: don't store service_id in detector structure since a single detector
  * can get service_id for multiple protocols. For example SIP which gets Id for RTP and
  * SIP services.
  */
@@ -544,8 +544,8 @@ static int detector_get_packet_size(lua_State* L)
     return 1;
 }
 
-/**Get packet direction. A flow/session maintains initiater and responder sides. A packet direction
- * is determined wrt to the original initiater.
+/**Get packet direction. A flow/session maintains initiator and responder sides. A packet direction
+ * is determined wrt to the original initiator.
  *
  * @param Lua_State* - Lua state variable.
  * @param detector/stack - detector object
@@ -638,7 +638,7 @@ static int detector_get_pcre_groups(lua_State* L)
  * @param Lua_State* - Lua state variable.
  * @param detector/stack - detector object
  * @param pattern/stack - pattern to be matched.
- * @param patternLenght/stack - length of pattern
+ * @param patternLength/stack - length of pattern
  * @param offset/stack - offset into packet payload where matching should start.
  *
  * @return int - Number of group matches.  May be 1 if successful, and 0 if error is encountered.
@@ -687,7 +687,7 @@ static int detector_get_protocol_type(lua_State* L)
  * @param Lua_State* - Lua state variable.
  * @param detector/stack - detector object
  * @return int - Number of elements on stack, which is 1 if successful, 0 otherwise.
- * @return IPv4/stack - Source IPv4 addresss.
+ * @return IPv4/stack - Source IPv4 address.
  */
 static int detector_get_packet_src_addr(lua_State* L)
 {
@@ -705,7 +705,7 @@ static int detector_get_packet_src_addr(lua_State* L)
  * @param Lua_State* - Lua state variable.
  * @param detector/stack - detector object
  * @return int - Number of elements on stack, which is 1 if successful, 0 otherwise.
- * @return IPv4/stack - destination IPv4 addresss.
+ * @return IPv4/stack - destination IPv4 address.
  */
 static int detector_get_packet_dst_addr(lua_State* L)
 {
@@ -783,7 +783,7 @@ static int client_register_pattern(lua_State* L)
       give a local callback function, which will do demuxing and
       then call lua callback function. */
 
-    /*mpse library does not hold reference to pattern therefore we dont need to allocate it. */
+    /*mpse library does not hold reference to pattern therefore we don't need to allocate it. */
 
     if ( protocol == IpProtocol::TCP)
         ClientDiscovery::get_instance().register_tcp_pattern(ud, (const uint8_t*)pattern,
@@ -965,7 +965,7 @@ static int detector_add_http_pattern(lua_State* L)
     pattern->pattern_size  = (int)pattern_size;
     pattern->appId         = appId;
 
-    // for apps that should not show up in 4.10 and ealier, we cannot include an entry in
+    // for apps that should not show up in 4.10 and earlier, we cannot include an entry in
     // the legacy client app or payload tables. We will use the appId instead. This is only for
     // user-agents that ID clients. if you want a user-agent to ID a payload, include it in the
     // payload database. If you want a host pattern ID, use the other API.
@@ -1806,7 +1806,7 @@ static int detector_add_rtmp_url(lua_State* L)
     return 0;
 }
 
-/*Lua should inject patterns in <clienAppId, clientVersion, multi-Pattern> format. */
+/*Lua should inject patterns in <clientAppId, clientVersion, multi-Pattern> format. */
 static int detector_add_sip_user_agent(lua_State* L)
 {
     int index = 1;
@@ -1976,7 +1976,7 @@ static int add_url_pattern(lua_State* L)
     assert(!(*UserData<LuaDetector>::check(L, DETECTOR, index))->validate_params.pkt);
 
     uint32_t service_app_id = lua_tointeger(L, ++index);
-    uint32_t clienAppId   = lua_tointeger(L, ++index);
+    uint32_t clientAppId   = lua_tointeger(L, ++index);
     uint32_t payload_app_id = lua_tointeger(L, ++index);
 
     /* Verify that host pattern is a valid string */
@@ -2019,7 +2019,7 @@ static int add_url_pattern(lua_State* L)
     DetectorAppUrlPattern* pattern =
         (DetectorAppUrlPattern*)snort_calloc(sizeof(DetectorAppUrlPattern));
     pattern->userData.service_id        = service_app_id;
-    pattern->userData.client_app        = clienAppId;
+    pattern->userData.client_app        = clientAppId;
     pattern->userData.payload           = payload_app_id;
     pattern->userData.appId             = APP_ID_NONE;
     pattern->userData.query.pattern     = nullptr;
@@ -2034,7 +2034,7 @@ static int add_url_pattern(lua_State* L)
 
     AppInfoManager& app_info_manager = AppInfoManager::get_instance();
     app_info_manager.set_app_info_active(service_app_id);
-    app_info_manager.set_app_info_active(clienAppId);
+    app_info_manager.set_app_info_active(clientAppId);
     app_info_manager.set_app_info_active(payload_app_id);
 
     return 0;
@@ -2048,7 +2048,7 @@ static int add_url_pattern(lua_State* L)
  *                             IPPROTO_UDP/DC.ipproto.udp (17)).
  * @param port/stack - port number to register.
  * @param pattern/stack - pattern to be matched.
- * @param patternLenght/stack - length of pattern
+ * @param patternLength/stack - length of pattern
  * @param offset/stack - offset into packet payload where matching should start.
  * @param appId/stack        - App ID to use for this detector.
  * @return int - Number of elements on stack, which is always 0.
@@ -2095,7 +2095,7 @@ static int add_port_pattern_client(lua_State* L)
  *                             IPPROTO_UDP/DC.ipproto.udp (17)).
  * @param port/stack - port number to register.
  * @param pattern/stack - pattern to be matched.
- * @param patternLenght/stack - length of pattern
+ * @param patternLength/stack - length of pattern
  * @param offset/stack - offset into packet payload where matching should start.
  * @param appId/stack        - App ID to use for this detector.
  * @return int - Number of elements on stack, which is always 0.
@@ -2127,7 +2127,7 @@ static int add_port_pattern_service(lua_State* L)
     return 0;
 }
 
-/*Lua should inject patterns in <clienAppId, clientVersion, multi-Pattern> format. */
+/*Lua should inject patterns in <clientAppId, clientVersion, multi-Pattern> format. */
 static int detector_add_sip_server(lua_State* L)
 {
     int index = 1;
@@ -2364,7 +2364,7 @@ static const luaL_reg detector_methods[] =
  * If in future, one needs to free any of these buffers then one should consider
  * references to detector buffer in  ServiceDetector stored in flows and hostServices
  * data structures. Other detectors at this time create one static instance for the
- * lifetime of RNA, and therefore we have adopted the same principle for Lua Detecotors.
+ * lifetime of RNA, and therefore we have adopted the same principle for Lua Detectors.
  */
 static int Detector_gc(lua_State*)
 {
@@ -2449,7 +2449,7 @@ int LuaDetector::lua_validate(AppIdDiscoveryArgs& args)
     {
         // Runtime Lua errors are suppressed in production code since detectors are written for
         // efficiency and with defensive minimum checks. Errors are dealt as exceptions
-        // that dont impact processing by other detectors or future packets by the same detector.
+        // that don't impact processing by other detectors or future packets by the same detector.
         ErrorMessage("lua detector %s: error validating %s\n",
             package_info.name.c_str(), lua_tostring(my_lua_state, -1));
         validate_params.pkt = nullptr;
index 4223111fc94b02b98665a8606ec49e23c6c52b54..286c1fc8a8fe56b33b8bd80ed1ebe02f560f9457 100644 (file)
@@ -221,7 +221,7 @@ static inline void set_lua_tracker_size(lua_State* L, uint32_t numTrackers)
     }
     else
     {
-        DebugMessage(DEBUG_LOG, "hostServiceTrackerModule.setHosServiceTrackerSize not found");
+        DebugMessage(DEBUG_LOG, "hostServiceTrackerModule.setHostServiceTrackerSize not found");
     }
 
     lua_pop(L, 1);
index 29312ead1c7999a8359d6a4db077be6ec0ea94f5..e4bd1abce6e06b0ec31ba59ccb39a9a1977c40b4 100644 (file)
@@ -239,7 +239,7 @@ static int pattern_match(void* id, void*, int match_end_pos, void* data, void*)
  * returned. The list itself is saved in ServiceDiscoveryState. If
  * appId is already identified, then use it instead of searching again. RNA will capability
  * to try out other inferior matches. If appId is unknown i.e. searched and not found by FRE then
- * dont do any pattern match. This is a way degrades RNA detector selection if FRE is running on
+ * don't do any pattern match. This is a way degrades RNA detector selection if FRE is running on
  * this sensor.
 */
 void ServiceDiscovery::match_services_by_pattern(AppIdSession* asd, const Packet* pkt, IpProtocol
@@ -577,7 +577,7 @@ bool ServiceDiscovery::do_service_discovery(AppIdSession& asd, Packet* p, int di
             if (asd.tp_app_id > APP_ID_NONE)
             {
                 //tp has positively identified appId, Dig deeper only if sourcefire
-                // detector identifies additional information or flow is UDP reveresed.
+                // detector identifies additional information or flow is UDP reversed.
                 AppInfoTableEntry* entry = asd.app_info_mgr->get_app_info_entry(asd.tp_app_id);
                 if ( entry && entry->service_detector &&
                     ( ( entry->flags & APPINFO_FLAG_SERVICE_ADDITIONAL ) ||
index 9053c6c03fd0ddc94931685720cbc7df8370f21e..55dc79ffd9f22e096d2524cd32819e062aecbb8b 100644 (file)
@@ -841,7 +841,7 @@ int FtpServiceDetector::validate(AppIdDiscoveryArgs& args)
 
     //ignore packets while encryption is on in explicit mode. In future, this will be changed
     //to direct traffic to SSL detector to extract payload from certs. This will require
-    // manintaining
+    // maintaining
     //two detector states at the same time.
     if (asd->get_session_flags(APPID_SESSION_ENCRYPTED))
     {
@@ -928,18 +928,18 @@ int FtpServiceDetector::validate(AppIdDiscoveryArgs& args)
             case 225: /* data connection open */
             case 226: /* Transfer complete */
             case 227: /*entering passive mode */
-            case 230: /*user loggined */
+            case 230: /*user logged in */
             case 250: /* CWD command successful */
             case 257: /* PATHNAME created */
             case 331: /* login ok need password */
             case 332: /*new account for login */
-            case 350: /*requested file action pending futher information */
+            case 350: /*requested file action pending further information */
             case 450: /*requested file action not taken */
             case 451: /*requested file action aborted */
             case 452: /*requested file action not taken not enough space */
             case 500: /*syntax error */
-            case 501: /*not recognozed */
-            case 502: /*not recognozed */
+            case 501: /*not recognized */
+            case 502: /*not recognized */
             case 503: /*bad sequence of commands */
             case 504: /*command not implemented */
             case 530: /*login incorrect */
index e4a7ed885fd0035bffa431cff2c5f4db444b3ecc..9ca5048c956e622e1af9467e8714b1aeccee6276 100644 (file)
@@ -340,7 +340,7 @@ int MdnsServiceDetector::analyze_user(AppIdSession* asd, const Packet* pkt, uint
                     {
                         user_name_len = user_original - srv_original - start_index;
                         user_name_bkp = (char*)(srv_original + start_index);
-                        /* Non-Printable characters in the begining */
+                        /* Non-Printable characters in the beginning */
 
                         while (user_index < user_name_len)
                         {
index f9b5892571d02d8d06953bc2d4c2b580f67525da..010710979d316bae8741cda65956b29b7efb536a 100644 (file)
@@ -399,7 +399,7 @@ static int parse_rtmp_message(const uint8_t** data_inout, uint16_t* size_inout,
         }
         else
         {
-            /* Something we dont care about... */
+            /* Something we don't care about... */
             ADVANCE_DATA(field_len);
             if (!skip_property_value(&data, &size))
                 goto parse_rtmp_message_fail;
index 0aa105f8e34250e7cd3f5b0cb243cd2d18ca6c24..cd77110325cb4fc5da17883be681bca1ef248d59 100644 (file)
@@ -119,11 +119,11 @@ private:
     unsigned detract_count = 0;
     SfIp last_detract;
 
-    // consecutive incompatible flows - incompatibile means client packet did not match.
+    // consecutive incompatible flows - incompatible means client packet did not match.
     unsigned invalid_client_count = 0;
 
     /**IP address of client in last flow that was declared incompatible. If client IP address is
-     * different everytime, then consecutive incompatible status indicate that flow is not using
+     * different every time, then consecutive incompatible status indicate that flow is not using
      * specific service.
      */
     SfIp last_invalid_client;
index 286474c43ea2eb4d36b4a02678b0fa38e3ff902b..828855e84d9f42bf28c94db6c4667eab9e009ef7 100644 (file)
@@ -33,7 +33,7 @@
  * arpspoof: -unicast
  *
  * WARNING: this can generate false positives as Linux systems send unicast
- * ARP requests repetatively for entries in their cache.
+ * ARP requests repetitively for entries in their cache.
  *
  * This plugin also takes a list of IP addresses and MAC address in the form:
  * arpspoof_detect_host: 10.10.10.10 29:a2:9a:29:a2:9a
index 465c44e17fd320292843836211403f4b813d9dfe..2f0d4358e091ccceb1f9f933eafa73f8564a172e 100644 (file)
@@ -72,7 +72,7 @@ const PegInfo norm_names[] =
     { "icmp6_echo", "icmp6 echo normalizations" },
     { "tcp_syn_options", "SYN only options cleared from non-SYN packets" },
     { "tcp_options", "packets with options cleared" },
-    { "tcp_paddding", "packets with padding cleared" },
+    { "tcp_padding", "packets with padding cleared" },
     { "tcp_reserved", "packets with reserved bits cleared" },
     { "tcp_nonce", "packets with nonce bit cleared" },
     { "tcp_urgent_ptr", "packets without data with urgent pointer cleared" },
@@ -338,7 +338,7 @@ static int Norm_ICMP6(
 
 //-----------------------------------------------------------------------
 // we assume here that the decoder has not pushed ip6 option extension
-// headers unless the basic sizing is correct (size = N*8 octetes, N>0).
+// headers unless the basic sizing is correct (size = N*8 octets, N>0).
 
 struct ExtOpt
 {
index dc264e5a3e276b12a8376721358684eeadcce7fe..ff981f2bcfe9ffd2fc699eb6de2b16d36024a845 100644 (file)
@@ -16,7 +16,7 @@
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-// packet_cpture.cc author Carter Waxman <cwaxman@cisco.com>
+// packet_capture.cc author Carter Waxman <cwaxman@cisco.com>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 67b41bd7f4a708ce2f842e68aaaac3d29bde86b1..12713fc6587910646e1c8c67234cc0d1e799bdf2 100644 (file)
 
 //
 // This class defines the data gathering layer of perfmon. PerfMonitor will
-// create an instance of each configued class for each packet processing
+// create an instance of each configured class for each packet processing
 // thread. Subclasses of PerfTrackers should implement or call the following
 // methods, leaving the others for internal use by PerfMonitor:
 //
 // reset() - perform initialization after the output handle has been opened.
 //
-// update(Packet*) - update statistics basied on the current packet.
+// update(Packet*) - update statistics based on the current packet.
 //
 // process(bool) - summarize data and report. This is called after the
 // reporting thresholds have been reached.
index 78c8e916019dfde2a61cf8666b556493ace83042..22af1f572ca607216b7c5befdda943471d250072 100644 (file)
@@ -48,7 +48,7 @@
    These can all be handled via the CIDR block notation : IP/MaskBits
 
    We use collections (lists) of cidr blocks to represent address blocks
-   and indivdual addresses.
+   and individual addresses.
 
    For a single IPAddress the implied Mask is 32 bits,or 255.255.255.255, or 0xffffffff, or -1.
 
index b99873b79e613579151059d1ff2bf44b28688be9..46467eeb8a858fac6523cfae94f0450d6c2e0b25 100644 (file)
@@ -68,7 +68,7 @@ struct IPSET
    These can all be handled via the CIDR block notation : IP/MaskBits
 
    We use collections (lists) of cidr blocks to represent address blocks
-   and indivdual addresses.
+   and individual addresses.
 
    For a single IPAddress the implied Mask is 32 bits,or
    255.255.255.255, or 0xffffffff, or -1.
index 52fb246a6e55cbfa450a5df32c3390d78f843182..949d2dc3fe642ab571784df97f021489e8b17af7 100644 (file)
@@ -398,7 +398,7 @@ static int MakePortscanPkt(PS_PKT* ps_pkt, PS_PROTO* proto, int proto_type,
     */
     PacketManager::encode_update(g_tmp_pkt);
 
-    // FIXIT-L IP4 is gauranteed to have been set in update().  Is IP6() also gauranteed?
+    // FIXIT-L IP4 is guaranteed to have been set in update().  Is IP6() also guaranteed?
     if (g_tmp_pkt->ptrs.ip_api.is_ip6())
         ((ip::IP6Hdr*)g_tmp_pkt->ptrs.ip_api.get_ip6h())->set_len((uint16_t)ip_size);
 
@@ -911,7 +911,7 @@ void PortScan::eval(Packet* p)
     memset(&ps_pkt, 0x00, sizeof(PS_PKT)); // FIXIT-P don't zap unless necessary
     ps_pkt.pkt = (void*)p;
 
-    /* See if there is already an exisiting node in the hash table */
+    /* See if there is already an existing node in the hash table */
     ps_detect(&ps_pkt);
 
     if (ps_pkt.scanner && ps_pkt.scanner->proto.alerts &&
index 7ce61660fb8f70bc54574eae92cbfc4abb91b2c5..95f0c1a921940a46643dfb0ecfb11fe0adc2d31c 100644 (file)
@@ -835,7 +835,7 @@ int PortScan::ps_tracker_update_tcp(PS_PKT* ps_pkt, PS_TRACKER* scanner,
             }
         }
         /*
-        **  We only get here on the server's response to the intial
+        **  We only get here on the server's response to the initial
         **  client connection.
         **
         **  That's why we use the sp, because that's the port that is
@@ -1070,7 +1070,7 @@ int PortScan::ps_tracker_update_icmp(
 **    ps_tracker_update::
 */
 /**
-**  At this point, we should only be looking at tranport protocols
+**  At this point, we should only be looking at transport protocols
 **  that we want to.  For instance, if we aren't doing UDP portscans
 **  then we won't see UDP packets here because they were ignored.
 **
index 7817099dfbb0401db76ac246b9a8b8b3762113ec..41a7750831525aff9c2af6611c6a64c78a5fbf06 100644 (file)
@@ -544,7 +544,8 @@ int SFDAQInstance::modify_flow_opaque(const DAQ_PktHdr_t* hdr, uint32_t opaque)
     return daq_modify_flow(daq_mod, daq_hand, hdr, &mod);
 }
 
-// FIXIT-L X Add Snort flag defitions for callers to use and translate/pass them through to the DAQ module
+// FIXIT-L X Add Snort flag definitions for callers to use and translate/pass them through to
+// the DAQ module
 int SFDAQInstance::add_expected(const Packet* ctrlPkt, const SfIp* cliIP, uint16_t cliPort,
         const SfIp* srvIP, uint16_t srvPort, IpProtocol protocol, unsigned timeout_ms, unsigned /* flags */)
 {
index a74684da39e1e799c16bb3341147c3adc865a8ab..93757fdaf3ab0630f57b9695a85c37a80be6345d 100644 (file)
@@ -32,7 +32,7 @@ public:
     {
         SOURCE_FILE_LIST,  // a file containing a list of sources
         SOURCE_LIST,       // a list of sources (eg from cmd line)
-        SOURCE_DIR         // a directory of sources; often used wiht filter
+        SOURCE_DIR         // a directory of sources; often used with filter
     };
 
     static void set_loop_count(long int c)
index cd323f53e03fb23209cb0996cd67e1b582c48468..acbef172357db3f525e2f2d9d69d1ccf4322ed5f 100644 (file)
@@ -189,7 +189,7 @@ void SetSnortConfDir(const char* file)
     {
         const char* path_sep = strrchr(file, '/');
 
-        /* is there a directory seperator in the filename */
+        /* is there a directory separator in the filename */
         if (path_sep != NULL)
         {
             path_sep++;  /* include path separator */
index 0836882b782184aec67fe460abacede05004a202..1be111f9135189325d1df0a9cbbebb913fad50b3 100644 (file)
@@ -38,7 +38,7 @@ static char* mSplitAddTok(const char*, const int, const char*, const char);
  *  char *
  *      The string to be split
  *  char *
- *      A string of token seperaters
+ *      A string of token separators
  *  int
  *      The maximum number of tokens to be returned. A value
  *      of 0 means to get them all.
@@ -46,7 +46,7 @@ static char* mSplitAddTok(const char*, const int, const char*, const char);
  *      Place to store the number of tokens returned
  *  char
  *      The "escape metacharacter", treat the character after
- *      this character as a literal and "escape" a seperator.
+ *      this character as a literal and "escape" a separator.
  *
  *  Note if max_toks is reached, the last tok in the returned
  *  token array will possibly have separator characters in it.
@@ -287,7 +287,7 @@ char** mSplit(const char* str, const char* sep_chars, const int max_toks,
     }
 
     /* Last character was not a separator character so we've got
-     * one more tok.  Unescape escaped sepatator charactors */
+     * one more tok.  Unescape escaped separator characters */
     if (toks != toks_alloc)
     {
         retstr = (char**)snort_calloc(cur_tok + 1, sizeof(char*));
index ea6fcc47f371679e133650e23aebf2c2f7cd2da8..b136942c293b924ca287ee53b9a748d753f6a2c7 100644 (file)
@@ -596,9 +596,7 @@ const char* PortObjectParseError(POParser* pop)
     {
     case POPERR_NO_NAME:            return "no name";
     case POPERR_NO_ENDLIST_BRACKET: return "no end of list bracket."
-               " Elements must be comma seperated,"
-               " and no spaces may appear between"
-               " brackets.";
+        " Elements must be comma separated, and no spaces may appear between brackets.";
     case POPERR_NOT_A_NUMBER:       return "not a number";
     case POPERR_EXTRA_BRACKET:      return "extra list bracket";
     case POPERR_NO_DATA:            return "no data";
index 39244e9a03144c2ae73018c7356d06ca153560e4..0934b3e92e417221ddefa4a3771af023956f1d8f 100644 (file)
@@ -537,7 +537,7 @@ static PortObject* ParsePortListTcpUdpPort(
         {
             DebugFormat(DEBUG_PORTLISTS,
                 "parser.c: already have '%s' as a PortObject - "
-                "calling PortObjectFree(portbject) line=%d\n",port_str,__LINE__);
+                "calling PortObjectFree(portobject) line=%d\n",port_str,__LINE__);
             PortObjectFree(portobject);
             portobject = pox;
         }
@@ -599,7 +599,7 @@ static int ParsePortList(
     DebugFormat(DEBUG_PORTLISTS,"Rule-PortVar Parsed: %s \n",port_str);
 
     /* !ports - port lists can be mixed 80:90,!82,
-    * so the old NOT flag is depracated for port lists
+    * so the old NOT flag is deprecated for port lists
     */
 
     /* set up any any flags */
@@ -1220,9 +1220,9 @@ const char* parse_rule_close(SnortConfig* sc, RuleTreeNode& rtn, OptTreeNode* ot
         }
     }
 
-    /* The IPs in the test node get free'd in ProcessHeadNode if there is
-     * already a matching RTN.  The portobjects will get free'd when the
-     * port var table is free'd */
+    /* The IPs in the test node get freed in ProcessHeadNode if there is
+     * already a matching RTN.  The portobjects will get freed when the
+     * port var table is freed */
     RuleTreeNode* new_rtn = ProcessHeadNode(sc, &rtn, rtn.listhead);
 
     addRtnToOtn(otn, new_rtn);
@@ -1237,7 +1237,7 @@ const char* parse_rule_close(SnortConfig* sc, RuleTreeNode& rtn, OptTreeNode* ot
         if ( mergeDuplicateOtn(sc, otn_dup, otn, new_rtn) )
         {
             /* We are keeping the old/dup OTN and trashing the new one
-             * we just created - it's free'd in the remove dup function */
+             * we just created - it's freed in the remove dup function */
             return nullptr;
         }
     }
index 3020190203c3e0576622f9506356c00f2f2391c9..133184bfeb215af04a4d187f60169f7c59af9e3b 100644 (file)
@@ -112,7 +112,7 @@ static void FreeRuleTreeNodes(SnortConfig* sc)
         otn = (OptTreeNode*)hashNode->data;
 
         /* Autogenerated OTNs along with their respective pseudo RTN
-         * will get cleaned up when the OTN is free'd */
+         * will get cleaned up when the OTN is freed */
         if (otn->generated)
             continue;
 
@@ -674,7 +674,7 @@ void PrintRuleOrder(RuleListNode* rule_lists)
  *
  * Function: OrderRuleLists
  *
- * Purpose: Orders the rule lists into the specefied order.
+ * Purpose: Orders the rule lists into the specified order.
  *
  * Returns: void function
  *
index d316ae599e45a888ad1aa04adac45c5632e33021..fd1124ed7fdd665ec76bbb98504328a490c9e683 100644 (file)
@@ -351,7 +351,7 @@ int VarIsIpList(vartable_t* ip_vartable, const char* value)
  *
  * Purpose: ParseErrors if the a variable name is redefined across variable
  *          types.  Enforcing this mutual exclusion prevents the
- *          catatrophe where the variable lookup fall-through (see VarSearch)
+ *          catastrophe where the variable lookup fall-through (see VarSearch)
  *          finds an unintended variable from the wrong table.  Note:  VarSearch
  *          is only necessary for ExpandVars.
  *
@@ -477,7 +477,7 @@ VarEntry* VarDefine(
 
         /* Verify a variable by this name is not already used as either a
          * portvar or regular var.  Enforcing this mutual exclusion prevents the
-         * catatrophe where the variable lookup fall-through (see VarSearch)
+         * catastrophe where the variable lookup fall-through (see VarSearch)
          * finds an unintended variable from the wrong table.  Note:  VarSearch
          * is only necessary for ExpandVars. */
         DisallowCrossTableDuplicateVars(sc, name, VAR_TYPE__IPVAR);
@@ -698,7 +698,7 @@ const char* VarGet(SnortConfig*, const char* name)
     sfip_var_t* var;
 
 // XXX-IPv6 This function should never be used if IP6 support is enabled!
-// Infact it won't presently even work for IP variables since the raw ASCII
+// In fact it won't presently even work for IP variables since the raw ASCII
 // value is never stored, and is never meant to be used.
 
     if ((var = sfvt_lookup_var(ip_vartable, name)) == NULL)
@@ -885,7 +885,7 @@ const char* ExpandVars(SnortConfig* sc, const char* string)
 
 void AddVarToTable(SnortConfig* sc, const char* name, const char* value)
 {
-    //TODO: snort.cfg and rules should use PortVar instead ...this allows compatability for now.
+    //TODO: snort.cfg and rules should use PortVar instead ...this allows compatibility for now.
     if (strstr(name, "_PORT") || strstr(name, "PORT_"))
     {
         DebugMessage(DEBUG_CONFIGRULES,"PortVar\n");
index ff5cbcdd5fd6adca2e4b9c519ebfbf9143ffa02c..bb476409fb7636eb3505212e69601ced8a98727c 100644 (file)
@@ -171,7 +171,7 @@ static const luaL_Reg methods[] =
         {
             Lua::Args args(L);
 
-            // FIXIT-M this hacky arg offset stuff is for backwards compatibilty
+            // FIXIT-M this hacky arg offset stuff is for backwards compatibility
             // it will be removed in later updates
 
             int off = 0;
index 6dbf58673bee42f63cc5c6dbe42d3a2c40fbba22..84539c2ceb3d07d11fa26b8975d645c2a692f873 100644 (file)
@@ -27,7 +27,7 @@
 
 // FIXIT-H a lot of users keep references to this data.  Need to prevent
 // Lua's garbage collection from destroying RawBuffer while other C++ types
-// are using the data (unbeknowest to Lua).  Add a container data type
+// are using the data (unbeknownst to Lua).  Add a container data type
 // which hold ref counts to RawBuffer and only frees when the ref count is
 // zero.
 
index d403f9d34d5df48ce788f3a3a7b7a11a862f8b3a..4e49da581d0e13808cda492dcc4a21544f14d223 100644 (file)
@@ -207,7 +207,7 @@ static unsigned PortObject_hash(SFHASHFCN* p, unsigned char* d, int)
  *  1) check if it's in the plx table-mhashx, this uses the list of
  *  addresses of the Input PortObjects as it's key, not the ports.
  *  This is quick and does not require assembling/merging the port
- *  objects intoa PortObject2 1st.
+ *  objects into a PortObject2 1st.
  *  2) if found were done, otherwise
  *  3) make a merged PortObject2
  *  4) Try adding the PortObject2 to it's table - mhash
@@ -219,7 +219,7 @@ static unsigned PortObject_hash(SFHASHFCN* p, unsigned char* d, int)
  *  5) Create a plx object
  *  6) Add the plx object to the plx Table
  *      1) if it's already in the object - fail this contradicts 1)
- *  7) return the create PortObject2, or the one retrived from the
+ *  7) return the create PortObject2, or the one retrieved from the
  *     PortObject table.
  *
  * pol    - list of input PortObject pointers
@@ -984,7 +984,7 @@ void PortTablePrintInput(PortTable* p)
 
 /*
    Prints the original (normalized) PortGroups and
-   as sepcified by the user
+   as specified by the user
 */
 void PortTablePrintUserRules(PortTable* p)
 {
index b4340d41e94adb0c63e093c03114caccf1ea4003..ce89e7cc8730c43f5a3dc186a103799cfec8a683 100644 (file)
@@ -28,7 +28,7 @@ namespace icmp
 constexpr uint32_t ICMP_BASE_LEN = 4;
 constexpr uint8_t ICMP_UNREACH_DATA_LEN = 8;
 
-// do NOT add 'ICMP_' to the begining of these const because they
+// do NOT add 'ICMP_' to the beginning of these const because they
 // will overlap with dnet macros
 
 //enum class IcmpType : std::uint8_t {
@@ -73,7 +73,7 @@ enum IcmpCode : std::uint8_t
     PREC_VIOLATION = 14,
     PREC_CUTOFF = 15,
 
-    /* Code for ICMP Source Quence (4) */
+    /* Code for ICMP Source Quench (4) */
     SOURCE_QUENCH_CODE = 0,
 
     /* Codes for an ICMP Redirect (5) */
@@ -85,7 +85,7 @@ enum IcmpCode : std::uint8_t
     /* Codes for ICMP Echo (8) */
     ECHO_CODE = 0,
 
-    /* Codes for ICMP time excceeded (11) */
+    /* Codes for ICMP time exceeded (11) */
     TIMEOUT_TRANSIT = 0,
     TIMEOUT_REASSY = 1,
 
index 988c5e1acf208aad789014a02fc50b1b34fb0464..03e6d90316f5d6336104b054a58f5a3a4ebb8020 100644 (file)
@@ -39,7 +39,7 @@ constexpr uint8_t IP4_MULTICAST = 0x0E;  // ms nibble
 constexpr uint8_t IP4_RESERVED = 0x0F;  // ms nibble
 constexpr uint8_t IP4_LOOPBACK = 0x7F;  // msb
 
-// This must be a standard layour struct!
+// This must be a standard layer struct!
 struct IP4Hdr
 {
     uint8_t ip_verhl;      /* version & header length */
index 2e37797b300f71722236277b04380b9b53925e5c..15cc0057c96ae4e636555cda9bc0a28b2bb3af99 100644 (file)
@@ -76,8 +76,8 @@ struct IpOptions
 };
 
 /*
- * relly creative name ... right
- * Use IpOptionIter ... this is the placehold
+ * really creative name ... right
+ * Use IpOptionIter ... this is the placeholder
  */
 class SO_PUBLIC IpOptionIteratorIter
 {
@@ -90,7 +90,7 @@ public:
     bool operator!=(const IpOptionIteratorIter& rhs)
     { return opt != rhs.opt; }
 
-    // I'd suggest just using IpOptionIterator and completley ignoring this
+    // I'd suggest just using IpOptionIterator and completely ignoring this
     // horror of a ++ operation.
     IpOptionIteratorIter& operator++()
     {
@@ -105,7 +105,7 @@ private:
 };
 
 /*
- * relly creative name ... right
+ * really creative name ... right
  * Use IP ranged for loop rather than calling this directly.
  * i.e.,
  *      IpOptionIter iter(ip4h, p)
@@ -126,7 +126,7 @@ public:
     /* If you already know the validated option length (for instance,
      * if you are in a decode() method), then call this constructor.
      * You MUST validate the a;; ip_options within len before
-     * using this constuctor*/
+     * using this constructor*/
     IpOptionIterator(const IP4Hdr* const, const uint8_t valid_hdr_len);
     IpOptionIteratorIter begin() const;
     IpOptionIteratorIter end() const;
index 451e29f4f978840c2d31214fd573e3813804a9cf..93b98b4e310b867487be51edd05ba1f86daf41db 100644 (file)
@@ -88,7 +88,7 @@ struct IP6Hdr
     inline uint32_t flow() const
     { return (uint16_t)((ntohl(ip6_vtf) & 0x000FFFFF) >> 20); }
 
-    // becaise Snort expects this in terms of 32 bit words.
+    // because Snort expects this in terms of 32 bit words.
     inline uint8_t hlen() const
     { return IP6_HEADER_LEN; }
 
@@ -223,7 +223,7 @@ struct IP6Frag
     { return ip6f_ident; }
 };
 
-// Reflects the recomended IPv6 order in RFC 2460 4.1
+// Reflects the recommended IPv6 order in RFC 2460 4.1
 constexpr int IPV6_ORDER_MAX = 7;
 inline int IPV6IdExtensionOrder(const ProtocolId prot_id)
 {
index 9349ef962a94ee4913f10afc0dfd8dfbf369da6e..d463f75506339bbb8210c74e4b0acb5fad7fe9aa 100644 (file)
@@ -220,7 +220,7 @@ const udp::UDPHdr* get_outer_udp_lyr(const Packet* const p)
 
 const uint8_t* get_root_layer(const Packet* const p)
 {
-    // since token ring is the grinder, its the begining of the packet.
+    // since token ring is the grinder, its the beginning of the packet.
     if (p->num_layers > 0)
         return p->layers[0].start;
     return nullptr;
index 34691fcb432ef2533be040032764f02de1aa802b..d25543484c2940ebf70a3f7b30dba95306c0f077 100644 (file)
@@ -30,7 +30,7 @@ struct Layer
     uint16_t length;
 };
 
-// forward declaring relevent structs. Since we're only return a pointer,
+// forward declaring relevant structs. Since we're only return a pointer,
 // there is no need for the actual header files
 
 namespace vlan
@@ -140,7 +140,7 @@ SO_PUBLIC const icmp::ICMPHdr* get_icmp_embed_icmp(const ip::IpApi&);
  *                              layer refer to packet get_next_ip_proto()
  *                              for more information.
  *          int8_t curr_layer = the current, zero based layer from which to
- *                              start searching inward. After the function returs,
+ *                              start searching inward. After the function returns,
  *                              This field will be set to the layer before
  *                              the Ip Api.  If no IP layer is found,
  *                              it will be set to -1.
@@ -151,7 +151,7 @@ SO_PUBLIC const icmp::ICMPHdr* get_icmp_embed_icmp(const ip::IpApi&);
  *          false: if the api has NOT been set
  *
  * NOTE: curr_layer is zero based.  That means to get all of the ip
- *       layers (starting from teh innermost layer), during the first call
+ *       layers (starting from the innermost layer), during the first call
  *       'curr_layer == p->num_layers'.
  *
  * NOTE: This functions is extremely useful in a loop
index 91868434b6038633d896d79e50c5b6b29b7eb2af..b9f83782025bddd6b4dcff15d07835d9c3cb3599 100644 (file)
@@ -44,7 +44,7 @@
 #define PKT_PDU_TAIL         0x00000200  /* end of PDU */
 #define PKT_HTTP_DECODE      0x00000400  /* this packet has normalized http */
 
-#define PKT_ALLOW_MULTIPLE_DETECT 0x00000800  /* packet has either pipelined mime attachements
+#define PKT_ALLOW_MULTIPLE_DETECT 0x00000800  /* packet has either pipelined mime attachments
                                                  or pipeline http requests */
 #define PKT_PAYLOAD_OBFUSCATE     0x00001000
 
index 84e0d4e596b85a1bc7b983b9d70fe4080652c2d8..790646803752058f62d3aa3890955d87dcb3ca1a 100644 (file)
@@ -733,7 +733,7 @@ int PacketManager::encode_format(
     pkth->pktlen = len;
     pkth->ts = p->pkth->ts;
 
-    layer::set_packet_pointer(c);  // set layer pointer to ensure lookin at the new packet
+    layer::set_packet_pointer(c);  // set layer pointer to ensure looking at the new packet
     total_rebuilt_pkts++;  // update local counter
     return 0;
 }
index e40f23510fe057044f6021a44bc4765dc28592a3..31088cd020696cbf46f2ffdaf8a6d3ef97b5bc2c 100644 (file)
@@ -54,7 +54,7 @@ enum class UnreachResponse
 class SO_PUBLIC PacketManager
 {
 public:
-    // decode this packet and set all relevent packet fields.
+    // decode this packet and set all relevant packet fields.
     static void decode(Packet*, const struct _daq_pkthdr*, const uint8_t*, bool cooked = false);
 
     // when encoding, rather than copy the destination MAC address from the
@@ -129,7 +129,7 @@ public:
     /* Accessor functions -- any object in Snort++ can now convert a
      * protocol to its mapped value.
      *
-     * The equivelant of Snort's PROTO_ID */
+     * The equivalent of Snort's PROTO_ID */
     static constexpr std::size_t max_protocols() // compile time constant
     { return CodecManager::s_protocols.size(); }
 
index f56d662dd235d463a7ed31dbe34f24f5e8894cac..c1e2ba072f9e34a5d0761c724e47197515a257cd 100644 (file)
@@ -120,7 +120,7 @@ enum class ProtocolId : std::uint16_t
     /*
      *  Undefined Protocols!
      */
-    FINISHED_DECODE = 0x0100,  // Indicates Codecs have succesfully decoded packet
+    FINISHED_DECODE = 0x0100,  // Indicates Codecs have successfully decoded packet
     TEREDO = 0x0101,
     GTP = 0x0102,
     IP_EMBEDDED_IN_ICMP4 = 0x0103,
index 11c013378a8813bfad08b9f48555aa0ee28347b7..b83beb7a930f19261382bb06b0c857308bc46610 100644 (file)
@@ -526,7 +526,7 @@ uint32_t SSL_decode(
                 if (pkt[9] == 3)
                 {
                     /* Saw a TLS version, but this could also be an SSHv2 length.
-                      * If it is, check if a hypothetical TLS record-data length agress
+                      * If it is, check if a hypothetical TLS record-data length agrees
                       * with its record length */
                     datalen = THREE_BYTE_LEN( (pkt+6) );
 
@@ -545,7 +545,7 @@ uint32_t SSL_decode(
         else if (size >= 8 && pkt[7] == 2)
         {
             /* A version of '2' at byte 7 overlaps with TLS record-data length.
-             * Check if a hypothetical TLS record-data length agress with its
+             * Check if a hypothetical TLS record-data length agrees with its
              * record length */
             datalen = THREE_BYTE_LEN( (pkt+6) );
 
index 71169b19c2a28b914597556923396d5c3a3672a7..f9b14b5b27f455ce8aa8fa5be0550db60be68c55 100644 (file)
@@ -45,7 +45,7 @@ TcpOptIterator::TcpOptIterator(const TCPHdr* const tcp_header, const Packet* con
     {
         if (p->layers[i].start == (const uint8_t*)tcp_header)
         {
-            // Can't use the tph_header->hlen() becuase the entire may
+            // Can't use the tph_header->hlen() because the entire may
             // be an EOF or invalid options. However, this layers length
             // has been valid by the codecs.
             end_ptr = (hdr + p->layers[i].length);
index 2f2fcd27815a3fa8c70657e82a638b978a434f35..9210c084b4a011f6139471a45832bf82e7b3ba3d 100644 (file)
@@ -83,7 +83,7 @@ const uint8_t TCPOLEN_TIMESTAMP = 10;   /* Timestamp [RFC1323], 10 bytes */
 const uint8_t TCPOLEN_PARTIAL_PERM = 2; /* Partial Order Permitted/ Experimental [RFC1693] */
 const uint8_t TCPOLEN_PARTIAL_SVC = 3;  /*  3 bytes long -- Experimental - [RFC1693] */
 
-/* atleast decode T/TCP options... */
+/* at least decode T/TCP options... */
 const uint8_t TCPOLEN_CC = 6;       /* page 17 of rfc1644 */
 const uint8_t TCPOLEN_CC_NEW = 6;   /* page 17 of rfc1644 */
 const uint8_t TCPOLEN_CC_ECHO = 6;  /* page 17 of rfc1644 */
index 0d05d0fc8cab36e32606e9a571ae38dfe43608f3..6b879d6c357997bc8ad864d7418c4ec072ef62d1 100644 (file)
@@ -38,7 +38,7 @@ struct WifiHdr
     uint8_t addr4[6];
 };
 
-/* Frame type/subype combinations with version = 0
+/* Frame type/subtype combinations with version = 0
   ** FRAME TYPE *****  HEX ****  SUBTYPE TYPE  DESCRIPT ********/
 #define WLAN_TYPE_MGMT_ASREQ   0x0      /* 0000    00  Association Req */
 #define WLAN_TYPE_MGMT_ASRES   0x10     /* 0001    00  Assocaition Res */
@@ -54,7 +54,7 @@ struct WifiHdr
 
 #define WLAN_TYPE_CONT_PS      0xa4     /* 1010    01  Power Save      */
 #define WLAN_TYPE_CONT_RTS     0xb4     /* 1011    01  Request to send */
-#define WLAN_TYPE_CONT_CTS     0xc4     /* 1100    01  Clear to sene   */
+#define WLAN_TYPE_CONT_CTS     0xc4     /* 1100    01  Clear to send   */
 #define WLAN_TYPE_CONT_ACK     0xd4     /* 1101    01  Acknowledgement */
 #define WLAN_TYPE_CONT_CFE     0xe4     /* 1110    01  Cont. Free end  */
 #define WLAN_TYPE_CONT_CFACK   0xf4     /* 1111    01  CF-End + CF-Ack */
index b202a60a3ebb08c9c710fdc5a71b18300a25d8ad..5119a3111b2d1995d7068e2c8e1749d83aceba87 100644 (file)
@@ -25,7 +25,7 @@
 **
 **   Reference - Efficient String matching: An Aid to Bibliographic Search
 **               Alfred V Aho and Margaret J Corasick
-**               Bell Labratories
+**               Bell Laboratories
 **               Copyright (C) 1975 Association for Computing Machinery,Inc
 **
 **   Implemented from the 4 algorithms in the paper by Aho & Corasick
@@ -36,7 +36,7 @@
 **     2) This algorithm finds all occurrences of all patterns within a
 **        body of text.
 **     3) Support is included to handle upper and lower case matching.
-**     4) Some comopilers optimize the search routine well, others don't, this makes all the difference.
+**     4) Some compilers optimize the search routine well, others don't, this makes all the difference.
 **     5) Aho inspects all bytes of the search text, but only once so it's very efficient,
 **        if the patterns are all large than the Modified Wu-Manbar method is often faster.
 **     6) I don't subscribe to any one method is best for all searching needs,
@@ -219,7 +219,7 @@ static void Build_NFA(ACSM_STRUCT* acsm)
                 acsm->acsmStateTable[s].FailState = next;
 
                 /*
-                 *  Copy 'next'states MatchList to 's' states MatchList,
+                 *  Copy 'next' states MatchList to 's' states MatchList,
                  *  we copy them so each list can be AC_FREE'd later,
                  *  else we could just manipulate pointers to fake the copy.
                  */
index 47f3e638ff1f14fd2069901156a9d27dbb2fb749..799d22bab065897bde944340445d9504c2a14350 100644 (file)
@@ -30,7 +30,7 @@
 **
 **   Reference - Efficient String matching: An Aid to Bibliographic Search
 **               Alfred V Aho and Margaret J Corasick
-**               Bell Labratories
+**               Bell Laboratories
 **               Copyright (C) 1975 Association for Computing Machinery,Inc
 **
 **   +++
@@ -54,7 +54,7 @@
 **   only use 1/4 of what we use to. The caching performance is better in
 **   pure benchmarking tests, but does not show overall improvement in Snort.
 **   Unfortunately, once a pattern match test has been performed Snort moves
-**   on to doing many other things before we get back to a patteren match test,
+**   on to doing many other things before we get back to a pattern match test,
 **   so the cache is voided.
 **
 **   This versions has better caching performance characteristics, reduced
@@ -89,7 +89,7 @@
 **    You can use any of the 4 storage modes above -full, sparse, banded,
 **    sparse-bands, set the structure directly.
 **    For applications where you have lots of data and a pattern set to
-**    search, this version was up to 3x faster than the previous verion, due
+**    search, this version was up to 3x faster than the previous version, due
 **    to caching performance. This cannot be fully realized in Snort yet,
 **    but other applications may have better caching opportunities.
 **    Snort only needs to use the banded or full storage.
@@ -651,7 +651,7 @@ static void Build_NFA(ACSM_STRUCT2* acsm)
                 FailState[s] = next;
 
                 /*
-                 *  Copy 'next'states MatchList to 's' states MatchList,
+                 *  Copy 'next' states MatchList to 's' states MatchList,
                  *  we copy them so each list can be AC_FREE'd later,
                  *  else we could just manipulate pointers to fake the copy.
                  */
@@ -777,7 +777,7 @@ static int Conv_List_To_Full(ACSM_STRUCT2* acsm)
 *                            1-1       fmt(0-full,1-sparse,2-banded,3-sparsebands)
 *                            2-2       bool match flag (indicates this state has pattern matches)
 *                            3-3       sparse state count ( # of input/next-state pairs )
-*                            4-3+2*cnt 'input,next-state' pairs... each sizof(acstate_t)
+*                            4-3+2*cnt 'input,next-state' pairs... each sizeof(acstate_t)
 *
 *   above example case yields:
 *     Full Format:    0, 1 7 0 0 0 3 0 0 0 0 0 0 0 0 0 0 ...
@@ -1183,7 +1183,7 @@ static inline int _acsmCompile2(ACSM_STRUCT2* acsm)
         ACSM2_MEMORY_TYPE__TRANSTABLE);
     MEMASSERT(acsm->acsmTransTable, "_acsmCompile2");
 
-    /* Alloc a MatchList table - this has a lis tof pattern matches for each state, if any */
+    /* Alloc a MatchList table - this has a lisof pattern matches for each state, if any */
     acsm->acsmMatchList =
         (ACSM_PATTERN2**)AC_MALLOC(sizeof(ACSM_PATTERN2*) * acsm->acsmMaxStates,
         ACSM2_MEMORY_TYPE__MATCHLIST);
@@ -2062,7 +2062,7 @@ int acsmPrintDetailInfo2(ACSM_STRUCT2* acsm)
 }
 
 /*
- *   Global sumary of all info and all state machines built during this run
+ *   Global summary of all info and all state machines built during this run
  *   This feeds off of the last pattern groupd built within snort,
  *   all groups use the same format, state size, etc..
  *   Combined with accrued stats, we get an average picture of things.
index 1c247feb9e1537fd47cbc594bbe430fe106bd84f..db97049c5fa9f83d27ea3b6eb6605949008c771e 100644 (file)
@@ -92,7 +92,7 @@ enum
 };
 
 /*
-*   Aho-Corasick State Machine Struct - one per group of pattterns
+*   Aho-Corasick State Machine Struct - one per group of patterns
 */
 struct ACSM_STRUCT2
 {
index d9e9ed6b0049acf4b7b3211da2c0107ed4dcf7fb..148b5555c2f766b0a2fe33ac25bb6a4cea4ae356 100644 (file)
@@ -50,7 +50,7 @@
 **   word 3+ : transition word =  input<<24 |  next-state-index
 **   input : 8 bit character, input to state machine from search text
 **   next-state-index: 24 bits for index of next state
-**     (if we reallly need 16M states, we can add a state->index lookup array)
+**     (if we really need 16M states, we can add a state->index lookup array)
 **     ...repeat for each state ...
 **
 **   * if a state is empty it has words 1 and 2, but no transition words.
@@ -82,7 +82,7 @@
 ** a binary search if there are more than 5 elements in the state to test for
 ** a match.  This allows us to use a simple sparse memory design with an
 ** acceptable worst case search scenario.  The binary search over 256 elements
-** is limtied to a max of 8 tests.  The zero'th state may use a full 256 state
+** is limited to a max of 8 tests.  The zero'th state may use a full 256 state
 ** array, so a quick index lookup provides the next state transition.  The
 ** zero'th state is generally visited much more than other states.
 **
@@ -99,7 +99,7 @@
 ** instruction pipelining.  Aren't we all.  To this end, the number of
 ** patterns, length of search text, and cpu cache L1,L2,L3 all affect
 ** performance. The relative performance of the sparse and full format NFA and
-** DFA varies as you vary the pattern charactersitics,and search text length,
+** DFA varies as you vary the pattern characteristics, and search text length,
 ** but strong performance trends are present and stable.
 **
 **
 **
 ** Reference - Efficient String matching: An Aid to Bibliographic Search
 **             Alfred V Aho and Margaret J Corasick
-**             Bell Labratories
+**             Bell Laboratories
 **             Copyright (C) 1975 Association for Computing Machinery,Inc
 **
 ** 12/4/06 - man - modified summary
 ** 6/26/07 - man - Added last_match tracking, and accounted for nocase/case by
-**                 preseting the last match state, and reverting if we fail the
+**                 presetting the last match state, and reverting if we fail the
 **                 case memcmp test for any rule in the states matching rule
-**                 list.  The states in the defaul matcher represent either
+**                 list.  The states in the default matcher represent either
 **                 case or nocase states, so they are dual mode, that makes
 **                 this a bit tricky.  When we sue the pure exact match, or
 **                 pure don't care matching routines, we just track the last
 ** 01/2008 - man - added 2 phase pattern matcher using a pattern match queue.
 **                 Text is scanned and matching states are queued, duplicate
 **                 matches are dropped, and after the complete buffer scan the
-**                 queued matches are processed.  This improves cacheing
+**                 queued matches are processed.  This improves caching
 **                 performance, and reduces duplicate rule processing.  The
 **                 queue is limited in size and is flushed if it becomes full
 **                 during the scan.  This allows simple insertions.  Tracking
@@ -650,7 +650,7 @@ static int KcontainsJ(bnfa_trans_node_t* tk, bnfa_trans_node_t* tj)
     bnfa_state_t full[BNFA_MAX_ALPHABET_SIZE];
 
     if ( !_bnfa_conv_node_to_full(tk,full)  )
-        return 1; /* emtpy state */
+        return 1; /* empty state */
 
     while ( tj )
     {
@@ -758,7 +758,7 @@ static int _bnfa_build_nfa(bnfa_struct_t* bnfa)
             FailState[s] = next;
 
             /*
-            *  Copy 'next'states MatchList into 's' states MatchList,
+            *  Copy 'next' states MatchList into 's' states MatchList,
             *  we just create a new list nodes, the patterns are not copied.
             */
             for ( mlist = MatchList[next]; mlist; mlist = mlist->next)
@@ -789,7 +789,7 @@ static int _bnfa_build_nfa(bnfa_struct_t* bnfa)
 
 #ifdef ALLOW_NFA_FULL
 /*
-*  Conver state machine to full format
+*  Convert state machine to full format
 */
 static int _bnfa_conv_list_to_full(bnfa_struct_t* bnfa)
 {
@@ -826,7 +826,7 @@ static int _bnfa_conv_list_to_full(bnfa_struct_t* bnfa)
 *  The transition and failure states are replaced with the start index of
 *  transition state, this eliminates the NextState[] lookup....
 *
-*  The compaction of multiple arays into a single array reduces the total
+*  The compaction of multiple arrays into a single array reduces the total
 *  number of states that can be handled since the max index is 2^24-1,
 *  whereas without compaction we had 2^24-1 states.
 */
@@ -917,7 +917,7 @@ static int _bnfa_conv_list_to_csparse_array(bnfa_struct_t* bnfa)
 
         ps_index++;  /* skip past state word */
 
-        /* conver state 'k' to full format */
+        /* convert state 'k' to full format */
         _bnfa_list_conv_row_to_full(bnfa, (bnfa_state_t)k, full);
 
         /* count transitions */
@@ -2135,8 +2135,8 @@ void bnfaAccumInfo(bnfa_struct_t* p)
 *  sindex - state tracker, set value to zero to reset the state machine,
 *            zero should be the value passed in on the 1st buffer or each buffer
 *           that is to be analyzed on its own, the state machine updates this
-*            during searches. This allows for sequential buffer searchs without
-*            reseting the state machine. Save this value as returned from the
+*            during searches. This allows for sequential buffer searches without
+*            resetting the state machine. Save this value as returned from the
 *            previous search for the next search.
 *
 *  returns
index 49c1428113b10f7116dc7de991f2480bc98fbdf2..0f5443e86f82a469719bf0200924b9c0605ec5cc 100644 (file)
@@ -175,7 +175,7 @@ void bnfaPrint(bnfa_struct_t* pstruct);   /* prints the nfa states-verbose!! */
 void bnfaPrintInfo(bnfa_struct_t* pstruct);    /* print info on this search engine */
 
 /*
- * Summary - this tracks search engine information accross multiple instances of
+ * Summary - this tracks search engine information across multiple instances of
  * search engines.  It helps in snort where we have many search engines, each using
  * rule grouping, to track total patterns, states, memory, etc...
  *
@@ -183,7 +183,7 @@ void bnfaPrintInfo(bnfa_struct_t* pstruct);    /* print info on this search engi
 void bnfaPrintInfoEx(bnfa_struct_t* p, const char* text);
 void bnfaAccumInfo(bnfa_struct_t* pstruct);  // add info to summary over multiple search engines
 void bnfaPrintSummary(); /* print current summary */
-void bnfaInitSummary();  /* reset accumulator foir global summary over multiple engines */
+void bnfaInitSummary();  /* reset accumulator for global summary over multiple engines */
 void bnfa_print_qinfo();
 #endif
 
index 58b0b4dbfc2bfbe0abc7cb801794f6c7d13bfd7a..34cc64f35e1abb28d05b96c9e2b76220c20794c1 100644 (file)
@@ -683,7 +683,7 @@ static void dce_co_process_ctx_result(DCE2_SsnData* sd,DCE2_CoTracker* cot,
     }
 
     /* Dequeue context item in pending queue - this will get put in the permanent
-     * context id list or free'd */
+     * context id list or freed */
     ctx_node = (DCE2_CoCtxIdNode*)DCE2_QueueDequeue(cot->pending_ctx_ids);
     if (ctx_node == nullptr)
     {
@@ -1319,7 +1319,7 @@ static Packet* dce_co_reassemble(DCE2_SsnData* sd, DCE2_CoTracker* cot,
 /********************************************************************
  * Function: DCE2_CoReassemble()
  *
- * Gets a reassemly packet based on the transport and the type of
+ * Gets a reassembly packet based on the transport and the type of
  * reassembly we want to do.  Sets rule options and calls detect
  * on the reassembled packet.
  *
@@ -2050,7 +2050,7 @@ static DCE2_Ret DCE2_CoSegEarlyRequest(DCE2_CoTracker* cot,
  * the current data in fragmentation and segmentation buffers
  * to the detection engine.  Whether we do or not is based on
  * whether or not we are configured to do so.  The number of bytes
- * in the fragmentation and segmentation buffers are calulated
+ * in the fragmentation and segmentation buffers are calculated
  * and if they exceed the amount we are configured for, we
  * reassemble.
  *
index 8ec97ef95f991f2e9fe564622287f97cf80f9806..6dbb00e494ce98e0a36bf7770c853005ab45dd1a 100644 (file)
@@ -175,8 +175,8 @@ struct DCE2_CoFragTracker
     DCE2_Buffer* cli_stub_buf;
     DCE2_Buffer* srv_stub_buf;
 
-    int opnum;    /* Opnum that is ultimatley used for request */
-    int ctx_id;   /* Context id that is ultimatley used for request */
+    int opnum;    /* Opnum that is ultimately used for request */
+    int ctx_id;   /* Context id that is ultimately used for request */
 
     /* These are set on a first fragment received */
     int expected_call_id;  /* Expected call id for fragments */
@@ -205,7 +205,7 @@ struct DCE2_CoTracker
      * numbers, but in the order they were in the client packet */
     DCE2_Queue* pending_ctx_ids;
 
-    /* Keeps track of fragmentation buffer and frag specfic data */
+    /* Keeps track of fragmentation buffer and frag specific data */
     DCE2_CoFragTracker frag_tracker;
 
     int max_xmit_frag;    /* The maximum negotiated size of a client request */
index 8c59bde36978aebab141e7c601e8c537bd80eb7e..65eedb4fdcb00561212a9f2e177e404489ebf25f 100644 (file)
@@ -922,7 +922,7 @@ DCE2_Ret DCE2_SmbWriteAndUnlock(DCE2_SmbSsnData* ssd, const SmbNtHdr* smb_hdr,
             return DCE2_RET__ERROR;
 
         // These are special cases.  The write succeeds but the unlock fails
-        // so an error reponse is returned but the data was actually written.
+        // so an error response is returned but the data was actually written.
         if (DCE2_ComInfoIsResponse(com_info) && DCE2_ComInfoIsStatusError(com_info))
         {
             if (DCE2_SmbIsTidIPC(ssd, ssd->cur_rtracker->tid))
index fe358ec4b21a5120c93739f8e7b37cac9fa73649..08bd5187925dcf2ec15a0910d6f4a193bc7f23fa 100644 (file)
@@ -811,10 +811,7 @@ DCE2_SmbFileTracker* DCE2_SmbDequeueTmpFileTracker(DCE2_SmbSsnData* ssd,
     DCE2_SmbRequestTracker* rtracker, const uint16_t fid)
 {
     Profile profile(dce2_smb_pstat_smb_fid);
-
-    DebugFormat(DEBUG_DCE_SMB, "Dequeueing file tracker "
-        "and binding to fid: 0x%04X\n", fid);
-
+    DebugFormat(DEBUG_DCE_SMB, "Dequeuing file tracker and binding to fid: 0x%04X\n", fid);
     DCE2_SmbFileTracker* ftracker = (DCE2_SmbFileTracker*)DCE2_QueueDequeue(rtracker->ft_queue);
 
     if (ftracker == nullptr)
@@ -853,7 +850,7 @@ DCE2_SmbFileTracker* DCE2_SmbDequeueTmpFileTracker(DCE2_SmbSsnData* ssd,
         }
     }
 
-    // Other values were intialized when queueing.
+    // Other values were initialized when queuing.
     ftracker->fid_v1 = (int)fid;
 
     return ftracker;
@@ -1051,7 +1048,7 @@ void DCE2_SmbQueueTmpFileTracker(DCE2_SmbSsnData* ssd,
 {
     Profile profile(dce2_smb_pstat_smb_fid);
 
-    DebugFormat(DEBUG_DCE_SMB, "Queueing file tracker "
+    DebugFormat(DEBUG_DCE_SMB, "Queuing file tracker "
         "with Uid: %hu, Tid: %hu\n", uid, tid);
 
     DCE2_SmbFileTracker* ftracker = (DCE2_SmbFileTracker*)
@@ -1361,7 +1358,7 @@ Packet* DCE2_SmbGetRpkt(DCE2_SmbSsnData* ssd,
  *
  * Returns:
  *  DCE2_Ret
- *      DCE2_RET__ERROR if an error occured.  Nothing can
+ *      DCE2_RET__ERROR if an error occurred.  Nothing can
  *          be trusted.
  *      DCE2_RET__SUCCESS if data was successfully added.
  *
index 5211c6eb62f6144a0c6dbb73051d0af1991bf4f9..5f1070c63f2a6fb6cbc12e3c6d979d1ee083701b 100644 (file)
@@ -56,7 +56,7 @@
  *  DCE2_Ret
  *      DCE2_RET__SUCCESS if we were able to successfully parse the
  *          integer to the type specified.
- *      DCE2_RET__ERROR if an error occured in parsing.
+ *      DCE2_RET__ERROR if an error occurred in parsing.
  *
  ********************************************************************/
 DCE2_Ret DCE2_GetValue(char* start, char* end, void* int_value, int negate,
index 4b6a3a49cdf9c812e65d6fc555543a1043adf102..6b365895c5644551bdd0203b75dd9fe597603753 100644 (file)
@@ -345,7 +345,7 @@ struct SmbNtHdr
     uint16_t smb_mid;               /* multiplex id */
 };
 
-/* For server empty respones indicating client error or interim response */
+/* For server empty responses indicating client error or interim response */
 struct SmbEmptyCom
 {
     uint8_t smb_wct;     /* value = 0 */
index a3fb2ee69c454713ddb2a5db5c1fa71cf9fd33e6..4c3d4c2f4840e4b6d701e9d0fbbc099d4572a2a8 100644 (file)
@@ -367,13 +367,13 @@ static uint32_t DCE2_IgnoreJunkData(const uint8_t* data_ptr, uint16_t data_len,
  *
  * Checks some relevant fields in the header to make sure they're
  * sane.
- * Side effects are potential alerts for anomolous behavior.
+ * Side effects are potential alerts for anomalous behavior.
  *
  * Arguments:
  *  DCE2_SmbSsnData *
  *      Pointer to the session data structure.
  *  SmbNtHdr *
- *      Pointer to the header struct layed over the packet data.
+ *      Pointer to the header struct laid over the packet data.
  *
  * Returns:
  *  DCE2_Ret
@@ -1380,7 +1380,7 @@ static DCE2_SmbSsnData* dce2_create_new_smb_session(Packet* p, dce2SmbProtoConf*
  *  initial Session Request / Session Positive/Negative response
  *  followed by the normal SMB conversation, i.e. Negotiate,
  *  SessionSetupAndX, etc.
- *  Side effects are potential alerts for anomolous behavior.
+ *  Side effects are potential alerts for anomalous behavior.
  *
  * Arguments:
  *  DCE2_SmbSsnData * - the session data structure.
@@ -1529,7 +1529,7 @@ static void DCE2_Smb1Process(DCE2_SmbSsnData* ssd)
             if (data_len < data_need)
             {
                 DebugFormat(DEBUG_DCE_SMB, "Data len(%hu) < NetBIOS SS header(%u). "
-                    "Queueing data.\n", data_len, data_need);
+                    "Queuing data.\n", data_len, data_need);
 
                 if (DCE2_SmbHandleSegmentation(seg_buf, data_ptr,
                     data_len, sizeof(NbssHdr)) != DCE2_RET__SUCCESS)
@@ -1623,7 +1623,7 @@ static void DCE2_Smb1Process(DCE2_SmbSsnData* ssd)
             if (data_len < data_need)
             {
                 DebugFormat(DEBUG_DCE_SMB, "Data len (%hu) < "
-                    "NetBIOS SS header + SMB header (%u). Queueing data.\n",
+                    "NetBIOS SS header + SMB header (%u). Queuing data.\n",
                     data_len, data_need);
 
                 if (DCE2_SmbHandleSegmentation(seg_buf, data_ptr, data_len,
@@ -1688,7 +1688,7 @@ static void DCE2_Smb1Process(DCE2_SmbSsnData* ssd)
                 continue;
             }
 
-            // Check the SMB header for anomolies
+            // Check the SMB header for anomalies
             if (DCE2_SmbHdrChecks(ssd, smb_hdr) != DCE2_RET__SUCCESS)
             {
                 DebugMessage(DEBUG_DCE_SMB, "Bad SMB header.\n");
@@ -1741,7 +1741,7 @@ static void DCE2_Smb1Process(DCE2_SmbSsnData* ssd)
             {
                 DebugFormat(DEBUG_DCE_SMB, "Data len(%hu) < "
                     "NetBIOS SS header + NetBIOS len(%zu). "
-                    "Queueing data.\n", data_len, sizeof(NbssHdr) + nb_len);
+                    "Queuing data.\n", data_len, sizeof(NbssHdr) + nb_len);
 
                 if (DCE2_SmbHandleSegmentation(seg_buf, data_ptr, data_len,
                     sizeof(NbssHdr) + nb_len) != DCE2_RET__SUCCESS)
@@ -1876,7 +1876,7 @@ void DCE2_SmbInitGlobals()
     // Sets up the function to call for the command and valid word and byte
     // counts for the command.  Ensuring valid word and byte counts is very
     // important to processing the command as it will assume the command is
-    // legitimate and can access data that is acutally there.  Note that
+    // legitimate and can access data that is actually there.  Note that
     // commands with multiple word counts indicate a different command
     // structure, however most, if not all just have an extended version
     // of the structure for which the extended part isn't used.  If the
index aa0c3a7556fe1ce551f94c5152c7ca2460d2c003..9f6d26cbf96a14a232affc0c7f4c99da86716ef0 100644 (file)
@@ -901,7 +901,7 @@ static void ParseDNSResponseMessage(Packet* p, DNSData* dnsSessionData)
                 {
                 case DNS_RESP_STATE_RR_RDATA_START:
                     DebugFormat(DEBUG_DNS,
-                        "DNS ADDITONAL RR %d: type %hu, class %hu, "
+                        "DNS ADDITIONAL RR %d: type %hu, class %hu, "
                         "ttl %u rdlength %hu\n", i,
                         dnsSessionData->curr_rr.type,
                         dnsSessionData->curr_rr.dns_class,
index 4dfc3fed62708a485913773b487dbfae6788435d..b15ab8d90f8eaf7d9b33f01c9947c0f206a77def 100644 (file)
@@ -129,7 +129,7 @@ static int SnortFTPData(Packet* p)
         if (!PROTO_IS_FTP(ftp_ssn))
         {
             DebugMessage(DEBUG_FTPTELNET,
-                "FTP-DATA Invalid FTP_SESSION retrieved durring lookup\n");
+                "FTP-DATA Invalid FTP_SESSION retrieved during lookup\n");
 
             if (data_ssn->data_chan)
                 p->flow->set_ignore_direction(SSN_DIR_BOTH);
index 130a1db713c2d2b637365a77d1f69dbff8f00845..658ac5a432121267b0a20d6861d0211da597c1b3 100644 (file)
@@ -48,7 +48,7 @@
 #define F_DATE              "date"
 #define F_LITERAL           "'"
 #define F_STRING            "string"
-#define F_STRING_FMT        "formated_string"
+#define F_STRING_FMT        "formatted_string"
 #define F_HOST_PORT         "host_port"
 #define F_LONG_HOST_PORT    "long_host_port"
 #define F_EXTD_HOST_PORT    "extd_host_port"
index 80a6385e5cedb83e616aebbb3585ea563deb5912..f2906d7f84523165dba55c00986f2d75af6a7e75 100644 (file)
@@ -165,7 +165,7 @@ struct FTP_SESSION
     SfIp serverIP;
     uint16_t serverPort;
 
-    /* A file is being transfered on ftp-data channel */
+    /* A file is being transferred on ftp-data channel */
     char* filename;
     int file_xfer_info; /* -1: ignore, 0: unknown, >0: filename length */
     unsigned char flags;
index 29253501b3f2e4855c1bd24e14e77270d9f1cb55..1247dea598c56829fdba7f65576285dee2907ca6 100644 (file)
@@ -33,7 +33,7 @@
  *
  * Arguments:  None
  *
- * Effect:  The telnet nogiation data is removed from the data
+ * Effect:  The telnet negotiation data is removed from the data
  *
  * Comments:
  *
@@ -117,7 +117,7 @@ int normalize_telnet(
     read_ptr = p->data;
     end = p->data + p->dsize;
 
-    /* look to see if we have any telnet negotiaion codes in the data */
+    /* look to see if we have any telnet negotiation codes in the data */
     while (!normalization_required && (read_ptr < end))
     {
         /* look for the start of a negotiation string */
@@ -182,7 +182,7 @@ int normalize_telnet(
     /* rewind the data stream to p->data */
     read_ptr = p->data;
 
-    /* setup for overwriting the negotaiation strings with
+    /* setup for overwriting the negotiation strings with
     * the follow-on data
     */
     write_ptr = (unsigned char*)DecodeBuffer.data;
index ff9c30fe75fd77767673fa18703b8630caa8a0f3..e29007c56fe1d6747089f21a7413350054bdaee3 100644 (file)
@@ -26,7 +26,7 @@
 
 /* RFC 885 defines an End of Record telnet option */
 #define RFC885
-/* RFC 1184 defines Abort, Suspend, and End of File telnet optinos */
+/* RFC 1184 defines Abort, Suspend, and End of File telnet options */
 #define RFC1184
 
 #include "ftpp_si.h"
index 94011b4e52330952ec4f8540055b5940388c6710..fb143326ceab6bdc9f85d92402c26c718bddef2f 100644 (file)
@@ -151,7 +151,7 @@ static void printInfoElements(GTP_IEData* info_elements, GTPMsg* msg)
  *  GTP_Ret
  *      true if we were able to successfully parse the
  *          port list.
- *      false if an error occured in parsing the port list.
+ *      false if an error occurred in parsing the port list.
  *
  ********************************************************************/
 static int gtp_processInfoElements(GTPMsg* msg, const uint8_t* buff, uint16_t len)
index f7fc5ccbfe526706c65f98c1a8cf56ac595f2de8..0066c3bcd2b65ab3e5e0b952db97d3cb53fa38b6 100644 (file)
@@ -67,7 +67,7 @@ ScanResult HttpStartCutter::cut(const uint8_t* buffer, uint32_t length,
         if (!validated)
         {
             // The purpose of validate() is to quickly and efficiently dispose of obviously wrong
-            // bindings. Passing is no guarentee that the connection is really HTTP, but failing
+            // bindings. Passing is no guarantee that the connection is really HTTP, but failing
             // makes it clear that it isn't.
             switch (validate(buffer[k]))
             {
index 8535b1eb98df85efc848c23e484a502467521c7c..92f25542a36e00ed04d8873c8e4a1c9bb6c2f919 100644 (file)
@@ -101,7 +101,7 @@ enum MethodId {
 enum UriType { URI__NOT_COMPUTE=-14, URI__PROBLEMATIC=-12, URI_ASTERISK = 2, URI_AUTHORITY,
     URI_ABSPATH, URI_ABSOLUTE };
 
-// Body compression tpyes
+// Body compression types
 enum CompressId { CMP_NONE=2, CMP_GZIP, CMP_DEFLATE };
 
 // Message section in which an IPS option provides the buffer
index 1c93ca4ae44f074e236a2d82995bf78c994315aa..4e0d58ca9c483e055f5da8b68eaf58d68113de11 100644 (file)
@@ -60,7 +60,7 @@ protected:
     ~HttpMsgHeadShared();
     // Get the next item in a comma-separated header value and convert it to an enum value
     static int32_t get_next_code(const Field& field, int32_t& offset, const StrCode table[]);
-    // Do a case insensitve search for "boundary=" in a Field
+    // Do a case insensitive search for "boundary=" in a Field
     static bool boundary_present(const Field& field);
 
 #ifdef REG_TEST
index d0e210db851e6bb822b0b927c9291182763e877c..185c6a47f8d4950fb88e431027552bd813c6df87 100644 (file)
@@ -500,6 +500,7 @@ void UriNormalizer::load_default_unicode_map(uint8_t map[65536])
 
     // Default unicode map is just a single string of tokens of the form
     // HHHH:HH (HHHH = unicode, HH = ascii char)
+// __STRDUMP_DISABLE__
     std::stringstream ss(
 "0100:41 0101:61 0102:41 0103:61 0104:41 0105:61 0106:43 0107:63 0108:43 0109:63 010a:43 010b:63 "
 "010c:43 010d:63 010e:44 010f:64 0111:64 0112:45 0113:65 0114:45 0115:65 0116:45 0117:65 0118:45 "
@@ -534,6 +535,7 @@ void UriNormalizer::load_default_unicode_map(uint8_t map[65536])
 "ff41:61 ff42:62 ff43:63 ff44:64 ff45:65 ff46:66 ff47:67 ff48:68 ff49:69 ff4a:6a ff4b:6b ff4c:6c "
 "ff4d:6d ff4e:6e ff4f:6f ff50:70 ff51:71 ff52:72 ff53:73 ff54:74 ff55:75 ff56:76 ff57:77 ff58:78 "
 "ff59:79 ff5a:7a ff5b:7b ff5c:7c ff5d:7d ff5e:7e");
+// __STRDUMP_ENABLE__
 
     std::string token;
 
index 887a0effa51ce58b82d0420df79b5c79defca38e..f6ca5df7185b8190684c66a4dfc38bab9057560e 100644 (file)
@@ -76,7 +76,7 @@ static bool parse_literal_length(const uint8_t ch, uint32_t* len)
         }
     }
     else if (ch != '}')
-        *len = 0;                      //  ALERT!!  charachter should be a digit or ''}''
+        *len = 0;                      //  ALERT!!  character should be a digit or ''}''
 
     return true;
 }
index cd3e98da2c7c29940b09ecb2ab5d640724dcadfc..778c8fa04c80f0915c2542421ad7f53765a8dbd0 100644 (file)
@@ -33,7 +33,7 @@ struct ImapDataInfo
     const char* next_letter;  // The current command in fetch
     bool found_len;
     uint32_t length;
-    bool esc_nxt_char;        // true if the next charachter has been escaped
+    bool esc_nxt_char;        // true if the next character has been escaped
 };
 
 // States for IMAP PAF
index 11d36c7c8a8c8401d3bb1d730357c654fefc7c36..876256f4c7311abf9357dd18605729f5656914b4 100644 (file)
@@ -17,7 +17,7 @@
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-// modubs.h author Russ Combs <rucombs@cisco.com>
+// modbus.h author Russ Combs <rucombs@cisco.com>
 
 #ifndef MODBUS_H
 #define MODBUS_H
index f96380fc8a36ee4989ce6e0ff9e827bfa7dbf4f0..c6dfdded3f9d0a49a8fc08ea698db6a4706a92f1 100644 (file)
@@ -162,7 +162,7 @@ static inline int valid_response(const uint8_t data)
 
 /*
  * Client PAF calls this command to set the server's state.  This is the
- * function which ensure's the server know the correct expected
+ * function which ensures the server know the correct expected
  * DATA
  */
 static inline void set_server_state(Flow* ssn, PopExpectedResp state)
@@ -231,7 +231,7 @@ static bool find_data_end_multi_line(PopPafData* pfdata, const uint8_t ch, bool
  * PARAMS:
  *
  * RETURNS:
- *         0 - if terminatino sequence not found
+ *         0 - if termination sequence not found
  *         1 - if termination sequence found
  */
 static inline bool find_data_end_single_line(PopPafData* pfdata, const uint8_t ch, bool client)
index dc668050e1db49abed7c3a68cbb7a5319a8a373f..f990e43173e4ea39b9c76a23fafcc7d9719cfbf6 100644 (file)
@@ -23,7 +23,7 @@
  * Purpose:
  *
  * This preprocessor normalizes the RPC requests from remote machines by
- * converting all fragments into one continous stream.
+ * 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
  * string 0186A0 is broken up.
@@ -702,7 +702,7 @@ static int ConvertRPC(RpcDecodeConfig* rconfig, RpcSsnData* rsdata, Packet* p)
     uint8_t* data_end;       /* points to the end of the payload for loop control */
     uint32_t length;          /* length of current fragment */
     int last_fragment = 0; /* have we seen the last fragment sign? */
-    uint32_t decoded_len; /* our decoded length is always atleast a 0 byte header */
+    uint32_t decoded_len; /* our decoded length is always at least a 0 byte header */
     uint32_t fraghdr;   /* Used to store the RPC fragment header data */
     int fragcount = 0;   /* How many fragment counters have we seen? */
     size_t decode_buf_rem = sizeof(DecodeBuffer.data);
@@ -769,7 +769,7 @@ static int ConvertRPC(RpcDecodeConfig* rconfig, RpcSsnData* rsdata, Packet* p)
     decoded_len = 4;
     decode_buf_rem -= 4;
 
-    /* always make sure that we have enough data to process atleast
+    /* always make sure that we have enough data to process at least
      * the header and that we only process at most, one fragment
      */
 
@@ -833,8 +833,7 @@ static int ConvertRPC(RpcDecodeConfig* rconfig, RpcSsnData* rsdata, Packet* p)
         else if ((data_index + length) > data_end)
         {
             DebugMessage(DEBUG_RPC,
-                "returning LARGE_FRAGSIZE"
-                "since we'd read past our end\n");
+                "returning LARGE_FRAGSIZE since we'd read past our end\n");
             return RPC_LARGE_FRAGSIZE;
         }
         else
@@ -890,7 +889,7 @@ static int ConvertRPC(RpcDecodeConfig* rconfig, RpcSsnData* rsdata, Packet* p)
 //-------------------------------------------------------------------------
 // splitter stuff:
 //
-// see above commments on MIN_CALL_BODY_SZ
+// see above comments on MIN_CALL_BODY_SZ
 // why flush_point == 28 instead of 32 IDK
 //
 // we don't set a flush point to flush_point (= 28 above) because that will
@@ -952,7 +951,7 @@ void RpcDecode::show(SnortConfig*)
 
 /*
  * Purpose: Inspects the packet's payload for fragment records and
- *          converts them into one infragmented record.
+ *          converts them into one unfragmented record.
  */
 void RpcDecode::eval(Packet* p)
 {
@@ -965,7 +964,7 @@ void RpcDecode::eval(Packet* p)
     // In this case we don't look at server packets.
     // There is the case were stream configuration requires a 3 way handshake.
     // If no 3 way, then the packet flags won't be set, so don't look at it
-    // since we won't be able to determeine who's the client and who's the
+    // since we won't be able to determine who's the client and who's the
     // server.
     if ( !p->is_from_client() )
         return;
index e5add0439b425faab5f88322640e9eb4272c656c..42d4e265315c7ac32c4e17b375e0055163890743 100644 (file)
@@ -95,7 +95,7 @@ struct SIP_PROTO_CONF
     uint32_t maxNumDialogsInSession;
     uint32_t methodsConfig;
     SIPMethodlist methods;   // Which methods to check
-    uint16_t maxUriLen;      // Maximum requst_URI size
+    uint16_t maxUriLen;      // Maximum request_URI size
     uint16_t maxCallIdLen;   // Maximum call_ID size.
     uint16_t maxRequestNameLen;  // Maximum length of request name in the CSeqID.
     uint16_t maxFromLen;     // Maximum From field size
index 74ca1ebec6d6627a9582b11a59b501b712657d1f..9909f92db379e4a23f5a348caea668db4bfbca33 100644 (file)
@@ -107,7 +107,7 @@ const SMTPToken smtp_resps[] =
     { "250",  3,  RESP_250, SMTP_CMD_TYPE_NORMAL },  /* Requested mail action okay, completed */
     { "334",  3,  RESP_334, SMTP_CMD_TYPE_NORMAL },  /* Auth intermediate response */
     { "354",  3,  RESP_354, SMTP_CMD_TYPE_NORMAL },  /* Start mail input - data response */
-    { "421",  3,  RESP_421, SMTP_CMD_TYPE_NORMAL },  /* Service not availiable - closes connection
+    { "421",  3,  RESP_421, SMTP_CMD_TYPE_NORMAL },  /* Service not available - closes connection
                                                         */
     { "450",  3,  RESP_450, SMTP_CMD_TYPE_NORMAL },  /* Mailbox unavailable */
     { "451",  3,  RESP_451, SMTP_CMD_TYPE_NORMAL },  /* Local error in processing */
@@ -305,7 +305,7 @@ static int AddCmd(SMTP_PROTO_CONF* config, const char* name, SMTPCmdTypeEnum typ
 
     config->num_cmds++;
 
-    /* allocate enough memory for new commmand - alloc one extra for NULL entry */
+    /* allocate enough memory for new command - alloc one extra for NULL entry */
     // FIXIT-L this constant reallocation is not necessary; use vector
     cmds = (SMTPToken*)snort_calloc((config->num_cmds + 1) * sizeof(*cmds));
     cmd_config = (SMTPCmdConfig*)snort_calloc((config->num_cmds + 1) * sizeof(*cmd_config));
@@ -1372,7 +1372,7 @@ static int SMTP_GetRcptTo(Flow* flow, uint8_t** buf, uint32_t* len, uint32_t* ty
     return 1;
 }
 
-/* Calback to return the email headers */
+/* Callback to return the email headers */
 static int SMTP_GetEmailHdrs(Flow* flow, uint8_t** buf, uint32_t* len, uint32_t* type)
 {
     SMTPData* ssn = get_session_data(flow);
index 202c226fa9faabe69318c7905de88f0fa2705889..7cb4d0e93647023902bc23d1360c98951de40d0f 100644 (file)
@@ -62,7 +62,7 @@
  * @param   eol    end of end of line marker
  *
  * @return  response
- * @retval   0          function succeded without error
+ * @retval   0          function succeeded without error
  * @retval  -1          there were errors
  */
 int SMTP_NormalizeCmd(Packet* p, const uint8_t* ptr, const uint8_t* eolm, const uint8_t* eol)
index f95d4667b3fa114034edaaade31e4dbf1a241bfd..dd7ed2e4e916f28a310235df30dba750ad0c64fb 100644 (file)
@@ -663,7 +663,7 @@ static unsigned int ProcessSSHKeyExchange(SSHData* sessionp, Packet* p,
              * key exchange. Both server and client should
              * send one, but as per Alex Kirk's note on this,
              * in some implementations the server does not
-             * actually send this message. So receving a new
+             * actually send this message. So receiving a new
              * keys msg from the client is sufficient.
              */
             if ( direction == SSH_DIR_FROM_CLIENT )
index bd7b51c4d32337593f2e7b7d427bbb463a6dfc10..2150b47f2c60bd83635229a269ef711ce175adf5 100644 (file)
@@ -39,7 +39,7 @@ SfIpRet SfCidr::contains(const SfIp* ip) const
     const uint32_t* pn, * pi;
 
     /* SFIP_CONTAINS is returned here due to how sfvar_ip_in
-     * handles zero'ed IPs" */
+     * handles zeroed IPs" */
     if (!ip)
         return SFIP_CONTAINS;
 
index 6ab6f6e7317c4ac55ac7ca82803da922cebb4cbc..540b7bf583bfc1e5d0ad8534d12da997aa046afc 100644 (file)
@@ -396,7 +396,7 @@ void snort_inet_ntop(int family, const void* ip_raw, char* buf, int bufsize)
     if (!ip_raw || !buf ||
         (family != AF_INET && family != AF_INET6) ||
         /* Make sure if it's IPv6 that the buf is large enough. */
-        /* Need atleast a max of 8 fields of 4 bytes plus 7 for colons in
+        /* Need at least a max of 8 fields of 4 bytes plus 7 for colons in
          * between.  Need 1 more byte for null. */
         (family == AF_INET6 && bufsize < INET6_ADDRSTRLEN) ||
         /* Make sure if it's IPv4 that the buf is large enough.
index 303f137e830455f0c501e0949e73321a9a2e2e0f..f0436d12e7ba673b442ebd79a838f20945d18485 100644 (file)
@@ -72,7 +72,7 @@ void sfvar_free(sfip_var_t* var)
     snort_free(var);
 }
 
-/* Allocaties and returns an IP node described by 'str' */
+/* Allocates and returns an IP node described by 'str' */
 static sfip_node_t* sfipnode_alloc(const char* str, SfIpRet* status)
 {
     // FIXIT-L rename variables from ret to something with more descriptive
@@ -138,7 +138,7 @@ static sfip_node_t* sfipnode_alloc(const char* str, SfIpRet* status)
         }
     }
 
-    /* Check if this is a negated, zero'ed IP (equivalent of a "!any") */
+    /* Check if this is a negated, zeroed IP (equivalent of a "!any") */
     if (!ret->ip->is_set() && (ret->flags & SFIP_NEGATED))
     {
         if (status)
@@ -308,7 +308,7 @@ static SfIpRet sfvar_add_node(sfip_var_t* var, sfip_node_t* node, int negated)
     }
 
     /* If we're here, the head node was lesser than the new node */
-    /* Before searching the list, verify there is atleast two nodes.
+    /* Before searching the list, verify there is at least two nodes.
      * (This saves an extra check during the loop below) */
     if (!(*head)->next)
     {
@@ -588,7 +588,7 @@ SfIpRet sfvar_parse_iplist(vartable_t* table, sfip_var_t* var,
                     return SFIP_NOT_ANY;
                 }
 
-                /* Check if this is a negated, zero'ed IP (equivalent of a "!any") */
+                /* Check if this is a negated, zeroed IP (equivalent of a "!any") */
                 if (copy_var->head && !copy_var->head->ip->is_set())
                 {
                     snort_free(tok);
@@ -643,7 +643,7 @@ SfIpRet sfvar_parse_iplist(vartable_t* table, sfip_var_t* var,
                 _negate_node(node);
             }
 
-            /* Check if this is a negated, zero'ed IP (equivalent of a "!any") */
+            /* Check if this is a negated, zeroed IP (equivalent of a "!any") */
             if (!node->ip->is_set() && (node->flags & SFIP_NEGATED))
             {
                 sfip_node_free(node);
index 1dce60839cff603659a0b54f368e74d98318ad71..511cdb016a804865ddec1f609780ada6e3932d99 100644 (file)
@@ -56,8 +56,8 @@ typedef struct _ip_node
     struct _ip_node* next;
     int flags;
     // XXX
-    int addr_flags; /* Flags used exlusively by Snort */
-                    /* Keeping these variables seperate keeps
+    int addr_flags; /* Flags used exclusively by Snort */
+                    /* Keeping these variables separate keeps
                      * this from stepping on Snort's toes. */
                     /* Should merge them later */
 } sfip_node_t;
index 54dadc669087e689c20cf7e9b59a986a4838d0fc..57cdde88a3a67941d7ff04430a3b12c47a29fea2 100644 (file)
@@ -66,6 +66,7 @@ struct FuncTest
 };
 
 //---------------------------------------------------------------
+// __STRDUMP_DISABLE__
 
 static FuncTest ftests[] =
 {
@@ -232,6 +233,7 @@ static FuncTest ftests[] =
 
 #define NUM_TESTS (sizeof(ftests)/sizeof(ftests[0]))
 
+// __STRDUMP_ENABLE__
 //---------------------------------------------------------------
 
 static int RunFunc(const char* func, const char* arg1, const char* arg2)
index 15059bd38e34e3d7ba78964b9bae09c572b025c0..cfecb72e02ac511c34ca43f36ad6994159fe1838 100644 (file)
@@ -34,7 +34,7 @@
  * then more specific information will be written into the routing tables
  * from RNA.  Ideally, information will only move from less specific to more
  * specific.  If a more general information is to overwrite existing entries,
- * the table should be free'ed and rebuilt.
+ * the table should be freed and rebuilt.
  *
  *
  * Implementation:
  * Inserts are performed by specifying a CIDR and a pointer to its associated
  * data.  Since a new routing table entry may overwrite previous entries,
  * a flag selects whether the insert favors the most recent or favors the most
- * specific.  Favoring most specific should be the default behvior.  If
+ * specific.  Favoring most specific should be the default behavior.  If
  * the user wishes to overwrite routing entries with more general data, the
  * table should be flushed, rather than using favor-most-recent.
  *
  * Before modifying the routing or data tables, the insert function performs a
- * lookup on the CIDR-to-be-insertted.  If no entry or an entry *of differing
- * bit length* is found, the data is insertted into the data table, and its
+ * lookup on the CIDR-to-be-inserted.  If no entry or an entry *of differing
+ * bit length* is found, the data is inserted into the data table, and its
  * index is used for the new routing table entry.  If an entry is found that
  * is as specific as the new CIDR, the index stored points to where the new
  * data is written into the data table.
@@ -109,7 +109,7 @@ table_t* sfrt_new(char table_type, char ip_type, long data_size, uint32_t mem_ca
     table_t* table = (table_t*)snort_alloc(sizeof(table_t));
 
     /* If this limit is exceeded, there will be no way to distinguish
-     * between pointers and indeces into the data table.  Only
+     * between pointers and indices into the data table.  Only
      * applies to DIR-n-m. */
 #if SIZEOF_LONG_INT == 8
     if (data_size >= 0x800000000000000)
index 6053df06b0b412e93fa263a3c3d295f53371865c..437933331bc052ef21c670d66feb687fe7c641ec 100644 (file)
@@ -275,7 +275,7 @@ static inline void _dir_fill_less_specific(int index, int fill,
  * a specific subnet. table->data[] entry for more specific subnet is not cleared.
  *
  * @note RT_FAVOR_TIME can cause orphaned table->data[] entries if the entire subnet
- * is replaced by more specific sudnets.
+ * is replaced by more specific subnets.
  */
 static inline uint32_t _dir_remove_all(uint32_t* allocated, uint32_t index, uint32_t fill,
     word length, dir_sub_table_t* table)
@@ -683,7 +683,7 @@ static int _dir_sub_remove(IPLOOKUP* ip, int length, int cur_len,
 
         fill += index;
 
-        /* Remove and overwrite without consedering CIDR specificity*/
+        /* Remove and overwrite without considering CIDR specificity*/
         if (behavior == RT_FAVOR_TIME)
         {
             valueIndex = _dir_remove_all(&root_table->allocated, index, fill, length, sub_table);
index 9e8a8c63661e049a034a1bb152d1d68a04d852f7..a362f40c59f9fe01db44092e9bf958c9d0c91e39 100644 (file)
@@ -47,8 +47,8 @@ typedef struct
                       * are used. */
     int cur_num;     /* Present number of used nodes */
 
-    /** number of entries filled including chidren sub_tables. This is used
-     * for freeing sub_tables when all entried are freed by delete operation.
+    /** number of entries filled including children sub_tables. This is used
+     * for freeing sub_tables when all entries are freed by delete operation.
      */
     int filledEntries;
 } dir_sub_table_t;
index 222f09e92c13cab19533fb7e28c8662c630acb75..c02a85bdb49805ec1461b138c300f401a7fd928e 100644 (file)
@@ -56,7 +56,7 @@ table_flat_t* sfrt_flat_new(char table_flat_type, char ip_type,  long data_size,
     table = (table_flat_t*)(&base[table_ptr]);
 
     /* If this limit is exceeded, there will be no way to distinguish
-     * between pointers and indeces into the data table.  Only
+     * between pointers and indices into the data table.  Only
      * applies to DIR-n-m. */
 
 #if SIZEOF_LONG_INT == 8
index 9ebf6412cbcc2c6b5e0c9253c3ec50393b1254c1..171cc3b00754453bc4a9b43fa3e723b937a25453 100644 (file)
@@ -33,7 +33,7 @@
  *  The mechanism for processing frags is based on the Linux IP stack
  *  implementation of IP defragmentation with proper amounts of paranoia
  *  and an IDS perspective applied.  Some of this code was derived from
- *  frag2 originally, but it's basically unrecognizeable if you compare
+ *  frag2 originally, but it's basically unrecognizable if you compare
  *  it to frag2 IMO.
  *
  *  I switched from using the UBI libs to using sfxhash and linked lists for
@@ -55,7 +55,7 @@
  *  Frag3 is also capable of performing "engine-based" IP defragmentation.
  *  What this means practically is that frag3 can model the IP stack of a
  *  engine on the network to avoid Ptacek-Newsham evasions of the IDS through
- *  sensor/engine desynchronization.  In terms of implentation, this is
+ *  sensor/engine desynchronization.  In terms of implementation, this is
  *  reflected by passing a "engine" into the defragmentation engine that has
  *  a specific configuration for a specific engine type.  Windows can put
  *  fragments back together differently than Linux/BSD/etc, so we model that
@@ -256,7 +256,7 @@ static inline void EventExcessiveOverlap(FragEngine*)
 }
 
 /**
- * Generate an event due to a fragment being too short, typcially based
+ * Generate an event due to a fragment being too short, typically based
  * on a non-last fragment that doesn't properly end on an 8-byte boundary
  *
  * @param engine Current run engine
@@ -415,7 +415,7 @@ static inline int FragCheckFirstLast(const Packet* const p,
         /* Use the actual length here because packet may have been
          * truncated.  Don't want to try to copy more than we actually
          * captured. Use dsize as the frag length since it is distance
-         * between the last sucesfully decoded layer (which is ip6_frag
+         * between the last succesfully decoded layer (which is ip6_frag
          *  or ipv4) and the end of packet, */
         fragLength = p->dsize;
         endOfThisFrag = frag_offset + fragLength;
@@ -674,7 +674,7 @@ static inline int FragIsComplete(FragTracker* ft)
 
         /*
          * if we've accumulated enough data to match the calculated size
-         * of the defragg'd packet, return 1
+         * of the defragged packet, return 1
          */
         if (ft->frag_bytes == ft->calculated_size)
         {
@@ -902,7 +902,7 @@ static void FragRebuild(FragTracker* ft, Packet* p)
  * Plug a Fragment into the fraglist of a FragTracker
  *
  * @param ft FragTracker to put the new node into
- * @param prev ptr to preceeding Fragment in fraglist
+ * @param prev ptr to preceding Fragment in fraglist
  * @param next ptr to following Fragment in fraglist
  * @param node ptr to node to put in list
  *
@@ -1178,7 +1178,7 @@ void Defrag::process(Packet* p, FragTracker* ft)
     ft->frag_time.tv_sec = p->pkth->ts.tv_sec;
     ft->frag_time.tv_usec = p->pkth->ts.tv_usec;
 
-    //dont forward fragments to engine if some previous fragment was dropped
+    //don't forward fragments to engine if some previous fragment was dropped
     if ( ft->frag_flags & FRAG_DROP_FRAGMENTS )
     {
         DisableDetect();
@@ -1343,7 +1343,7 @@ int Defrag::insert(Packet* p, FragTracker* ft, FragEngine* fe)
     /* Use the actual length here because packet may have been
      * truncated.  Don't want to try to copy more than we actually
      * captured. Use dsize as the frag length since it is distance
-     * between the last sucesfully decoded layer (which is ip6_frag
+     * between the last succesfully decoded layer (which is ip6_frag
      *  or ipv4) and the end of packet, */
     len = fragLength = p->dsize;
     fragStart = p->data;
@@ -1376,7 +1376,7 @@ int Defrag::insert(Packet* p, FragTracker* ft, FragEngine* fe)
     {
         uint16_t oldfrag_end;
         /*
-         * all non-last frags are supposed to end on 8-byte boundries
+         * all non-last frags are supposed to end on 8-byte boundaries
          */
         if (frag_end & 7)
         {
@@ -1595,7 +1595,7 @@ int Defrag::insert(Packet* p, FragTracker* ft, FragEngine* fe)
                      * existing frag -- existing frag needs to be split
                      * and the new frag inserted in the middle.
                      *
-                     * Need to duplciate left.  Adjust that guys
+                     * Need to duplicate left.  Adjust that guys
                      * offset by + (frag_offset + len) and
                      * size by - (frag_offset + len - left->offset).
                      */
@@ -2029,7 +2029,7 @@ int Defrag::new_tracker(Packet* p, FragTracker* ft)
     /* Use the actual length here because packet may have been
      * truncated.  Don't want to try to copy more than we actually
      * captured. Use dsize as the frag length since it is distance
-     * between the last sucesfully decoded layer (which is ip6_frag
+     * between the last succesfully decoded layer (which is ip6_frag
      *  or ipv4) and the end of packet, */
     fragLength = p->dsize;
     fragStart = p->data;
@@ -2113,7 +2113,7 @@ int Defrag::new_tracker(Packet* p, FragTracker* ft)
     else
     {
         /*
-         * all non-last frags are supposed to end on 8-byte boundries
+         * all non-last frags are supposed to end on 8-byte boundaries
          */
         if (frag_end & 7)
         {
@@ -2138,7 +2138,7 @@ int Defrag::new_tracker(Packet* p, FragTracker* ft)
     /* insert the fragment into the frag list */
     ft->fraglist = f;
     ft->fraglist_tail = f;
-    ft->fraglist_count = 1;  /* XXX: Are these duplciates? */
+    ft->fraglist_count = 1;  /* XXX: Are these duplicates? */
     ft->frag_pkts = 1;
 
     /*
@@ -2163,9 +2163,9 @@ int Defrag::new_tracker(Packet* p, FragTracker* ft)
  * @param fragLength Length of packet data
  * @param len Length of this fragment
  * @param slide Adjustment to make to left side of data (for left overlaps)
- * @param trunc Adjustment to maek to right side of data (for right overlaps)
+ * @param trunc Adjustment to make to right side of data (for right overlaps)
  * @param frag_offset Offset for this fragment
- * @prarm left FragNode prior to this one
+ * @param left FragNode prior to this one
  * @param retFrag this one after its inserted (returned)
  *
  * @return status
@@ -2285,7 +2285,7 @@ int Defrag::add_frag_node(
  * Duplicate a frag node and insert it into the list.
  *
  * @param ft FragTracker to hold the packet
- * @prarm left FragNode prior to this one (to be dup'd)
+ * @param left FragNode prior to this one (to be dup'd)
  * @param retFrag this one after its inserted (returned)
  *
  * @return status
index 6eec4a281679a099f4f6792a488b4a9709ae45db..c175bedc9f0492fff89092083ace1e0631010ce2 100644 (file)
@@ -45,7 +45,7 @@ struct FragTracker
                                 * last frag offset
                                 */
 
-    uint32_t frag_pkts;   /* nummber of frag pkts stored under this tracker */
+    uint32_t frag_pkts;   /* number of frag pkts stored under this tracker */
 
     struct timeval frag_time; /* time we started tracking this frag */
 
index 609fb4964a6907d2745d8b4d84bfa582bf64b076..4901b5c9eaaba25d4690e2cd0d675a3d79464036 100644 (file)
@@ -179,7 +179,7 @@ bool TcpStreamSession::is_sequenced(uint8_t dir)
     return true;
 }
 
-/* This will falsely return SSN_MISSING_BEFORE on the first reassembed
+/* This will falsely return SSN_MISSING_BEFORE on the first reassembled
  * packet if reassembly for this direction was set mid-session */
 uint8_t TcpStreamSession::missing_in_reassembled(uint8_t dir)
 {
index e659a10d7510fbb9307a26f9beb0fec81b3a5493..f8c4f40d07a209c3a0c48e04e2d980eae87b498d 100644 (file)
@@ -98,7 +98,7 @@ void Stream::populate_flow_key(Packet* p, FlowKey* key)
         p->type(), p->get_ip_proto_next(),
         p->ptrs.ip_api.get_src(), p->ptrs.sp,
         p->ptrs.ip_api.get_dst(), p->ptrs.dp,
-        // if the vlan protocol bit is defined, vlan layer gauranteed to exist
+        // if the vlan protocol bit is defined, vlan layer guaranteed to exist
         (p->proto_bits & PROTO_BIT__VLAN) ? layer::get_vlan_layer(p)->vid() : 0,
         (p->proto_bits & PROTO_BIT__MPLS) ? p->ptrs.mplsHdr.label : 0,
         p->pkth->address_space_id);
index 707a4798776a1578123a99f015649c1382641d29..11e1e5c21a99a1e2acd95fbccce981c411d7323a 100644 (file)
@@ -72,7 +72,7 @@ public:
     static Flow* new_flow(FlowKey*);
 
     // Looks in the flow cache for flow session with specified key and returns
-    // pointer to flow session oject if found, otherwise null.
+    // pointer to flow session object if found, otherwise null.
     static Flow* get_flow(const FlowKey*);
 
     // Allocates a flow session object from the flow cache table for the protocol
index 4ef45ee8f8419756e2e37d466617d74f1ed45192..b112aee4544c612036444ec2115d8cc0bd2bd55b 100644 (file)
@@ -400,7 +400,7 @@ int SegmentOverlapEditor::full_right_overlap_os2()
 int SegmentOverlapEditor::full_right_overlap_os3()
 {
     // If this packet is wholly overlapping and the same size as a previous one and we have not
-    // received the one immediately preceeding, we take the FIRST.
+    // received the one immediately preceding, we take the FIRST.
     if ( SEQ_EQ(right->seq, seq) && ( right->payload_size == len )
         && ( left && !SEQ_EQ(left->seq + left->payload_size, seq) ) )
     {
index 50250e5a89e7065af4380503139cb20591abd10a..c9a24fa8faa2ce5eda21440ccc1632cf637f8d8b 100644 (file)
@@ -34,7 +34,7 @@ static const PegInfo pegName[] =
 {
     { "tcp_trim_syn", "tcp segments trimmed on SYN" },
     { "tcp_trim_rst", "RST packets with data trimmed" },
-    { "tcp_trim_win", "data trimed to window" },
+    { "tcp_trim_win", "data trimmed to window" },
     { "tcp_trim_mss", "data trimmed to MSS" },
     { "tcp_ecn_session", "ECN bits cleared" },
     { "tcp_ts_nop", "timestamp options cleared" },
index 54a7de5bb479d3bd3a5e7a35ae16c2e4d6411ca8..b54450faabbfee031fcd5d9b086b686460b7ff45 100644 (file)
@@ -199,8 +199,8 @@ public:
 static inline int handle_repeated_syn_mswin(TcpStreamTracker* talker, TcpStreamTracker* listener,
     TcpSegmentDescriptor& tsd, TcpSession* session)
 {
-    /* Windows has some strange behaviour here.  If the sequence of the reset is the
-     *  next expected sequence, it Resets.  Otherwise it ignores the 2nd SYN.
+    /* Windows has some strange behavior here.  If the sequence of the reset is the
+     * next expected sequence, it Resets.  Otherwise it ignores the 2nd SYN.
      */
     if (SEQ_EQ(tsd.get_seg_seq(), listener->r_nxt_ack))
     {
index d3dd1b5a3c56dc90b0568837751ac34b2c64c557..340f0d8dbaa6a96a097ef328333270ab9dceb005 100644 (file)
@@ -16,7 +16,7 @@
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-// tcp_reassember.cc author davis mcpherson <davmcphe@@cisco.com>
+// tcp_reassembler.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Jul 31, 2015
 
 #ifdef HAVE_CONFIG_H
@@ -369,7 +369,7 @@ int TcpReassembler::purge_to_seq(uint32_t flush_seq)
      * Without doing it this way, the timestamp would be 20.  With
      * the next packet to arrive (P4, seq 40), the ts_last value
      * wouldn't be updated for the talker in ProcessTcp() since that
-     * code specificially looks for the NEXT sequence number.
+     * code specifically looks for the NEXT sequence number.
      */
     if ( !last_ts )
         return purged_bytes;
index d4f6bb122093da05fa0c606a901c65f826be59b2..ce2892f3c53f87b5154c72107af2659e967f8f17 100644 (file)
@@ -383,7 +383,7 @@ int TcpSession::process_tcp_data(TcpSegmentDescriptor& tsd)
             return STREAM_UNALIGNED;
         }
 
-        /* move the ack boundry up, this is the only way we'll accept data */
+        /* move the ack boundary up, this is the only way we'll accept data */
         // FIXIT-L for ips, must move all the way to first hole or right end
         listener->r_nxt_ack = tsd.get_end_seq();
 
@@ -679,7 +679,7 @@ void TcpSession::check_for_session_hijack(TcpSegmentDescriptor& tsd)
 
         if ( tsd.get_pkt()->is_eth() )
         {
-            // if flag is set, gauranteed to have an eth layer
+            // if flag is set, guaranteed to have an eth layer
             Packet* p = tsd.get_pkt();
             const eth::EtherHdr* eh = layer::get_eth_layer(p);
             bool t_hijack = !talker->compare_mac_addresses(eh->ether_src);
@@ -767,7 +767,7 @@ void TcpSession::handle_data_segment(TcpSegmentDescriptor& tsd)
         // FIXIT-M move this to normalizer base class, handle OS_PROXY in derived class
         if (config->policy != StreamPolicy::OS_PROXY)
         {
-            /* check for valid seqeuence/retrans */
+            /* check for valid sequence/retrans */
             if (!listener->is_segment_seq_valid(tsd) )
                 return;
 
index 14a63030310cf068841f20a93a9e03abd0a055f4..9789e775eca66611157c7bec3cd8272b823aca80 100644 (file)
@@ -42,13 +42,13 @@ static bool hasService(const HostAttributeEntry* host_entry,
             {
                 if (!application)
                 {
-                    /* match of ipproto, proto.  application not speicifed */
+                    /* match of ipproto, proto.  application not specified */
                     return true;
                 }
             }
             else if (!protocol)
             {
-                /* match of ipproto.  protocol not speicifed */
+                /* match of ipproto.  protocol not specified */
                 return true;
             }
         }
@@ -74,13 +74,13 @@ static bool hasClient(const HostAttributeEntry* host_entry,
             {
                 if (!application)
                 {
-                    /* match of ipproto, proto.  application not speicifed */
+                    /* match of ipproto, proto.  application not specified */
                     return true;
                 }
             }
             else if (!protocol)
             {
-                /* match of ipproto.  protocol not speicifed */
+                /* match of ipproto.  protocol not specified */
                 return true;
             }
         }
index a74b0635842df118c99b7276dd79bdcc2846201e..02e7cfe13aa73ca3af13a783a8076e4edc72eec1 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef TIMERSUB_H
 #define TIMERSUB_H
 
-// never worry about timersub type activies again -- from GLIBC and upcased.
+// never worry about timersub type activities again -- from GLIBC and upcased.
 #define TIMERSUB(a, b, result)                                                \
     do {                                                                      \
         (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;                         \
index 7b8c3f30385fa39b4c2ee38583d89b96d0751d1f..9764f36051a8f4a8acddc94fecac6ec3097af214 100644 (file)
@@ -214,7 +214,7 @@ int KMapAdd(KMAP* km, void* key, int n, void* userdata)
         root = km->root[ *P ];
     }
 
-    /* Walk exisitng Patterns */
+    /* Walk existing Patterns */
     while ( n )
     {
         if ( root->nodechar == *P )
@@ -268,7 +268,7 @@ int KMapAdd(KMAP* km, void* key, int n, void* userdata)
         else
         {
             /*
-            *  Start a new sibling bracnch to finish this Keyword
+            *  Start a new sibling branch to finish this Keyword
                 */
             //printf("added sibling branch nodechar = %c \n",*P);
             root->sibling= KMapCreateNode(km);
index c8940806f2aee6d22007163d7c030da63bc7e012..30273499a9efc5f64a40262369ca11b184addee7 100644 (file)
@@ -25,7 +25,7 @@
 // Keyword Trie based Map Table
 // The tree uses linked lists to build the finite automata
 //
-// MapKeyFind(): Performs a setwise strcmp() equivalant.
+// MapKeyFind(): Performs a setwise strcmp() equivalent.
 //
 // Keys may be ascii or binary, both may be of random sizes.  Each key may
 // be a different size, or all one size.  Fast dictionary lookup,
index 9ecac3d31cf151d0d5dac4bd3ed88b53c69ac224..bc2ab8078fde6bb2b31409c110403a6150de9a59 100644 (file)
@@ -224,7 +224,7 @@ const PegInfo proc_names[] =
 
 void pc_sum()
 {
-    // must sum explicitly; can't zero; daq stats are cuumulative ...
+    // must sum explicitly; can't zero; daq stats are cumulative ...
     const DAQ_Stats_t* daq_stats = SFDAQ::get_stats();
 
     g_daq_stats.hw_packets_received += daq_stats->hw_packets_received;
index d652bc5c74786a28be38a27bbdce8278729d5000..8fb5ac17b953e1f728b31b8aa1c8ba5e75ce8c47 100644 (file)
@@ -108,7 +108,7 @@ int SnortSnprintfAppend(char* buf, size_t buf_size, const char* format, ...)
 
     if (buf[buf_size - 1] != '\0' || (size_t)ret >= buf_size)
     {
-        /* truncation occured */
+        /* truncation occurred */
         buf[buf_size - 1] = '\0';
         return SNORT_SNPRINTF_TRUNCATION;
     }
@@ -315,7 +315,7 @@ int sfsnprintfappend(char* dest, int dsize, const char* format, ...)
     appendLen = vsnprintf(dest+currLen, dsize-currLen, format, ap);
     va_end(ap);
 
-    dest[dsize-1]=0; /* guarantee a null tremination */
+    dest[dsize-1]=0; /* guarantee a null termination */
 
     return appendLen;
 }
index 40f245185e3d3cbb7537237e80089820e080ad48..f0199f1fe4664dbb507a3a52d12d047389b9e93f 100644 (file)
@@ -19,7 +19,7 @@
 
 //  This program is a simple utility for reading the flatbuffers files
 //  Snort generates. The files consist of a schema with a stream of
-//  timetamped records that this program converts into a YAML array for
+//  timestamped records that this program converts into a YAML array for
 //  further data processing.
 
 #include <csignal>
index ed8ed8e2dbde8405756fa3158e0d46426027c6f2..0ca546eed0beaa5c27006b82e0aedaf6c973315a 100644 (file)
@@ -45,7 +45,7 @@ bool DefaultRuleState::convert(std::istringstream& data_stream)
     table_api.open_table("alerts");
 
     if (data_stream >> val &&
-        util::case_compare(val, "disableD"))
+        util::case_compare(val, "disabled"))
     {
         table_api.add_option("default_rule_state", false);
     }
index 211f6c381fb379b5c706f968eeab5b73b64fef9f..7538ba1d290abec391ea272d56b53eca7ac9bdea 100644 (file)
@@ -73,7 +73,7 @@ bool IgnorePorts::convert(std::istringstream& data_stream)
 
             if (!port.compare("any"))
             {
-                // Possible Snort bug, but only port zero is ignrored
+                // Possible Snort bug, but only port zero is ignored
                 bind.add_when_port("0");
             }
             else if (colon_pos == std::string::npos)
@@ -116,13 +116,13 @@ bool IgnorePorts::convert(std::istringstream& data_stream)
         {
             data_api.failed_conversion(data_stream, "can't convert " + port);
             retval = false;
-            bind.print_binding(false); // don't print the binding if an error occured
+            bind.print_binding(false); // don't print the binding if an error occurred
         }
         catch (std::out_of_range)
         {
             data_api.failed_conversion(data_stream, "Port" + port + " must be <= 65535");
             retval = false;
-            bind.print_binding(false); // don't print the binding if an error occured
+            bind.print_binding(false); // don't print the binding if an error occurred
         }
     }
 
index 280d17a09495a7a23d94e5c28ddf45919244bd10..87bb91ad11c8dc1e9ab11ea772b4a432a3d81c21 100644 (file)
@@ -23,8 +23,8 @@
 #include <string>
 
 /*
- * This file was specifically created to avoid cyclic depencies
- * and should therefore avoid ANY local depencies.
+ * This file was specifically created to avoid cyclic dependencies
+ * and should therefore avoid ANY local dependencies.
  */
 
 class ConversionState;
index 8dadbedb5801126cc17b08e1b1c02ccf94c0bf2a..8f36ecc4a5f1d9d3b51ba6778e3ead9bc619b33d 100644 (file)
@@ -58,7 +58,7 @@ protected:
     RuleApi& rule_api;
 
 #if 0
-    Forward declaration fo parsing methods.Since these are all inline,
+    Forward declaration of parsing methods.Since these are all inline,
     unable to forward declare in regular code.
 
     inline bool eat_option(std::istringstream& stream);
@@ -204,8 +204,9 @@ protected:
             }
             else
             {
-                table_api.add_comment("Unable to convert " + elem +
-                    "!!  The element must be a single charachter or number between 0 - 255 inclusive");
+                table_api.add_comment(
+                    "Unable to convert " + elem + "!!  "
+                    "The element must be a single character or number between 0 - 255 inclusive");
                 retval = false;
             }
         }
@@ -225,7 +226,7 @@ protected:
         while (stream >> elem && elem != "}")
             tmp += " " + elem;
 
-        // remove the extra space at the beginig of the string
+        // remove the extra space at the beginning of the string
         if (tmp.size() > 0)
             tmp.erase(tmp.begin());
 
index e189ca56be283511a233f608c0191870899d4efc..ad47cc0d14097ac59eb293cd6b86cd556269aa5d 100644 (file)
@@ -115,13 +115,13 @@ std::ostream& operator<<(std::ostream& out, const Comments& c)
         std::string curr_pre_str = pre_str;
         std::size_t max_line_length = c.max_line_length - pre_str_length - 1;
 
-        // print a newline betweens strings, but not before the first line.
+        // print a newline between strings, but not before the first line.
         if (first_str)
             first_str = false;
         else
             out << "\n";
 
-        // if the line is emptry, we need a newline. the loop won't print it.
+        // if the line is empty, we need a newline. the loop won't print it.
         if (str.size() == 0)
             out << "\n";
 
index 1c53093859cbbd3c06b7e92e918fff4da3b54a58..baf1668a2e589a4776af1e740b8d0eb3488e0db3 100644 (file)
@@ -31,7 +31,7 @@ static const std::string start_comments =
 
 static const std::string start_errors =
     "\nERRORS:\n"
-    "    all of these occured during the attempted conversion:\n\n";
+    "    all of these occurred during the attempted conversion:\n\n";
 
 static const std::string start_bad_rules =
     "\nFAILED RULES CONVERSIONS:\n"
index 3d64a1f7fa4fcedf27447b499ebad12cbfdd1050..18e59dabec182f9c3ffef444320847147f9173d9 100644 (file)
@@ -114,7 +114,7 @@ bool Variable::add_value(std::string elem)
         VarData* vd = new VarData();
         vd->type = VarType::STRING;
 
-        // if the previous variable was a symbol, we need a space seperator.
+        // if the previous variable was a symbol, we need a space separator.
         if (!vars.empty())
             s.insert(0, " ");
 
index 28901e8f47d5b828e575f273c24ebe06eb54951f..6480337e02245aa1c2b65d6819d158f94551f606 100644 (file)
@@ -69,7 +69,7 @@ std::string DataApi::translate_variable(const std::string& var_name)
  * I copied the Snort version of ExpandVars and made some
  * minor adjustments.
  *
- * Given a Snort style string to expand, this funcion will return
+ * Given a Snort style string to expand, this function will return
  * the expanded string
  */
 std::string DataApi::expand_vars(const std::string& string)
index f5c034cbb9ded266f4c5811055f77ec50258111f..bee0897c43307d6ff92c62ee57ac79a71e105264 100644 (file)
 #include "data/dt_rule_api.h"
 
 // FIXIT-L change name to data_api
-// FIXIT-L remove all unecessary includes
+// FIXIT-L remove all unnecessary includes
 // FIXIT-L set_default_print name should be change to print_all
 
 // As a heads up to whoever reads this file.  This one API is really three
 // distinct API's rolled into one.  One API for rules, one api for misc
 // data (variables, includes, etcs), one api for creating tables. Hoever,
-// the reason they are together is becasue this class is not static, and I
+// the reason they are together is because this class is not static, and I
 // did not want to be pass three pointers to the three API's when creating
-// new convesion states.  There are comments in in all caps which show the
-// seperate the sections.
+// new conversion states.  There are comments in in all caps which show the
+// separate the sections.
 
 // The first section of this file is really DataApi creation and
-// initialization, and adding miscelaneous objects to the DataApi data.
+// initialization, and adding miscellaneous objects to the DataApi data.
 // The second section is for creating tables and their options.  The third
 // section is for creating rules.
 
@@ -89,7 +89,7 @@ public:
     bool empty() const
     { return vars.empty() && includes.empty(); }
 
-    // functions specifically usefull when parsing includes.
+    // functions specifically useful when parsing includes.
     // allows for easy swapping of data.  These two functions
     // swap data which will be printed in 'print_rules()' and
     // 'print_conf_options()'
@@ -103,7 +103,7 @@ public:
     bool add_variable(std::string name, std::string value);
     // add a Snort style include file
     bool add_include_file(std::string name);
-    // add a 'comment' to the Lua file. shoudl ONLY be used when
+    // add a 'comment' to the Lua file. should ONLY be used when
     // adding a comment from the original Snort file.
     void add_comment(std::string);
     // Call when failed to convert a line.
index 33acb5bf139e85a10582163c718ca8746c38efbc..e42631e325e6d0d2040e10182ff7d1918f128a1f 100644 (file)
@@ -108,7 +108,7 @@ void RuleApi::include_rule_file(std::string file_name)
 {
     if (curr_rule)
     {
-        DataApi::developer_error("Attempting to include a file while buliding a rule!");
+        DataApi::developer_error("Attempting to include a file while building a rule!");
     }
     else
     {
index 28b7400119820e7495317244226f4a23ece89817..afa38830e60f5e0c6105ca3089dd04492e561723 100644 (file)
@@ -49,7 +49,7 @@ public:
     void print_rules(std::ostream&, bool in_rule_file);
     void print_rejects(std::ostream&);
 
-    // functions specifically usefull when parsing includes.
+    // functions specifically useful when parsing includes.
     // allows for easy swapping of data.  These two functions
     // swap data which will be printed in 'print_rules()' and
     // 'print_conf_options()'
index d9e4fe2cce474c8ee430e273655ee9e5bdc8e093..f933d587b7119fc91f0f1915fd98b93b38b41915 100644 (file)
@@ -189,7 +189,7 @@ void TableApi::create_append_data(std::string& fqn, Table*& t)
     // I need to iterate over the stack of open tables.  However,
     // stack's don't allow iteration without popping.  So, rather
     // than change the underlying stack data structure, I am going
-    // to just copy the entire data structure.  Innedficciant, but
+    // to just copy the entire data structure.  Inefficient, but
     // not pressed for speed here.
     std::stack<Table*> copy(open_tables);
 
index cf3e46a27eb68607322f6aa14d25b3976275807e..265f4a7c75dab8b586ff5926b16fc758f97be77d 100644 (file)
 * really three distinct API's rolled into one.  One API for rules,
 * one api for misc data (variables, includes, etcs), one api
 * for creating tables. Hoever, the reason they are
-* together is becasue this class is not static, and I did not
+* together is because this class is not static, and I did not
 * want to be pass three pointers to the three API's when
-* creating new convesion states.  There are comments in
-* in all caps which show the seperate the sections.
+* creating new conversion states.  There are comments in
+* in all caps which show the separate the sections.
 *
 * The first section of this file is really DataApi creation
-* and initialization, and adding miscelaneous objects
+* and initialization, and adding miscellaneous objects
 * to the DataApi data.  The second section is for creating
 * tables and their options.  The third section is for
 * creating rules.
@@ -109,7 +109,7 @@ public:
 // add an option with a list of variables -->  table = { name = 'elem1 elem2 ...' }
 // corresponds to Parameter::PT_MULTI
     bool add_list(std::string list_name, std::string next_elem);
-// add a commment to be printed in the table --> table = { -- comment \n ... }
+// add a comment to be printed in the table --> table = { -- comment \n ... }
     bool add_comment(std::string comment);
 // add a comment about an option change to the table
     bool add_diff_option_comment(std::string orig_var, std::string new_var);
index cb28723f6d7c26d34fee3029641b36e14e0970e9..008c1c3b9b1e22826e62df6d28aa76d3d9cf4ccf 100644 (file)
@@ -175,7 +175,7 @@ int Converter::parse_file(std::string input_file)
 
             if (!tmp.empty())
             {
-                // first charachter is either a '#' or a ';'
+                // first character is either a '#' or a ';'
                 tmp.erase(tmp.begin());
                 util::ltrim(tmp);
             }
index 629897b240c14ccec054c887b337c4de5b8be0d0..4ed65a8a6b4f01db80cdb9ec43fbb43f9af3bc47 100644 (file)
@@ -61,7 +61,7 @@ public:
         std::string rules,         // defaults to output_file
         std::string errors);         // defaults to output_file
 
-    // parse a file without creating an entirely new Lua configuation
+    // parse a file without creating an entirely new Lua configuration
     int parse_include_file(std::string input_file);
 
     // set the next parsing state.
index 57f55d87e66dd16e73dc0c748d94cba2517212eb..ecb69819878e8e0366bc307b1e4045f6864235d9 100644 (file)
@@ -202,7 +202,7 @@ static void parse_config_file(const char* key, const char* val)
         std::size_t path_sep = conf_file.find_last_of("\\");
 #endif
 
-        /* is there a directory seperator in the filename */
+        /* is there a directory separator in the filename */
         if (path_sep != std::string::npos)
         {
             path_sep++;  /* include path separator */
@@ -353,18 +353,18 @@ static ConfigFunc basic_opts[] =
       "output the new Snort++ lua configuration to <out_file>" },
 
     { "q", print_quiet, "",
-      "quiet mode. Only output valid confiration information to the <out_file>" },
+      "quiet mode. Only output valid configuration information to the <out_file>" },
 
     { "r", parse_rule_file, "<rule_file>",
       "output any converted rule to <rule_file>" },
 
     { "s", sing_rule_files, "",
       "when parsing <include_file>, write <include_file>'s rules to "
-      "<rule_file>. Meaningles if '-i' provided" },
+      "<rule_file>. Meaningless if '-i' provided" },
 
     { "t", sing_conf_files, "",
       "when parsing <include_file>, write <include_file>'s information, "
-      "excluding rules, to <out_file>. Meaningles if '-i' provided" },
+      "excluding rules, to <out_file>. Meaningless if '-i' provided" },
 
     { "V", print_version, "",
       "Print the current Snort2Lua version" },
@@ -396,7 +396,7 @@ static ConfigFunc basic_opts[] =
       "between the Snort and Snort++ configurations to the <out_file>" },
 
     { "quiet", print_quiet, "",
-      "Same as '-q'. quiet mode. Only output valid confiration information to the <out_file>" },
+      "Same as '-q'. quiet mode. Only output valid configuration information to the <out_file>" },
 
     { "remark", add_remark, "",
       "same as '-m'.  add a remark to the end of every converted rule" },
index e01ac6867327335145a39752b5464428dadd1223..cb6bbb8721fe3fd949b863448842dd4af694f1c3 100644 (file)
@@ -25,7 +25,7 @@ namespace parser
 {
 /*
  * This file is directly copied (and then edited)
- * from Snrot++'s cmd_line.h
+ * from Snort++'s cmd_line.h
  */
 
 bool parse_cmd_line(int argc, char* argv[]);
index 27d56dddea04c488f91ee362866ec2b774fddfdf..b918bb7478736367f031f9dca779a1546e281e24 100644 (file)
@@ -164,16 +164,16 @@ std::size_t get_substr_length(std::string str, std::size_t max_length)
 
 bool get_string(std::istringstream& stream,
     std::string& option,
-    const std::string delimeters)
+    const std::string delimiters)
 {
-    if (delimeters.empty() || !stream.good())
+    if (delimiters.empty() || !stream.good())
     {
         option = std::string();
         return false;
     }
-    else if (delimeters.size() == 1)
+    else if (delimiters.size() == 1)
     {
-        std::getline(stream, option, delimeters[0]);
+        std::getline(stream, option, delimiters[0]);
         trim(option);
         return !option.empty();
     }
@@ -186,18 +186,18 @@ bool get_string(std::istringstream& stream,
         while (stream.good() && option.empty())
         {
             pos = stream.tellg();
-            std::getline(stream, option, delimeters[0]);
+            std::getline(stream, option, delimiters[0]);
         }
 
-        // find the first non-delimeter charachter
-        const std::size_t first_char = option.find_first_not_of(delimeters);
+        // find the first non-delimiter character
+        const std::size_t first_char = option.find_first_not_of(delimiters);
 
-        // if there are no characters between a delimeter, empty string. return false
+        // if there are no characters between a delimiter, empty string. return false
         if (first_char == std::string::npos)
             return false;
 
-        // find the first delimeter after the first non-delimeter
-        std::size_t first_delim = option.find_first_of(delimeters, first_char);
+        // find the first delimiter after the first non-delimiter
+        std::size_t first_delim = option.find_first_of(delimiters, first_char);
 
         if (first_delim == std::string::npos)
             first_delim = option.size();    // set value to take proper substr
index 5f90a8bb512babbbb21dc2e473e00f41bd7436fb..6514a15c5408c1f06c1d454f25417e758bf26c5d 100644 (file)
@@ -43,7 +43,7 @@ const ConvertMap* find_map(const std::vector<const ConvertMap*>&, const std::str
 const std::unique_ptr<const ConvertMap>& find_map(
     const std::vector<std::unique_ptr<const ConvertMap> >&, const std::string& keyword, bool strict_case = true);
 
-// trim from begining
+// trim from beginning
 std::string& ltrim(std::string& s);
 
 // trim from end
@@ -56,27 +56,27 @@ std::string& trim(std::string& s);
 bool file_exists(const std::string& name);
 
 /*
- * Takes in a stream and a string of delimeters. The function will extract the characters
- * from the stream until it hits one of the delimeters.  The substring will be set to the
- * third parameter.  The stream itself will point to the chrachter after the first delim.
+ * Takes in a stream and a string of delimiters. The function will extract the characters
+ * from the stream until it hits one of the delimiters.  The substring will be set to the
+ * third parameter.  The stream itself will point to the character after the first delim.
  *
  * PARAMS:
  *          data_stream - the data stream from which to find a substring.
- *          delimeters - The string of delimeters.
+ *          delimiters - The string of delimiters.
  *          options - The found substring will be place in this parameter.  If the
  *                     stream is empty or no characters have been extracted, then
- *                     this parameter wil be set to an empty string.
+ *                     this parameter will be set to an empty string.
  * RETURNS:
  *          True - when the string is found.
- *          False - whenma substing was unable to be extracted.
+ *          False - when the substring was unable to be extracted.
  */
 bool get_string(std::istringstream& data_stream,
     std::string& option,
-    const std::string delimeters);
+    const std::string delimiters);
 
 /*
  * Returns the rest of the data_streams data as one argument.
- * Usefule when parsing filenames with spaces or other
+ * Useful when parsing filenames with spaces or other
  * characters which can get removed by c++ libraries
  *
  * NO SIDE EFFECTS
@@ -93,7 +93,7 @@ std::string get_rule_option_args(std::istringstream& data_stream);
  *
  * PARAMS:
  *          data_stream - the rule's data stream
- *          opt_name - the option name for which to seach.
+ *          opt_name - the option name for which to search.
  * RETURN:
  *          the opt_names value or an empty string if the opt_name
  *          is not found.
@@ -105,7 +105,7 @@ std::string rule_option_find_val(std::istringstream& data_stream,
 // remove any ']]' and double spaces from this string.
 std::string& sanitize_lua_string(std::string& s);
 
-// find the location of the first space before max_str_lenght.
+// find the location of the first space before max_str_length.
 // if no space exists before max_str_length, return the first space
 // after max_length. Otherwise, return std::string::npos
 std::size_t get_substr_length(std::string s, std::size_t max_length);
index 7c98e09e94af7eed96c0adf650f48315043e7d30..27eaf589bfa7c41f39d39f5d013e0727847afe8e 100644 (file)
@@ -25,7 +25,7 @@
 
 class TableApi;
 
-// The Binders destrutor will add the Objects configuration to the
+// The Binders destructor will add the Objects configuration to the
 //   table_api.
 class Binder
 {
index f449c48f1875ba233d61a024442b8d6f39a62685..715e5c8a948cc4a31421482029364eacb5e4f10c 100644 (file)
@@ -63,7 +63,7 @@ bool AttributeTable::get_next_element(std::string& elem)
 
     if (!elem.empty() && elem.front() != '<')
     {
-        // add the '<' charachter back for next call
+        // add the '<' character back for next call
         attr_file.unget();
         return true;
     }
@@ -76,7 +76,7 @@ bool AttributeTable::get_next_element(std::string& elem)
 }
 
 /*
- * Parse the 'SERVICE' element and add elemnts to Lua configuration
+ * Parse the 'SERVICE' element and add elements to Lua configuration
  */
 void AttributeTable::parse_service()
 {
@@ -466,7 +466,7 @@ bool AttributeTable::convert(std::istringstream& data_stream)
             parse_attr_table();
 
         /*
-         * While there probaby should be another else,
+         * While there probably should be another else,
          * I have absolutely NO idea what correct
          * 'grammar' entails. So, in this case and all others
          * just ignore any extra data.
index 4924cad549503a33e33477333237dad4af3fe02c..b48f740bdd17dd91c523eef422cb00969570b523 100644 (file)
@@ -72,8 +72,7 @@ bool Include::convert(std::istringstream& data_stream)
     }
     else
     {
-        data_api.failed_conversion(data_stream, "include requires a"
-            "'filename' argument");
+        data_api.failed_conversion(data_stream, "include requires a 'filename' argument");
     }
 
     return false;
index e31cdb73b68cd7b45e8af2ce1cced1dec85b1c13..a096cd655683a27f8d1fc800c906c5a746869f8b 100644 (file)
@@ -58,7 +58,7 @@ bool RuleHeader::convert(std::istringstream& data_stream)
     std::string rule_string = data_stream.str();
     std::size_t end_pos = rule_string.rfind(')');
     rule_string = rule_string.substr(0, end_pos);
-    util::rtrim(rule_string); // gaurantee last char is a rule opt/subopt
+    util::rtrim(rule_string); // guarantee last char is a rule opt/subopt
     data_stream.str(rule_string);
     data_stream.seekg(curr_pos);  // position was reset. so find curr position
 
index 60a733a5463612324d957e4f88e77d209e0ee89e..37771c3c2d505f62dedc01472968d827df5e3243 100644 (file)
@@ -121,7 +121,7 @@ bool RuleType::convert(std::istringstream& stream)
 
                 if (map)
                 {
-                    // using smart pointer to gaurantee new Map is deleted
+                    // using smart pointer to guarantee new Map is deleted
                     const std::vector<std::unique_ptr<const ConvertMap> >& ruletype_map =
                         ruletype_api;
                     std::unique_ptr<ConvertMap> new_map(new ConvertMap());
index 81001cd538b7b7b826f53badf7877cefda80bd7b..3216f331a7772ed36dcc92a28ec5636bf12a5d9a 100644 (file)
@@ -69,7 +69,7 @@ bool AlertFast::convert(std::istringstream& data_stream)
     std::string units = "B";
 
     std::istringstream tmp_stream(keyword);
-    tmp_stream >> limit;  // gauranteed success since keyword is non-empty
+    tmp_stream >> limit;  // guaranteed success since keyword is non-empty
     if (tmp_stream >> c)
     {
         if (c == 'K' || c == 'k')
index 39f3c0f4b670f632055c9ce40b61865cf6836308..509904bbbdc38629301dce416b1e31989f115066 100644 (file)
@@ -134,7 +134,7 @@ bool DcerpcServer::get_bracket_list(std::istringstream& data_stream, std::string
 }
 
 // Read from data_stream either a single value x or list : [x,y,z ... ]
-// Put in str either a single value 'x', or space sperated list 'x y z'
+// Put in str either a single value 'x', or space separated list 'x y z'
 bool DcerpcServer::convert_val_or_list(std::istringstream& data_stream, std::string& str)
 {
     if (!(data_stream >> str))
@@ -165,7 +165,7 @@ bool DcerpcServer::convert_val_or_list(std::istringstream& data_stream, std::str
     // remove ""
     str.erase(std::remove(str.begin(), str.end(), '"'), str.end());
 
-    // convert ',' seperators to spaces
+    // convert ',' separators to spaces
     replace(str.begin(), str.end(), ',', ' ');
 
     return true;
@@ -405,7 +405,7 @@ bool DcerpcServer::parse_detect(std::istringstream& data_stream,
                 ((ports.find('[') == std::string::npos) &&  (ports.find(']') !=
                 std::string::npos)))
             {
-                // found outer list seperator
+                // found outer list separator
                 if (one_type)
                 {
                     return false;
@@ -465,7 +465,7 @@ bool DcerpcServer::parse_detect(std::istringstream& data_stream,
             {
                 return true;
             }
-            else // wait for list terminator or item seperator
+            else // wait for list terminator or item separator
             {
                 if (!data_stream.get(c))
                     return false;
index 5a97484c7e7e4fdf824651c4b357c7538e63ed83..52a03d3d60e71e41b3afd56b67465b528a3654e3 100644 (file)
@@ -42,12 +42,12 @@ bool Frag3Global::convert(std::istringstream& data_stream)
 
     table_api.open_table("stream_ip");
 
-    // full options are comma seperated
+    // full options are comma separated
     while (util::get_string(data_stream, keyword, ","))
     {
         bool tmpval = true;
 
-        // suboptions are space seperated
+        // suboptions are space separated
         std::istringstream args_stream(keyword);
         args_stream >> keyword;
 
index 26ea81bae30d8c9cbe11e2280c03c02cfea46742..a7f53dcd83d9dec5d92b85966d1478194b0a348d 100644 (file)
@@ -454,7 +454,7 @@ bool FtpClient::convert(std::istringstream& data_stream)
                         retval = false;
                     }
 
-                    table_api.close_table(); // anonymouse
+                    table_api.close_table(); // anonymous
                 }
                 table_api.close_table(); // "bounce_to"
             }
@@ -551,7 +551,7 @@ bool Telnet::convert(std::istringstream& data_stream)
         }
     }
 
-    // adding the defualt port.
+    // adding the default port.
     if (!ports_set)
         bind.add_when_port("23");
 
index 31e8ea6ce54f0c12129f82e0ea3200fbec0bc405..3f0098682f9d7b1da2a033fe9194f7bb6858a56a 100644 (file)
@@ -49,7 +49,7 @@ bool Reputation::convert(std::istringstream& data_stream)
         bool tmpval = true;
         std::istringstream arg_stream(keyword);
 
-        // should be gauranteed to happen.  Checking for error just cause
+        // should be guaranteed to happen.  Checking for error just cause
         if (!(arg_stream >> keyword))
             tmpval = false;
 
index b74bde63cde1fa849262f26eb8a7547dfdff272b..9ee93eefc99a8ec680029ed61cbfee0bcaf4df42 100644 (file)
@@ -157,7 +157,7 @@ bool PortScan::convert(std::istringstream& data_stream)
             retval = tmpval;
     }
 
-    table_api.close_table(); // unecessary since the state will be reset
+    table_api.close_table(); // unnecessary since the state will be reset
     return retval;
 }
 
index 4409940aa515dc753018ed5bc20b083133454b8f..27345de6b211adf7f7e8fc75722efba307fbcfe8 100644 (file)
@@ -57,7 +57,7 @@ bool Sip::convert(std::istringstream& data_stream)
         bool tmpval = true;
         std::istringstream arg_stream(keyword);
 
-        // should be gauranteed to happen.  Checking for error just cause
+        // should be guaranteed to happen.  Checking for error just cause
         if (!(arg_stream >> keyword))
             tmpval = false;
 
index 324a2e997f618020f6e390fcadd167d495a1af4d..e3cf834bfacac4bfe2b272beadc326d4b9292b1c 100644 (file)
@@ -55,7 +55,7 @@ bool Ssl::convert(std::istringstream& data_stream)
         bool tmpval = true;
         std::istringstream arg_stream(keyword);
 
-        // should be gauranteed to happen.  Checking for error just cause
+        // should be guaranteed to happen.  Checking for error just cause
         if (!(arg_stream >> keyword))
             tmpval = false;
 
index 2d8903641f90f81312b3a43bd17799e2cf6778ab..dc5e2916105631220cd7b9c3506b9e17aa53b065 100644 (file)
@@ -49,7 +49,7 @@ bool StreamGlobal::convert(std::istringstream& data_stream)
         bool tmpval = true;
         std::istringstream arg_stream(keyword);
 
-        // should be gauranteed to happen.  Checking for error just cause
+        // should be guaranteed to happen.  Checking for error just cause
         if (!(arg_stream >> keyword))
             tmpval = false;
 
index 643e40867f175fae4f46bd9da4381098ba94fc9c..0e48bfec4fb0e6355df0b13c960a003e03d679c1 100644 (file)
@@ -271,7 +271,7 @@ bool StreamTcp::convert(std::istringstream& data_stream)
     server.set_when_role("server");
     any.set_when_role("any");
 
-    // create pointers so other member functinos can access binders
+    // create pointers so other member functions can access binders
     bind_client = &client;
     bind_server = &server;
     bind_any = &any;
@@ -287,7 +287,7 @@ bool StreamTcp::convert(std::istringstream& data_stream)
         bool tmpval = true;
         std::istringstream arg_stream(keyword);
 
-        // should be gauranteed to happen.  Checking for error just cause
+        // should be guaranteed to happen.  Checking for error just cause
         if (!(arg_stream >> keyword))
             tmpval = false;
 
index 19c44e212e352effe239bbcd3503f5843e654c8f..6f39e26c4e2002da705289690a33823b298ffc7f 100644 (file)
@@ -219,7 +219,7 @@ bool Content<option_name>::convert(std::istringstream& data_stream)
         std::string tmp_str;
         val = "";
 
-        opts >> keyword;  // gauranteed to work since get_string is true
+        opts >> keyword;  // guaranteed to work since get_string is true
         std::getline(opts, val);
 
         util::trim(keyword);
@@ -254,7 +254,7 @@ bool Content<option_name>::convert(std::istringstream& data_stream)
                 add_sticky_buffer(data_stream, "pkt_data");
 
             // since this option is not an content modifier,
-            // lets coninue parsing the rest of the rule.
+            // lets continue parsing the rest of the rule.
             data_stream.clear();
             data_stream.seekg(pos);
             return set_next_rule_state(data_stream);
index c9361d844f058aedf5f1d16492f431e2cf510322..1cb41ffcea2badd13fb3a0b95b3c12ad89ba8eb5 100644 (file)
@@ -27,7 +27,7 @@
 namespace rules
 {
 /*
- * Convert rule option from comma list to a space sperated list in qoutes:
+ * Convert rule option from comma list to a space separated list in qoutes:
  * x,y,z to "x y z"
  */
 
index 5470c2c1bc82a6e2ca77bc56f59923b1f222cda2..bf2eda8a66f690529e188a4ee71b74796e2c27a0 100644 (file)
@@ -49,7 +49,7 @@ bool DNP3Obj::convert(std::istringstream& data)
     val.insert(0, group);
     size_t start_pos = val.find(',');
     if (start_pos == std::string::npos)
-        rule_api.bad_rule(data, "dnp3_obj:expecting 2 args seperated by comma");
+        rule_api.bad_rule(data, "dnp3_obj:expecting 2 args separated by comma");
     else
         val.insert(start_pos+1, var);
 
index 41879ecc0645234e5dec9748c2b4e77ad853a95f..0ce9b984ff5128220a78252033f97ae80e6910e9 100644 (file)
@@ -114,7 +114,7 @@ static ConversionState* ctor(Converter& c)
 {
     // react may not have arguments. So, set this information now.
 
-    // create this table to ensure react is instatiated
+    // create this table to ensure react is instantiated
     c.get_table_api().open_table("react");
     c.get_table_api().close_table();
 
index ac34d35150786d091a83833eeb9b1b10813740bb..f4d1ffda665d5c1044547567d8039165d583042b 100644 (file)
@@ -83,7 +83,7 @@ bool Resp::convert(std::istringstream& data_stream)
                 !tmp.compare("reset_source") ||
                 !tmp.compare("icmp_port"))
             {
-                // Now that we have confirmed this is a vlid option, parse it!!
+                // Now that we have confirmed this is a valid option, parse it!!
                 table_api.open_table("reject");
 
                 do
@@ -167,7 +167,7 @@ static ConversionState* ctor(Converter& c)
 {
     // reject may not have arguments. So, set this information now.
 
-    // create this table to ensure reject is instatiated
+    // create this table to ensure reject is instantiated
     c.get_table_api().open_table("reject");
     c.get_table_api().close_table();
 
index 57fc585ed7435661da1d676564a0dc8a7034ef97..c6c87868ce0808a6788aa1afe353b9c3646abf8f 100644 (file)
@@ -302,7 +302,7 @@ static void event_dump(u2record* record)
 
     /* network to host ordering
        In the event structure, only the last 40 bits are not 32 bit fields
-       The first 11 fields need to be convertted */
+       The first 11 fields need to be converted */
     field = (uint8_t*)&event;
     for (i=0; i<11; i++, field+=4)
     {
@@ -341,7 +341,7 @@ static void event6_dump(u2record* record)
 
     /* network to host ordering
        In the event structure, only the last 40 bits are not 32 bit fields
-       The first fields need to be convertted */
+       The first fields need to be converted */
     field = (uint8_t*)&event;
     for (i=0; i<9; i++, field+=4)
     {
@@ -387,7 +387,7 @@ static void event2_dump(u2record* record)
 
     /* network to host ordering
        In the event structure, only the last 40 bits are not 32 bit fields
-       The first 11 fields need to be convertted */
+       The first 11 fields need to be converted */
     field = (uint8_t*)&event;
     for (i=0; i<11; i++, field+=4)
     {
@@ -436,7 +436,7 @@ static void event2_6_dump(u2record* record)
 
     /* network to host ordering
        In the event structure, only the last 40 bits are not 32 bit fields
-       The first fields need to be convertted */
+       The first fields need to be converted */
     field = (uint8_t*)&event;
     for (i=0; i<9; i++, field+=4)
     {
@@ -522,7 +522,7 @@ static void packet_dump(u2record* record)
     memcpy(&packet, record->data, offset);
 
     /* network to host ordering
-       The first 7 fields need to be convertted */
+       The first 7 fields need to be converted */
     field = (uint8_t*)&packet;
     for (counter=0; counter<7; counter++, field+=4)
     {