]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
prioritized FIXITs
authorRuss Combs <rucombs@cisco.com>
Thu, 21 Aug 2014 16:00:34 +0000 (12:00 -0400)
committerRuss Combs <rucombs@cisco.com>
Thu, 21 Aug 2014 16:00:34 +0000 (12:00 -0400)
156 files changed:
ChangeLog
extra/src/ips_options/ips_urg.cc
extra/src/search_engines/sfksearch.cc
src/actions/act_replace.cc
src/actions/act_replace.h
src/actions/actions.cc
src/codecs/ip/cd_icmp4.cc
src/codecs/ip/cd_udp.cc
src/codecs/link/cd_mpls.cc
src/detection/detect.cc
src/detection/detection_options.cc
src/detection/detection_util.h
src/detection/fpcreate.cc
src/detection/fpdetect.cc
src/detection/generators.h
src/detection/signature.h
src/detection/tag.cc
src/events/event.cc
src/events/event_wrapper.cc
src/file_api/file_mime_process.cc
src/file_api/libs/file_sha256.h
src/filters/detection_filter.cc
src/filters/rate_filter.cc
src/filters/sfthd.cc
src/flow/expect_cache.cc
src/flow/flow.cc
src/flow/flow.h
src/flow/flow_cache.cc
src/flow/flow_control.cc
src/flow/session.h
src/framework/inspector.h
src/framework/ips_option.h
src/framework/logger.h
src/framework/module.h
src/framework/parameter.cc
src/framework/parameter.h
src/framework/plug_data.h
src/hash/zhash.cc
src/helpers/process.cc
src/ips_options/ips_byte_extract.cc
src/ips_options/ips_byte_test.cc
src/ips_options/ips_content.cc
src/ips_options/ips_content.h
src/ips_options/ips_detection_filter.cc
src/ips_options/ips_flowbits.cc
src/ips_options/ips_fragoffset.cc
src/ips_options/ips_http.cc
src/ips_options/ips_http_header.cc
src/ips_options/ips_pcre.cc
src/ips_options/ips_pcre.h
src/ips_options/ips_session.cc
src/ips_options/ips_tag.cc
src/ips_options/range.h
src/log/log_text.cc
src/log/messages.cc
src/log/messages.h
src/loggers/alert_csv.cc
src/loggers/alert_sf_socket.cc
src/loggers/alert_syslog.cc
src/loggers/alert_unixsock.cc
src/loggers/log_tcpdump.cc
src/loggers/unified2.cc
src/main.cc
src/main/analyzer.cc
src/main/analyzer.h
src/main/help.cc
src/main/modules.cc
src/main/policy.h
src/main/snort.cc
src/main/snort.h
src/main/snort_config.cc
src/main/snort_config.h
src/main/snort_debug.cc
src/main/snort_types.h
src/main/thread.cc
src/managers/event_manager.cc
src/managers/inspector_manager.cc
src/managers/ips_manager.cc
src/managers/module_manager.cc
src/managers/mpse_manager.cc
src/managers/plugin_manager.cc
src/managers/script_manager.cc
src/managers/so_manager.cc
src/network_inspectors/arp_spoof/arp_spoof.cc
src/network_inspectors/binder/binder.cc
src/network_inspectors/normalize/norm.cc
src/network_inspectors/normalize/norm.h
src/network_inspectors/normalize/norm_module.cc
src/network_inspectors/normalize/normalize.cc
src/network_inspectors/perf_monitor/perf.cc
src/network_inspectors/perf_monitor/perf_monitor.cc
src/network_inspectors/port_scan/port_scan.cc
src/network_inspectors/port_scan/ps_module.cc
src/packet_io/active.cc
src/packet_io/sfdaq.cc
src/parser/arg_list.cc
src/parser/config_file.cc
src/parser/config_file.h
src/parser/parse_conf.cc
src/parser/parse_conf.h
src/parser/parse_rule.cc
src/parser/parser.cc
src/parser/vars.h
src/protocols/ip.h
src/protocols/udp.h
src/search_engines/ac_sparse.cc
src/search_engines/ac_sparse_bands.cc
src/search_engines/bnfa_search.cc
src/search_engines/intel_soft_cpm.cc
src/search_engines/str_search.h
src/service_inspectors/ftp_telnet/ft_main.cc
src/service_inspectors/ftp_telnet/ftp.cc
src/service_inspectors/ftp_telnet/ftp_data.cc
src/service_inspectors/ftp_telnet/ftp_module.cc
src/service_inspectors/ftp_telnet/ftpp_si.cc
src/service_inspectors/ftp_telnet/hi_util_kmap.h
src/service_inspectors/ftp_telnet/hi_util_xmalloc.cc
src/service_inspectors/ftp_telnet/hi_util_xmalloc.h
src/service_inspectors/http_inspect/hi_client.cc
src/service_inspectors/http_inspect/hi_main.cc
src/service_inspectors/http_inspect/hi_module.cc
src/service_inspectors/http_inspect/hi_norm.cc
src/service_inspectors/http_inspect/hi_paf.cc
src/service_inspectors/http_inspect/hi_server.cc
src/service_inspectors/http_inspect/hi_ui_config.cc
src/service_inspectors/http_inspect/http_inspect.cc
src/service_inspectors/wizard/hexes.cc
src/service_inspectors/wizard/spells.cc
src/service_inspectors/wizard/wizard.cc
src/sfrt/sfrt_dir.cc
src/sfrt/sfrt_flat.h
src/sfrt/sfrt_flat_dir.cc
src/stream/base/stream_base.cc
src/stream/icmp/icmp_session.cc
src/stream/ip/ip_defrag.cc
src/stream/ip/ip_defrag.h
src/stream/ip/ip_module.cc
src/stream/ip/stream_ip.cc
src/stream/stream.h
src/stream/stream_api.cc
src/stream/stream_api.h
src/stream/stream_splitter.cc
src/stream/stream_splitter.h
src/stream/tcp/ips_stream_reassemble.cc
src/stream/tcp/stream_paf.cc
src/stream/tcp/tcp_session.cc
src/stream/tcp/tcp_session.h
src/stream/udp/udp_session.cc
src/target_based/sftarget_reader.cc
src/time/ppm.cc
src/time/profiler.cc
src/utils/dyn_array.cc
src/utils/dyn_array.h
src/utils/segment_mem.cc
src/utils/stats.cc
src/utils/util.h

index eee88a35946eeb3a55af7be4b829d54570556dfb..3ed8bf60cb66de2b334b0529f31628cf2aac333f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 -- remove share.h
 -- misc FIXITs
 -- refactored cmd line parsing and moved options to SnortModule
+-- prioritized all FIXITs; FIXIT-J are for josh to reprioritize
 
 114
 -- more FIXIT cleanup
index 5994b98138e36a44ec9addfe9059fecf7f94118d..cb77b4e866bf933f045859e2cb4228bcbc4e7a16 100644 (file)
@@ -41,7 +41,7 @@
 
 static const char* s_name = "urg";
 
-// FIXIT profiling is desirable but must be refactored to
+// FIXIT-H profiling is desirable but must be refactored to
 // avoid dependence on snort_config.h which snowballs
 //#undef PERF_PROFILING
 
@@ -50,7 +50,7 @@ static THREAD_LOCAL ProfileStats tcpUrgPerfStats;
 //-------------------------------------------------------------------------
 // range check
 //-------------------------------------------------------------------------
-// FIXIT this is a stub until we can use range.{h,cc}
+// FIXIT-L this is a stub until we can use range.{h,cc}
 
 struct RangeCheck
 {
index 71abb4efb5adfb649c7efc93739f8364e8b0c2da..a5eab175700ca0b0e161428e8634bc08b7c54423 100644 (file)
@@ -56,7 +56,7 @@
 
 static void KTrieFree(KTRIENODE *n);
 
-static unsigned int mtot = 0;  // FIXIT 1 / process
+static unsigned int mtot = 0;
 
 unsigned int KTrieMemUsed(void)
 {
index 6273a7f58c4dd31e2009bf67b181161f37a65ddb..e1ac578d76d167dd3b7874831f93aa1b1af1c6a7 100644 (file)
@@ -34,8 +34,8 @@
 
 static const char* s_name = "rewrite";
 
-// FIXIT ips_replace.cc should part of this lib
-// FIXIT enforce that a rule with a replace option has a replace action
+// FIXIT-L ips_replace.cc should part of this lib
+// FIXIT-L enforce that a rule with a replace option has a replace action
 //       (and vice-versa)
 //--------------------------------------------------------------------------
 // queue foo
index f7e102ba9a2c2afc5ea67978aa177bd0be8a99c9..912df26b0bb41a1e6037799e82a7386ec3dbab24 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <string>
 
-// FIXIT these prevent ips replace option and action
+// FIXIT-M these prevent ips replace option and action
 // from being dynamically built
 void Replace_ResetQueue(void);
 void Replace_QueueChange(const std::string&, unsigned);
index 7f28d590a53fbe4c986032bdf2b7f9cd30b27747..ca684f255e74a24f1d332b38c835deb5c3e7d617 100644 (file)
@@ -53,7 +53,7 @@ int AlertAction(Packet* p, const OptTreeNode* otn)
     /* Call OptTreeNode specific output functions */
     if(otn->outputFuncs)
     {
-        ListHead lh;  // FIXIT "kinda hackish"
+        ListHead lh;  // FIXIT-L "kinda hackish"
         lh.LogList = otn->outputFuncs;
         CallLogFuncs(p, otn, &lh);
     }
index 564f2b44af3a72c58e839bd1cf782ef7075d09e3..e7f86ca410aff6e5a17d395c02504eb14fab846a 100644 (file)
@@ -363,7 +363,7 @@ struct IcmpHdr {
 
 bool Icmp4Codec::encode(EncState* enc, Buffer* out, const uint8_t* /*raw_in*/)
 {
-    // FIXIT:  speak with Russ, then get rid of commented lines
+    // FIXIT-J:  speak with Russ, then get rid of commented lines
 //    uint8_t* p;
     IcmpHdr* ho;
 
index 1a1aad0acdb79d270e5dd89ad9e156fe11019cff..8e9630afbaffeb8fe6db9e365cad61f0c05f65bc 100644 (file)
@@ -60,7 +60,7 @@ static const Parameter udp_params[] =
     { "enable_gtp", Parameter::PT_BOOL, nullptr, "false",
       "decode GTP encapsulations" },
 
-    // FIXIT use PT_BIT_LIST
+    // FIXIT-L use PT_BIT_LIST
     { "gtp_ports", Parameter::PT_STRING, nullptr,
       "'2152 3386'", "set GTP ports" },
 
@@ -93,7 +93,7 @@ public:
     {
         if ( v.is("deep_teredo_inspection") )
         {
-            sc->enable_teredo = v.get_long();  // FIXIT move to existing bitfield
+            sc->enable_teredo = v.get_long();  // FIXIT-L move to existing bitfield
         }
         else if ( v.is("gtp_ports") )
         {
@@ -102,7 +102,7 @@ public:
         else if ( v.is("enable_gtp") )
         {
             if ( v.get_bool() )
-                sc->enable_gtp = 1;  // FIXIT move to existing bitfield
+                sc->enable_gtp = 1;  // FIXIT-L move to existing bitfield
         }
         else
         {
index 60d26f282d7f9d41326ccd0a6c0addaebd1c229a..cc69a8990dbf75f1537f3da12d8cf4a420e8a621 100644 (file)
@@ -84,12 +84,12 @@ public:
         if ( v.is("enable_mpls_multicast") )
         {
             if ( v.get_bool() )
-                sc->run_flags |= RUN_FLAG__MPLS_MULTICAST; // FIXIT move to existing bitfield
+                sc->run_flags |= RUN_FLAG__MPLS_MULTICAST; // FIXIT-L move to existing bitfield
         }
         else if ( v.is("enable_mpls_overlapping_ip") )
         {
             if ( v.get_bool() )
-                sc->run_flags |= RUN_FLAG__MPLS_OVERLAPPING_IP; // FIXIT move to existing bitfield
+                sc->run_flags |= RUN_FLAG__MPLS_OVERLAPPING_IP; // FIXIT-L move to existing bitfield
         }
         else if ( v.is("max_mpls_stack_depth") )
         {
index 7320f01b4fca7b59be044bdecf8477e58154c094..ec51fbc3fa2711b57cfcf9a48764bceb9afb2f47 100644 (file)
@@ -239,7 +239,7 @@ void CallAlertFuncs(Packet* p, const OptTreeNode* otn, ListHead* head)
     pc.total_alert_pkts++;
 
 #if 0
-    // FIXIT this should be a generic feature of otn
+    // FIXIT-M this should be a generic feature of otn
     if ( otn->sigInfo.generator != GENERATOR_SPP_REPUTATION )
     {
         /* Don't include IP Reputation events in count */
@@ -319,7 +319,7 @@ int Detect(Packet * p)
         return 0;
     }
 
-    // FIXIT:  Curently, if a rule is found on any IP layer, we
+    // FIXIT-M:  Curently, 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!!
index 1d73c7b8ce1baf98892b329361c66b9738ebe413..e9347649fe846ccae9ad0b6846d69cebce3defcc 100644 (file)
@@ -849,7 +849,7 @@ static void detection_option_node_update_otn_stats(
     if (node->option_type == RULE_OPTION_TYPE_LEAF_NODE)
     {
         /* Update stats for this otn */
-        // FIXIT should be sum of instances (only called from main thread)
+        // FIXIT-H should be sum of instances (only called from main thread)
         OptTreeNode *otn = (OptTreeNode *)node->option_data;
         OtnState* state = otn->state + get_instance_id();
         state->ticks += local_stats.ticks;
index 1b84e178c538064650a2b5a09d6b7b350a1586b8..9e2ab4eb75499ea99c627f7df620346f6cc34468 100644 (file)
@@ -153,7 +153,7 @@ static inline void DetectReset()
     ClearHttpBuffers();
 }
 
-int IsGzipData(Flow*);  // FIXIT these from HI
+int IsGzipData(Flow*);  // FIXIT-M these from HI
 int IsJSNormData(Flow*);
 
 #endif
index 07c5b2b826f9f5b59370f268d3756171a36f0de4..12057aa06b4fa927889c70467440251b27cae6cb 100644 (file)
@@ -1149,7 +1149,7 @@ static int fpAddPortGroupRule(
         return -1;
 
     // skip builtin rules
-    if ( !otn->sigInfo.text_rule )  // FIXIT must be set for so rules too!
+    if ( !otn->sigInfo.text_rule )  // FIXIT-H must be set for so rules too!
         return -1;
 
     /* Rule not enabled */
index f72218adfa1cc1b86b4411959040c8d331d95e0c..e7ee165c9e3e89bc0714f5810048faa885d942c0 100644 (file)
@@ -847,7 +847,7 @@ static inline int fpFinalSelectEvent(OTNX_MATCH_DATA *o, Packet *p)
 **          1 if flagged
 **
 */
-// FIXIT this should include frags now that they are in session
+// FIXIT-H this should include frags now that they are in session
 static inline int fpAddSessionAlert(Packet *p, OptTreeNode *otn)
 {
     if ( !p->flow )
@@ -878,7 +878,7 @@ static inline int fpAddSessionAlert(Packet *p, OptTreeNode *otn)
 **          1 if alert previously generated
 **
 */
-// FIXIT this should include frags now that they are in session
+// FIXIT-H this should include frags now that they are in session
 static inline int fpSessionAlerted(Packet *p, OptTreeNode *otn)
 {
     SigInfo *si = &otn->sigInfo;
@@ -960,7 +960,7 @@ static inline int fpEvalHeaderSW(PORT_GROUP *port_group, Packet *p,
 
     if (ip_rule)
     {
-        // FIXIT -- Copying p->ip_data may be unnecessary because when
+        // FIXIT-J -- Copying p->ip_data may be unnecessary because when
         //          finished evaluating, ip_api will be the innermost
         //          layer. Right now, ip_api should already be the
         //          innermost layer
@@ -1001,7 +1001,7 @@ static inline int fpEvalHeaderSW(PORT_GROUP *port_group, Packet *p,
          **  re-inject the stream we have.
          */
 
-        // FIXIT sdf etc. runs here
+        // FIXIT-M sdf etc. runs here
 
         if ( fp->inspect_stream_insert || !(p->packet_flags & PKT_STREAM_INSERT) )
         {
@@ -1076,7 +1076,7 @@ static inline int fpEvalHeaderSW(PORT_GROUP *port_group, Packet *p,
              **  payload, in case any of the rules have the
              **  'rawbytes' option.
              */
-            // FIXIT alt buf and file data should be obtained from 
+            // FIXIT-H alt buf and file data should be obtained from 
             // inspector gadget as an extension of above
             so = port_group->pgPms[PM_TYPE__CONTENT];
 
index 8d6f781e10f72bdd55ffd820e12a5d06b03c93d6..4eb399f081761c69faa5b3d267a5768654c2259b 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef GENERATORS_H
 #define GENERATORS_H
 
-// FIXIT migrate all defines to respective modules and delete this file
+// FIXIT-M migrate all defines to respective modules and delete this file
 
 #define GENERATOR_SNORT_ENGINE        1
 
index 5768bb43565619f60cd31d227621897b983a2abf..df3f64058281706c9540f56cbde80b800053d19c 100644 (file)
@@ -63,7 +63,7 @@ void FPrintReference(FILE *, ReferenceNode *);
 /* struct for rule classification */
 typedef struct _ClassType
 {
-    // FIXIT type and name are backwards (name -> text, type -> name)
+    // FIXIT-L type and name are backwards (name -> text, type -> name)
     char *type;      /* classification type */
     int id;          /* classification id */
     char *name;      /* "pretty" classification name */
index 974094341cfb7b6a14b97a1a8b3307c5732ce5de..a731ca67de5722a801f925db8743d378f7856a2e 100644 (file)
@@ -107,7 +107,7 @@ typedef struct _TagNode
 /*  G L O B A L S  **************************************************/
 static THREAD_LOCAL SFXHASH *host_tag_cache_ptr = nullptr;
 
-// FIXIT utilize Flow instead of separate cache
+// FIXIT-M utilize Flow instead of separate cache
 static THREAD_LOCAL SFXHASH *ssn_tag_cache_ptr = nullptr;
 
 static THREAD_LOCAL uint32_t last_prune_time = 0;
index d87b345eef8ac2091ebb4a4732d4f0993cf5741d..68b8751de414489f473253cb87987b85117d8d4c 100644 (file)
@@ -30,8 +30,8 @@
 
 #include "snort.h"
 
-THREAD_LOCAL uint16_t event_id; // FIXIT also incremented in fpLogEvent()
-THREAD_LOCAL SigInfo sig_info;  // FIXIT move to stack
+THREAD_LOCAL uint16_t event_id; // FIXIT-M also incremented in fpLogEvent()
+THREAD_LOCAL SigInfo sig_info;  // FIXIT-M move to stack
 
 void SetEvent(
     Event *event, uint32_t generator, uint32_t id, uint32_t rev,
index d358506ba497f7b4e14bc8ab783a38fd783bfdbc..81b299f0b078b1737a6e01b417aaa448b8350dc0 100644 (file)
@@ -75,7 +75,7 @@ uint32_t GenerateSnortEvent(Packet *p, uint32_t gid, uint32_t sid)
 
     fpLogEvent(rtn, otn, p);
 
-    return 0;  //otn->event_data.event_id; // FIXIT EVENT
+    return 0;  //otn->event_data.event_id; // FIXIT-H EVENT
 }
 
 /**
index f9c25728dd08081f42f79ca4a7910516c39258fd..0f205833df5c217e3ebdfae94ef79551b6cd6a6d 100644 (file)
@@ -1063,7 +1063,7 @@ void init_mime(void)
     mime_hdr_search_mpse = search_api->search_instance_new();
     if (mime_hdr_search_mpse == NULL)
     {
-        // FIXIT make configurable or at least fall back to any
+        // FIXIT-M make configurable or at least fall back to any
         // available search engine
         FatalError("Could not instantiate ac_bnfa search engine.\n");
     }
index 6f244bbedd2139881b2a54a78324bc0a1055e036..3a69180971e52de6e8cfa28efe7936646c31ddb7 100644 (file)
@@ -37,7 +37,7 @@
 #ifdef HAVE_OPENSSL_SHA
 #include <openssl/sha.h>
 #define SHA256CONTEXT SHA256_CTX
-#define SHA256INIT    SHA256_Init  // FIXIT these are deprecated
+#define SHA256INIT    SHA256_Init  // FIXIT-M these are deprecated
 #define SHA256UPDATE  SHA256_Update
 #define SHA256FINAL   SHA256_Final
 #else
index 1187bd217c8a4e9dc1b39dfab5a82404c244af54..91f7918cf2636e5b5d3dbcb3a413d5cd8bcae783 100644 (file)
@@ -102,7 +102,7 @@ void detection_filter_init(DetectionFilterConfig* df_config)
         detection_filter_hash = sfthd_local_new(df_config->memcap);
 
         if ( detection_filter_hash == NULL )
-            return;  // FIXIT this is fatal
+            return;  // FIXIT-H this is fatal
     }
 }
 
index 5df9f31bd9b850fd7d01dd65f819d041ae97b483..cdf3128a4a58749538b0e01ea31a68e062acc4c1 100644 (file)
@@ -175,7 +175,7 @@ void RateFilter_ResetActive (void)
 
 void RateFilter_PrintConfig(RateFilterConfig*)
 {
-    // FIXIT print from module
+    // FIXIT-L print from module
     //_printThresholdContext(config);
 }
 
index 68bce11f536a48184456a9072b0bccbf43edcf30..5c22d01855f052395a6bc4a34f7da3f4343e2f81 100644 (file)
@@ -656,7 +656,7 @@ int sfthd_create_threshold(
     sfthd_node.seconds   = seconds;
     sfthd_node.ip_address= ip_address;
 
-    // FIXIT convert to std::vector
+    // FIXIT-L convert to std::vector
     sfDynArrayCheckBounds ((void **)&thd_objs->sfthd_garray, policyId, &thd_objs->numPoliciesAllocated);
     if (thd_objs->sfthd_garray[policyId] == NULL)
     {
index 499864c4fc416c657cae9f95f0db6b34c1511bfd..7e83bba1030c8b67f8729613c5d16fbc20247407 100644 (file)
 #include <assert.h>
 
 #include "time/packet_time.h"
-#include "stream/stream_api.h"  // FIXIT bad dependency
+#include "stream/stream_api.h"  // FIXIT-M bad dependency
 #include "zhash.h"
 
 /* Reasonably small, and prime */
-// FIXIT size based on max_tcp + max_udp?
+// FIXIT-L size based on max_tcp + max_udp?
 #define MAX_HASH 1021
 #define MAX_LIST    8
 #define MAX_DATA    4
@@ -64,8 +64,7 @@
 // -- matching expected sessions are pulled off from the head of the node's
 //    list struct chain
 //
-// FIXIT
-// -- expiration is by node struct but should be by list struct, ie 
+// FIXIT-M expiration is by node struct but should be by list struct, ie 
 //    individual sessions, not all sessions to a given 3-tuple
 //    (this would make pruning a little harder unless we add linkage
 //    a la FlowCache)
index c85fd83c501a95959270ddd5ea4023dca1b4c18e..abefe75c054864f0e9aa4e0cbe3af0c753ca7970 100644 (file)
@@ -34,7 +34,7 @@
 
 unsigned FlowData:: flow_id = 0;
 
-// FIXIT can't inline SO_PUBLIC ctor and dtor in header or we get problems:
+// FIXIT-H can't inline SO_PUBLIC ctor and dtor in header or we get problems:
 // ld: warning: direct access in FlowData::FlowData(unsigned int,
 // Inspector*) to global weak symbol vtable for FlowData means the weak
 // symbol cannot be overridden at runtime. This was likely caused by
@@ -61,7 +61,7 @@ Flow::Flow (int proto)
     memset(this, 0, sizeof(*this));
     protocol = proto;
 
-    // FIXIT getFlowbitSizeInBytes() should be attribute of ???
+    // FIXIT-M getFlowbitSizeInBytes() should be attribute of ??? (or eliminate)
     /* use giFlowbitSize - 1, since there is already 1 byte in the
     * StreamFlowData structure */
     size_t sz = sizeof(StreamFlowData) + getFlowbitSizeInBytes() - 1;
@@ -92,7 +92,7 @@ void Flow::reset()
         session->cleanup();
         free_application_data();
     }
-    // FIXIT cleanup() winds up calling clear()
+    // FIXIT-H cleanup() winds up calling clear()
     if ( ssn_client )
     {
         ssn_client->rem_ref();
@@ -427,7 +427,7 @@ void Flow::set_ttl (Packet* p, bool client)
      */
     if (outer_ip_api.is_valid())
     {
-        // FIXIT!! -- Do we want more than just the outermost
+        // FIXIT-J!! -- Do we want more than just the outermost
         //            and innermost ttl()?
         outer_ttl = outer_ip_api.ttl();
         inner_ttl = p->ip_api.ttl();
index 5e336a29913e1438466f8cab5f9a2da8c9ebe595..ffacf2cf65cbecba652209ddbc3f92a720a4e173 100644 (file)
@@ -195,7 +195,7 @@ public:
         gadget = nullptr;
     };
 
-public:  // FIXIT privatize if possible
+public:  // FIXIT-M privatize if possible
     // these fields are const after initialization
     const FlowKey* key;
     class Session* session;
@@ -215,9 +215,9 @@ public:  // FIXIT privatize if possible
     const char* service;
 
     int flow_state;
-    FlowState s5_state;  // FIXIT rename this (s5 not appropriate)
+    FlowState s5_state;  // FIXIT-L rename this (s5 not appropriate)
 
-    sfip_t client_ip; // FIXIT family and bits should be changed to uint16_t
+    sfip_t client_ip; // FIXIT-L family and bits should be changed to uint16_t
     sfip_t server_ip; // or uint8_t to reduce sizeof from 24 to 20
 
     uint64_t expire_time;
index 45844308f75afd4a6d7a6096f24c7e364624f330..6f42206e61a7b3e57467bd8cc7bb98546cf09c42 100644 (file)
@@ -32,7 +32,6 @@
 #include "zhash.h"
 
 #define SESSION_CACHE_FLAG_PURGING  0x01
-#define SESSION_CACHE_FLAG_PRUNING  0x02  // FIXIT not used?
 
 //-------------------------------------------------------------------------
 // FlowCache stuff
@@ -183,7 +182,7 @@ uint32_t FlowCache::prune_stale(uint32_t thetime, Flow *save_me)
 
     while ( flow )
     {
-        // FIXIT this loops forever if 1 flow in cache
+        // FIXIT-L this loops forever if 1 flow in cache
         if(flow == save_me)
             hash_table->touch();
 
@@ -211,7 +210,7 @@ uint32_t FlowCache::prune_stale(uint32_t thetime, Flow *save_me)
 uint32_t FlowCache::prune_unis()
 {
     // we may have many or few unis; need to find reasonable ratio
-    // FIXIT max_uni should be based on typical ratios seen in perfmon
+    // FIXIT-L max_uni should be based on typical ratios seen in perfmon
     const uint32_t max_uni = (max_flows >> 2) + 1;
 
     Flow* curr = uni_tail->prev;
@@ -247,7 +246,7 @@ uint32_t FlowCache::prune_excess(bool memCheck, Flow *save_me)
     while (
         (hash_table->get_count() > 1) &&
         ((!memCheck && ((hash_table->get_count() > max_cap) || !pruned)) ||
-         (memCheck && tcp_memcap->at_max()) )) // FIXIT remove explicit dependence on tcp_memcap
+         (memCheck && tcp_memcap->at_max()) )) // FIXIT-M remove explicit dependence on tcp_memcap
     {
         unsigned int blocks = 0;
         Flow* flow = (Flow*)hash_table->first();
index f079865f744e552a48201d709f0405c681e8d625..89c2e232e44f0829749d05ff617d7baa1c6b956f 100644 (file)
@@ -117,7 +117,7 @@ Flow* FlowControl::new_flow (const FlowKey* key)
     return cache->get(key);
 }
 
-// FIXIT cache* can be put in flow so that lookups by
+// FIXIT-L cache* can be put in flow so that lookups by
 // protocol are obviated for existing / initialized flows
 void FlowControl::delete_flow (const FlowKey* key)
 {
index eb03eeb5291e07a8898a5864f3d424515ab79643..bdb6acfbb7db27e68d91a9b190dfc62525d0fc54 100644 (file)
@@ -43,7 +43,7 @@ protected:
     Session(Flow* f) { flow = f; };
 
 public:
-    Flow* flow;  // FIXIT use reference?
+    Flow* flow;  // FIXIT-L use reference?
 };
 
 #endif
index d977ef0207aaf59a31290948c6912fe53bb6d87d..a4d92964b4c9e68f2d602de973034ee163d2106a 100644 (file)
@@ -42,7 +42,7 @@ struct InspectionBuffer
     enum Type
     {
         IBT_KEY, IBT_HEADER, IBT_BODY, 
-        IBT_ALT, IBT_FILE, // FIXIT alt and file data are tbd
+        IBT_ALT, IBT_FILE, // FIXIT-M alt and file data are tbd
         IBT_MAX
     };
     const uint8_t* data;
@@ -140,7 +140,6 @@ typedef void (*InspectDelFunc)(Inspector*);
 typedef void (*InspectFunc)();
 typedef class Session* (*InspectSsnFunc)(class Flow*);
 
-// FIXIT ensure all provide stats
 struct InspectApi
 {
     BaseApi base;
index ef9c5dc70fee77bffd63e424024df66697266a19..819c81fb07a110cb71903998a71d40c4c6e5990c 100644 (file)
@@ -98,9 +98,8 @@ private:
     option_type_t type;
 };
 
-enum RuleOptType // FIXIT is this still useful?
+enum RuleOptType
 {
-    OPT_TYPE_ACTION = 0,
     OPT_TYPE_LOGGING,
     OPT_TYPE_DETECTION,
     OPT_TYPE_META,
@@ -116,8 +115,9 @@ struct IpsApi
 {
     BaseApi base;
     RuleOptType type;
-    unsigned max_per_rule;  // FIXIT this must be enforced
-    unsigned protos;
+
+    unsigned max_per_rule;  // FIXIT-H this must be enforced
+    unsigned protos;        // FIXIT-H enforce or delete
 
     IpsOptFunc pinit;
     IpsOptFunc pterm;
index cfab014625e88128603d2438f5badf1ca28756a6..97c7e897859d8abdd92b4e96a57bfcb0300b0837 100644 (file)
@@ -67,7 +67,6 @@ protected:
 typedef Logger* (*LogNewFunc)(struct SnortConfig*, class Module*);
 typedef void (*LogDelFunc)(Logger*);
 
-// FIXIT ensure all eh provide stats
 struct LogApi
 {
     BaseApi base;
index 94e547580e3555bfadde87f47cd8aeaffd2918f1..ed389d16bdf42901eab3bc36382cdaa02b6818e1 100644 (file)
 */
 // module.h author Russ Combs <rucombs@cisco.com>
 
-// FIXIT 
-// -- add lua module default
-// -- add set_default method
-// -- add trace param(s)
-// -- add memcap related
+// FIXIT-H add brief help string to modules
+// FIXIT-H add optional default config to modules
+// FIXIT-M add trace param(s)
+// FIXIT-M add memcap related
+// FIXIT-L add set_default method
 
 #ifndef MODULE_H
 #define MODULE_H
@@ -51,7 +51,6 @@ struct RuleMap
 
 struct ProfileStats;
 
-// FIXIT add brief help string to modules
 class Module
 {
 public:
index b0853a33a76c59a74769ffb4d7e17c8b9abf3cfc..d99e450306684cd44ba75a658876f2e494c7c99a 100644 (file)
@@ -35,7 +35,7 @@ static bool valid_bool(Value& v, const char*)
     return v.get_type() == Value::VT_BOOL;
 }
 
-// FIXIT allow multiple , separated ranges
+// FIXIT-L allow multiple , separated ranges
 static bool valid_int(Value& v, const char* r)
 {
     if ( !r )
@@ -67,7 +67,7 @@ static bool valid_int(Value& v, const char* r)
     return true;
 }
 
-// FIXIT allow multiple , separated ranges
+// FIXIT-L allow multiple , separated ranges
 static bool valid_real(Value& v, const char* r)
 {
     if ( !r )
index 148e2c82f135715cf1d4df2d6654500ccde6b139..33cadc03bbf2e7c67e9a87fcfcaf1ed0f1893306 100644 (file)
@@ -36,6 +36,7 @@ struct Parameter
         PT_REAL,       // double
         PT_PORT,       // 0 to 64K-1 unless specified otherwise
         PT_STRING,     // any string less than len chars
+                       // range = "(optional)" if not required (eg on cmd line)
         PT_SELECT,     // any string appearing in range
         PT_MULTI,      // one or more strings appearing in range
         PT_ENUM,       // string converted to unsigned by range sequence
@@ -50,7 +51,7 @@ struct Parameter
     const char* name;
     Type type;
     const void* range;  // nullptr|const char*|const Parameter*
-    const char* deflt;  // FIXIT add defaults for tables and lists
+    const char* deflt;
     const char* help;
 
     const char* get_type() const;
index ede4ba0b2bc97126f4f304118695bac85522d90e..18ab7026e21e33da7569582d922cfaad9a7767f7 100644 (file)
@@ -23,8 +23,6 @@
 
 #include "framework/base_api.h"
 
-// FIXIT this must be tied to SnortConfig and moved to trash
-
 struct SnortConfig;
 
 // this is the current version of the api
index 58b9fe8e58a6ba67eefacae0343127560132c787..960a1458e3600c085be1cda753c92af46d852ce2 100644 (file)
@@ -243,7 +243,7 @@ ZHash::ZHash(int rows, int keysz)
     sfhashfcn = sfhashfcn_new(rows);
 
     if ( !sfhashfcn )
-        return;  // FIXIT can't just return
+        return;  // FIXIT-H can't just return
 
     /* Allocate the array of node ptrs */
     table = new ZHashNode*[rows];
index 933caa1f690cf0a10f0f94e312e5960e3eecc2ef..7f8c7df7fbe64b861b96da0e51847d491b8a7283 100644 (file)
@@ -156,7 +156,7 @@ const char* get_signal_name(PigSignal s)
 // If check needed, also check whether previous signal_handler is neither
 // SIG_IGN nor SIG_DFL
 
-// FIXIT convert sigaction, etc. to c++11
+// FIXIT-L convert sigaction, etc. to c++11
 static int add_signal(int sig, sighandler_t signal_handler, int check_needed)
 {
 #ifdef VALGRIND_TESTING
@@ -195,7 +195,7 @@ void init_signals(void)
     sigset_t set;
 
     sigemptyset(&set);
-    // FIXIT this is undefined for multithreaded apps
+    // FIXIT-L this is undefined for multithreaded apps
     sigprocmask(SIG_SETMASK, &set, NULL);
 # else
     sigsetmask(0);
index 7d7109aa2a12938003ce3515e020bb25adbab127..d39a735f77b1a9a32db532990d0fab25fd16e932 100644 (file)
@@ -522,7 +522,7 @@ static IpsOption* byte_extract_ctor(Module* p, OptTreeNode* otn)
     ClearVarNames(otn->opt_func);
     data.var_number = AddVarNameToList(&data);
 
-    // FIXIT can this be handled by setting max_per_rule = 2?
+    // FIXIT-H can this be handled by setting max_per_rule = 2?
     if (data.var_number >= NUM_BYTE_EXTRACT_VARS)
     {
         ParseError("Rule has more than %d byte_extract variables.",
index 5a2f705ace9d5d125b0e4346927cea0da80863d0..c64c1d64e985364baef9b2bbbf7e8a099d29ba73 100644 (file)
@@ -124,7 +124,6 @@ static THREAD_LOCAL ProfileStats byteTestPerfStats;
 
 static const char* s_name = "byte_test";
 
-// FIXIT cloned from sf_snort_plugin_api.h
 #define CHECK_EQ            0
 #define CHECK_NEQ           1
 #define CHECK_LT            2
@@ -134,20 +133,9 @@ static const char* s_name = "byte_test";
 #define CHECK_AND           6
 #define CHECK_XOR           7
 #define CHECK_ALL           8
-#define CHECK_ATLEASTONE    9
+#define CHECK_GT0    9
 #define CHECK_NONE          10
 
-#define BT_LESS_THAN            CHECK_LT
-#define BT_EQUALS               CHECK_EQ
-#define BT_GREATER_THAN         CHECK_GT
-#define BT_AND                  CHECK_AND
-#define BT_XOR                  CHECK_XOR
-#define BT_GREATER_THAN_EQUAL   CHECK_GTE
-#define BT_LESS_THAN_EQUAL      CHECK_LTE
-#define BT_CHECK_ALL            CHECK_ALL
-#define BT_CHECK_ATLEASTONE     CHECK_ATLEASTONE
-#define BT_CHECK_NONE           CHECK_NONE
-
 #define BIG    0
 #define LITTLE 1
 
@@ -335,45 +323,45 @@ int ByteTestOption::eval(Cursor& c, Packet*)
 
     switch(btd->opcode)
     {
-        case BT_LESS_THAN: if(value < cmp_value)
-                               success = 1;
-                           break;
+    case CHECK_LT:
+        success = (value < cmp_value);
+        break;
 
-        case BT_EQUALS: if(value == cmp_value)
-                            success = 1;
-                        break;
+    case CHECK_EQ:
+        success = (value == cmp_value);
+        break;
 
-        case BT_GREATER_THAN: if(value > cmp_value)
-                                  success = 1;
-                              break;
+    case CHECK_GT:
+        success = (value > cmp_value);
+        break;
 
-        case BT_AND: if ((value & cmp_value) > 0)
-                         success = 1;
-                     break;
+    case CHECK_AND:
+        success =  ((value & cmp_value) > 0);
+        break;
 
-        case BT_XOR: if ((value ^ cmp_value) > 0)
-                        success = 1;
-                    break;
+    case CHECK_XOR:
+        success =  ((value ^ cmp_value) > 0);
+        break;
 
-        case BT_GREATER_THAN_EQUAL: if (value >= cmp_value)
-                                        success = 1;
-                                    break;
+    case CHECK_GTE:
+        success =  (value >= cmp_value);
+        break;
 
-        case BT_LESS_THAN_EQUAL: if (value <= cmp_value)
-                                        success = 1;
-                                 break;
+    case CHECK_LTE:
+        success =  (value <= cmp_value);
+        break;
 
-        case BT_CHECK_ALL: if ((value & cmp_value) == cmp_value)
-                               success = 1;
-                           break;
+    case CHECK_ALL:
+        success =  ((value & cmp_value) == cmp_value);
+        break;
 
-        case BT_CHECK_ATLEASTONE: if ((value & cmp_value) != 0)
-                                      success = 1;
-                                  break;
+    case CHECK_GT0:
+        success =  ((value & cmp_value) != 0);
+        break;
 
-        case BT_CHECK_NONE: if ((value & cmp_value) == 0)
-                                success = 1;
-                            break;
+    case CHECK_NONE:
+        success =  ((value & cmp_value) == 0);
+        break;
     }
 
     if (btd->not_flag)
@@ -411,36 +399,36 @@ static void parse_operator(const char* cptr, ByteTestData& idx)
 
     if (idx.not_flag && strlen(cptr) == 0)
     {
-        idx.opcode = BT_EQUALS;
+        idx.opcode = CHECK_EQ;
     }
     else
     {
         /* set the opcode */
         switch(*cptr)
         {
-            case '<': idx.opcode = BT_LESS_THAN;
+            case '<': idx.opcode = CHECK_LT;
                       cptr++;
                       if (*cptr == '=')
-                          idx.opcode = BT_LESS_THAN_EQUAL;
+                          idx.opcode = CHECK_LTE;
                       else
                           cptr--;
                       break;
 
-            case '=': idx.opcode = BT_EQUALS;
+            case '=': idx.opcode = CHECK_EQ;
                       break;
 
-            case '>': idx.opcode = BT_GREATER_THAN;
+            case '>': idx.opcode = CHECK_GT;
                       cptr++;
                       if (*cptr == '=')
-                          idx.opcode = BT_GREATER_THAN_EQUAL;
+                          idx.opcode = CHECK_GTE;
                       else
                           cptr--;
                       break;
 
-            case '&': idx.opcode = BT_AND;
+            case '&': idx.opcode = CHECK_AND;
                       break;
 
-            case '^': idx.opcode = BT_XOR;
+            case '^': idx.opcode = CHECK_XOR;
                       break;
 
             default: ParseError(
index ceaf4273e29b7b043346f0ecc349cf7fe5f6c14d..eb65fd908693899e2f40f5d5eac74d5d7f96954a 100644 (file)
@@ -227,7 +227,7 @@ static PatternMatchData* new_pmd()
     return pmd;
 }
 
-// FIXIT must ensure that fast_pattern is applied to 
+// FIXIT-H must ensure that fast_pattern is applied to 
 // a fast_pattern inspection buffer
 static int fast_pattern_count(OptTreeNode *otn, int list_type)
 {
@@ -724,7 +724,7 @@ static void parse_fast_pattern_offset(PatternMatchData* pmd, const char *data)
     }
 
     pmd->fp_offset = offset;
-    pmd->fp = 1;  // FIXIT must ensure current buffer is fp compatible
+    pmd->fp = 1;  // FIXIT-H must ensure current buffer is fp compatible
 }
 
 static void parse_fast_pattern_length(PatternMatchData* pmd, const char *data)
@@ -744,7 +744,7 @@ static void parse_fast_pattern_length(PatternMatchData* pmd, const char *data)
     }
 
     pmd->fp_length = length;
-    pmd->fp = 1;  // FIXIT must ensure current buffer is fp compatible
+    pmd->fp = 1;  // FIXIT-H must ensure current buffer is fp compatible
 }
 
 //-------------------------------------------------------------------------
@@ -849,7 +849,7 @@ bool ContentModule::set(const char*, Value& v, SnortConfig*)
         pmd->no_case = 1;
 
     else if ( v.is("fast_pattern") )
-        pmd->fp = 1;  // FIXIT must ensure current buffer is fp compatible
+        pmd->fp = 1;  // FIXIT-H must ensure current buffer is fp compatible
 
     else if ( v.is("fast_pattern_offset") )
         parse_fast_pattern_offset(pmd, v.get_string());
index f6e3edcdfdb1134643e5b0b95050dbe9dbf6fce3..a96aa33326c39136caa252a9067302f617d1e645 100644 (file)
@@ -71,7 +71,7 @@ struct PatternMatchData
     uint8_t negated;        /* search for "not this pattern" */
     uint8_t pm_type;
 
-    // FIXIT wasting some memory here:
+    // 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)
@@ -89,7 +89,7 @@ int PatternMatchAdjustRelativeOffsets(
     void*, PatternMatchData *dup_pmd,
     const uint8_t *current_cursor, const uint8_t *orig_cursor);
 
-// FIXIT if really needed, would b better as specific method
+// FIXIT-L if really needed, would b better as specific method
 // so PMD isn't exposed
 PatternMatchData* get_pmd(OptFpList*);
 bool is_fast_pattern_only(OptFpList*);
index a1229e9d64e20ce9033bfd724bde41d4d6a4e311..f5df600c109a5266cd3eb208c16cdf617f2440c4 100644 (file)
@@ -19,7 +19,7 @@
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
 // ips_detection_filter.cc author Russ Combs <rucombs@cisco.com>
-// FIXIT add DetectionFilterOption::eval() instead of special case
+// FIXIT-L add DetectionFilterOption::eval() instead of special case
 
 #include <sys/types.h>
 
index dc399a8774e71ebb6e4a15969a991906124c8547..9e99a4291873ee405fffb73f958aef923cf68d15 100644 (file)
@@ -295,7 +295,7 @@ static inline int boUnSetGrpBit(BITOP *BitOp, char *group)
     if( group == NULL )
         return 0;
 
-    // FIXIT why is the hash lookup done at runtime for flowbits groups?
+    // FIXIT-M why is the hash lookup done at runtime for flowbits groups?
     // a pointer to flowbis_grp should be in flowbits config data
     // this *should* be safe but iff splay mode is disabled
     flowbits_grp = (FLOWBITS_GRP *)sfghash_find(flowbits_grp_hash, group);
@@ -1205,14 +1205,14 @@ static void flowbits_dtor(IpsOption* p)
     delete p;
 }
 
-// FIXIT updating statics during reload is bad, mkay?
+// FIXIT-M updating statics during reload is bad, mkay?
 static void flowbits_verify(SnortConfig*)
 {
     FlowBitsVerify();
 }
 
 #if 0
-        // FIXIT if add_detection_option() finds a dup, then
+        // FIXIT-M if add_detection_option() finds a dup, then
         // we can leak the original group name if same as current
         // also, why use new group name instead of original?
         char *group_name =  ((FLOWBITS_OP *)idx_dup)->group;
index f5d19842cb8e0959e4adac5f03c2ddaf9cb0ee50..5ea55cfff68100af637962b60840c75a8fed1330 100644 (file)
@@ -184,7 +184,7 @@ static const IpsApi fragoffset_api =
         mod_dtor
     },
     OPT_TYPE_DETECTION,
-    0, 0,  // FIXIT more than one fragoffset per rule?
+    1, 0,
     nullptr,
     nullptr,
     nullptr,
index ca866e9f5a94522bd17390f8e2268d172640a092..1948446783fe69f307b67c3850a7afea3bc52445 100644 (file)
@@ -93,7 +93,7 @@ int HttpIpsOption::eval(Cursor& c, Packet* p)
     if ( !p->flow || !p->flow->gadget )
         rval = DETECTION_OPTION_NO_MATCH;
 
-    // FIXIT cache id at parse time for runtime use
+    // FIXIT-P cache id at parse time for runtime use
     else if ( !p->flow->gadget->get_buf(key, p, hb) )
         rval = DETECTION_OPTION_NO_MATCH;
 
index 495429dd56241b720505da8492849362b85cda83..58e36b7a3fef68c1b71a9b1f22d2d3bf95695a5d 100644 (file)
@@ -159,7 +159,7 @@ int HttpHeaderOption::eval(Cursor& c, Packet* p)
     if ( !p->flow || !p->flow->gadget )
         rval = DETECTION_OPTION_NO_MATCH;
 
-    // FIXIT cache id at parse time for runtime use
+    // FIXIT-P cache id at parse time for runtime use
     else if ( !p->flow->gadget->get_buf(s_name, p, hb) )
         rval = DETECTION_OPTION_NO_MATCH;
 
index e43b5cccc94bcba431ac3cf94decde0b37629e3f..c060dfb10cfa6e6fa9be738c8532551a40b73eeb 100644 (file)
 #define PCRE_STUDY_JIT_COMPILE 0
 #endif
 
+#define SNORT_PCRE_RELATIVE         0x00010 // relative to the end of the last match
+#define SNORT_PCRE_INVERT           0x00020 // invert detect
+#define SNORT_PCRE_ANCHORED         0x00040
+#define SNORT_OVERRIDE_MATCH_LIMIT  0x00080 // Override default limits on match & match recursion
+
 static const char* s_name = "pcre";
 
 /*
@@ -697,7 +702,7 @@ static void pcre_dtor(IpsOption* p)
     delete p;
 }
 
-// FIXIT the thread specific ovector can be allocated and deallocated 
+// FIXIT-L the thread specific ovector can be allocated and deallocated 
 // from the main thread since it isn't literally thread local
 void pcre_tinit(SnortConfig* sc)
 {
index 505cc4729a9ac988597a7b5a4bcee32d8f8a195a..aa0b9c23112c04441066aac8f67d7a05cc96ffd7 100644 (file)
 
 #include <stdint.h>
 
-// FIXIT poor encapsulation
-#define SNORT_PCRE_RELATIVE         0x00010 // relative to the end of the last match
-#define SNORT_PCRE_INVERT           0x00020 // invert detect
-#define SNORT_PCRE_RAWBYTES         0x00040 // Don't use decoded buffer (if available)
-#define SNORT_PCRE_ANCHORED         0x00080
-#define SNORT_OVERRIDE_MATCH_LIMIT  0x00100 // Override default limits on match & match recursion
-
 #include <pcre.h>
 
 struct PcreData
index 1157f161475f791577d7fff79456f9ee571f67ab..453bde0a13551500c8cc74f7fee8cf97bb46a49e 100644 (file)
@@ -40,7 +40,7 @@
  * Warning, this plugin may slow Snort *way* down!
  *
  */
-// FIXIT delete this (sp_session) and use session tag instead
+// FIXIT-L delete this (sp_session) and use session tag instead
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index bf707b277a1084367e81ea3461e575b8871240d5..4b2fda96a5a99945b049fa8652c7342f621c6238 100644 (file)
@@ -17,7 +17,7 @@
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
 // ips_tag.cc author Russ Combs <rucombs@cisco.com>
-// FIXIT add TagOption::eval() instead of special case
+// FIXIT-L add TagOption::eval() instead of special case
 
 #include <sys/types.h>
 
@@ -95,7 +95,7 @@ bool TagModule::end(const char*, int, SnortConfig*)
     return true;
 }
 
-// FIXIT error if named option is set multiple times (general problem)
+// FIXIT-L error if named option is set multiple times (general problem)
 // eg: tag:session, packets 10, packets 20;
 bool TagModule::set(const char*, Value& v, SnortConfig*)
 {
index dece3be0bd53dc8c2b4052a058dfdf451b797976..3b1a782bf7af1c57e0a2a0cdac95c59c86408f4f 100644 (file)
@@ -21,9 +21,8 @@
 #ifndef RANGE_H
 #define RANGE_H
 
-// FIXIT ideally this would be in framework/ and we'd have just one copy
-// but that breaks dynamic builds so each dynamic ips option plugin has
-// its own copy for now.
+// FIXIT-M ideally this would be in framework/ and we'd have just one copy
+// but that breaks dynamic builds so each dynamic client has its own for now.
 
 // unfortunately, <> was implemented inconsistently.  eg:
 // dsize implements <> as ( a <= c && c <= b ) and
@@ -48,7 +47,7 @@ struct RangeCheck
     bool operator==(const RangeCheck&) const;
 
     void init();
-    // FIXIT add ttl style syntax
+    // FIXIT-L add ttl style syntax
     bool parse(const char* s); 
     bool eval(long);
 };
index 67b920ae83ac45d210bca85b52c4add80873c966..51c7fda1b300bef7efabc18d25fe67f6f36bc3fc 100644 (file)
@@ -429,7 +429,7 @@ void Log2ndHeader(TextLog* log, Packet* p)
         default:
             if (ScLogVerbose())
             {
-                // FIXIT should only be output once!
+                // FIXIT-L should only be output once!
                 ErrorMessage("Datalink %i type 2nd layer display is not "
                              "supported\n", DAQ_GetBaseProtocol());
             }
@@ -1644,7 +1644,7 @@ static void LogPacketType(TextLog* log, Packet* p)
         TextLog_Print(log, "%s", "Frag reassembled packet");
         break;
     default:
-        // FIXIT do we get here for portscan or sdf?
+        // FIXIT-L do we get here for portscan or sdf?
         TextLog_Print(log, "%s", "Cooked packet");
         break;
     }
@@ -1691,7 +1691,7 @@ void LogIPPkt(TextLog* log, int type, Packet * p)
         }
 
 
-        // FIXIT --> log everything in order!!
+        // FIXIT-J --> log everything in order!!
         ip::IpApi tmp_api = p->ip_api;
         int8_t num_layer = 0;
         bool first = true;
index 1965b450572b4397447c12951f3347cb33ca173f..884e01589ab30ec87cf1815c4b8389e9008c04a4 100644 (file)
@@ -249,7 +249,7 @@ NORETURN void FatalError(const char *format,...)
     }
 
 #if 0
-    // FIXIT need to stop analyzers / workers 
+    // FIXIT-H need to stop analyzers / workers 
     // and they should handle the DAQ break / abort
     if ( SnortIsInitializing() )
     {
@@ -259,8 +259,8 @@ NORETURN void FatalError(const char *format,...)
     else
 #endif
     {
-        // FIXIT this makes no sense from main thread
-        // FIXIT exit() segfaults too; looks like something borked in dylib
+        // FIXIT-H this makes no sense from main thread
+        // exit() segfaults too; looks like something borked in dylib
         exit(EXIT_FAILURE);
     }
 }
index f79760b1e0b35c4536165f5360284252031de227..210b07f0143a404722d6276669eb090df0113a07 100644 (file)
@@ -49,7 +49,7 @@ struct ThrottleInfo
 
 void ErrorMessageThrottled(ThrottleInfo*,const char*, ...) __attribute__((format (printf, 2, 3)));
 
-// FIXIT do not call FatalError() during runtime
+// FIXIT-M do not call FatalError() during runtime
 NORETURN void FatalError(const char*, ...) __attribute__((format (printf, 1, 2)));
 
 void PrintPacketData(const uint8_t*, const uint32_t);
index a0f09c9d22b6e79927a514f3c05d0c40d4a21039..46a0871fee793e7ad4cab94f69419d30c745f76a 100644 (file)
@@ -66,7 +66,7 @@ static const char* csv_deflt =
 
 static const Parameter csv_params[] =
 {
-    // FIXIT provide PT_FILE and PT_PATH and enforce no
+    // FIXIT-M provide PT_FILE and PT_PATH and enforce no
     // path chars in file (outputs file must be in instance dir)
     { "file", Parameter::PT_STRING, nullptr, "stdout",
       "name of alert file" },
@@ -77,7 +77,7 @@ static const Parameter csv_params[] =
     { "limit", Parameter::PT_INT, "0:", "0",
       "set limit (0 is unlimited)" },
 
-    // FIXIT provide PT_UNITS that converts to multiplier automatically
+    // FIXIT-M provide PT_UNITS that converts to multiplier automatically
     { "units", Parameter::PT_ENUM, "B | K | M | G", "B",
       "bytes | KB | MB | GB" },
 
index 35ff4665af0389a17c773fd2fc9e656932778247..ebaab8edeebb7756c18bcca8a3185c00dbf57d9b 100644 (file)
@@ -61,7 +61,7 @@ using namespace std;
 // alert_sfsocket module
 //-------------------------------------------------------------------------
 
-// FIXIT this file will probably fail to compile on Linux
+// FIXIT-H this file will probably fail to compile on Linux
 
 static const Parameter sfsocket_params[] =
 {
@@ -301,7 +301,7 @@ static OptTreeNode *OptTreeNode_Search(uint32_t, uint32_t sid)
     if(sid == 0)
         return NULL;
 
-    // FIXIT wow - this should be encapsulated somewhere ...
+    // FIXIT-H wow - this should be encapsulated somewhere ...
     for (hashNode = sfghash_findfirst(snort_conf->otn_map);
             hashNode;
             hashNode = sfghash_findnext(snort_conf->otn_map))
index bd559a276830e87a73b01c4cd084dc12df736007..f2628ef90d711f206e6cc46c321cfe6754316127 100644 (file)
@@ -190,7 +190,7 @@ bool SyslogModule::end(const char*, int, SnortConfig*)
 // alert foo
 //-------------------------------------------------------------------------
 
-// FIXIT can't message be put in Event?
+// FIXIT-M can't message be put in Event?
 static void AlertSyslog(
     int priority, Packet *p, const char *msg, Event *event)
 {
index 0012c2c88a8b29940eea75cc8caabc0d54aea170..9ed9a1b8f256f12fb7451811660c06357f1ff2b4 100644 (file)
@@ -57,7 +57,7 @@ struct pcap_pkthdr32
 };
 
 /* this struct is for the alert socket code.... */
-// FIXIT alert unix sock supports l2-l3-l4 encapsulations
+// FIXIT-L alert unix sock supports l2-l3-l4 encapsulations
 
 const unsigned int ALERTMSG_LENGTH = 256;
 struct Alertpkt
@@ -74,7 +74,7 @@ struct Alertpkt
 #define NOPACKET_STRUCT 0x1
     /* no transport headers in packet */
 #define NO_TRANSHDR    0x2
-    uint8_t pkt[65535];       // FIXIT move to end and send actual size
+    uint8_t pkt[65535];       // FIXIT-L move to end and send actual size
 
     uint32_t gid;
     uint32_t sid;
@@ -102,7 +102,7 @@ static THREAD_LOCAL UnixSock us;
 
 static const Parameter unixsock_params[] =
 {
-    // FIXIT add name param?
+    // FIXIT-L add name param?
 
     { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
 };
@@ -121,7 +121,7 @@ static void get_alert_pkt(
 {
     DEBUG_WRAP(DebugMessage(DEBUG_LOG, "Logging Alert data!\n"););
 
-    // FIXIT ugh ...
+    // FIXIT-L ugh ...
     memset((char *)&us.alert,0,sizeof(us.alert));
 
     us.alert.gid = event->sig_info->generator;
@@ -147,7 +147,7 @@ static void get_alert_pkt(
 
     if (msg)
     {
-        // FIXIT ugh ...
+        // FIXIT-L ugh ...
         memmove( (void *)us.alert.alertmsg, (const void *)msg,
                strlen(msg)>ALERTMSG_LENGTH-1 ? ALERTMSG_LENGTH - 1 : strlen(msg));
     }
index 0e877ac05dbdbebbbacf6842c68f20aee8875a6c..f9c13f29deb60c04bb804c0f1d446265ad337028 100644 (file)
@@ -176,7 +176,7 @@ static void LogTcpdumpSingle(
     pcap_dump((u_char *)context.dumpd,(struct pcap_pkthdr*)p->pkth,p->pkt);
     context.size += dumpSize;
 
-    if (!ScLineBufferedLogging())  // FIXIT misnomer
+    if (!ScLineBufferedLogging())  // FIXIT-L misnomer
     {
         fflush( (FILE*) context.dumpd );
     }
index a8107f895a63732c1fdaee15f398369901c5292b..808f741f9df8210415daad00473b1b2368319402 100644 (file)
@@ -183,7 +183,7 @@ static void Unified2InitFile(Unified2Config *config)
         fname_ptr = u2.filepath;
     }
 
-    // FIXIT should use open() instead of fopen()
+    // FIXIT-L should use open() instead of fopen()
     if ((u2.stream = fopen(fname_ptr, "wb")) == NULL)
     {
         FatalError("%s(%d) Could not open %s: %s\n",
@@ -200,7 +200,7 @@ static void Unified2InitFile(Unified2Config *config)
     }
 
     /* If test mode, close and delete the file */
-    if (ScTestMode())  // FIXIT eliminate test check; should always remove if empty
+    if (ScTestMode())  // FIXIT-L eliminate test check; should always remove if empty
     {
         fclose(u2.stream);
         u2.stream = NULL;
index d25e812cfd835edce59bd5b3740caf40b0141b65..9821d47b45b1f4281163a5490167d16c63908553 100644 (file)
@@ -154,7 +154,7 @@ void Request::set(int f, const char* s)
     buf[sizeof(buf)-1] = '\0';
 }
 
-// FIXIT ignoring partial reads for now
+// FIXIT-L ignoring partial reads for now
 // using simple text for now so can use telnet as client
 // but must parse commands out of stream (ending with \n)
 void Request::read(int f)
@@ -167,7 +167,7 @@ void Request::read(int f)
     while ( n-- && isspace(buf[n]) );
 }
 
-// FIXIT supporting only simple strings for now
+// FIXIT-L supporting only simple strings for now
 // should support var args formats
 void Request::respond(const char* s) const
 {
@@ -177,7 +177,7 @@ void Request::respond(const char* s) const
         return;
     }
     if ( write(fd, s, strlen(s)) )
-        return;  // FIXIT count errors?
+        return;  // FIXIT-L count errors?
 }
 
 void Request::show_prompt() const
@@ -365,7 +365,7 @@ int main_quit(lua_State*)
 int main_help(lua_State*)
 {
 #if 0
-    // FIXIT this should be generic for all modules
+    // FIXIT-H this should be generic for all modules
     RequestMap* map = cmd_set;
 
     while ( map->name )
@@ -425,7 +425,7 @@ static int signal_check()
     return 1;
 }
 
-// FIXIT return true if something was done to avoid sleeping
+// FIXIT-L return true if something was done to avoid sleeping
 static bool house_keeping()
 {
     signal_check();
@@ -443,9 +443,9 @@ static bool house_keeping()
 // socket foo
 //-------------------------------------------------------------------------
 
-// FIXIT make these non-blocking
-// FIXIT allow at least 2 remote controls
-// FIXIT bind to configured ip including INADDR_ANY
+// FIXIT-M make these non-blocking
+// FIXIT-M allow at least 2 remote controls
+// FIXIT-M bind to configured ip including INADDR_ANY
 // (default is loopback if enabled)
 static int listener = -1;
 static int remote_control = -1;
@@ -463,7 +463,7 @@ static int socket_init()
         return -2;
     }
 
-    // FIXIT does this disable time wait for us?
+    // FIXIT-M does this disable time wait for us?
     int on = 1;
     setsockopt(listener, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
 
@@ -480,7 +480,7 @@ static int socket_init()
         return -3;
     }
 
-    // FIXIT configure max conns
+    // FIXIT-M configure max conns
     if ( listen(listener, 5) < 0 )
     {
         FatalError("listen failed: %s\n", strerror(errno));
@@ -513,7 +513,7 @@ static int socket_conn()
     if ( remote_control < 0 ) 
         return -1;
 
-    // FIXIT authenticate, use ssl ?
+    // FIXIT-L authenticate, use ssl ?
     return 0;
 }
 
index b4c1fddf9fdf9ca9ab7a501dafca57b871797620..61483ef4c95fec6b3c947b8f0d6a72528ce7d037 100644 (file)
@@ -68,7 +68,7 @@ bool Analyzer::execute(AnalyzerCommand ac)
     if ( command && command != AC_PAUSE )
         return false;
 
-    // FIXIT executing a command while paused
+    // FIXIT-L executing a command while paused
     // will cause a resume
     command = ac;
     return true;
index 56d7daf1332bfa8e22b33ed2489aef3b7caf06e6..642f4a908d8209f9e2d3b684acb08874f8607aef 100644 (file)
@@ -47,7 +47,7 @@ public:
     uint64_t get_count() { return count; };
     const char* get_source() { return source; };
 
-    // FIXIT add asynchronous response too
+    // FIXIT-M add asynchronous response too
     bool execute(AnalyzerCommand);
 
     void set_config(Swapper* ps) { swap = ps; };
index cacb0a302237adc38867ef800dc3c0d9dde157e9..0fb7619005af97f6dca313a41b5a32f519fa9cc1 100644 (file)
@@ -83,7 +83,6 @@ static const char* snort_help =
 
 //-------------------------------------------------------------------------
 
-// FIXIT must use SnortModule params
 void help_args(const char* pfx)
 {
     Module* m = get_snort_module();
index aec9b175ab8eeb03fc47a6f9e0e7572025e227cb..126cb94aca7c70d06651ae25305c676b5d416b89 100644 (file)
@@ -237,7 +237,7 @@ bool SearchEngineModule::set(const char*, Value& v, SnortConfig* sc)
     else if ( v.is("bleedover_warnings_enabled") )
     {
         if ( v.get_bool() )
-            fpDetectSetBleedOverWarnings(fp);  // FIXIT these should take arg
+            fpDetectSetBleedOverWarnings(fp);  // FIXIT-L these should take arg
     }
     else if ( v.is("enable_single_rule_group") )
     {
@@ -400,8 +400,8 @@ bool ProfileModule::set(const char* fqn, Value& v, SnortConfig* sc)
         p->append = v.get_long() + 1;
 
     else if ( v.is("name") )
-        p->filename = SnortStrdup(v.get_string());  // FIXIT use c++ string
-        // FIXIT do this after log dir is set
+        p->filename = SnortStrdup(v.get_string());  // FIXIT-L use c++ string
+        // FIXIT-M do this after log dir is set
         //p->filename = ProcessFileOption(sc, v.get_string());
 
     else
@@ -414,7 +414,7 @@ bool ProfileModule::set(const char* fqn, Value& v, SnortConfig* sc)
 //-------------------------------------------------------------------------
 // classification module
 //-------------------------------------------------------------------------
-// FIXIT signature.{h,cc} has type and name confused
+// FIXIT-L signature.{h,cc} has type and name confused
 // the keys here make more sense
 
 static const Parameter classification_params[] =
@@ -482,7 +482,7 @@ bool ClassificationsModule::set(const char*, Value& v, SnortConfig*)
 //-------------------------------------------------------------------------
 // reference module
 //-------------------------------------------------------------------------
-// FIXIT signature.{h,cc} has type and name confused
+// FIXIT-L signature.{h,cc} has type and name confused
 // the keys here make more sense
 
 static const Parameter reference_params[] =
@@ -546,7 +546,7 @@ bool ReferencesModule::set(const char*, Value& v, SnortConfig*)
 static const Parameter alerts_params[] =
 {
     { "alert_file", Parameter::PT_STRING, nullptr, nullptr,
-      "set the alert output file name (FIXIT delete if not used)" },
+      "set the alert output file name (FIXIT-H delete if not used)" },
 
     { "alert_with_interface_name", Parameter::PT_BOOL, nullptr, "false",
       "include interface in alert info (fast, full, or syslog only)" },
@@ -720,7 +720,7 @@ bool OutputModule::set(const char*, Value& v, SnortConfig* sc)
     else if ( v.is("log_ipv6_extra_data") )
     {
         if ( v.get_bool() )
-        sc->log_ipv6_extra = 1; // FIXIT move to output|logging_flags
+        sc->log_ipv6_extra = 1; // FIXIT-M move to output|logging_flags
     }
     else if ( v.is("quiet") )
     {
@@ -884,7 +884,7 @@ bool PacketsModule::set(const char*, Value& v, SnortConfig* sc)
 
 static const Parameter daq_params[] =
 {
-    // FIXIT should be a list?
+    // FIXIT-L should be a list?
     { "dir", Parameter::PT_STRING, nullptr, nullptr,
       "directory where to search for DAQ plugins" },
 
@@ -894,11 +894,11 @@ static const Parameter daq_params[] =
     { "no_promisc", Parameter::PT_BOOL, nullptr, "false",
       "whether to put DAQ device into promiscuous mode" },
 
-    // FIXIT range determined by available plugins
+    // FIXIT-H range determined by available plugins
     { "name", Parameter::PT_STRING, nullptr, "pcap",
       "select name of DAQ" },
 
-    // FIXIT should be a list?
+    // FIXIT-L should be a list?
     { "var", Parameter::PT_STRING, nullptr, nullptr,
       "list of name=value DAQ-specific parameters" },
 
@@ -1207,7 +1207,7 @@ bool ProcessModule::set(const char*, Value& v, SnortConfig* sc)
 //-------------------------------------------------------------------------
 // vars module
 //-------------------------------------------------------------------------
-// FIXIT signature.{h,cc} has type and name confused
+// FIXIT-L signature.{h,cc} has type and name confused
 // the keys here make more sense
 
 static const Parameter vars_params[] =
@@ -1494,7 +1494,7 @@ static const Parameter rate_filter_params[] =
       "count interval" },
 
     { "new_action", Parameter::PT_SELECT,
-      // FIXIT range based on available action plugins
+      // FIXIT-H range based on available action plugins
       "alert | drop | log | pass | | reject | sdrop", "alert",
       "restrict filter to these addresses according to track" },
 
@@ -1629,7 +1629,7 @@ bool RuleStateModule::end(const char*, int idx, SnortConfig* sc)
 // hosts module
 //-------------------------------------------------------------------------
 
-// FIXIT these are cloned from ip_module.cc and tcp_module.cc
+// FIXIT-H these are cloned from ip_module.cc and tcp_module.cc
 
 static const char* ip_policies =
     "first | linux | bsd | bsd_right |last | windows | solaris";
index bbaff1809cc0da7da8784a3e2eb3ee4935d3dd6f..50953c00c137a6138b06667a28af8da4bd30208b 100644 (file)
@@ -31,7 +31,7 @@
 
 typedef unsigned int PolicyId;
 
-// FIXIT split into separate modules
+// FIXIT-H split into separate modules
 
 //-------------------------------------------------------------------------
 // traffic stuff
@@ -140,7 +140,7 @@ public:
 };
 
 //-------------------------------------------------------------------------
-// binding stuff - FIXIT tbd
+// binding stuff - FIXIT-H tbd
 //-------------------------------------------------------------------------
 
 class PolicyMap
index 2af89e39d0fb2c72bcb4293a3299bc1a8d62d986..a22a41ef2faf80c213609675f3445d40ebd4283a 100644 (file)
@@ -132,8 +132,8 @@ static void SnortCleanup();
 //-------------------------------------------------------------------------
 // nascent policy management
 //-------------------------------------------------------------------------
-// FIXIT need stub binding rule to set these for runtime
-// FIXIT need to set these on load too somehow
+// FIXIT-H need stub binding rule to set these for runtime
+// FIXIT-H need to set these on load too somehow
 
 static THREAD_LOCAL NetworkPolicy* s_traffic_policy = nullptr;
 static THREAD_LOCAL InspectionPolicy* s_inspection_policy = nullptr;
@@ -190,7 +190,7 @@ static void SetupMetadataCallback(void)  // FIXDAQ
 #endif
 
 #if 0
-// FIXIT not yet used
+// FIXIT-H not yet used
 static void restart()
 {
     int daemon_mode = ScDaemonMode();
@@ -229,7 +229,7 @@ static void restart()
 
 //-------------------------------------------------------------------------
 // perf stats
-// FIXIT move these to appropriate modules
+// FIXIT-M move these to appropriate modules
 //-------------------------------------------------------------------------
 
 #ifdef PERF_PROFILING
@@ -324,7 +324,7 @@ static void SnortInit(int argc, char **argv)
 
     LogMessage("--------------------------------------------------\n");
 
-    // FIXIT config plugin_path won't work like this
+    // FIXIT-H config plugin_path won't work like this
     Shell::init();
     ModuleManager::init();
 
@@ -378,7 +378,7 @@ static void SnortInit(int argc, char **argv)
 
     ParseRules(snort_conf);
 
-    // FIXIT print should be through generic module list 
+    // FIXIT-M print should be through generic module list 
     // and only print configured / active stuff
     //detection_filter_print_config(snort_conf->detection_filter_config);
     //RateFilter_PrintConfig(snort_conf->rate_filter_config);
@@ -412,7 +412,7 @@ static void SnortInit(int argc, char **argv)
     /* Finish up the pcap list and put in the queues */
     Trough_SetUp();
 
-    // FIXIT stuff like this that is also done in snort_config.cc::VerifyReload()
+    // FIXIT-L stuff like this that is also done in snort_config.cc::VerifyReload()
     // should be refactored
     if ((snort_conf->bpf_filter == NULL) && (snort_conf->bpf_file != NULL))
         snort_conf->bpf_filter = read_infile(snort_conf->bpf_file);
@@ -446,7 +446,7 @@ static void SnortInit(int argc, char **argv)
 // much initialization stuff in SnortInit() as possible and to restrict this
 // function to those things that depend on DAQ startup or non-root user/group.
 //
-// FIXIT breaks DAQ_New()/Start() because packet threads won't be root when
+// FIXIT-H breaks DAQ_New()/Start() because packet threads won't be root when
 // opening iface
 static void SnortUnprivilegedInit(void)
 {
@@ -604,7 +604,7 @@ void snort_cleanup()
 {
     DAQ_Term();
 
-    if ( !ScTestMode() )  // FIXIT ideally the check is in one place
+    if ( !ScTestMode() )  // FIXIT-M ideally the check is in one place
         PrintStatistics();
 
     CloseLogger();
@@ -615,7 +615,7 @@ void snort_cleanup()
 // reload foo
 //-------------------------------------------------------------------------
 
-// FIXIT refactor this so startup and reload call the same core function to
+// FIXIT-M refactor this so startup and reload call the same core function to
 // instantiate things that can be reloaded
 static SnortConfig * get_reload_config(void)
 {
@@ -652,7 +652,7 @@ static SnortConfig * get_reload_config(void)
     FlowbitResetCounts();
     ParseRules(sc);
 
-    // FIXIT see SnortInit() on config printing
+    // FIXIT-L see SnortInit() on config printing
     //detection_filter_print_config(sc->detection_filter_config);
     ////RateFilter_PrintConfig(sc->rate_filter_config);
     //print_thresholding(sc->threshold_config, 0);
@@ -734,7 +734,7 @@ void set_main_hook(MainHook_f f)
 Packet* get_current_packet()
 { return &s_packet; }
 
-// FIXIT for multiple packet threads
+// FIXIT-H for multiple packet threads
 // using thread locals for s_pkth and s_data won't work
 // will need array of s_packet, s_pkth, and s_data and 
 // capture all if it is not clear which thread crashed
@@ -823,7 +823,7 @@ DAQ_Verdict ProcessPacket(
         p->proto_bits = PROTO_BIT__OTHER;
 
 #if 0
-    // FIXIT required until decoders are fixed
+    // FIXIT-H required until decoders are fixed (josh)
     else if ( !p->family && (p->proto_bits & PROTO_BIT__IP) )
         p->proto_bits &= ~PROTO_BIT__IP;
 #endif
@@ -858,7 +858,7 @@ DAQ_Verdict ProcessPacket(
     return verdict;
 }
 
-// FIXIT need to call fail open from a different thread
+// FIXIT-H need to call fail open from a different thread
 DAQ_Verdict fail_open(
     void*, const DAQ_PktHdr_t*, const uint8_t*)
 {
@@ -958,12 +958,12 @@ DAQ_Verdict packet_callback(
     Active_Reset();
     PacketManager::encode_reset();
 
-    if ( flow_con )  // FIXIT always instantiate
+    if ( flow_con )  // FIXIT-H always instantiate
         flow_con->timeout_flows(4, pkthdr->ts.tv_sec);
 
 #if 0
-    // FIXIT do this when idle
-    if ( flow_con ) // FIXIT always instantiate
+    // FIXIT-H do this when idle
+    if ( flow_con ) // FIXIT-H always instantiate
         flow_con->timeout_flows(16384, time(NULL));
 #endif
 
@@ -983,7 +983,7 @@ void snort_rotate()
 
 void snort_thread_init(const char* intf)
 {
-    // FIXIT the start-up sequence is a little off due to dropping privs
+    // FIXIT-H the start-up sequence is a little off due to dropping privs
     DAQ_New(snort_conf, intf);
     DAQ_Start();
 
index 3a1f21220f203c49258d208b31b97315638ff9b8..05c61af62f7cd6961e9f7009d077cf6279c4797f 100644 (file)
@@ -48,7 +48,7 @@ void snort_thread_term();
 
 void snort_rotate();
 
-// FIXIT may be inlined at some point; on lockdown for now
+// FIXIT-L may be inlined at some point; on lockdown for now
 NetworkPolicy* get_network_policy();
 InspectionPolicy* get_inspection_policy();
 IpsPolicy* get_ips_policy();
@@ -73,7 +73,7 @@ typedef void (*MainHook_f)(Packet*);
 void set_main_hook(MainHook_f);
 
 //-------------------------------------------------------------------------
-// FIXIT most of what follows belongs in snort_config.h
+// FIXIT-L most of what follows belongs in snort_config.h
 //-------------------------------------------------------------------------
 
 /*  D E F I N E S  ************************************************************/
@@ -204,7 +204,7 @@ static inline int ScLogQuiet(void)
 }
 
 //-------------------------------------------------------------------------
-// FIXIT should be calling NetworkPolicy methods
+// FIXIT-L should be calling NetworkPolicy methods
 
 static inline int ScIpChecksums(void)
 {
@@ -480,7 +480,7 @@ static inline int ScGid(void)
     return snort_conf->group_id;
 }
 
-// FIXIT this should be feature of otn
+// FIXIT-L this should be feature of otn
 #define EventIsInternal(gid) (gid == GENERATOR_INTERNAL)
 
 static inline void EnableInternalEvent(RateFilterConfig *config, uint32_t sid)
index 3780b03cddc6425d8f4176818c8e6bf921f8c7db..59ae5f8f1ebf2092ffa80cb31ca219db2b81f466 100644 (file)
@@ -30,7 +30,7 @@
 #include "detection/treenodes.h"
 #include "events/event_queue.h"
 #include "stream/stream_api.h"
-#include "port_scan/ps_detect.h"  // FIXIT for PS_PROTO_*
+#include "port_scan/ps_detect.h"  // FIXIT-L for PS_PROTO_*
 #include "utils/strvec.h"
 #include "file_api/file_service.h"
 #include "target_based/sftarget_reader.h"
@@ -166,7 +166,7 @@ SnortConfig * SnortConfNew(void)
     sc->tagged_packet_limit = 256;
     sc->default_rule_state = RULE_STATE_ENABLED;
 
-    // FIXIT pcre_match_limit* are interdependent
+    // FIXIT-L pcre_match_limit* are interdependent
     // somehow a packet thread needs a much lower setting 
     sc->pcre_match_limit = 1500;
     sc->pcre_match_limit_recursion = 1500;
@@ -468,7 +468,7 @@ SnortConfig * MergeSnortConfs(SnortConfig *cmd_line, SnortConfig *config_file)
         config_file->max_encapsulations = cmd_line->max_encapsulations;
 
     // config file vars are stored differently
-    // FIXIT should config_file and cmd_line use the same var list / table?
+    // FIXIT-M should config_file and cmd_line use the same var list / table?
     config_file->var_list = NULL;
 
     free(config_file->state);
index 3610d0e2e3aac3d62d47718b7943be684044bc33..c4dbc211ae566280e10aea3f5c6b5804a0152f46 100644 (file)
@@ -183,14 +183,14 @@ struct SnortConfig
 #endif
 
     //------------------------------------------------------
-    // FIXIT command line only stuff, add to conf / module
+    // FIXIT-L command line only stuff, add to conf / module
 
     uint32_t event_log_id;      /* -G */
     sfip_t obfuscation_net;  // -B
     char *bpf_filter;        // --bpf
 
     //------------------------------------------------------
-    // FIXIT non-module stuff - separate config from derived state?
+    // FIXIT-L non-module stuff - separate config from derived state?
 
     char pid_filename[STD_BUF];
     char *orig_log_dir;      /* set in case of chroot */
index d1c65883052219a085c9a642669a4db1ea4845d7..ccc7a0e90cdb6d48d34b79544277ec20ed95b9e9 100644 (file)
@@ -41,8 +41,8 @@
 #include "snort.h"
 
 #ifdef DEBUG_MSGS
-SO_PUBLIC const char *DebugMessageFile = NULL;  // FIXIT use access methods
-SO_PUBLIC int DebugMessageLine = 0;  // FIXIT use access methods
+SO_PUBLIC const char *DebugMessageFile = NULL;  // FIXIT-M use access methods
+SO_PUBLIC int DebugMessageLine = 0;  // FIXIT-M use access methods
 
 int DebugThis(uint64_t level)
 {
index 571fa56c044b9d5a5dd056244d1cc97c0102288c..834a2b3cd795187f3dc3ac60bafe6faff286aafa 100644 (file)
@@ -93,11 +93,11 @@ typedef uint16_t Port;
 /* utilities */
 
 #ifndef SIZE_MAX
-#define SIZE_MAX 0xFFFFFFFF  // FIXIT not defined for g++?
+#define SIZE_MAX 0xFFFFFFFF  // FIXIT-L use c++ define
 #endif
 
 #ifndef INT32_MAX
-#define INT32_MAX 0x7FFFFFFF  // FIXIT not defined for g++?
+#define INT32_MAX 0x7FFFFFFF  // FIXIT-L use c++ define
 #endif
 
 #define UNUSED(x) (void)(x)
index 6f318cb4d5e00a68494da4401d3505badfc3b800..673be538dc22a251206bf2eece0dec8743512999 100644 (file)
@@ -24,7 +24,7 @@
 #include "snort.h"
 
 //-------------------------------------------------------------------------
-// FIXIT instance_id zero indicates main thread during parse time and the
+// FIXIT-L instance_id zero indicates main thread during parse time and the
 // first packet thread during runtime.  not sure if i'm ok with that.
 // works for now.
 //-------------------------------------------------------------------------
@@ -57,7 +57,7 @@ const char* get_instance_file(std::string& file, const char* name)
     struct stat s;
 
     if ( stat(file.c_str(), &s) )
-        // FIXIT getting random 0750 or 0700 (umask not thread local)?
+        // FIXIT-H getting random 0750 or 0700 (umask not thread local)?
         mkdir(file.c_str(), 0770);
 
     file += name;
index ee7ee9faad651bc148faaa9ca91c2f74f97a9a67..db9e7ae1752f1b51a83a958138768d4c9c9f833e 100644 (file)
@@ -155,7 +155,7 @@ void EventManager::instantiate(
     Output* p, Module* mod, SnortConfig* sc)
 {
     p->handler = p->api->ctor(sc, mod);
-    assert(p->handler);  // FIXIT must handle case where not configured
+    assert(p->handler);  // FIXIT-H must handle case where not configured
 
     if ( (p->api->flags & OUTPUT_TYPE_FLAG__ALERT) &&
         (p->api->flags & OUTPUT_TYPE_FLAG__LOG) )
@@ -191,7 +191,7 @@ void EventManager::instantiate(
         return;
     }
 
-    // FIXIT this loses args if set in conf
+    // FIXIT-H this loses args if set in conf
     // emulate a config like name = { }
     //mod->begin(name, 0, sc);
     //mod->end(name, 0, sc);
index 15fc3ca77732b500421c04f2ee0d7dd4b9344a94..6ee820f4850fa0138517d5e4bfbf73246966158e 100644 (file)
@@ -293,7 +293,7 @@ static PHInstance* GetInstance(
 
     p = new PHInstance(*ppc);
 
-    if ( !p->handler )  // FIXIT is this even possible?
+    if ( !p->handler )  // FIXIT-M is this even possible?
     {
         delete p;
         return NULL;
@@ -302,10 +302,10 @@ static PHInstance* GetInstance(
     return p;
 }
 
-// FIXIT create a separate list for meta handlers?  is there really more than one?
+// FIXIT-M create a separate list for meta handlers?  is there really more than one?
 void InspectorManager::dispatch_meta (FrameworkPolicy* fp, int type, const uint8_t* data)
 {
-    // FIXIT change to select instance by policy and pass that in
+    // FIXIT-M change to select instance by policy and pass that in
     for ( auto* p : fp->ilist )
         p->handler->meta(type, data);
 }
@@ -379,7 +379,7 @@ static PHClass* GetClass(const char* keyword, FrameworkConfig* fc)
 // this is per thread
 void InspectorManager::thread_init(SnortConfig* sc)
 {
-    // FIXIT BIND the policy related logic herein moves to binder
+    // FIXIT-H BIND the policy related logic herein moves to binder
     Inspector::slot = get_instance_id();
 
     for ( auto* p : sc->framework_config->clist )
@@ -418,12 +418,12 @@ void InspectorManager::thread_term(SnortConfig* sc)
 void InspectorManager::instantiate(
     const InspectApi* api, Module*, SnortConfig* sc)
 {
-    // FIXIT only configures Lua inspectors in base policy; must be 
+    // FIXIT-H only configures Lua inspectors in base policy; must be 
     // revisited when bindings are implemented
     FrameworkConfig* fc = sc->framework_config;
     FrameworkPolicy* fp = sc->policy_map->inspection_policy[0]->framework_policy;
 
-    // FIXIT should not need to lookup inspector etc
+    // FIXIT-H should not need to lookup inspector etc
     // since given api and mod
     const char* keyword = api->base.name;
 
@@ -446,7 +446,7 @@ bool InspectorManager::configure(SnortConfig *sc)
     Inspector::max_slots = sc->max_threads;
     s_handlers.sort(PHGlobal::comp);
 
-    // FIXIT use FrameworkConfig or FrameworkPolicy ?
+    // FIXIT-H use FrameworkConfig or FrameworkPolicy ?
     //FrameworkConfig* fc = sc->framework_config;
     FrameworkPolicy* fp = sc->policy_map->inspection_policy[0]->framework_policy;
     bool ok = true;
@@ -485,7 +485,7 @@ static inline void execute(
 
         PHClass& ppc = (*prep)->pp_class;
 
-        // FIXIT these checks can eventually be optimized
+        // FIXIT-P these checks can eventually be optimized
            // but they are required to ensure that session and app
            // handlers aren't called w/o a session pointer
         if ( !p->flow && (ppc.api.type >= IT_SESSION) )
@@ -528,7 +528,7 @@ void InspectorManager::execute (Packet* p)
     FrameworkPolicy* fp = get_inspection_policy()->framework_policy;
     assert(fp);
 
-    // FIXIT structure lists so stream, normalize, etc. aren't
+    // FIXIT-M structure lists so stream, normalize, etc. aren't
     // called on reassembled packets
     ::execute(p, fp->session.vec, fp->session.num);
     ::execute(p, fp->network.vec, fp->network.num);
@@ -544,7 +544,7 @@ void InspectorManager::execute (Packet* p)
         if ( flow->clouseau && (p->proto_bits & flow->clouseau->get_api()->proto_bits) )
             bumble(p);
 
-        // FIXIT BIND need more than one service inspector?
+        // FIXIT-H BIND need more than one service inspector?
         //::execute(p, fp->service.vec, fp->service.num);
         if ( flow->gadget && (p->proto_bits & flow->gadget->get_api()->proto_bits) )
             flow->gadget->eval(p);
index b4b735db25c185ac1095b1cacd0139acd1cbdeaa..48dada1e6ec6d7bd68b556d0d9fcda003466f2f9 100644 (file)
@@ -176,7 +176,7 @@ bool IpsManager::option_begin(
             opt->api->pinit(sc);
         opt->init = true;
     }
-    // FIXIT verify api->protos and api->max_per_rule
+    // FIXIT-H verify api->protos and api->max_per_rule
     // before calling ctor
     current_module = ModuleManager::get_module(key);
 
index 3328bfec982a3d7f06dee0fafedbd54372afe7cf..0537aee88aa456829eed007acf1e9e9a50c02069 100644 (file)
@@ -246,15 +246,15 @@ static const Parameter* get_params(string& sfx, const Parameter* p)
     return get_params(sfx,  p);
 }
 
-// FIXIT vars may have been defined on command line
+// FIXIT-M vars may have been defined on command line
 // that mechanism will be replaced with pulling a Lua
 // chunk from the command line and stuffing into L
 // before setting configs; that will overwrite
 //
-// FIXIT should only need one table with
+// FIXIT-M should only need one table with
 // dynamically typed vars
 //
-// FIXIT this is a hack to tell vars by naming
+// FIXIT-M this is a hack to tell vars by naming
 // convention; with one table this is obviated
 // but if multiple tables are kept might want
 // to change these to a module with parameters
@@ -700,7 +700,7 @@ void ModuleManager::show_rules(const char* pfx)
 
 void ModuleManager::load_rules(SnortConfig* sc)
 {
-    // FIXIT callers of ParseConfigString() should not have to push parse loc
+    // FIXIT-M callers of ParseConfigString() should not have to push parse loc
     push_parse_location("builtin");
 
     for ( auto p : s_modules )
@@ -717,11 +717,11 @@ void ModuleManager::load_rules(SnortConfig* sc)
         while ( r->msg )
         {
             ss.str("");
-            // FIXIT move builtin generation to a better home
-            // FIXIT builtins should allow configurable nets and ports
-            // FIXIT builtins should have accurate proto
+            // FIXIT-L move builtin generation to a better home
+            // FIXIT-L builtins should allow configurable nets and ports
+            // FIXIT-L builtins should have accurate proto
             //       (but ip winds up in all others)
-            // FIXIT if msg has C escaped embedded quotes, we break
+            // FIXIT-L if msg has C escaped embedded quotes, we break
             //ss << "alert tcp any any -> any any ( ";
             ss << "alert ( ";
             ss << "gid:" << gid << "; ";
@@ -761,7 +761,7 @@ void ModuleManager::dump_rules(const char* pfx)
 
         while ( r->msg )
         {
-            // FIXIT builtin gen should be in exactly one place
+            // FIXIT-L builtin gen should be in exactly one place
             ss << "alert ( ";
             ss << "gid:" << gid << "; ";
             ss << "sid:" << r->sid << "; ";
index f738852af8948c72e867ecf1636e4cd333e3d606..f301b2e94398b313bbf49add01ce054f5de343e0 100644 (file)
@@ -158,7 +158,7 @@ bool MpseManager::search_engine_trim(const MpseApi* api)
 }
 
 // was called during drop stats but actually commented out
-// FIXIT this one has to accumulate across threads
+// FIXIT-M this one has to accumulate across threads
 #if 0
 void MpseManager::print_qinfo()
 {
index e6785d43a41b7275dbf5257529df265f5cabc88f..8c12f5dc94445fa53927c7302ab8b3a81a263bd7 100644 (file)
@@ -127,7 +127,7 @@ struct RefCount
 
     RefCount() { count = 0; };
 
-    // FIXIT fails on fatal error
+    // FIXIT-L fails on fatal error
     //~RefCount() { assert(!count); };
 };
 
@@ -334,8 +334,6 @@ void PluginManager::load_plugins(const char* paths)
     add_plugins();
 }
 
-// FIXIT some plugins don't have modules; consider adding them
-// for stray parameters, perfstats, documentation, etc.
 void PluginManager::list_plugins()
 {
     PlugMap::iterator it;
index 8b656ee56d361d351993caa2ee93aca0ddb5b643..b77ce7e2cf236b21d22b1d6f44935e0a1c61c57e 100644 (file)
@@ -32,7 +32,7 @@
 #include "parser/parser.h"
 #include "helpers/directory.h"
 
-// FIXIT this approach results in N * K lua states where
+// FIXIT-P this approach results in N * K lua states where
 // N ::= number of instances of script + args and
 // K ::= number of threads
 // change to create K lua states here for each script + args
index 15dcb8188f042f5e2cbdd07b17f8ae73557bbd8f..2d099475f6b528e73287881059c1856db53bfa0e 100644 (file)
@@ -77,7 +77,7 @@ void SoManager::dump_plugins()
 
 #define GZIP_WBITS 31
 
-// FIXIT make this into a general utility for one shot decompress
+// FIXIT-L make this into a general utility for one shot decompress
 // and add class for stream decompress
 const char*  uncompress(const uint8_t* data, unsigned len)
 {
@@ -133,7 +133,7 @@ const char* SoManager::get_so_options(const char* soid)
     if ( !rule )
         return nullptr;
 
-    // FIXIT this approach won't tolerate spaces and might get
+    // FIXIT-L this approach won't tolerate spaces and might get
     // fooled by matching content (should it precede this)
     char opt[32];
     snprintf(opt, sizeof(opt), "soid:%s;", soid);
@@ -175,7 +175,7 @@ void SoManager::dump_rule_stubs(const char* path)
         if ( !rule )
             continue;
 
-        // FIXIT need to properly parse rule to avoid
+        // FIXIT-L need to properly parse rule to avoid
         // confusing other text for soid option
         if ( !(s = strstr(rule, "soid:")) )
             continue;
index 284e2dc1660ddd110d76676aa626b6f8e04f1a7e..636e5793114f92f411cc71d435478370f880a3ed 100644 (file)
@@ -126,7 +126,7 @@ static void PrintIPMacEntryList(IPMacEntryList& ipmel)
     {
         sfip_t in;
         sfip_set_raw(&in, &p.ipv4_addr, AF_INET);
-        // FIXIT replace all inet_ntoa() with thread safe
+        // FIXIT-L replace all inet_ntoa() with thread safe
         LogMessage("    %s -> ", inet_ntoa(&in));
 
         for (int i = 0; i < 6; i++)
index 549d6a9fcda3430dfa2dc29177c5f58984326968..537450664614afc9c744c15ba0b9b748265f5925 100644 (file)
@@ -44,7 +44,7 @@ THREAD_LOCAL ProfileStats bindPerfStats;
 // helpers
 //-------------------------------------------------------------------------
 
-// FIXIT bind this is a temporary hack. note that both ends must be set
+// FIXIT-H bind this is a temporary hack. note that both ends must be set
 // independently and that we must ref count inspectors.
 static void set_session(Flow* flow, const char* key)
 {
@@ -61,7 +61,7 @@ static void set_session(Flow* flow)
     flow->clouseau = nullptr;
 }
 
-// FIXIT use IPPROTO_* directly (any == 0)
+// FIXIT-H use IPPROTO_* directly (any == 0)
 static bool check_proto(const Flow* flow, BindProto bp)
 {
     switch ( bp )
@@ -121,7 +121,7 @@ void Binder::eval(Packet* p)
     ++bstats.total_packets;
 }
 
-// FIXIT implement inspector lookup from policy / bindings
+// FIXIT-H implement inspector lookup from policy / bindings
 Inspector* Binder::find_inspector(const char* s)
 {
     Binding* pb;
@@ -167,7 +167,7 @@ int Binder::exec(int, void* pv)
     return 0;
 }
 
-// FIXIT bind services - this is a temporary hack that just looks at ports,
+// FIXIT-H bind services - this is a temporary hack that just looks at ports,
 // need to examine all key fields for matching.  ultimately need a routing
 // table, scapegoat tree, etc.
 int Binder::check_rules(Flow* flow, Packet* p)
@@ -175,8 +175,8 @@ int Binder::check_rules(Flow* flow, Packet* p)
     Binding* pb;
     unsigned i, sz = bindings.size();
 
-    // FIXIT called before stream runs - these flags aren't set
-    // (below is structed to work by accident on initial syn until fixed)
+    // FIXIT-H called before stream runs - these flags aren't set
+    // (below is structured to work by accident on initial syn until fixed)
     Port port = (p->packet_flags & PKT_FROM_SERVER) ? p->sp : p->dp;
 
     for ( i = 0; i < sz; i++ )
@@ -191,7 +191,7 @@ int Binder::check_rules(Flow* flow, Packet* p)
     }
         
     if ( i == sz )
-        return BA_ALLOW;  // default action FIXIT make configurable
+        return BA_ALLOW;  // default action FIXIT-H make configurable
 
     if ( pb->action != BA_INSPECT )
         return pb->action;
index cf68e3e267023c44baac6c321239d885e28d9541..f25a7fff22a163b5c09c19ed200f13d4a35f787b 100644 (file)
@@ -540,7 +540,7 @@ int Norm_SetConfig (NormalizerConfig* nc)
 {
     if ( !DAQ_CanReplace() )
     {
-        // FIXIT output only once
+        // FIXIT-L output only once
         //LogMessage("WARNING: normalizations disabled because DAQ"
         //    " can't replace packets.\n");
         nc->normalizer_flags = 0x0;
index c17ebb07d6bdda7cd4f01905ec306d712f736d62..8af1cb749ac9fefa273ea6abfbe17d1bb94a7b44 100644 (file)
@@ -30,7 +30,7 @@ struct NormalizerConfig;
 
 // all normalizers look like this:
 // the return is 1 if packet was changed, else 0
-typedef int (*NormalFunc)(  // FIXIT why is this exposed?
+typedef int (*NormalFunc)(  // FIXIT-L why is this exposed?
     struct NormalizerConfig*, Packet*, uint8_t layer, int changes);
 
 struct NormalizerConfig
index f0ff409fc05f89c54ab3d1973e6d46007a27f062..d038df332440c3f928fc02e8e997dd1293431b39 100644 (file)
@@ -126,7 +126,7 @@ static const Parameter norm_tcp_params[] =
       "sack | echo | partial_order | conn_count | alt_checksum | md5", "false",
       "don't clear given option names" },
 
-    // FIXIT provide a byte list for stuff like this
+    // FIXIT-L provide a byte list for stuff like this
     { "allow_codes", Parameter::PT_STRING, nullptr, nullptr,
       "don't clear given option codes" },
 
index 9c0adbb48641d0c90239d61d7544cbc92b9574c8..d156b7b907693b72e35450c00968aac068b48e0c 100644 (file)
@@ -180,7 +180,7 @@ Normalizer::Normalizer(NormalizeModule* mod)
 
 bool Normalizer::configure(SnortConfig*)
 {
-    // FIXIT detection policy can't be used by normalizer
+    // FIXIT-M detection policy can't be used by normalizer
     // (not set until after normalizer runs)
     if ( get_ips_policy()->policy_mode != POLICY_MODE__INLINE )
     {
index b76dbb86b6752c950f0bb6eb12c00855e81aef4c..cf2e7e879d6e0df909f71e65ac3b1c2aade28d3b 100644 (file)
@@ -479,7 +479,7 @@ void sfPerformanceStats(SFPERF *sfPerf, Packet *p)
             if (CheckSampleInterval(sfPerf, p))
             {
                 cnt = 0;
-                perfmon_config = sfPerf;  // FIXIT sfPerf isn't propagated far enough
+                perfmon_config = sfPerf;  // FIXIT-L sfPerf isn't propagated far enough
 
                 if (!(sfPerf->perf_flags & SFPERF_SUMMARY_BASE))
                 {
@@ -552,7 +552,7 @@ static bool CheckSampleInterval(SFPERF *sfPerf, Packet *p)
 
 void InitPerfStats(SFPERF *sfPerf)
 {
-    perfmon_config = sfPerf;  // FIXIT sfPerf isn't propagated far enough
+    perfmon_config = sfPerf;  // FIXIT-L sfPerf isn't propagated far enough
 
     if (sfPerf->perf_flags & SFPERF_BASE)
         InitBaseStats(&sfBase);
@@ -573,7 +573,7 @@ void InitPerfStats(SFPERF *sfPerf)
 
 static void UpdatePerfStats(SFPERF *sfPerf, Packet *p)
 {
-    perfmon_config = sfPerf;  // FIXIT sfPerf isn't propagated far enough
+    perfmon_config = sfPerf;  // FIXIT-L sfPerf isn't propagated far enough
     bool rebuilt = PacketIsRebuilt(p);
 
     if (sfPerf->perf_flags & SFPERF_BASE)
@@ -671,7 +671,7 @@ void sfPerfStatsSummary(SFPERF *sfPerf)
     if (sfPerf == NULL)
         return;
 
-    perfmon_config = sfPerf;  // FIXIT sfPerf isn't propagated far enough
+    perfmon_config = sfPerf;  // FIXIT-L sfPerf isn't propagated far enough
 
     if (sfPerf->perf_flags & SFPERF_SUMMARY_BASE)
         sfProcessBaseStats(sfPerf);
index 9271f67ddef2b088de029a4ca8772f93c14a00f3..b35bc298dd53e7363883ed7991ef5f8d08a01a61 100644 (file)
@@ -63,7 +63,7 @@ THREAD_LOCAL ProfileStats perfmonStats;
 /* This function changes the perfmon log files permission if exists.
    It is done in the  PerfMonitorInit() before Snort changed its user & group.
  */
-// FIXIT this should be deleted; was added as 1-time workaround to
+// FIXIT-L this should be deleted; was added as 1-time workaround to
 // get around the borked perms due to a bug that has been fixed
 static void PerfMonitorChangeLogFilesPermission(void)
 {
@@ -243,7 +243,7 @@ void PerfMonitor::show(SnortConfig*)
     PrintConfig(&config);
 }
 
-// FIXIT perfmonitor should be logging to one file and writing record type and
+// FIXIT-L perfmonitor should be logging to one file and writing record type and
 // version fields immediately after timestamp like
 // seconds, usec, type, version#, data1, data2, ...
 bool PerfMonitor::configure(SnortConfig*)
index 5e7a7f282ef3d9c74ac7e4f8cfef4d9a13d8eab0..99db9ab8dba8365eedc00fb3df45a277b67639f9 100644 (file)
@@ -418,7 +418,7 @@ static int MakePortscanPkt(PS_PKT *ps_pkt, PS_PROTO *proto, int proto_type,
     */
     PacketManager::encode_update(g_tmp_pkt);
 
-    // FIXIT: IP4 is gauranteed to have been set in update().  Is IP6()
+    // FIXIT-L: IP4 is gauranteed to have been set in update().  Is IP6()
     //        also gauranteed?
     if(g_tmp_pkt->ip_api.is_ip6())
         ((ip::IP6Hdr*)g_tmp_pkt->ip_api.get_ip6h())->set_len(htons((uint16_t)ip_size));
@@ -854,7 +854,7 @@ PortScan::~PortScan()
 
 bool PortScan::configure(SnortConfig* sc)
 {
-    // FIXIT use fixed base file name
+    // FIXIT-L use fixed base file name
     config->logfile = SnortStrdup("portscan.log");
 
     global = (PsData*)DataManager::acquire(PS_GLOBAL, sc);
@@ -904,7 +904,7 @@ void PortScan::eval(Packet *p)
     MODULE_PROFILE_START(psPerfStats);
     ++spstats.total_packets;
 
-    memset(&ps_pkt, 0x00, sizeof(PS_PKT)); // FIXIT don't zap unless necessary
+    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 */
@@ -991,7 +991,7 @@ static const InspectApi sp_api =
         mod_dtor
     },
     IT_PROTOCOL,
-    PROTO_BIT__IP|PROTO_BIT__ICMP|PROTO_BIT__TCP|PROTO_BIT__UDP,  // FIXIT dynamic assign
+    PROTO_BIT__IP|PROTO_BIT__ICMP|PROTO_BIT__TCP|PROTO_BIT__UDP,  // FIXIT-L dynamic assign
     nullptr, // buffers
     nullptr, // service
     nullptr, // pinit
index 951e9aaeded587172467149f66b2731258c10763..db0e81cce324e0c0bb350ef0d4a259ecc3ce28c0 100644 (file)
@@ -118,7 +118,7 @@ const RuleMap* PortScanModule::get_rules() const
 { return port_scan_rules; }
 
 //-------------------------------------------------------------------------
-// FIXIT ipset_parse() format must be changed to remove comma
+// FIXIT-L ipset_parse() format must be changed to remove comma
 // separators between tokens which means using something other than
 // space between CIDR and port.  the current format is:
 // CIDR[ ports][,CIDR[ ports]]*
index d4b9c9331349b4f28aeec258dcaeaa43af936a38..bc2741db77657f42506cc70a01c3e274e8a9d2d3 100644 (file)
@@ -254,7 +254,7 @@ int Active_IsRSTCandidate(const Packet* p)
 
 int Active_IsUNRCandidate(const Packet* p)
 {
-    // FIXIT allow unr to tcp/udp/icmp4/icmp6 only or for all
+    // FIXIT-J allow unr to tcp/udp/icmp4/icmp6 only or for all
     switch ( GetInnerProto(p) ) {
     case PROTO_UDP:
     case PROTO_TCP:
@@ -370,7 +370,7 @@ static inline int _Active_DoReset(Packet *p)
                 ActionManager::queue_reject();
             break;
 
-        // FIXIT send unr to udp/icmp4/icmp6 only or for all non-tcp?
+        // FIXIT-J send unr to udp/icmp4/icmp6 only or for all non-tcp?
         case IPPROTO_UDP:
         case IPPROTO_ICMP:
         case IPPROTO_ICMPV6:
index 77d7e893918532ea11ce71781adb779b01e53916..3ca6cef02bc3404d83c70deba880f8e97719d5b2 100644 (file)
@@ -268,7 +268,7 @@ void DAQ_Abort ()
         DAQ_Stop();
 
     DAQ_Delete();
-    //DAQ_Term();  FIXIT this must be called from main thread on abort
+    //DAQ_Term();  FIXIT-H this must be called from main thread on abort
 }
 
 //--------------------------------------------------------------------
index 02a76f61c2775c6d387a8b6da83e82f7464ceda5..9abf1e2e7f175fab9a5db7027d65bca25b0ec07b 100644 (file)
@@ -28,7 +28,7 @@ void ArgList::dump()
         printf("argv[%d]='%s'\n", i, argv[i]);
 }
 
-// FIXIT this chokes on -n -4 because it thinks
+// FIXIT-L this chokes on -n -4 because it thinks
 // -4 is another arg instead of an option to -n
 bool ArgList::get_arg(const char*& key, const char*& val)
 {
index 76d501740ca5ec207eb062bc8148a82b0f4722a7..e9e13ad9c2edf4db0e598c2503fb226aeb76c9a5 100644 (file)
 #include "managers/event_manager.h"
 #include "detection/detect.h"
 
-// FIXIT defines should be avoided here - the actual option
-// may be from command line (a-b) or from config file (a_b)
-// option should be passed into all parser function for error
-// messages
-#define CONFIG_OPT__POLICY_VERSION                  "policy_version"
-#ifdef PERF_PROFILING
-# define CONFIG_OPT__PROFILE_MODULES               "profile_preprocs"
-# define CONFIG_OPT__PROFILE_RULES                  "profile_rules"
-#endif
-
 #define LOG_NONE  "none"
 #define LOG_TEXT  "text"
 #define LOG_PCAP  "pcap"
@@ -83,7 +73,6 @@
 
 #define OUTPUT_AJK  "unified2"
 #define OUTPUT_CMG  "alert_fast"
-//#define OUTPUT_LOG  "alert_syslog"  // FIXIT should use?
 #define OUTPUT_PCAP "log_tcpdump"
 
 static std::string lua_conf;
@@ -573,23 +562,6 @@ void ConfigShowYear(SnortConfig *sc, const char*)
     DEBUG_WRAP(DebugMessage(DEBUG_INIT, "Enabled year in timestamp\n"););
 }
 
-// FIXIT-L who is calling this?  get rid of SnortStrtoul() etc. when
-// all are modularized
-void ConfigSoRuleMemcap(SnortConfig *sc, const char *args)
-{
-    char *endptr;
-
-    if ( !args )
-        return;
-
-    sc->so_rule_memcap = SnortStrtoul(args, &endptr, 0);
-    if ((errno == ERANGE) || (*endptr != '\0'))
-    {
-        ParseError("invalid so rule memcap: %s.  Memcap must be between "
-                   "0 and %u inclusive.", args, UINT32_MAX);
-    }
-}
-
 void ConfigTreatDropAsAlert(SnortConfig *sc, const char*)
 {
     sc->run_flags |= RUN_FLAG__TREAT_DROP_AS_ALERT;
index 08ef4b4a321c38ec85925de56cf174b2212c86a1..0a1ef408699ee2f26012a3f2aee4844c9dcf6f47 100644 (file)
@@ -49,7 +49,6 @@ void ConfigObfuscate(SnortConfig*, const char*);
 void ConfigObfuscationMask(SnortConfig*, const char*);
 void ConfigQuiet(SnortConfig*, const char*);
 void ConfigShowYear(SnortConfig*, const char*);
-void ConfigSoRuleMemcap(SnortConfig*, const char*);
 void ConfigTreatDropAsAlert(SnortConfig*, const char*);
 void ConfigTreatDropAsIgnore(SnortConfig*, const char*);
 void ConfigProcessAllEvents(SnortConfig*, const char*);
index 0946ee2d83771a09ff4edc5c8dfa881a96514f6d..3dbf982206a852cac71c11fb02356ea95b55494a 100644 (file)
@@ -154,7 +154,7 @@ void parse_include(SnortConfig *sc, const char *arg)
 void ParseIpVar(SnortConfig *sc, const char* var, const char* val)
 {
     int ret;
-    IpsPolicy* p = get_ips_policy(); // FIXIT double check, see below
+    IpsPolicy* p = get_ips_policy(); // FIXIT-M double check, see below
     DisallowCrossTableDuplicateVars(sc, var, VAR_TYPE__IPVAR);
 
     if((ret = sfvt_define(p->ip_vartable, var, val)) != SFIP_SUCCESS)
@@ -277,7 +277,7 @@ ListHead* get_rule_list(SnortConfig* sc, const char* s)
     return p ? p->RuleList : nullptr;
 }
 
-// FIXIT find this a better home
+// FIXIT-L find this a better home
 void AddRuleState(SnortConfig* sc, const RuleState& rs)
 {
     if (sc == NULL)
index 7a4f2a32e8537262088307270a04a9c65c2526c2..bd29af43daf793bd92613d1e40767808a29177ea 100644 (file)
@@ -41,25 +41,5 @@ void add_service_to_otn(SnortConfig*, OptTreeNode*, const char*);
 RuleType get_rule_type(const char*);
 ListHead* get_rule_list(SnortConfig*, const char*);
 
-#if 0
-// FIXIT delete this cruft
-#define ERR_PAIR_COUNT \
-        "%s has incorrect argument count; should be %d pairs.", ERR_KEY
-#define ERR_NOT_PAIRED \
-        "%s is missing an option or argument to go with: %s.", ERR_KEY, pairs[0]
-#define ERR_EXTRA_OPTION \
-        "%s has extra option of type: %s.", ERR_KEY, pairs[0]
-#define ERR_BAD_OPTION \
-        "%s has unknown option: %s.", ERR_KEY, pairs[0]
-#define ERR_BAD_VALUE \
-        "%s has unknown %s: %s.", ERR_KEY, pairs[0], pairs[1]
-#define ERR_BAD_ARG_COUNT \
-        "%s has incorrect argument count.", ERR_KEY
-#define ERR_CREATE \
-        "%s could not be created.", ERR_KEY
-#define ERR_CREATE_EX \
-        "%s could not be created: %s.", ERR_KEY
-#endif
-
 #endif
 
index d5762475808c036deaa1228eb0f9776116133af2..3873e713551f108885b3c986492072f6e209d841 100644 (file)
@@ -1379,7 +1379,7 @@ void parse_rule_proto(SnortConfig* sc, const char* s, RuleTreeNode& rtn)
         rtn.proto = ETHERNET_TYPE_IP;
 
         /* This will be set via ip_protos */
-        // FIXIT need to add these for a single ip any any rule?
+        // FIXIT-L need to add these for a single ip any any rule?
         sc->ip_proto_array[IPPROTO_TCP] = 1;
         sc->ip_proto_array[IPPROTO_UDP] = 1;
         sc->ip_proto_array[IPPROTO_ICMP] = 1;
@@ -1510,7 +1510,7 @@ const char* parse_rule_close(SnortConfig* sc, RuleTreeNode& rtn, OptTreeNode* ot
             ParseError("SO rule %s not loaded.", otn->soid);
         else
         {
-            // FIXIT why isn't this set already? (don't hardcode)
+            // FIXIT-L why isn't this set already? (don't hardcode)
             otn->sigInfo.generator = GENERATOR_SNORT_SHARED;
             entered = true;
             return so_opts;
@@ -1541,7 +1541,7 @@ const char* parse_rule_close(SnortConfig* sc, RuleTreeNode& rtn, OptTreeNode* ot
     otn_count++;
     rule_count++;
 
-    // FIXIT need more reliable way of knowing type of rule instead of hard
+    // FIXIT-L need more reliable way of knowing type of rule instead of hard
     // coding these gids
     if ( otn->sigInfo.generator == 1 )
     {
index 7b49719d4ae3b0e06a2b66e606ddb14f5d901663..f40d3a3e1701eb306e977635234c96661111b65c 100644 (file)
@@ -83,7 +83,7 @@
 #include "target_based/sftarget_reader.h"
 #include "events/event_wrapper.h"  // see s_hack
 
-// FIXIT without s_hack, we get this error on Mac:
+// FIXIT-L without s_hack, we get this error on Mac:
 // Symbol not found: __Z18GenerateSnortEventP6Packetjj
 // Referenced from: /Users/rucombs/install/lib/snort/inspectors/libport_scan.0.dylib
 // Expected in: flat namespace
@@ -421,7 +421,7 @@ static void DefineIfaceVar(SnortConfig *sc, char *iname, uint8_t *network, uint8
  ****************************************************************************/
 static void DefineAllIfaceVars(SnortConfig *sc)
 {
-    // FIXIT don't come back here on reload unless we are going to find
+    // FIXIT-L don't come back here on reload unless we are going to find
     // new ifaces.
     /* Cache retrieved devs so if user is running with dropped privs and
      * does a reload, we can use previous values */
index 14dd75e846c44a522c7f698e5e577615ebb8a767..b94678e3eb9278df1d1755c9d85b9226fee9af12 100644 (file)
@@ -48,7 +48,7 @@ void VarTablesFree(IpsPolicy*);
 
 VarEntry * VarDefine(SnortConfig *sc, const char *name, const char *value);
 int PortVarDefine(SnortConfig *sc, const char *name, const char *s);
-void ParseIpVar(SnortConfig *sc, const char *name, const char *s);  // FIXIT actually in parse_conf.cc
+void ParseIpVar(SnortConfig *sc, const char *name, const char *s);  // FIXIT-L actually in parse_conf.cc
 
 VarEntry *VarAlloc();
 void DeleteVars(VarEntry *var_table);
index d72f838eec7732764149c694cae4ade9da4c7f08..4d004d9629d6191c3e32a1e2410bd5895567c9cf 100644 (file)
@@ -42,7 +42,7 @@
 
 struct Packet;
 
-// FIXIT : can I assume api si always valid?  i.e. if not ip4, then ipv6?
+// FIXIT-J : can I assume api si always valid?  i.e. if not ip4, then ipv6?
 //          or if not ip4, also make sure its not ip6
 
 namespace ip
index c6e45b57b917c9bffc972901b848476d2b0452d3..b89d11fe8ea0ca45ae2c687f92622a607ecd040b 100644 (file)
@@ -27,7 +27,7 @@
 
 
 /* otherwise defined in /usr/include/ppp_defs.h */
-// FIXIT udph should not be set for udp tunnel
+// FIXIT-J udph should not be set for udp tunnel
 // (only if innermost layer == udp)
 #define IsUDP(p) (IsIP(p) && !IsTCP(p) && p->udph)
 
index 11c0d24543d2a23c47d7774e0f6041eeeba2e9b6..0d9fb26ed64fd567103d0bd7ba3eeeb0246156a6 100644 (file)
@@ -73,7 +73,7 @@ public:
         const unsigned char* T, int n, mpse_action_f action,
         void* data, int* current_state)
     {
-        // FIXIT make sure DFA and NFA flavors aren't swapped
+        // FIXIT-H make sure DFA and NFA flavors aren't swapped
         return acsmSearchSparseDFA(
             obj, (unsigned char *)T, n, action, data, current_state);
     };
index 2f73f12f05c3a36e92462b79b751af428dc9ba40..86ffa0d1aceef1ed27903a57e7b39fee53478459 100644 (file)
@@ -76,7 +76,7 @@ public:
         const unsigned char* T, int n, mpse_action_f action,
         void* data, int* current_state )
     {
-        // FIXIT make sure NFA and DFA flavors aren't swapped
+        // FIXIT-H make sure NFA and DFA flavors aren't swapped
         return acsmSearchSparseNFA(
             obj, (unsigned char *)T, n, action, data, current_state);
     };
index bcb539955c96074df75fc70ed768698b0727da0e..80e9a5bd4284519b17a1aff50aa3ed99bf6dbe24 100644 (file)
@@ -2247,7 +2247,7 @@ unsigned bnfaSearchX(
     return _process_queue( bnfa, Match, data );
 }
 
-// FIXIT eliminate the if-else-
+// FIXIT-L eliminate the if-else-
 unsigned bnfaSearch( bnfa_struct_t * bnfa, unsigned char *Tx, int n,
             int (*Match)(void * id, void *tree, int index, void *data, void *neg_list),
             void *data, unsigned sindex, int* current_state )
index 0596e6804ab7b13125c3bb8dfb0e1c85dbeb3863..262364c3fb19e630e7741b6fb9a43c039fb2de35 100644 (file)
@@ -78,7 +78,7 @@ typedef int (*MatchFunc)(void * id, void *tree, int index, void *data, void *neg
 
 
 /* GLOBALS ********************************************************************/
-static CpaInstanceHandle ipm_instance = NULL;  /* instance handle */  // FIXIT 1 / process
+static CpaInstanceHandle ipm_instance = NULL;  /* instance handle */
 static IntelPmHandles *ipm_handles = NULL;
 
 /* XXX Temporary stat for Intel */
index e96f4cbc42a3ec215673616dfe7a142a57f5de2d..328a8106ff6b30d3cb74dd4d4b9945f17f8c35a9 100644 (file)
@@ -35,7 +35,7 @@ typedef struct _search_api
     
 } SearchAPI;
 
-// FIXIT search_api should be turned into a class
+// FIXIT-L search_api should be turned into a class
 // (constructed of an Mpse, not subclassed)
 extern SearchAPI *search_api;
 
index 417aa25c141ae1de36ba35f589e48412f2a4a2bc..cafb886125c24ac096302f74db205f9fddea3c1d 100644 (file)
@@ -67,7 +67,7 @@
 #include "sfsnprintfappend.h"
 
 #ifdef PERF_PROFILING
-// FIXIT ftp, http, etc. should not be calling Detect()
+// FIXIT-M ftp, http, etc. should not be calling Detect()
 static THREAD_LOCAL int ftppDetectCalled = 0;
 static THREAD_LOCAL ProfileStats ftppDetectPerfStats;
 
@@ -193,7 +193,7 @@ int CheckFTPServerConfigs(
  * Returns: None
  *
  */
-// FIXIT eliminate legacy void* cruft
+// FIXIT-L eliminate legacy void* cruft
 int FTPCheckConfigs(SnortConfig* sc, void* pData)
 {
     FTP_SERVER_PROTO_CONF* config = (FTP_SERVER_PROTO_CONF*)pData;
@@ -207,7 +207,7 @@ int FTPCheckConfigs(SnortConfig* sc, void* pData)
 #if 0
     if ( file_api->get_max_file_depth() < 0 )
     {
-        // FIXIT need to change to IT_SERVICE and FTPTelnetChecks
+        // FIXIT-M need to change to IT_SERVICE and FTPTelnetChecks
         // for optimization
     }
 #endif
index 54ab645cb537f525358f2b6de46a49dd6cd47a57..bc3cf30fea4f067d63dc42cdb2a653ef44234e19 100644 (file)
@@ -106,7 +106,7 @@ static int SnortFTP(
         DEBUG_WRAP(DebugMessage(DEBUG_FTPTELNET,
             "Server packet: %.*s\n", p->dsize, p->data));
 
-        // FIXIT breaks target-based non-standard ports
+        // FIXIT-L breaks target-based non-standard ports
         //if ( !ScPafEnabled() )
             /* Force flush of client side of stream  */
         stream.response_flush_stream(p);
@@ -284,7 +284,7 @@ static int ProcessFTPDataChanCmdsList(
 
             strcpy(FTPCmd->cmd_name, cmd);
 
-            // FIXIT make sure pulled from server conf when used if not
+            // FIXIT-L make sure pulled from server conf when used if not
             // overridden
             //FTPCmd->max_param_len = ServerConf->def_max_param_len;
 
@@ -374,7 +374,7 @@ public:
 
 private:
     FTP_SERVER_PROTO_CONF* ftp_server;
-    ClientData* ftp_client;  // FIXIT delete this when bindings implemented
+    ClientData* ftp_client;  // FIXIT-H delete this when bindings implemented
 };
 
 FtpServer::FtpServer(FTP_SERVER_PROTO_CONF* server)
@@ -389,7 +389,7 @@ FtpServer::~FtpServer ()
     delete ftp_server;
 
     if ( ftp_client )
-        // FIXIT make sure CleanupFTPClientConf() is called
+        // FIXIT-L make sure CleanupFTPClientConf() is called
         DataManager::release(ftp_client);
 }
 
@@ -429,7 +429,7 @@ void FtpServer::eval(Packet* p)
 // fc_ = ftp_client
 // fs_ = ftp_server
 //
-// FIXIT fc is a data module but may need to
+// FIXIT-L fc is a data module but may need to
 // be an inspector with separate bindings.
 //-------------------------------------------------------------------------
 
@@ -509,7 +509,6 @@ static const InspectApi fs_api =
         fs_mod_ctor,
         mod_dtor
     },
-    //IT_SESSION,  // FIXIT should be service only
     IT_SERVICE,
     PROTO_BIT__TCP,
     nullptr, // buffers
index 2b158fc1aa7de3f1ac5fa3f1923e2f29936bef5e..560211440c6f19db493ed464150753da8c58be31 100644 (file)
@@ -289,7 +289,7 @@ const InspectApi fd_api =
         mod_ctor,
         mod_dtor
     },
-    IT_SERVICE,  // FIXIT does this still need to be session??
+    IT_SERVICE,  // FIXIT-M does this still need to be session??
     PROTO_BIT__TCP,
     nullptr, // buffers
     "ftp-data",
index 4537da0baaadab0b8a7d1852417a8d5a96c008ad..e1120784e47d34a07a0d9e58503afde0b91e2fcf 100644 (file)
@@ -37,7 +37,7 @@ static const Parameter client_bounce_params[] =
     { "address", Parameter::PT_ADDR, nullptr, nullptr,
       "allowed ip address in CIDR format" },
 
-    // FIXIT port and last_port should be replaced with a port list
+    // FIXIT-L port and last_port should be replaced with a port list
     { "port", Parameter::PT_PORT, "1:", nullptr,
       "allowed port" },
 
@@ -221,14 +221,13 @@ FtpCmd::FtpCmd(std::string& key, std::string& fmt, int num)
 #define FTP_EVASIVE_TELNET_CMD_STR               \
         "(ftp) Evasive (incomplete) TELNET CMD on FTP Command Channel"
 
-// FIXIT convert to Lua and use as module default settings
+// FIXIT-H convert to Lua and use as module default settings
 #if 0
 static const char* DEFAULT_FTP_CONF[] =
 {
     "hardcoded_config "
     "def_max_param_len 100 "
 
-    // FIXIT should not have to list commands more than once
     // eg must appear in at least one *_cmds parameter
     "ftp_cmds { USER PASS ACCT CWD CDUP SMNT QUIT REIN TYPE STRU"
               " MODE RETR STOR STOU APPE ALLO REST RNFR RNTO ABOR"
index 91eb79f3abfaecbe90a39e8104046a52839c3391..b5b784ffcfd7d205453513de1dc5fba46cdf7f22 100644 (file)
@@ -101,7 +101,7 @@ static int TelnetStatefulsessionInspection(Packet *p,
         TelnetFlowData* fd = new TelnetFlowData;
         TELNET_SESSION* Newsession = &fd->session;
 
-        // FIXIT lots of redundancy; clean up and move to ctor
+        // FIXIT-L lots of redundancy; clean up and move to ctor
         TelnetResetsession(Newsession);
         Newsession->ft_ssn.proto = FTPP_SI_PROTO_TELNET;
         Newsession->telnet_conf = GlobalConf;
@@ -198,24 +198,13 @@ int FTPGetPacketDir(Packet *p)
     return FTPP_SI_NO_MODE;
 }
 
-/*
- * // FIXIT this goes away when bindings are implemented
- * Purpose: When a session is initialized, we must select the appropriate
- *          server configuration and select the type of inspection based
- *          on the source and destination ports.
- *
- * IMPORTANT NOTE:
- *   We should check to make sure that there are some unique configurations,
- *   otherwise we can just default to the global default and work some magic
- *   that way.
- */
 static int FTPInitConf(
     Packet *p, 
     FTP_CLIENT_PROTO_CONF **ClientConf,
     FTP_SERVER_PROTO_CONF **ServerConf,
     FTPP_SI_INPUT *SiInput, int *piInspectMode)
 {
-    // FIXIT BINDING ftp client and server must set by external bindings
+    // FIXIT-H BINDING ftp client and server must set by external bindings
     // at that point these get deleted
     FTP_CLIENT_PROTO_CONF *ClientConfSip = get_default_ftp_client();
     FTP_CLIENT_PROTO_CONF *ClientConfDip = get_default_ftp_client();
@@ -526,7 +515,7 @@ static int FTPStatefulsessionInspection(
             FtpFlowData* fd = new FtpFlowData;
             FTP_SESSION* Newsession = &fd->session;
 
-            // FIXIT lots of redundancy; clean up and move to ctor
+            // FIXIT-L lots of redundancy; clean up and move to ctor
             FTPResetsession(Newsession);
             Newsession->ft_ssn.proto = FTPP_SI_PROTO_FTP;
             Newsession->client_conf = ClientConf;
index e20789d342cbda0591b71821ecbbc4f9bb5df2a7..ec15c333224958d2b348d572ed5853159c50e342 100644 (file)
@@ -31,7 +31,7 @@
 
 #ifndef HI_UTIL_KMAP_H
 #define HI_UTIL_KMAP_H
-// FIXIT this is a dup of the file in http_inspect
+// FIXIT-L this is a dup of the file in http_inspect
 
 #define ALPHABET_SIZE 256
 
index fa582f3dd68d8a930acdc87c1f99cc1c6af9707e..46c3da7b648363a67fad093ca0b40ba6bfe666fb 100644 (file)
@@ -39,7 +39,7 @@
 
 static THREAD_LOCAL unsigned msize=0;
 
-void * xmalloc(size_t byteSize) // FIXIT eliminate this nonsense
+void * xmalloc(size_t byteSize) // FIXIT-L eliminate this nonsense
 {
 #ifdef MDEBUG
    int * data = (int*) malloc( byteSize + 4 );
index 5c1e74d132730a81a4ff9b6b63319e002d469274..f96a91649f8d9a9891bb484c4bbe3de89cd5cc18 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef HI_UTIL_XMALLOC_H
 #define HI_UTIL_XMALLOC_H
-// FIXIT this is a dup of the file in http_inspect
+// FIXIT-L this is a dup of the file in http_inspect
 
 #include <sys/types.h>
 
index 7f16c4a935a8a8d5f228a0b45301d87d77f72039..dc86b688c8b5ce4774145decde1e72c2795eadcd 100644 (file)
@@ -1519,7 +1519,7 @@ static inline void HTTP_CopyUri(
 
     cur_ptr = start;
 
-    if(/*ServerConf->log_uri &&*/ !stream_ins && hsd)  // FIXIT move back to ServerConf?
+    if(/*ServerConf->log_uri &&*/ !stream_ins && hsd)  // FIXIT-L move back to ServerConf?
     {
         SkipBlankSpace(start,end,&cur_ptr);
 
@@ -2226,7 +2226,7 @@ static inline const u_char *extractHeaderFieldValues(HI_SESSION *session,
             else
             {
                 hdrs_args->hst_name_hdr = 1;
-                if ( hsd && !(hdrs_args->strm_ins) /*&& (ServerConf->log_hostname)*/)  // FIXIT move back to ServerConf?
+                if ( hsd && !(hdrs_args->strm_ins) /*&& (ServerConf->log_hostname)*/)  // FIXIT-L move back to ServerConf?
                 {
                     if(!SetLogBuffers(hsd))
                     {
index 59f254f684c04e2c88389d776379b1d9b9351e6b..63144ba426e419dea35e266874974bec37e99190 100644 (file)
@@ -95,7 +95,7 @@ const HiSearchToken html_patterns[] =
     {NULL,               0, 0}
 };
 
-// FIXIT verify these don't need to be thread local
+// FIXIT-H verify these don't need to be thread local
 void *hi_javascript_search_mpse = NULL;
 void *hi_htmltype_search_mpse = NULL;
 
@@ -428,7 +428,7 @@ static inline FilePosition getFilePoistion(Packet *p)
     return position;
 }
 
-// FIXIT extra data masks should only be updated as extra data changes state
+// FIXIT-P extra data masks should only be updated as extra data changes state
 // eg just once when captured; this function is called on every packet and 
 // repeatedly sets the flags on session
 static inline void HttpLogFuncs(
@@ -679,7 +679,7 @@ int HttpInspectMain(HTTPINSPECT_CONF* conf, Packet *p)
         if ( iInspectMode == HI_SI_CLIENT_MODE )
         {
             const HttpBuffer* hb;
-            ClearHttpBuffers();  // FIXIT needed here and right above??
+            ClearHttpBuffers();  // FIXIT-P needed here and right above??
 
             if ( session->client.request.uri_norm )
             {
@@ -1110,7 +1110,7 @@ void FreeHttpsessionData(void *data)
     file_api->free_mime_session(hsd->mime_ssn);
 }
 
-// FIXIT this should leverage inspector get_buf()
+// FIXIT-H this should leverage inspector get_buf()
 int GetHttpTrueIP(Flow* flow, uint8_t **buf, uint32_t *len, uint32_t *type)
 {
     HttpsessionData* hsd = get_session_data(flow);
index 87f071a2205d5101e66725aa2ce5f4e3509cab48..a6edbe28ebed1545cf96404d95c41a2e6509ed08 100644 (file)
@@ -76,7 +76,7 @@ static const Parameter hi_global_params[] =
     { "decompress_depth", Parameter::PT_INT, "1:65535", "2920",
       "maximum amount of decompressed data to process" },
 
-    // FIXIT does this work with bindings?
+    // FIXIT-L does this work with bindings?
     { "detect_anomalous_servers", Parameter::PT_BOOL, nullptr, "false",
       "inspect non-configured ports for HTTP - bad idea" },
 
@@ -250,7 +250,7 @@ bool HttpInspectModule::end(const char* fqn, int, SnortConfig*)
 
 static const char* profiles = "none | all | apache | iis | iis_40 | iis_50";
 
-// FIXIT refactor params to create a profile table so that user can define
+// FIXIT-L refactor params to create a profile table so that user can define
 // different profiles (like above) and use those.  rename existing profile
 // to profile_type.
 
index 967ee7b0bd4ea35484f1531f0483299c3027f086..12c56623da9a4fd324338bab89e53a276eeab30c 100644 (file)
@@ -582,7 +582,7 @@ static int UTF8Decode(HI_SESSION *session, const u_char *start,
     {
         if(ServerConf->iis_unicode.on)
         {
-            // FIXIT iNorm is an int; is it guaranteed to be < 64K?
+            // FIXIT-L iNorm is an int; is it guaranteed to be < 64K?
             iNorm = ServerConf->iis_unicode_map[iNorm];
 
             if(iNorm == HI_UI_NON_ASCII_CODEPOINT)
index 577dd6c9fc18baf6c128757aedcaa2195ce49361..178e2f5d84de31dfbc50a1b49e03581cc4b1b370 100644 (file)
@@ -88,7 +88,7 @@
 static uint32_t hi_cap = 0;
 
 // stats
-// FIXIT eliminate these counts
+// FIXIT-L eliminate these counts
 static THREAD_LOCAL uint32_t hi_paf_calls = 0;
 static THREAD_LOCAL uint32_t hi_paf_bytes = 0;
 
index 1f8ad964de5ff6e260a2e82d04f031eb550996e8..64233538a65a248ecf5142bae0f186d62d19d875 100644 (file)
@@ -618,7 +618,7 @@ static inline const u_char *extractHttpRespHeaderFieldValues(HTTPINSPECT_CONF *S
         }
 
         else if ( IsHeaderFieldName(p, end, HTTPRESP_HEADER_NAME__CONTENT_ENCODING,
-                    HTTPRESP_HEADER_LENGTH__CONTENT_ENCODING) /*&& ServerConf->extract_gzip*/ &&  // FIXIT move back to ServerConf?
+                    HTTPRESP_HEADER_LENGTH__CONTENT_ENCODING) /*&& ServerConf->extract_gzip*/ &&  // FIXIT-L move back to ServerConf?
                     parse_cont_encoding)
         {
             p = extract_http_content_encoding(ServerConf, p, start, end, header_ptr, header_field_ptr );
index 5b5dfd36688d4ed730195c6523c26cee2ddf82eb..e70b0405bcad60fb882aa22c0198890f04770761 100644 (file)
@@ -64,7 +64,7 @@ HTTPINSPECT_GLOBAL_CONF::~HTTPINSPECT_GLOBAL_CONF()
 HTTPINSPECT_CONF::HTTPINSPECT_CONF()
 {
     // can't just zero the whole thing because of embedded objects
-    // FIXIT really need explicit assignments or refactor into substruct(s)
+    // FIXIT-L really need explicit assignments or refactor into substruct(s)
     // that can simply be zeroed
     uint8_t* end = (uint8_t*)&whitespace;
     unsigned len = end - (uint8_t*)this;
@@ -75,7 +75,7 @@ HTTPINSPECT_CONF::HTTPINSPECT_CONF()
 
 HTTPINSPECT_CONF::~HTTPINSPECT_CONF()
 {
-    // FIXIT xfree() etc should go
+    // FIXIT-L xfree() etc should go
     xfree(iis_unicode_map_filename);
     xfree(iis_unicode_map);
 
index de24f11db29842ccf37d1f90bbc67e1fd248901a..dc4ed097ee833767a792b2b18238215255796139 100644 (file)
@@ -171,7 +171,7 @@ static void updateConfigFromFileProcessing (HTTPINSPECT_CONF* ServerConf)
 
 static int HttpInspectVerifyPolicy(SnortConfig*, HTTPINSPECT_CONF* pData)
 {
-    HttpInspectRegisterXtraDataFuncs();  // FIXIT must be done once
+    HttpInspectRegisterXtraDataFuncs();  // FIXIT-L must be done once
 
     updateConfigFromFileProcessing(pData);
     return 0;
@@ -306,7 +306,6 @@ bool HttpInspect::configure (SnortConfig* sc)
 
     HttpInspectInitializeGlobalConfig(config->global);
 
-    // FIXIT must load default unicode map from const char*
     CheckGzipConfig(config->global);
     CheckMemcap(config->global);
 
@@ -423,7 +422,7 @@ static void hs_init()
 {
     HttpFlowData::init();
     HI_SearchInit();
-    hi_paf_init(0);  // FIXIT is cap needed?
+    hi_paf_init(0);  // FIXIT-L is cap needed?
     InitLookupTables();
     InitJSNormLookupTable();
 }
index bfd949148e5daef95a6579a007c9c4de278adabd..04c2990e20910fa1a55070a6eccf10dea159003e 100644 (file)
@@ -159,7 +159,7 @@ MagicPage* HexBook::find_spell(
         return p;
 }
 
-// FIXIT make this incremental based on last position
+// FIXIT-H make this incremental based on last position
 const char* HexBook::find_spell(const uint8_t* data, unsigned len) const
 {
     if ( MagicPage* p = find_spell(data, len, root) )
index ece9b8c8947988e8ba1cb865f1115c54567be2f1..2a98861a014166442b712279f648edd9093d4f8e 100644 (file)
@@ -152,10 +152,10 @@ MagicPage* SpellBook::find_spell(
         return p;
 }
 
-// FIXIT make this incremental based on last position
+// FIXIT-H make this incremental based on last position
 const char* SpellBook::find_spell(const uint8_t* data, unsigned len) const
 {
-    // FIXIT make configurable upper bound to limit globbing
+    // FIXIT-L make configurable upper bound to limit globbing
     unsigned max = 16;
 
     if ( len > max )
index bd7889bf22540c4cea6d7531b5617a9f6838865f..7ad54936a7df93c56a35a297beae22ca4ef18635 100644 (file)
@@ -198,7 +198,7 @@ StreamSplitter* Wizard::get_splitter(bool c2s)
 bool Wizard::spellbind(
     const MagicPage* m, Flow* f, const uint8_t* data, unsigned len)
 {
-    // FIXIT convert to stateful find
+    // FIXIT-H convert to stateful find
     f->service = m->book.find_spell(data, len);
     return f->service != nullptr;
 }
index 742ec7c0244b3f81e571920bf57e183f3a1e43ad..6ce7a8095a5710daca0af6134fddb0022c9fdf34 100644 (file)
@@ -33,7 +33,7 @@
 #include "config.h"
 #endif
 
-#include "sfrt.h"  // FIXIT these includes are circular
+#include "sfrt.h"  // FIXIT-L these includes are circular
 #include "sfrt_dir.h"
 
 #include <stdarg.h> /* For variadic */
index 4d4559a5153a9374a98a26fae817e6684fd469f8..cda8be4dd99e86f7629b47ca57ecf28b30f5870e 100644 (file)
@@ -49,7 +49,7 @@ typedef struct {
     int length;
 } tuple_flat_t;
 
-// FIXIT circular include here
+// FIXIT-L circular include here
 #include "sfrt/sfrt_flat_dir.h"
 
 /*******************************************************************/
index 0f33b03569147649223ee5d8b035109524a8248d..9e7ee73621d5ef5d976c4dfee5280e38f6045d5e 100644 (file)
@@ -25,7 +25,7 @@
 #include "config.h"
 #endif
 
-#include "sfrt_flat.h" // FIXIT these includes are circular
+#include "sfrt_flat.h" // FIXIT-L these includes are circular
 #include "sfrt_flat_dir.h"
 
 #include <stdarg.h> /* For variadic */
index 6f2fd5bad78350f0dc69a9a9701702f83ba420b6..a71086d5f4a4ca7c1a25e64fb3485f1088f83109 100644 (file)
@@ -196,7 +196,7 @@ void StreamBase::tterm()
 
 void StreamBase::show(SnortConfig*)
 {
-    // FIXIT SSN print 
+    // FIXIT-L SSN print 
     //Stream5PrintGlobalConfig(&config);
 }
 
@@ -239,7 +239,7 @@ void StreamBase::eval(Packet *p)
 }
 
 #if 0
-    // FIXIT add method to get exp cache?
+    // FIXIT-L add method to get exp cache?
     LogMessage("            Expected Flows\n");
     LogMessage("                  Expected: %lu\n", exp_cache->get_expects());
     LogMessage("                  Realized: %lu\n", exp_cache->get_realized());
@@ -279,7 +279,7 @@ static const InspectApi base_api =
         mod_dtor
     },
     IT_STREAM,
-    PROTO_BIT__ALL,  // FIXIT which bits??
+    PROTO_BIT__ALL,  // FIXIT-H which bits??
     nullptr, // buffers
     nullptr, // service
     nullptr, // init
index c5f0a5254f55dd604030d911aae58d56277fbc68..8ec6db96e59a20f6f3bca70f24a40d1a3ae6dc55 100644 (file)
@@ -256,8 +256,8 @@ void IcmpSession::update_direction(char dir, const sfip_t *ip, uint16_t)
 #if 0
 void icmp_stats()
 {
-    // FIXIT move these to the actual owner
-    // FIXIT need to get these before delete flow_con
+    // FIXIT-L move these to the actual owner
+    // FIXIT-L need to get these before delete flow_con
     //flow_con->get_prunes(IPPROTO_UDP, icmpStats.prunes);
 }
 #endif
index 5d52df81c1c495591290c16a6bc310a2381a352a..a7a11d21cbb6e34f13b96c95a21f31c47788ef0f 100644 (file)
@@ -226,7 +226,7 @@ static const char* peg_names[] =
 
 /*  G L O B A L S  **************************************************/
 
-// FIXIT convert to session memcap
+// FIXIT-M convert to session memcap
 static THREAD_LOCAL unsigned long mem_in_use = 0; /* memory in use, used for self pres */
 
 static THREAD_LOCAL FragStats t_stats;
@@ -1015,7 +1015,7 @@ static void FragRebuild(FragTracker *ft, Packet *p)
         /* Set the 'next' protocol */
         if (p->ip6_frag_index > 0)
         {
-            // FIXIT use of last_extension works but is ugly
+            // FIXIT-J use of last_extension works but is ugly
             ip::IP6Extension *last_extension = (ip::IP6Extension *)
                 (dpkt->pkt + (p->ip6_extensions[p->ip6_frag_index -1].data - p->pkt));
             last_extension->ip6e_nxt = ft->protocol;
@@ -1055,7 +1055,7 @@ static void FragRebuild(FragTracker *ft, Packet *p)
     SnortEventqPush();
     p->packet_flags |= (PKT_PSEUDO | PKT_REBUILT_FRAG);
     p->pseudo_type = PSEUDO_PKT_IP;
-    //Encode_SetPkt(p);  // FIXIT needed for responses to defragged packets
+    //Encode_SetPkt(p);  // FIXIT-J needed for responses to defragged packets
     ProcessPacket(dpkt, dpkt->pkth, dpkt->pkt);
     SnortEventqPop();
 
index 355302e2027d4a3d057872b8288a98c5be604447..1b45e332ad3c6e8a5948873c413f5b17e2c1a414 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "fpcreate.h"
 
-// FIXIT integrate into stream api
+// FIXIT-L integrate into stream api
 //int fpAddFragAlert(Packet *p, OptTreeNode *otn);
 //int fpFragAlerted(Packet *p, OptTreeNode *otn);
 int  drop_all_fragments(Packet *p);
@@ -58,7 +58,7 @@ private:
     int new_tracker(Packet *p, FragTracker*);
 
     int add_frag_node(
-        // FIXIT too many args
+        // FIXIT-L too many args
         FragTracker *ft, Packet*, FragEngine*,
         const uint8_t *fragStart, int16_t fragLength,
         char lastfrag, int16_t len,
index 0383faa1f54d446666d6a306a9e6f6f744c0b42e..4554395a460f22f32f9b2bab56fa3c9f61937fc2 100644 (file)
@@ -189,7 +189,7 @@ bool StreamIpModule::set(const char*, Value& v, SnortConfig*)
 
     else if ( v.is("session_timeout") )
     {
-        // FIXIT need to integrate to eliminate redundant data
+        // FIXIT-L need to integrate to eliminate redundant data
         config->session_timeout = v.get_long();
         config->frag_engine.frag_timeout = v.get_long();
     }
index c5de4be4124998b495e2d68fe089ce49d845ba33..b35daa207c1bcc4d843bb363a6fc57344196e440 100644 (file)
@@ -93,7 +93,7 @@ bool StreamIp::configure(SnortConfig* sc)
 
 int StreamIp::verify_config(SnortConfig*)
 {
-    // FIXIT needed for defrag?
+    // FIXIT-L needed for defrag?
     return 0;
 }
 
index 23513313be7d8913318a5a9c2bffea6150fa9760..3d076de0e80d2172ad83fe5477af4f49bcfd23c6 100644 (file)
@@ -50,7 +50,7 @@
 #define S5_TRACK_YES            1
 #define S5_TRACK_NO             0
 
-// FIXIT move to proto specific where possible
+// FIXIT-L move to proto specific where possible
 #define STREAM5_CONFIG_STATEFUL_INSPECTION      0x00000001
 #define STREAM5_CONFIG_LOG_STREAMS              0x00000004
 #define STREAM5_CONFIG_REASS_CLIENT             0x00000008
@@ -86,7 +86,7 @@ private:
 };
 
 /*  D A T A   S T R U C T U R E S  **********************************/
-// FIXIT some of this stuff can be better encapsulated
+// FIXIT-L some of this stuff can be better encapsulated
 
 struct Stream5GlobalConfig
 {
index f06b26d1c9e9da815f8966d72c552ae2ab849ad0..1afbf2468c5401f4879c49bd2b4c50ded7fd7a3e 100644 (file)
@@ -63,7 +63,7 @@
 // public methods other than ctor / dtor must all be declared SO_PUBLIC
 //-------------------------------------------------------------------------
 
-Stream stream;  // FIXIT global for SnortContext
+Stream stream;  // FIXIT-L global for SnortContext
 
 Stream::Stream()
 {
@@ -845,7 +845,7 @@ void Stream::set_extra_data(
     Stream5SetExtraDataTcp(flow, p, flag);
 }
 
-// FIXIT get pv/flow from packet directly?
+// FIXIT-L get pv/flow from packet directly?
 void Stream::clear_extra_data(
     Flow* pv, Packet* p, uint32_t flag)
 {
index 475eb5d1317cfd737fa4aa86dd1413d886a8053a..cfc663ad1169f12451c551716db33c24362b2e78 100644 (file)
@@ -26,7 +26,7 @@
  *          preprocessors and detection plugins.
  */
 
-// FIXIT stream_api should not be tied to a particular version of stream
+// FIXIT-L stream_api should not be tied to a particular version of stream
 
 #ifndef STREAM_API_H
 #define STREAM_API_H
index d9857f9aef8179e91cf5e673711ca745a3f29dba..1fb77440ab53bf3a75e72ff791e309a13bf17b6c 100644 (file)
@@ -30,7 +30,7 @@ static THREAD_LOCAL uint8_t pdu_buf[65536];
 static THREAD_LOCAL StreamBuffer str_buf;
 
 uint32_t StreamSplitter::max()
-{ return 16384; }  // FIXIT make default configurable
+{ return 16384; }  // FIXIT-H make default configurable
 
 const StreamBuffer* StreamSplitter::reassemble(
     Flow*, unsigned, unsigned offset, const uint8_t* p,
@@ -84,7 +84,7 @@ void AtomSplitter::update()
 }
 
 #if 0
-// FIXIT this should be part of a new splitter
+// FIXIT-H this should be part of a new splitter
 static inline int CheckFlushCoercion (
     Packet* p, FlushMgr* fm, uint16_t flush_factor
 ) {
index dc8ef8943ee6c6d6afa7749a70cd9cd27cc2f982..7ad7de841b15ecd59ac7c9fe7bcd98d863b5d1be 100644 (file)
@@ -27,7 +27,7 @@
 
 class Flow;
 
-enum PAF_Status // FIXIT move inside StreamSplitter
+enum PAF_Status // FIXIT-H move inside StreamSplitter
 {
     PAF_ABORT,   // non-paf operation
     PAF_START,   // internal use only
index 776be6d623f81d02c278f8abe7032b6b0e759aa7..f63d742c0df34c1fbe5cf862694ba4e4c06db818 100644 (file)
@@ -123,8 +123,8 @@ int ReassembleOption::eval(Cursor&, Packet* pkt)
     }
     else
     {
-        // FIXIT PAF need to instantiate atom splitter?
-        // FIXIT PAF need to check for ips / on-data
+        // FIXIT-H PAF need to instantiate atom splitter?
+        // FIXIT-H PAF need to check for ips / on-data
         if ( srod.direction & SSN_DIR_SERVER )
             tcpssn->server.flush_policy = STREAM_FLPOLICY_ON_ACK;
 
index 30a13ca739343b3c43685821381ba08d00ade407..fe0f38704495144f8162eaf2e6639c3b54c1c5d6 100644 (file)
@@ -69,7 +69,7 @@ static THREAD_LOCAL uint64_t prep_bytes = 0;
 
 // s5_len and s5_idx are used only during the
 // lifetime of s5_paf_check()
-// FIXIT these thread local should be moved into thread context
+// FIXIT-L these thread local should be moved into thread context
 static THREAD_LOCAL uint32_t s5_len;  // total bytes queued
 static THREAD_LOCAL uint32_t s5_idx;  // offset from start of queued bytes
 
@@ -132,7 +132,7 @@ static uint32_t s5_paf_flush (
 }
 
 //--------------------------------------------------------------------
-// FIXIT PAF support multiple scanners
+// FIXIT-L PAF support multiple scanners
 
 static bool s5_paf_callback (
     StreamSplitter* ss, PAF_State* ps, Flow* ssn,
@@ -165,7 +165,7 @@ static inline bool s5_paf_eval (
         "%s: paf=%d, idx=%u, len=%u, fpt=%u\n",
         __FUNCTION__, ps->paf, s5_idx, s5_len, ps->fpt);)
 
-    uint16_t fuzz = 0; // FIXIT PAF add a little zippedy-do-dah
+    uint16_t fuzz = 0; // FIXIT-L PAF add a little zippedy-do-dah
 
     switch ( ps->paf )
     {
@@ -301,7 +301,7 @@ uint32_t s5_paf_check (
 
     } while ( 1 );
 
-    uint16_t fuzz = 0; // FIXIT PAF add a little zippedy-do-dah
+    uint16_t fuzz = 0; // FIXIT-L PAF add a little zippedy-do-dah
     if ( (ps->paf != PAF_FLUSH) && (s5_len > ss->max()+fuzz) )
     {
         uint32_t fp = s5_paf_flush(ss, ps, FT_MAX, flags);
index a4ba2c1a13d58a9c380f53cfe8467478c0fa0f0d..a862e02f30d69a8aab3ca114841244b8bf4114d6 100644 (file)
@@ -368,7 +368,7 @@ static inline bool DataToFlush (const StreamTracker* st)
     if ( st->flush_policy )
         return ( SegsToFlush(st, 1) > 0 );
 
-    return ( SegsToFlush(st, 2) > 1 );  // FIXIT return false?
+    return ( SegsToFlush(st, 2) > 1 );  // FIXIT-L return false?
 }
 
 /*  P R O T O T Y P E S  ********************************************/
@@ -665,7 +665,7 @@ StreamTcpConfig::StreamTcpConfig()
 }
 
 //-------------------------------------------------------------------------
-// FIXIT directionality must be fixed per 297 bug fixes
+// FIXIT-L directionality must be fixed per 297 bug fixes
 //
 // when client ports are configured, that means c2s and is stored on the
 // client side; when the session starts, the server policy is obtained from
@@ -1306,7 +1306,7 @@ static inline int ValidTimestamp(StreamTracker *talker,
     if ( p->tcph->th_flags & TH_ACK &&
         Normalize_IsEnabled(p, NORM_TCP_OPT) )
     {
-        // FIXIT validate tsecr here (check that it was previously sent)
+        // FIXIT-L validate tsecr here (check that it was previously sent)
         // checking for the most recent ts is easy enough must check if
         // ts are up to date in retransmitted packets
     }
@@ -1582,7 +1582,7 @@ static inline void UpdateSsn(
 {
 #if 0
     if (
-         // FIXIT these checks are a hack to avoid off by one normalization
+         // FIXIT-L these checks are a hack to avoid off by one normalization
          // due to FIN ... if last segment filled a hole, r_nxt_ack is not at
          // end of data, FIN is ignored so sequence isn't bumped, and this
          // forces seq-- on ACK of FIN.  :(
@@ -1594,8 +1594,8 @@ static inline void UpdateSsn(
         // if a gap exists prior to ack, move ack back to start of gap
         StreamSegment* seg = snd->seglist;
 
-        // FIXIT must check ack oob with empty seglist
-        // FIXIT add lower gap bound to tracker for efficiency?
+        // FIXIT-L must check ack oob with empty seglist
+        // FIXIT-L add lower gap bound to tracker for efficiency?
         while ( seg )
         {
             uint32_t seq = seg->seq + seg->size;
@@ -1645,8 +1645,8 @@ static inline void UpdateSsn(
 void tcp_sinit()
 {
     s5_pkt = PacketManager::encode_new();
-    tcp_memcap = new Memcap(26214400); // FIXIT replace with session memcap
-    //AtomSplitter::init();  // FIXIT PAF implement
+    tcp_memcap = new Memcap(26214400); // FIXIT-M replace with session memcap
+    //AtomSplitter::init();  // FIXIT-L PAF implement
 }
 
 void tcp_sterm()
@@ -1858,7 +1858,7 @@ static inline void purge_all (StreamTracker *st)
 // * we may flush partial segments
 // * must adjust seq->seq and seg->size when a flush gets only the
 //   initial part of a segment
-// * FIXIT need flag to mark any reassembled packets that have a gap
+// * FIXIT-L need flag to mark any reassembled packets that have a gap
 //   (if we reassemble such)
 static inline int purge_flushed_ackd (TcpSession *tcpssn, StreamTracker *st)
 {
@@ -1967,7 +1967,7 @@ static int FlushStream(
         }
         else if ( !bytes_copied )
         {
-            // FIXIT change stream splitter default reassemble 
+            // FIXIT-P change stream splitter default reassemble 
             // to copy into external buffer to eliminate this special case
             memcpy(flushbuf, ss->payload, bytes_to_copy);
         }
@@ -1999,9 +1999,9 @@ static int FlushStream(
             break;
 
         /* Check for a gap/missing packet */
-        // FIXIT PAF should account for missing data and resume
+        // FIXIT-L PAF should account for missing data and resume
         // scanning at the start of next PDU instead of aborting.
-        // FIXIT FIN may be in toSeq causing bogus gap counts.
+        // FIXIT-L FIN may be in toSeq causing bogus gap counts.
         if ( (ss->next && (ss->seq + ss->size != ss->next->seq)) ||
             (!ss->next && (ss->seq + ss->size < toSeq)))
         {
@@ -2061,7 +2061,7 @@ static inline int _flush_to_seq (
     if ( !bytes && SEQ_GT(st->r_win_base, st->seglist_base_seq) )
         bytes = st->r_win_base - st->seglist_base_seq;
 
-    // FIXIT this should not be necessary here
+    // FIXIT-L this should not be necessary here
     st->seglist_base_seq = st->seglist_next->seq;
     stop_seq = st->seglist_base_seq + bytes;
 
@@ -2239,7 +2239,7 @@ static inline uint32_t get_q_footprint(StreamTracker *st)
     return fp;
 }
 
-// FIXIT get_q_sequenced() performance could possibly be
+// FIXIT-L get_q_sequenced() performance could possibly be
 // boosted by tracking sequenced bytes as seglist is updated
 // to avoid the while loop, etc. below.
 static inline uint32_t get_q_sequenced(StreamTracker *st)
@@ -2280,7 +2280,7 @@ static inline int flush_ackd(
     return flush_to_seq(tcpssn, st, bytes, p, dir);
 }
 
-// FIXIT flush_stream() calls should be replaced with calls to
+// FIXIT-L flush_stream() calls should be replaced with calls to
 // CheckFlushPolicyOn*() with the exception that for the *OnAck() case,
 // any available ackd data must be flushed in both directions.
 static inline int flush_stream(
@@ -2588,7 +2588,7 @@ static void CheckSegments (const StreamTracker* a)
 #define LCL(p, x)    (p->x - p->isn)
 #define RMT(p, x, q) (p->x - (q ? q->isn : 0))
 
-// FIXIT this should not be thread specific
+// FIXIT-L this should not be thread specific
 static THREAD_LOCAL int s5_trace_enabled = -1;
 
 static void TraceEvent (
@@ -3996,7 +3996,7 @@ static int ProcessTcpData(
         }
 
         /* move the ack boundry up, this is the only way we'll accept data */
-        // FIXIT for ips, must move all the way to first hole or right end
+        // FIXIT-L for ips, must move all the way to first hole or right end
         if (listener->s_mgr.state_queue == TCP_STATE_NONE)
             listener->r_nxt_ack = tdb->end_seq;
 
@@ -4047,7 +4047,7 @@ static int ProcessTcpData(
                 {
                     /* set next ack so we are within the window going forward on
                     * this side. */
-                    // FIXIT for ips, must move all the way to first hole or right end
+                    // FIXIT-L for ips, must move all the way to first hole or right end
                     listener->r_nxt_ack = tdb->end_seq;
                 }
             }
@@ -4262,7 +4262,7 @@ static int NewTcpSession(
 
 
         /* Set the StreamTcpConfig for each direction (pkt from client) */
-        tmp->client.config = dstPolicy;  // FIXIT BINDING use external for both dirs
+        tmp->client.config = dstPolicy;  // FIXIT-H BINDING use external for both dirs
         tmp->server.config = dstPolicy;
 
         CopyMacAddr(p, tmp, FROM_CLIENT);
@@ -4312,7 +4312,7 @@ static int NewTcpSession(
         tmp->server.flags |= Stream5GetWscale(p, &tmp->server.wscale);
 
         /* Set the config for each direction (pkt from server) */
-        tmp->server.config = dstPolicy;  // FIXIT BINDING use external for both dirs
+        tmp->server.config = dstPolicy;  // FIXIT-H BINDING use external for both dirs
         tmp->client.config = dstPolicy;
 
         CopyMacAddr(p, tmp, FROM_SERVER);
@@ -4359,7 +4359,7 @@ static int NewTcpSession(
         tmp->client.flags |= Stream5GetWscale(p, &tmp->client.wscale);
 
         /* Set the config for each direction (pkt from client) */
-        tmp->client.config = dstPolicy;  // FIXIT BINDING use external for both dirs
+        tmp->client.config = dstPolicy;  // FIXIT-H BINDING use external for both dirs
         tmp->server.config = dstPolicy;
 
         CopyMacAddr(p, tmp, FROM_CLIENT);
@@ -4415,7 +4415,7 @@ static int NewTcpSession(
             tmp->client.flags |= Stream5GetWscale(p, &tmp->client.wscale);
 
             /* Set the config for each direction (pkt from client) */
-            tmp->client.config = dstPolicy;  // FIXIT BINDING use external for both dirs
+            tmp->client.config = dstPolicy;  // FIXIT-H BINDING use external for both dirs
             tmp->server.config = dstPolicy;
 
             CopyMacAddr(p, tmp, FROM_CLIENT);
@@ -4457,7 +4457,7 @@ static int NewTcpSession(
             tmp->server.flags |= Stream5GetWscale(p, &tmp->server.wscale);
 
             /* Set the config for each direction (pkt from server) */
-            tmp->server.config = dstPolicy;  // FIXIT BINDING use external for both dirs
+            tmp->server.config = dstPolicy;  // FIXIT-H BINDING use external for both dirs
             tmp->client.config = dstPolicy;
 
             CopyMacAddr(p, tmp, FROM_SERVER);
@@ -4701,7 +4701,7 @@ static int ProcessTcp(
     if ( !tcpssn->tcp_init )
     {
         {
-            // FIXIT expected flow should be checked by flow_con before we
+            // FIXIT-L expected flow should be checked by flow_con before we
             // get here
             char ignore = flow_con->expected_flow(lwssn, p);
 
@@ -4997,7 +4997,7 @@ static int ProcessTcp(
                     "Got SYN pkt on reset ssn, re-SYN-ing\n"););
     }
 
-    // FIXIT why flush here instead of just purge?
+    // FIXIT-L why flush here instead of just purge?
     // s5_ignored_session() may be disabling detection too soon if we really want to flush
     if ( stream.ignored_session(lwssn, p) )
     {
@@ -5436,7 +5436,7 @@ static int ProcessTcp(
                         }
                         if ( lwssn->s5_state.session_flags & SSNFLAG_MIDSTREAM )
                         {
-                            // FIXIT this should be handled below in fin section
+                            // FIXIT-L this should be handled below in fin section
                             // but midstream sessions fail the seq test
                             listener->s_mgr.state_queue = TCP_STATE_TIME_WAIT;
                             listener->s_mgr.transition_seq = tdb->end_seq;
@@ -5487,7 +5487,7 @@ static int ProcessTcp(
                 break;
 
             default:
-                // FIXIT safe to ignore when inline?
+                // FIXIT-L safe to ignore when inline?
                 break;
         }
     }
@@ -5714,7 +5714,7 @@ dupfin:
 
                 if(flushed)
                 {
-                    // FIXIT - these calls redundant?
+                    // FIXIT-L - these calls redundant?
                     purge_alerts(talker, talker->r_win_base, tcpssn->flow);
                     purge_to_seq(tcpssn, talker, talker->seglist->seq + flushed);
                 }
@@ -5903,7 +5903,7 @@ static inline int CheckFlushPolicyOnData(
             while ( flush_amt > 0 )
             {
 #if 0
-                // FIXIT can't do this with new HI - copy is inevitable
+                // FIXIT-P can't do this with new HI - copy is inevitable
                 // if this payload is exactly one pdu, don't
                 // actually flush, just use the raw packet
                 if ( (tdb->seq == listener->seglist->seq) &&
@@ -5933,7 +5933,7 @@ static inline int CheckFlushPolicyOnData(
             }
             if ( !flags && listener->splitter->is_paf() )
             {
-                // FIXIT PAF auto disable with multiple splitters?
+                // FIXIT-L PAF auto disable with multiple splitters?
                 //if ( AutoDisable(listener, talker) )
                 //    return 0;
 
@@ -6063,7 +6063,7 @@ int CheckFlushPolicyOnAck(
             }
             if ( !flags && talker->splitter->is_paf() )
             {
-                // FIXIT PAF auto disable with multiple splitters?
+                // FIXIT-L PAF auto disable with multiple splitters?
                 //if ( AutoDisable(talker, listener) )
                 //    return 0;
 
@@ -6597,7 +6597,7 @@ bool TcpSession::setup (Packet* p)
 {
     if ( TCP_ISFLAGSET(p->tcph, TH_SYN) &&
         !TCP_ISFLAGSET(p->tcph, TH_ACK) )
-        flow->session_state = STREAM5_STATE_SYN;  // FIXIT same as line 4555
+        flow->session_state = STREAM5_STATE_SYN;  // FIXIT-L same as line 4555
 
     assert(flow->session == this);
     reset();
@@ -6614,7 +6614,7 @@ bool TcpSession::setup (Packet* p)
     return true;
 }
 
-// FIXIT diff betw TcpSessionCleanup() and TcpSessionClear() ?
+// FIXIT-L diff betw TcpSessionCleanup() and TcpSessionClear() ?
 // Cleanup() flushes data; Clear() does not flush data
 void TcpSession::cleanup()
 {
@@ -6622,7 +6622,7 @@ void TcpSession::cleanup()
     TcpSessionCleanup(flow, 1);
 }
 
-// FIXIT this was originally called by Stream::drop_packet()
+// FIXIT-L this was originally called by Stream::drop_packet()
 // which is now calling Session::clear()
 void TcpSession::clear()
 {
@@ -6707,7 +6707,7 @@ int TcpSession::process(Packet *p)
             !TCP_ISFLAGSET(p->tcph, TH_ACK))
         {
             /* SYN only */
-            flow->session_state = STREAM5_STATE_SYN;  // FIXIT same as line 4511
+            flow->session_state = STREAM5_STATE_SYN;  // FIXIT-L same as line 4511
         }
         else
         {
index b99f47ea3a6950466441a8fd50260d432b819c00..e18d250936e426a61e93985a710cb88ec665d189 100644 (file)
@@ -136,7 +136,7 @@ struct StreamTracker
     StreamSegment *seglist;       /* first queued segment */
     StreamSegment *seglist_tail;  /* last queued segment */
 
-    // FIXIT seglist_base_seq is the sequence number to flush from
+    // FIXIT-P seglist_base_seq is the sequence number to flush from
     // and is valid even when seglist is empty.  seglist_next is
     // the segment to flush from and is set per packet.  should keep
     // up to date.
@@ -186,7 +186,7 @@ struct StreamTracker
 
 };
 
-// FIXIT ideally, session tracking would be split from reassembly 
+// FIXIT-L ideally, session tracking would be split from reassembly 
 // into a separate module a la ip_session.cc and ip_defrag.cc
 // (of course defrag should also be cleaned up)
 class TcpSession : public Session
index 866ca59815e7e3252c76b654ec05cab299b4fc57..4213d17eebe7732885c8a64c762b61e7519ad5e0 100644 (file)
@@ -81,8 +81,8 @@ static void UdpSessionCleanup(Flow *lwssn)
 static int ProcessUdp(
     Flow *lwssn, Packet *p, StreamUdpConfig*, SFXHASH_NODE*)
 {
-    if (lwssn->protocol != IPPROTO_UDP)  // FIXIT checked by tcp, icmp, and ip too?
-    // FIXIT need to free lwssn and get a new one
+    if (lwssn->protocol != IPPROTO_UDP)  // FIXIT-P checked by tcp, icmp, and ip too?
+    // FIXIT-L need to free lwssn and get a new one
     {
         DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE,
                     "Lightweight session not UDP on UDP packet\n"););
@@ -236,7 +236,7 @@ int UdpSession::process(Packet *p)
 #if 0
 void udp_stats()
 {
-    // FIXIT need to get these before delete flow_con
+    // FIXIT-L need to get these before delete flow_con
     //flow_con->get_prunes(IPPROTO_UDP, udpStats.prunes);
 }
 #endif
index 3a180ffa1f420c4899190543d650d729b84977e7..8c47d46c3894371d087b1cfc79920543e8213c1d 100644 (file)
@@ -75,8 +75,8 @@ tTargetBasedConfig::tTargetBasedConfig()
 {
     /* Add 1 to max for table purposes
     * We use max_hosts to limit memcap, assume 16k per entry costs*/
-    // FIXIT 16k per host is no longer true
-    // FIXIT init before snort_conf; move to filename and load separately
+    // FIXIT-M 16k per host is no longer true
+    // FIXIT-M init before snort_conf; move to filename and load separately
     // this is a hack to get it going
     uint32_t max = snort_conf ? ScMaxAttrHosts() : DEFAULT_MAX_ATTRIBUTE_HOSTS;
     lookupTable = sfrt_new(DIR_8x16, IPv6, max + 1, (max>>6) + 1);
@@ -91,7 +91,7 @@ tTargetBasedConfig::~tTargetBasedConfig()
 static THREAD_LOCAL tTargetBasedConfig* curr_cfg = NULL;
 static tTargetBasedConfig* next_cfg = NULL;
 
-// FIXIT ensure these are not used by packet threads
+// FIXIT-H ensure these are not used by packet threads
 static HostAttributeEntry *current_host = NULL;
 static ApplicationEntry *current_app = NULL;
 
index 6d700eee85aec42e4b844ba6ca391323a136a80f..1d28b3cbd9edc055c4f44ff7ae8e3ca546b8be18 100644 (file)
@@ -114,7 +114,7 @@ typedef struct
 } ppm_rules_t;
 
 /* suspended rules */
-// FIXIT storing rule tree pointers is a bad idea
+// FIXIT-L storing rule tree pointers is a bad idea
 // - no accommodation for reload
 // - really not used except to log
 // - should be deleted
@@ -122,7 +122,7 @@ static THREAD_LOCAL ppm_rules_t ppm_rules[MAX_DP_NRULES];
 static THREAD_LOCAL int ppm_n_rules;
 
 /* cleared rules - re-enabled */
-// FIXIT see above re storing rule tree pointers
+// FIXIT-L see above re storing rule tree pointers
 static THREAD_LOCAL detection_option_tree_root_t * ppm_crules[MAX_DP_NRULES];
 static THREAD_LOCAL int ppm_n_crules;
 
@@ -238,7 +238,7 @@ static int print_rule( int, RuleTreeNode*, OptTreeNode * o )
     return 0;
 }
 
-// FIXIT ppm_stats should be rolled into ppm module
+// FIXIT-L ppm_stats should be rolled into ppm module
 // (not just peg counts; need module support)
 
 void ppm_sum_stats()
index 792622aab475491a289ba4e19e04368d6d94af41..db3c69a17050d448d58cb8e5b1b8dec61fffa2ef 100644 (file)
@@ -255,7 +255,7 @@ void PrintWorstRules(int numToPrint)
 
     if (numToPrint != -1)
     {
-        // FIXIT this is fugly; should have a LogMessage() type "file" within
+        // FIXIT-L this is fugly; should have a LogMessage() type "file" within
         // TextLog so this if (log) TextLog_Print() else LogMessage() isn't
         // necessary.
         if(log)
index 0177b8573498c4dcd51b1eab0e0ad80d7f062718..c2dc450549edaa8443e887901bc1654a8b3d6125 100644 (file)
@@ -30,7 +30,7 @@
 /**Number of additional policies allocated with each re-alloc operation. */
 #define POLICY_ALLOCATION_CHUNK 10
 
-// FIXIT replace with vector
+// FIXIT-L replace with vector
 int sfDynArrayCheckBounds (
         void ** dynArray,
         unsigned int index,
index f969d9d24e91fddc11b34d3bd7b84cf51cd2135e..5d0e54679db44fefdf11b444b4470ddd73c2c2fb 100644 (file)
@@ -34,7 +34,7 @@
  *     0 value means no elements are allocated
  *     and therefore dynArray[0] will cause memory allocation.
  */
-int sfDynArrayCheckBounds (  // FIXIT replace with std::vector
+int sfDynArrayCheckBounds (
     void** dynArray, unsigned int index, unsigned int *maxElements);
 
 #endif
index 1e2f42c24641cb3b8830df8965cf1ac2b35f5c04..24f747f910867d88b57de3af6bb5f1af4d8879e1 100644 (file)
@@ -30,7 +30,7 @@
 #include "snort_types.h"
 
 #ifndef SIZE_MAX
-#define SIZE_MAX 0xFFFFFFFF  // FIXIT use c++ value
+#define SIZE_MAX 0xFFFFFFFF  // FIXIT-L use c++ value
 #endif
 
 /*point to the start of the unused memory*/
index 1605b133d8a9fefe19c0f49110030cf9b1496cd4..66339c47a4ad2be78857e4387a3104adef0d4c08 100644 (file)
@@ -306,7 +306,7 @@ void DropStats()
     // ensure proper counting of log_limit
     SnortEventqResetCounts();
 
-    // FIXIT alert_pkts excludes rep hits
+    // FIXIT-L alert_pkts excludes rep hits
     if ( gpc.total_alert_pkts == gpc.alert_pkts )
         gpc.total_alert_pkts = 0;
 
@@ -327,7 +327,7 @@ void PrintStatistics (void)
     DropStats();
     timing_stats();
 
-    // FIXIT below stats need to be made consistent with above
+    // FIXIT-L below stats need to be made consistent with above
     fpShowEventStats(snort_conf);
     print_thresholding(snort_conf->threshold_config, 1);
 
index 0b9e19583bdc5be7ce5ed162db3ff0c95536a9cd..a8ff4e8de540d79fb3f5af722670daccd3bf102e 100644 (file)
@@ -131,7 +131,7 @@ static inline void* SnortAlloc (unsigned long size)
     if ( pv )
         return pv;
 
-    // FIXIT do not FatalError() on runtime allocation failures
+    // FIXIT-M do not FatalError() on runtime allocation failures
     FatalError("Unable to allocate memory!  (%lu requested)\n", size);
 
     return NULL;
@@ -267,10 +267,4 @@ const char* get_error(int errnum);
 // reentrant.
 char* get_tok(char* s, const char* delim);
 
-/* for getopt */
-extern char *optarg;  // FIXIT add header
-extern int optind;
-extern int opterr;
-extern int optopt;
-
 #endif /*__UTIL_H__*/