From: Russ Combs Date: Fri, 5 Sep 2014 19:55:38 +0000 (-0400) Subject: added brief help to plugins X-Git-Tag: 3.0.0-233~1417^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63e09bdb8fc32108b10dabf0edc2ca20078e2ec4;p=thirdparty%2Fsnort3.git added brief help to plugins --- diff --git a/ChangeLog b/ChangeLog index 87c9971b7..2b413a7d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ -- tweaked main loop -- added module 1-line help -- latest from josh +-- added plugin 1-line help (should be same as module, if plugin has module) 117 -- added --stdin-rules diff --git a/extra/src/codecs/pim.cc b/extra/src/codecs/pim.cc index 2591f2818..149d25b83 100644 --- a/extra/src/codecs/pim.cc +++ b/extra/src/codecs/pim.cc @@ -34,6 +34,7 @@ namespace // yes, macros are necessary. The API and class constructor require different strings. #define CD_PIM_NAME "pim" +#define CD_PIM_HELP "support for protocol independent multicast" class PimCodec : public Codec { @@ -82,6 +83,7 @@ static const CodecApi pim_api = { PT_CODEC, CD_PIM_NAME, + CD_PIM_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/extra/src/codecs/token_ring.cc b/extra/src/codecs/token_ring.cc index f7505f8ab..bc4645478 100644 --- a/extra/src/codecs/token_ring.cc +++ b/extra/src/codecs/token_ring.cc @@ -234,6 +234,7 @@ static const CodecApi tr_api = { PT_CODEC, TR_NAME, + TR_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/extra/src/inspectors/dpx.cc b/extra/src/inspectors/dpx.cc index 5ff4b390d..8d0530bc7 100644 --- a/extra/src/inspectors/dpx.cc +++ b/extra/src/inspectors/dpx.cc @@ -141,6 +141,7 @@ static const InspectApi dpx_api { PT_INSPECTOR, s_name, + s_help, INSAPI_PLUGIN_V0, 0, nullptr, diff --git a/extra/src/ips_options/ips_urg.cc b/extra/src/ips_options/ips_urg.cc index 93199da58..3236454e9 100644 --- a/extra/src/ips_options/ips_urg.cc +++ b/extra/src/ips_options/ips_urg.cc @@ -174,6 +174,7 @@ static const IpsApi urg_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/extra/src/loggers/alert_ex.cc b/extra/src/loggers/alert_ex.cc index 5d8f8fc9b..162e8907c 100644 --- a/extra/src/loggers/alert_ex.cc +++ b/extra/src/loggers/alert_ex.cc @@ -133,6 +133,7 @@ static const LogApi ex_api = { PT_LOGGER, s_name, + s_help, LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/extra/src/search_engines/lowmem.cc b/extra/src/search_engines/lowmem.cc index fd4787180..7273e1b82 100644 --- a/extra/src/search_engines/lowmem.cc +++ b/extra/src/search_engines/lowmem.cc @@ -131,6 +131,7 @@ static const MpseApi lm_api = { PT_SEARCH_ENGINE, "lowmem", + "Keyword Trie (low memory, moderate performance) MPSE", SEAPI_PLUGIN_V0, 0, nullptr, diff --git a/extra/src/search_engines/lowmem_q.cc b/extra/src/search_engines/lowmem_q.cc index cf0d4e782..5c7ba3b76 100644 --- a/extra/src/search_engines/lowmem_q.cc +++ b/extra/src/search_engines/lowmem_q.cc @@ -198,6 +198,7 @@ static const MpseApi lmq_api = { PT_SEARCH_ENGINE, s_name, + "Keyword Trie (low memory, moderate performance) MPSE with queued events", SEAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/extra/src/so_rules/sid_18758.cc b/extra/src/so_rules/sid_18758.cc index cb9926406..ea187e312 100644 --- a/extra/src/so_rules/sid_18758.cc +++ b/extra/src/so_rules/sid_18758.cc @@ -58,6 +58,7 @@ static const SoApi so_api = { PT_SO_RULE, "3|18758", + "SO rule example", IPSAPI_PLUGIN_V0, 8, nullptr, diff --git a/src/actions/act_react.cc b/src/actions/act_react.cc index 7ff4f95bc..399e78bc3 100644 --- a/src/actions/act_react.cc +++ b/src/actions/act_react.cc @@ -65,6 +65,9 @@ static const char* s_name = "react"; +static const char* s_help = + "send response to client and terminate session"; + static THREAD_LOCAL ProfileStats reactPerfStats; static const char* MSG_KEY = "<>"; @@ -250,7 +253,7 @@ static void react_config (ReactData* rd) // module //------------------------------------------------------------------------- -static const Parameter react_params[] = +static const Parameter s_params[] = { { "msg", Parameter::PT_IMPLIED, nullptr, nullptr, " use rule message in response page" }, @@ -261,13 +264,10 @@ static const Parameter react_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* react_help = - "send response to client and terminate session"; - class ReactModule : public Module { public: - ReactModule() : Module(s_name, react_help, react_params) { }; + ReactModule() : Module(s_name, s_help, s_params) { }; bool begin(const char*, int, SnortConfig*); bool set(const char*, Value&, SnortConfig*); @@ -339,6 +339,7 @@ static const ActionApi react_api = { PT_IPS_ACTION, s_name, + s_help, ACTAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/actions/act_reject.cc b/src/actions/act_reject.cc index deab2c897..1a5a27e5f 100644 --- a/src/actions/act_reject.cc +++ b/src/actions/act_reject.cc @@ -72,6 +72,9 @@ static const char* s_name = "reject"; +static const char* s_help = + "terminate session with TCP reset or ICMP unreachable"; + static THREAD_LOCAL ProfileStats rejPerfStats; class RejectAction : public IpsAction @@ -135,7 +138,7 @@ void RejectAction::send(Packet* p) // module //------------------------------------------------------------------------- -static const Parameter rej_params[] = +static const Parameter s_params[] = { { "reset", Parameter::PT_ENUM, "source|dest|both", nullptr, "send tcp reset to one or both ends" }, @@ -146,13 +149,10 @@ static const Parameter rej_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* rej_help = - "terminate session with TCP reset or ICMP unreachable"; - class RejectModule : public Module { public: - RejectModule() : Module(s_name, rej_help, rej_params) { }; + RejectModule() : Module(s_name, s_help, s_params) { }; bool begin(const char*, int, SnortConfig*); bool end(const char*, int, SnortConfig*); @@ -239,6 +239,7 @@ static const ActionApi rej_api = { PT_IPS_ACTION, s_name, + s_help, ACTAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/actions/act_replace.cc b/src/actions/act_replace.cc index 6cabb26ea..dd73471c4 100644 --- a/src/actions/act_replace.cc +++ b/src/actions/act_replace.cc @@ -34,6 +34,9 @@ static const char* s_name = "rewrite"; +static const char* s_help = + "overwrite packet contents"; + // 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) @@ -100,18 +103,15 @@ static void Replace_ModifyPacket(Packet *p) // replace module //------------------------------------------------------------------------- -static const Parameter rep_params[] = +static const Parameter s_params[] = { { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* rep_help = - "overwrite packet contents"; - class ReplaceModule : public Module { public: - ReplaceModule() : Module(s_name, rep_help, rep_params) { }; + ReplaceModule() : Module(s_name, s_help, s_params) { }; bool set(const char*, Value&, SnortConfig*); bool begin(const char*, int, SnortConfig*); bool end(const char*, int, SnortConfig*); @@ -183,6 +183,7 @@ static ActionApi rep_api { PT_IPS_ACTION, s_name, + s_help, ACTAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/ip/cd_auth.cc b/src/codecs/ip/cd_auth.cc index 80ecd81af..777508272 100644 --- a/src/codecs/ip/cd_auth.cc +++ b/src/codecs/ip/cd_auth.cc @@ -34,11 +34,12 @@ #include "protocols/packet.h" #include "codecs/ip/ip_util.h" +#define CD_AUTH_NAME "auth" +#define CD_AUTH_HELP "support for IP authentication header" + namespace { -#define CD_AUTH_NAME "auth" - static const RuleMap auth_rules[] = { { DECODE_AUTH_HDR_TRUNC, "(" CD_AUTH_NAME ") Truncated authentication header"}, @@ -46,13 +47,10 @@ static const RuleMap auth_rules[] = { 0, nullptr } }; -static const char* s_help = - "support for IP authentication header"; - class AuthModule : public DecodeModule { public: - AuthModule() : DecodeModule(CD_AUTH_NAME, s_help) {} + AuthModule() : DecodeModule(CD_AUTH_NAME, CD_AUTH_HELP) {} const RuleMap* get_rules() const { return auth_rules; } @@ -135,6 +133,7 @@ static const CodecApi ah_api = { PT_CODEC, CD_AUTH_NAME, + CD_AUTH_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/ip/cd_dst_opts.cc b/src/codecs/ip/cd_dst_opts.cc index 7fe5e101f..104ad75e4 100644 --- a/src/codecs/ip/cd_dst_opts.cc +++ b/src/codecs/ip/cd_dst_opts.cc @@ -33,12 +33,12 @@ #include "detection/fpdetect.h" #include "codecs/ip/ip_util.h" +#define CD_DSTOPTS_NAME "ipv6_dst_opts" +#define CD_DSTOPTS_HELP "support for ipv6 destination options" namespace { -#define CD_DSTOPTS_NAME "ipv6_dst_opts" - class Ipv6DSTOptsCodec : public Codec { public: @@ -136,6 +136,7 @@ static const CodecApi ipv6_dstopts_api = { PT_CODEC, CD_DSTOPTS_NAME, + CD_DSTOPTS_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/ip/cd_esp.cc b/src/codecs/ip/cd_esp.cc index 7ea3da0ef..a7a94333c 100644 --- a/src/codecs/ip/cd_esp.cc +++ b/src/codecs/ip/cd_esp.cc @@ -32,12 +32,12 @@ #include "protocols/protocol_ids.h" #include "codecs/ip/ip_util.h" +#define CD_ESP_NAME "esp" +#define CD_ESP_HELP "support for encapsulating security payload" + namespace { - -#define CD_ESP_NAME "esp" - static const RuleMap esp_rules[] = { { DECODE_ESP_HEADER_TRUNC, "(" CD_ESP_NAME ") truncated Encapsulated Security Payload (ESP) header" }, @@ -53,13 +53,10 @@ static const Parameter esp_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* esp_help = - "support for encapsulating security payload"; - class EspModule : public DecodeModule { public: - EspModule() : DecodeModule(CD_ESP_NAME, esp_help, esp_params) {} + EspModule() : DecodeModule(CD_ESP_NAME, CD_ESP_HELP, esp_params) {} const RuleMap* get_rules() const { return esp_rules; } @@ -221,6 +218,7 @@ static const CodecApi esp_api = { PT_CODEC, CD_ESP_NAME, + CD_ESP_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/ip/cd_frag.cc b/src/codecs/ip/cd_frag.cc index 13c38faaf..b691d0dba 100644 --- a/src/codecs/ip/cd_frag.cc +++ b/src/codecs/ip/cd_frag.cc @@ -36,12 +36,12 @@ #include "log/text_log.h" #include "protocols/packet_manager.h" +#define CD_IPV6_FRAG_NAME "ipv6_frag" +#define CD_IPV6_FRAG_HELP "support for IPv6 fragment decoding" namespace { -#define CD_IPV6_FRAG_NAME "ipv6_frag" - class Ipv6FragCodec : public Codec { public: @@ -181,6 +181,7 @@ static const CodecApi ipv6_frag_api = { PT_CODEC, CD_IPV6_FRAG_NAME, + CD_IPV6_FRAG_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/ip/cd_gre.cc b/src/codecs/ip/cd_gre.cc index 828b874aa..5b5e4d17c 100644 --- a/src/codecs/ip/cd_gre.cc +++ b/src/codecs/ip/cd_gre.cc @@ -32,11 +32,12 @@ #include "log/text_log.h" #include "protocols/packet_manager.h" +#define CD_GRE_NAME "gre" +#define CD_GRE_HELP "support for generic routing encapsulation" + namespace { -#define CD_GRE_NAME "gre" - static const RuleMap gre_rules[] = { { DECODE_GRE_DGRAM_LT_GREHDR, "(" CD_GRE_NAME ") GRE header length > payload length" }, @@ -48,13 +49,10 @@ static const RuleMap gre_rules[] = { 0, nullptr } }; -static const char* gre_help = - "support for generic routing encapsulation"; - class GreModule : public DecodeModule { public: - GreModule() : DecodeModule(CD_GRE_NAME, gre_help) {} + GreModule() : DecodeModule(CD_GRE_NAME, CD_GRE_HELP) {} const RuleMap* get_rules() const { return gre_rules; } @@ -273,6 +271,7 @@ static const CodecApi gre_api = { PT_CODEC, CD_GRE_NAME, + CD_GRE_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/ip/cd_hop_opts.cc b/src/codecs/ip/cd_hop_opts.cc index cbe07ba19..bfd52f99a 100644 --- a/src/codecs/ip/cd_hop_opts.cc +++ b/src/codecs/ip/cd_hop_opts.cc @@ -33,11 +33,12 @@ #include "main/snort.h" #include "detection/fpdetect.h" +#define CD_HOPOPTS_NAME "ipv6_hop_opts" +#define CD_HOPOPTS_HELP "support for IPv6 hop options" + namespace { -#define CD_HOPOPTS_NAME "ipv6_hop_opts" - class Ipv6HopOptsCodec : public Codec { public: @@ -139,6 +140,7 @@ static const CodecApi ipv6_hopopts_api = { PT_CODEC, CD_HOPOPTS_NAME, + CD_HOPOPTS_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/ip/cd_icmp4.cc b/src/codecs/ip/cd_icmp4.cc index d92339f87..b8a9a2243 100644 --- a/src/codecs/ip/cd_icmp4.cc +++ b/src/codecs/ip/cd_icmp4.cc @@ -38,9 +38,10 @@ #include "packet_io/active.h" #include "log/text_log.h" -namespace{ - #define CD_ICMP4_NAME "icmp4" +#define CD_ICMP4_HELP "support for internet control message protocol v4" + +namespace{ static const RuleMap icmp4_rules[] = { @@ -72,13 +73,10 @@ static const RuleMap icmp4_rules[] = { 0, nullptr } }; -static const char* icmp4_help = - "support for internet control message protocol v4"; - class Icmp4Module : public DecodeModule { public: - Icmp4Module() : DecodeModule(CD_ICMP4_NAME, icmp4_help) {} + Icmp4Module() : DecodeModule(CD_ICMP4_NAME, CD_ICMP4_HELP) {} const RuleMap* get_rules() const { return icmp4_rules; } @@ -682,6 +680,7 @@ static const CodecApi icmp4_api = { PT_CODEC, CD_ICMP4_NAME, + CD_ICMP4_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/ip/cd_icmp6.cc b/src/codecs/ip/cd_icmp6.cc index 75552dca2..48d1d9925 100644 --- a/src/codecs/ip/cd_icmp6.cc +++ b/src/codecs/ip/cd_icmp6.cc @@ -39,11 +39,12 @@ #include "packet_io/active.h" #include "log/text_log.h" +#define CD_ICMP6_NAME "icmp6" +#define CD_ICMP6_HELP "support for internet control message protocol v6" namespace { -#define CD_ICMP6_NAME "icmp6" static const RuleMap icmp6_rules[] = { { DECODE_ICMP6_HDR_TRUNC, "(" CD_ICMP6_NAME ") truncated ICMP6 header" }, @@ -60,13 +61,10 @@ static const RuleMap icmp6_rules[] = { 0, nullptr } }; -static const char* icmp6_help = - "support for internet control message protocol v6"; - class Icmp6Module : public DecodeModule { public: - Icmp6Module() : DecodeModule(CD_ICMP6_NAME, icmp6_help) {} + Icmp6Module() : DecodeModule(CD_ICMP6_NAME, CD_ICMP6_HELP) {} const RuleMap* get_rules() const { return icmp6_rules; } @@ -469,6 +467,7 @@ static const CodecApi ipv6_api = { PT_CODEC, CD_ICMP6_NAME, + CD_ICMP6_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/ip/cd_igmp.cc b/src/codecs/ip/cd_igmp.cc index 677fc231a..fca16a4a9 100644 --- a/src/codecs/ip/cd_igmp.cc +++ b/src/codecs/ip/cd_igmp.cc @@ -31,25 +31,22 @@ #include "protocols/packet.h" +#define CD_IGMP_NAME "igmp" +#define CD_IGMP_HELP "support for internet group management protocol" + namespace { - -#define CD_IGMP_NAME "igmp" - static const RuleMap igmp_rules[] = { { DECODE_IGMP_OPTIONS_DOS, "(" CD_IGMP_NAME ") DOS IGMP IP Options validation attempt" }, { 0, nullptr } }; -static const char* igmp_help = - "support for internet group management protocol"; - class IgmpModule : public DecodeModule { public: - IgmpModule() : DecodeModule(CD_IGMP_NAME, igmp_help) {} + IgmpModule() : DecodeModule(CD_IGMP_NAME, CD_IGMP_HELP) {} const RuleMap* get_rules() const { return igmp_rules; } @@ -144,6 +141,7 @@ static const CodecApi igmp_api = { PT_CODEC, CD_IGMP_NAME, + CD_IGMP_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/ip/cd_ipv4.cc b/src/codecs/ip/cd_ipv4.cc index 71be6f364..863d2da3c 100644 --- a/src/codecs/ip/cd_ipv4.cc +++ b/src/codecs/ip/cd_ipv4.cc @@ -47,9 +47,11 @@ #include "log/text_log.h" #include "log/log_text.h" +#define CD_IPV4_NAME "ipv4" +#define CD_IPV4_HELP "support for internet protocol v4" + namespace{ -#define CD_IPV4_NAME "ipv4" static const RuleMap ipv4_rules[] = { { DECODE_NOT_IPV4_DGRAM, "(" CD_IPV4_NAME ") Not IPv4 datagram" }, @@ -82,13 +84,10 @@ static const RuleMap ipv4_rules[] = { 0, nullptr } }; -static const char* ipv4_help = - "support for internet protocol v4"; - class Ipv4Module : public DecodeModule { public: - Ipv4Module() : DecodeModule(CD_IPV4_NAME, ipv4_help) {} + Ipv4Module() : DecodeModule(CD_IPV4_NAME, CD_IPV4_HELP) {} const RuleMap* get_rules() const { return ipv4_rules; } @@ -937,6 +936,7 @@ static const CodecApi ipv4_api = { PT_CODEC, CD_IPV4_NAME, + CD_IPV4_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/ip/cd_ipv6.cc b/src/codecs/ip/cd_ipv6.cc index c16d78e69..208cfb707 100644 --- a/src/codecs/ip/cd_ipv6.cc +++ b/src/codecs/ip/cd_ipv6.cc @@ -41,10 +41,12 @@ #include "protocols/packet_manager.h" #include "log/text_log.h" +#define CD_IPV6_NAME "ipv6" +#define CD_IPV6_HELP "support for internet protocol v6" + namespace { -#define CD_IPV6_NAME "ipv6" static const RuleMap ipv6_rules[] = { { DECODE_IPV6_MIN_TTL, "(" CD_IPV6_NAME ") IPv6 packet below TTL limit" }, @@ -73,13 +75,10 @@ static const RuleMap ipv6_rules[] = { 0, nullptr } }; -static const char* ipv6_help = - "support for internet protocol v6"; - class Ipv6Module : public DecodeModule { public: - Ipv6Module() : DecodeModule(CD_IPV6_NAME, ipv6_help) {} + Ipv6Module() : DecodeModule(CD_IPV6_NAME, CD_IPV6_HELP) {} const RuleMap* get_rules() const { return ipv6_rules; } @@ -773,6 +772,7 @@ static const CodecApi ipv6_api = { PT_CODEC, CD_IPV6_NAME, + CD_IPV6_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/ip/cd_mobility.cc b/src/codecs/ip/cd_mobility.cc index 2fc9812cf..ee709ab27 100644 --- a/src/codecs/ip/cd_mobility.cc +++ b/src/codecs/ip/cd_mobility.cc @@ -27,11 +27,12 @@ #include "framework/codec.h" #include "codecs/codec_events.h" -namespace -{ - // yes, macros are necessary. The API and class constructor require different strings. #define CD_MOBILE_NAME "mobility" +#define CD_MOBILE_HELP "support for mobility" + +namespace +{ class MobilityCodec : public Codec { @@ -43,7 +44,6 @@ public: virtual void get_protocol_ids(std::vector&); virtual bool decode(const uint8_t *raw_pkt, const uint32_t& raw_len, Packet *, uint16_t &lyr_len, uint16_t &next_prot_id); - }; const uint16_t IPPROTO_ID_MOBILITY = 55; @@ -84,6 +84,7 @@ static const CodecApi mobility_api = { PT_CODEC, CD_MOBILE_NAME, + CD_MOBILE_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/ip/cd_no_next.cc b/src/codecs/ip/cd_no_next.cc index ad07ea76c..07f884f6b 100644 --- a/src/codecs/ip/cd_no_next.cc +++ b/src/codecs/ip/cd_no_next.cc @@ -36,6 +36,7 @@ namespace { #define CD_NO_NEXT_NAME "ipv6_no_next" +#define CD_NO_NEXT_HELP "sentinel codec" class Ipv6NoNextCodec : public Codec { @@ -90,6 +91,7 @@ static const CodecApi no_next_api = { PT_CODEC, CD_NO_NEXT_NAME, + CD_NO_NEXT_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/ip/cd_pgm.cc b/src/codecs/ip/cd_pgm.cc index 87e460445..ae11cde83 100644 --- a/src/codecs/ip/cd_pgm.cc +++ b/src/codecs/ip/cd_pgm.cc @@ -35,6 +35,7 @@ namespace { #define CD_PGM_NAME "pgm" +#define CD_PGM_HELP "support for pragmatic general multicast" static const RuleMap pgm_rules[] = { @@ -42,13 +43,10 @@ static const RuleMap pgm_rules[] = { 0, nullptr } }; -static const char* pgm_help = - "support for pragmatic general multicast"; - class PgmModule : public DecodeModule { public: - PgmModule() : DecodeModule(CD_PGM_NAME, pgm_help) {} + PgmModule() : DecodeModule(CD_PGM_NAME, CD_PGM_HELP) {} const RuleMap* get_rules() const { return pgm_rules; } @@ -209,6 +207,7 @@ static const CodecApi pgm_api = { PT_CODEC, CD_PGM_NAME, + CD_PGM_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/ip/cd_routing.cc b/src/codecs/ip/cd_routing.cc index a7894a4e3..5efed30d2 100644 --- a/src/codecs/ip/cd_routing.cc +++ b/src/codecs/ip/cd_routing.cc @@ -34,11 +34,12 @@ #include "protocols/ipv6.h" #include "codecs/ip/ip_util.h" +#define CD_IPV6_ROUTING_NAME "ipv6_routing" +#define CD_IPV6_ROUTING_HELP "support for IPv6 routing extension" + namespace { -#define CD_IPV6_ROUTING_NAME "ipv6_routing" - class Ipv6RoutingCodec : public Codec { public: @@ -156,6 +157,7 @@ static const CodecApi ipv6_routing_api = { PT_CODEC, CD_IPV6_ROUTING_NAME, + CD_IPV6_ROUTING_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/ip/cd_sun_nd.cc b/src/codecs/ip/cd_sun_nd.cc index 7a559d3ec..c45870aeb 100644 --- a/src/codecs/ip/cd_sun_nd.cc +++ b/src/codecs/ip/cd_sun_nd.cc @@ -33,6 +33,7 @@ namespace // yes, macros are necessary. The API and class constructor require different strings. #define CD_SUN_ND_NAME "sun_nd" +#define CD_SUN_ND_HELP "support for Sun ND" class SunNdCodec : public Codec { @@ -81,6 +82,7 @@ static const CodecApi sun_nd_api = { PT_CODEC, CD_SUN_ND_NAME, + CD_SUN_ND_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/ip/cd_swipe.cc b/src/codecs/ip/cd_swipe.cc index b6ef4eea1..f6b7628f8 100644 --- a/src/codecs/ip/cd_swipe.cc +++ b/src/codecs/ip/cd_swipe.cc @@ -28,10 +28,10 @@ #include "framework/codec.h" #include "codecs/codec_events.h" -namespace{ - #define CD_SWIPE_NAME "swipe" +#define CD_SWIPE_HELP "support for Swipe" +namespace{ class SwipeCodec : public Codec { @@ -80,6 +80,7 @@ static const CodecApi swipe_api = { PT_CODEC, CD_SWIPE_NAME, + CD_SWIPE_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/ip/cd_tcp.cc b/src/codecs/ip/cd_tcp.cc index e5a3ddea2..9faea90d6 100644 --- a/src/codecs/ip/cd_tcp.cc +++ b/src/codecs/ip/cd_tcp.cc @@ -43,13 +43,12 @@ #include "log/log.h" #include "protocols/packet_manager.h" +#define CD_TCP_NAME "tcp" +#define CD_TCP_HELP "support for transmission control protocol" namespace { - -#define CD_TCP_NAME "tcp" - static const RuleMap tcp_rules[] = { { DECODE_TCP_DGRAM_LT_TCPHDR, "(" CD_TCP_NAME ") TCP packet len is smaller than 20 bytes" }, @@ -76,13 +75,10 @@ static const RuleMap tcp_rules[] = { 0, nullptr } }; -static const char* tcp_help = - "support for transmission control protocol"; - class TcpModule : public DecodeModule { public: - TcpModule() : DecodeModule(CD_TCP_NAME, tcp_help) {} + TcpModule() : DecodeModule(CD_TCP_NAME, CD_TCP_HELP) {} const RuleMap* get_rules() const { return tcp_rules; } @@ -1117,6 +1113,7 @@ static const CodecApi tcp_api = { PT_CODEC, CD_TCP_NAME, + CD_TCP_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/ip/cd_udp.cc b/src/codecs/ip/cd_udp.cc index 28e063863..e5a7740bb 100644 --- a/src/codecs/ip/cd_udp.cc +++ b/src/codecs/ip/cd_udp.cc @@ -44,12 +44,12 @@ #include "parser/config_file.h" #include "codecs/ip/ip_util.h" +#define CD_UDP_NAME "udp" +#define CD_UDP_HELP "support for user datagram protocol" namespace { - -#define CD_UDP_NAME "udp" static const Parameter udp_params[] = { { "deep_teredo_inspection", Parameter::PT_BOOL, nullptr, "false", @@ -79,13 +79,10 @@ static const RuleMap udp_rules[] = { 0, nullptr } }; -static const char* udp_help = - "support for user datagram protocol"; - class UdpModule : public DecodeModule { public: - UdpModule() : DecodeModule(CD_UDP_NAME, udp_help, udp_params) {} + UdpModule() : DecodeModule(CD_UDP_NAME, CD_UDP_HELP, udp_params) {} const RuleMap* get_rules() const { return udp_rules; } @@ -596,6 +593,7 @@ static const CodecApi udp_api = { PT_CODEC, CD_UDP_NAME, + CD_UDP_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/link/cd_arp.cc b/src/codecs/link/cd_arp.cc index 88a3dbd89..a9d18a074 100644 --- a/src/codecs/link/cd_arp.cc +++ b/src/codecs/link/cd_arp.cc @@ -28,24 +28,22 @@ #include "protocols/packet.h" #include "log/text_log.h" +#define CD_ARP_NAME "arp" +#define CD_ARP_HELP "support for address resolution protocol" + namespace { -#define CD_ARP_NAME "arp" - static const RuleMap arp_rules[] = { { DECODE_ARP_TRUNCATED, "(" CD_ARP_NAME ") Truncated ARP" }, { 0, nullptr } }; -static const char* arp_help = - "support for address resolution protocol"; - class ArpModule : public DecodeModule { public: - ArpModule() : DecodeModule(CD_ARP_NAME, arp_help) {} + ArpModule() : DecodeModule(CD_ARP_NAME, CD_ARP_HELP) {} const RuleMap* get_rules() const { return arp_rules; } @@ -128,6 +126,7 @@ static const CodecApi arp_api = { PT_CODEC, CD_ARP_NAME, + CD_ARP_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/link/cd_eapol.cc b/src/codecs/link/cd_eapol.cc index 1a6c12da4..04c7bef3a 100644 --- a/src/codecs/link/cd_eapol.cc +++ b/src/codecs/link/cd_eapol.cc @@ -31,11 +31,12 @@ #include "protocols/protocol_ids.h" #include "protocols/eapol.h" +#define CD_EAPOL_NAME "eapol" +#define CD_EAPOL_HELP "support for extensible authentication protocol over LAN" namespace { -#define CD_EAPOL_NAME "eapol" static const RuleMap eapol_rules[] = { { DECODE_EAPOL_TRUNCATED, "(" CD_EAPOL_NAME ") Truncated EAP Header" }, @@ -44,13 +45,10 @@ static const RuleMap eapol_rules[] = { 0, nullptr } }; -static const char* eapol_help = - "support for extensible authentication protocol over LAN"; - class EapolModule : public DecodeModule { public: - EapolModule() : DecodeModule(CD_EAPOL_NAME, eapol_help) {} + EapolModule() : DecodeModule(CD_EAPOL_NAME, CD_EAPOL_HELP) {} const RuleMap* get_rules() const { return eapol_rules; } @@ -188,6 +186,7 @@ static const CodecApi eapol_api = { PT_CODEC, CD_EAPOL_NAME, + CD_EAPOL_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/link/cd_erspan2.cc b/src/codecs/link/cd_erspan2.cc index e4c54380d..e01759bc8 100644 --- a/src/codecs/link/cd_erspan2.cc +++ b/src/codecs/link/cd_erspan2.cc @@ -27,11 +27,12 @@ #include "codecs/sf_protocols.h" #include "protocols/packet.h" +#define CD_ERSPAN2_NAME "erspan2" +#define CD_ERSPAN2_HELP "support for encapsulated remote switched port analyzer - type 2" + namespace { -#define CD_ERSPAN2_NAME "erspan2" - static const RuleMap erspan2_rules[] = { { DECODE_ERSPAN_HDR_VERSION_MISMATCH, "(codec_erspan) ERSpan Header version mismatch" }, @@ -39,13 +40,10 @@ static const RuleMap erspan2_rules[] = { 0, nullptr } }; -static const char* erspan2_help = - "support for encapsulated remote switched port analyzer - type 2"; - class Erspan2Module : public DecodeModule { public: - Erspan2Module() : DecodeModule(CD_ERSPAN2_NAME, erspan2_help) {} + Erspan2Module() : DecodeModule(CD_ERSPAN2_NAME, CD_ERSPAN2_HELP) {} const RuleMap* get_rules() const { return erspan2_rules; } @@ -151,6 +149,7 @@ static const CodecApi erspan2_api = { PT_CODEC, CD_ERSPAN2_NAME, + CD_ERSPAN2_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/link/cd_erspan3.cc b/src/codecs/link/cd_erspan3.cc index faa7a54a1..b99f552ff 100644 --- a/src/codecs/link/cd_erspan3.cc +++ b/src/codecs/link/cd_erspan3.cc @@ -29,24 +29,22 @@ #include "codecs/sf_protocols.h" #include "protocols/packet.h" +#define CD_ERSPAN3_NAME "erspan3" +#define CD_ERSPAN3_HELP "support for encapsulated remote switched port analyzer - type 3" namespace { -#define CD_ERSPAN3_NAME "erspan3" static const RuleMap erspan3_rules[] = { { DECODE_ERSPAN3_DGRAM_LT_HDR, "(" CD_ERSPAN3_NAME ") captured < ERSpan Type3 Header Length" }, { 0, nullptr } }; -static const char* erspan3_help = - "support for encapsulated remote switched port analyzer - type 3"; - class Erspan3Module : public DecodeModule { public: - Erspan3Module() : DecodeModule(CD_ERSPAN3_NAME, erspan3_help) {} + Erspan3Module() : DecodeModule(CD_ERSPAN3_NAME, CD_ERSPAN3_HELP) {} const RuleMap* get_rules() const { return erspan3_rules; } @@ -174,6 +172,7 @@ static const CodecApi erspan3_api = { PT_CODEC, CD_ERSPAN3_NAME, + CD_ERSPAN3_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/link/cd_mpls.cc b/src/codecs/link/cd_mpls.cc index 180802137..cf1fc4fa1 100644 --- a/src/codecs/link/cd_mpls.cc +++ b/src/codecs/link/cd_mpls.cc @@ -37,9 +37,11 @@ #include "main/snort.h" #include "log/text_log.h" +#define CD_MPLS_NAME "mpls" +#define CD_MPLS_HELP "support for multiprotocol label switching" + namespace { -#define CD_MPLS_NAME "mpls" static const Parameter mpls_params[] = { @@ -58,7 +60,6 @@ static const Parameter mpls_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; - // rules which will loaded into snort. // You can now reference these rules by calling a codec_event // in your main codec's functions @@ -74,13 +75,10 @@ static const RuleMap mpls_rules[] = { 0, nullptr } }; -static const char* mpls_help = - "support for multiprotocol label switching"; - class MplsModule : public DecodeModule { public: - MplsModule() : DecodeModule(CD_MPLS_NAME, mpls_help, mpls_params) {}; + MplsModule() : DecodeModule(CD_MPLS_NAME, CD_MPLS_HELP, mpls_params) {}; const RuleMap* get_rules() const { return mpls_rules; } @@ -345,6 +343,7 @@ static const CodecApi mpls_api = { PT_CODEC, CD_MPLS_NAME, + CD_MPLS_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/link/cd_ppp_encap.cc b/src/codecs/link/cd_ppp_encap.cc index 0e9495095..d31d8cadc 100644 --- a/src/codecs/link/cd_ppp_encap.cc +++ b/src/codecs/link/cd_ppp_encap.cc @@ -29,11 +29,12 @@ #include "snort.h" #include "codecs/sf_protocols.h" +#define CD_PPPENCAP_NAME "ppp_encap" +#define CD_PPPENCAP_HELP "support for point-to-point encapsulation" + namespace { -#define CD_PPPENCAP_NAME "ppp_encap" - class PppEncap : public Codec { public: @@ -189,6 +190,7 @@ static const CodecApi pppencap_api = { PT_CODEC, CD_PPPENCAP_NAME, + CD_PPPENCAP_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/link/cd_pppoe.cc b/src/codecs/link/cd_pppoe.cc index aa149cae2..4c29f35ab 100644 --- a/src/codecs/link/cd_pppoe.cc +++ b/src/codecs/link/cd_pppoe.cc @@ -303,6 +303,7 @@ namespace const uint16_t ETHERNET_TYPE_PPPoE_DISC = 0x8863; /* discovery stage */ #define CD_PPPOEPKT_DISC_NAME "pppoe_disc" +#define CD_PPPOEPKT_DISC_HELP "support for point-to-point discovery" class PPPoEDiscCodec : public Codec { @@ -375,6 +376,7 @@ static const CodecApi pppoepkt_disc_api = { PT_CODEC, CD_PPPOEPKT_DISC_NAME, + CD_PPPOEPKT_DISC_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, @@ -404,6 +406,7 @@ namespace #define CD_PPPOEPKT_SESS_NAME "pppoe_sess" +#define CD_PPPOEPKT_SESS_HELP "support for point-to-point session" const uint16_t ETHERNET_TYPE_PPPoE_SESS = 0x8864; /* session stage */ @@ -466,6 +469,7 @@ static const CodecApi pppoepkt_sess_api = { PT_CODEC, CD_PPPOEPKT_SESS_NAME, + CD_PPPOEPKT_SESS_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/link/cd_trans_bridge.cc b/src/codecs/link/cd_trans_bridge.cc index 4d0fb5b4d..41bb9818b 100644 --- a/src/codecs/link/cd_trans_bridge.cc +++ b/src/codecs/link/cd_trans_bridge.cc @@ -38,6 +38,7 @@ namespace { #define CD_TRANSBRIDGE_NAME "trans_bridge" +#define CD_TRANSBRIDGE_HELP "support for trans-bridging" class TransbridgeCodec : public Codec { @@ -114,6 +115,7 @@ static const CodecApi transbridge_api = { PT_CODEC, CD_TRANSBRIDGE_NAME, + CD_TRANSBRIDGE_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/link/cd_vlan.cc b/src/codecs/link/cd_vlan.cc index 85d8a2dc9..f3766bde6 100644 --- a/src/codecs/link/cd_vlan.cc +++ b/src/codecs/link/cd_vlan.cc @@ -36,10 +36,12 @@ #include "protocols/packet_manager.h" #include "log/text_log.h" +#define CD_VLAN_NAME "vlan" +#define CD_VLAN_HELP "support for virtual local area network" + namespace { -#define CD_VLAN_NAME "vlan" static const RuleMap vlan_rules[] = { { DECODE_BAD_VLAN, "(" CD_VLAN_NAME ") Bad VLAN Frame" }, @@ -48,13 +50,10 @@ static const RuleMap vlan_rules[] = { 0, nullptr } }; -static const char* vlan_help = - "support for virtual local area network"; - class VlanModule : public DecodeModule { public: - VlanModule() : DecodeModule(CD_VLAN_NAME, vlan_help) {} + VlanModule() : DecodeModule(CD_VLAN_NAME, CD_VLAN_HELP) {} const RuleMap* get_rules() const { return vlan_rules; } @@ -162,6 +161,7 @@ static const CodecApi vlan_api = { PT_CODEC, CD_VLAN_NAME, + CD_VLAN_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/misc/cd_default.cc b/src/codecs/misc/cd_default.cc index 8956faf16..0bc6d3968 100644 --- a/src/codecs/misc/cd_default.cc +++ b/src/codecs/misc/cd_default.cc @@ -28,11 +28,12 @@ #include "framework/codec.h" #include "protocols/protocol_ids.h" +#define CD_DEFAULT_NAME "unknown" +#define CD_DEFAULT_HELP "support for unkown protocols" + namespace { -#define CD_DEFAULT_NAME "unknown" - class DefaultCodec : public Codec { public: @@ -69,6 +70,7 @@ static const CodecApi default_api = { PT_CODEC, CD_DEFAULT_NAME, + CD_DEFAULT_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/misc/cd_gtp.cc b/src/codecs/misc/cd_gtp.cc index 19fbde7cc..ace1f4846 100644 --- a/src/codecs/misc/cd_gtp.cc +++ b/src/codecs/misc/cd_gtp.cc @@ -35,11 +35,12 @@ #include "protocols/protocol_ids.h" #include "codecs/decode_module.h" +#define CD_GTP_NAME "gtp" +#define CD_GTP_HELP "support for general-packet-radio-service tunnelling protocol" + namespace { -#define CD_GTP_NAME "gtp" - static const RuleMap gtp_rules[] = { { DECODE_GTP_MULTIPLE_ENCAPSULATION, "(" CD_GTP_NAME ") Two or more GTP encapsulation layers present" }, @@ -47,13 +48,10 @@ static const RuleMap gtp_rules[] = { 0, nullptr } }; -static const char* gtp_help = - "support for general-packet-radio-service tunnelling protocol"; - class GtpModule : public DecodeModule { public: - GtpModule() : DecodeModule(CD_GTP_NAME, gtp_help) {}; + GtpModule() : DecodeModule(CD_GTP_NAME, CD_GTP_HELP) {}; const RuleMap* get_rules() const { return gtp_rules; } @@ -324,6 +322,7 @@ static const CodecApi gtp_api = { PT_CODEC, CD_GTP_NAME, + CD_GTP_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/misc/cd_icmp4_ip.cc b/src/codecs/misc/cd_icmp4_ip.cc index e769b4bd9..02358280f 100644 --- a/src/codecs/misc/cd_icmp4_ip.cc +++ b/src/codecs/misc/cd_icmp4_ip.cc @@ -38,6 +38,7 @@ namespace { #define ICMP4_IP_NAME "icmp4_ip" +#define ICMP4_IP_HELP "support for IP in ICMPv4" class Icmp4IpCodec : public Codec { @@ -358,6 +359,7 @@ static const CodecApi icmp4_ip_api = { PT_CODEC, ICMP4_IP_NAME, + ICMP4_IP_HELP, CDAPI_PLUGIN_V0, 0, nullptr, // module constructor diff --git a/src/codecs/misc/cd_icmp6_ip.cc b/src/codecs/misc/cd_icmp6_ip.cc index 7887e4c03..7730947c1 100644 --- a/src/codecs/misc/cd_icmp6_ip.cc +++ b/src/codecs/misc/cd_icmp6_ip.cc @@ -33,9 +33,6 @@ #include "codecs/codec_events.h" -namespace -{ - // yes, macros are necessary. The API and class constructor require different strings. // // this macros is defined in the module to ensure identical names. However, @@ -44,6 +41,11 @@ namespace #define ICMP6_IP_NAME "icmp6_ip" #endif +#define ICMP6_IP_HELP "support for IP in ICMPv6" + +namespace +{ + class Icmp6IpCodec : public Codec { public: @@ -158,6 +160,7 @@ static const CodecApi icmp6_ip_api = { PT_CODEC, ICMP6_IP_NAME, + ICMP6_IP_HELP, CDAPI_PLUGIN_V0, 0, nullptr, // module constructor diff --git a/src/codecs/misc/cd_llc.cc b/src/codecs/misc/cd_llc.cc index 63eed914c..63893ae46 100644 --- a/src/codecs/misc/cd_llc.cc +++ b/src/codecs/misc/cd_llc.cc @@ -33,16 +33,15 @@ #include "log/text_log.h" #include "protocols/packet_manager.h" -namespace -{ - // yes, macros are necessary. The API and class constructor require different strings. // // this macros is defined in the module to ensure identical names. However, // if you don't want a module, define the name here. #define LLC_NAME "llc" +#define LLC_HELP "support for logical link control" - +namespace +{ class LlcCodec : public Codec { @@ -167,6 +166,7 @@ static const CodecApi llc_api = { PT_CODEC, LLC_NAME, + LLC_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/misc/cd_teredo.cc b/src/codecs/misc/cd_teredo.cc index 6d702f3cf..caf214fea 100644 --- a/src/codecs/misc/cd_teredo.cc +++ b/src/codecs/misc/cd_teredo.cc @@ -37,11 +37,12 @@ #include "protocols/teredo.h" #include "protocols/protocol_ids.h" +#define CD_TEREDO_NAME "teredo" +#define CD_TEREDO_HELP "support for teredo" + namespace { -#define CD_TEREDO_NAME "teredo" - class TeredoCodec : public Codec { public: @@ -127,6 +128,7 @@ static const CodecApi teredo_api = { PT_CODEC, CD_TEREDO_NAME, + CD_TEREDO_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/root/cd_eth.cc b/src/codecs/root/cd_eth.cc index ad654ec7e..4d0849721 100644 --- a/src/codecs/root/cd_eth.cc +++ b/src/codecs/root/cd_eth.cc @@ -33,23 +33,22 @@ #include "codecs/sf_protocols.h" #include "log/text_log.h" +#define CD_ETH_NAME "eth" +#define CD_ETH_HELP "support for ethernet protocol" + namespace { -#define CD_ETH_NAME "eth" static const RuleMap eth_rules[] = { { DECODE_ETH_HDR_TRUNC, "(" CD_ETH_NAME ") truncated eth header" }, { 0, nullptr } }; -static const char* eth_help = - "support for ethernet protocol"; - class EthModule : public DecodeModule { public: - EthModule() : DecodeModule(CD_ETH_NAME, eth_help) {} + EthModule() : DecodeModule(CD_ETH_NAME, CD_ETH_HELP) {} const RuleMap* get_rules() const { return eth_rules; } @@ -263,6 +262,7 @@ static const CodecApi eth_api = { PT_CODEC, CD_ETH_NAME, + CD_ETH_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/root/cd_linux_sll.cc b/src/codecs/root/cd_linux_sll.cc index 3f670123e..3faa30e19 100644 --- a/src/codecs/root/cd_linux_sll.cc +++ b/src/codecs/root/cd_linux_sll.cc @@ -30,16 +30,16 @@ #include "protocols/linux_sll.h" #include "main/snort.h" +#define CD_LINUX_SLL_NAME "linux_sll" +#define CD_LINUX_SLL_HELP "support for Linux SLL" namespace { -#define CD_LINUX_SSL_NAME "linux_sll" - class LinuxSllCodec : public Codec { public: - LinuxSllCodec() : Codec(CD_LINUX_SSL_NAME){}; + LinuxSllCodec() : Codec(CD_LINUX_SLL_NAME){}; ~LinuxSllCodec() {}; @@ -100,7 +100,8 @@ static const CodecApi linux_ssl_api = { { PT_CODEC, - CD_LINUX_SSL_NAME, + CD_LINUX_SLL_NAME, + CD_LINUX_SLL_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/root/cd_null.cc b/src/codecs/root/cd_null.cc index 7853585bd..4a384a094 100644 --- a/src/codecs/root/cd_null.cc +++ b/src/codecs/root/cd_null.cc @@ -30,11 +30,12 @@ #include +#define CD_NULL_NAME "null" +#define CD_NULL_HELP "support for null encapsulation" + namespace { -#define CD_NULL_NAME "null" - class NullCodec : public Codec { public: @@ -112,6 +113,7 @@ static const CodecApi null_api = { PT_CODEC, CD_NULL_NAME, + CD_NULL_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/root/cd_ppp.cc b/src/codecs/root/cd_ppp.cc index ac8f836b2..206cff748 100644 --- a/src/codecs/root/cd_ppp.cc +++ b/src/codecs/root/cd_ppp.cc @@ -28,11 +28,6 @@ #include "framework/codec.h" #include "main/snort.h" - - -namespace -{ - // yes, macros are necessary. The API and class constructor require different strings. // // this macros is defined in the module to ensure identical names. However, @@ -41,6 +36,11 @@ namespace #define PPP_NAME "ppp" #endif +#define PPP_HELP "support for point-to-point encapsulation" + +namespace +{ + class PPPCodec : public Codec { public: @@ -117,6 +117,7 @@ static const CodecApi ppp_api = { PT_CODEC, PPP_NAME, + PPP_HELP, CDAPI_PLUGIN_V0, 0, nullptr, // mod_ctor diff --git a/src/codecs/root/cd_raw4.cc b/src/codecs/root/cd_raw4.cc index 3d28e5f30..536917166 100644 --- a/src/codecs/root/cd_raw4.cc +++ b/src/codecs/root/cd_raw4.cc @@ -28,12 +28,12 @@ #include "protocols/protocol_ids.h" #include +#define CD_RAW4_NAME "raw4" +#define CD_RAW4_HELP "support for unencapsulated IPv4" namespace { -#define CD_RAW4_NAME "raw4" - class Raw4Codec : public Codec { public: @@ -104,6 +104,7 @@ static const CodecApi raw4_api = { PT_CODEC, CD_RAW4_NAME, + CD_RAW4_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/root/cd_raw6.cc b/src/codecs/root/cd_raw6.cc index 867f5b471..5bf0754ce 100644 --- a/src/codecs/root/cd_raw6.cc +++ b/src/codecs/root/cd_raw6.cc @@ -28,12 +28,12 @@ #include "protocols/protocol_ids.h" #include +#define CD_RAW6_NAME "raw6" +#define CD_RAW6_HELP "support for unencapsulated IPv6" namespace { -#define CD_RAW6_NAME "raw6" - class Raw6Codec : public Codec { public: @@ -78,6 +78,7 @@ static const CodecApi raw6_api = { PT_CODEC, CD_RAW6_NAME, + CD_RAW6_HELP, CDAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/codecs/root/cd_wlan.cc b/src/codecs/root/cd_wlan.cc index f9b5fa48f..45fa12619 100644 --- a/src/codecs/root/cd_wlan.cc +++ b/src/codecs/root/cd_wlan.cc @@ -37,10 +37,12 @@ #include "log/log.h" #endif +#define CD_WLAN_NAME "wlan" +#define CD_WLAN_HELP "support for wireless local area network protocol" + namespace { -#define CD_WLAN_NAME "wlan" static const RuleMap wlan_rules[] = { { DECODE_BAD_80211_ETHLLC, "(" CD_WLAN_NAME ") Bad 802.11 LLC header" }, @@ -48,13 +50,10 @@ static const RuleMap wlan_rules[] = { 0, nullptr } }; -static const char* wlan_help = - "support for wireless local area network protocol"; - class WlanCodecModule : public DecodeModule { public: - WlanCodecModule() : DecodeModule(CD_WLAN_NAME, wlan_help) {} + WlanCodecModule() : DecodeModule(CD_WLAN_NAME, CD_WLAN_HELP) {} const RuleMap* get_rules() const { return wlan_rules; } @@ -253,6 +252,7 @@ static const CodecApi wlan_api = { PT_CODEC, CD_WLAN_NAME, + CD_WLAN_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/codecs/root/root_i4lrawip.cc b/src/codecs/root/root_i4lrawip.cc index beb94a560..bbee0bff1 100644 --- a/src/codecs/root/root_i4lrawip.cc +++ b/src/codecs/root/root_i4lrawip.cc @@ -26,19 +26,19 @@ #include "framework/codec.h" +#ifndef I4L_RAW_IP_NAME +#define I4L_RAW_IP_NAME "i4l_raw_ip" +#endif + +#define I4L_RAW_IP_HELP "support for I4L IP" namespace { - -#ifndef I4L_RAW_IP -#define I4L_RAW_IP "i4l_raw_ip" -#endif - class I4LRawIpCodec : public Codec { public: - I4LRawIpCodec() : Codec(I4L_RAW_IP){}; + I4LRawIpCodec() : Codec(I4L_RAW_IP_NAME){}; ~I4LRawIpCodec() {}; @@ -105,7 +105,8 @@ static const CodecApi i4l_raw_ip_api = { { PT_CODEC, - I4L_RAW_IP, + I4L_RAW_IP_NAME, + I4L_RAW_IP_HELP, CDAPI_PLUGIN_V0, 0, nullptr, // mod_ctor diff --git a/src/codecs/template.cc b/src/codecs/template.cc index 6bd96f61d..8e04fac58 100644 --- a/src/codecs/template.cc +++ b/src/codecs/template.cc @@ -31,17 +31,15 @@ #include "framework/module.h" #include "log/text_log.h" -namespace -{ - // yes, macros are necessary. The API and class constructor require different strings. // // this macros is defined in the module to ensure identical names. However, // if you don't want a module, define the name here. #define CODEC_NAME "name" +#define CODEC_NAME "one line help for this codec" - - +namespace +{ // inherit from DecodeModule rather than Module so the GID for // all codecs are identical. Additionally, all of the SIDS are @@ -256,6 +254,7 @@ static const CodecApi name_api = { PT_CODEC, CODEC_NAME, + CODEC_HELP, CDAPI_PLUGIN_V0, 0, mod_ctor, // module constructor ( see function for details ) diff --git a/src/framework/base_api.h b/src/framework/base_api.h index d184695cb..d811c7355 100644 --- a/src/framework/base_api.h +++ b/src/framework/base_api.h @@ -52,6 +52,7 @@ struct BaseApi { PlugType type; const char* name; + const char* help; unsigned api_version; unsigned version; ModNewFunc mod_ctor; diff --git a/src/ips_options/ips_ack.cc b/src/ips_options/ips_ack.cc index 171dabf43..33d285802 100644 --- a/src/ips_options/ips_ack.cc +++ b/src/ips_options/ips_ack.cc @@ -44,6 +44,9 @@ static const char* s_name = "ack"; +static const char* s_help = + "rule option to match on TCP ack numbers"; + static THREAD_LOCAL ProfileStats tcpAckPerfStats; class TcpAckOption : public IpsOption @@ -118,9 +121,6 @@ static const Parameter s_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* s_help = - "rule option to match on TCP ack numbers"; - class AckModule : public Module { public: @@ -179,6 +179,7 @@ static const IpsApi ack_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_asn1.cc b/src/ips_options/ips_asn1.cc index e35224f25..42bf6b802 100644 --- a/src/ips_options/ips_asn1.cc +++ b/src/ips_options/ips_asn1.cc @@ -94,6 +94,9 @@ static THREAD_LOCAL ProfileStats asn1PerfStats; static const char* s_name = "asn1"; +static const char* s_help = + "rule option for asn1 detection"; + class Asn1Option : public IpsOption { public: @@ -214,9 +217,6 @@ static const Parameter s_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* s_help = - "rule option for asn1 detection"; - class Asn1Module : public Module { public: @@ -299,6 +299,7 @@ static const IpsApi asn1_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_base64.cc b/src/ips_options/ips_base64.cc index 8fc3aee18..0f0752561 100644 --- a/src/ips_options/ips_base64.cc +++ b/src/ips_options/ips_base64.cc @@ -57,6 +57,9 @@ static THREAD_LOCAL ProfileStats base64PerfStats; static const char* s_name = "base64_decode"; +static const char* s_help = + "rule option to decode base64 data - must be used with base64_data option"; + //------------------------------------------------------------------------- // base64_decode //------------------------------------------------------------------------- @@ -199,9 +202,6 @@ static const Parameter s_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* s_help = - "rule option to decode base64 data - must be used with base64_data option"; - class B64DecodeModule : public Module { public: @@ -269,6 +269,7 @@ static const IpsApi base64_decode_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, @@ -290,6 +291,7 @@ static const IpsApi base64_decode_api = //------------------------------------------------------------------------- static const char* s_data_name = "base64_data"; +static const char* s_data_help = "set detection cursor to decoded Base64 data"; class Base64DataOption : public IpsOption { @@ -348,6 +350,7 @@ static const IpsApi base64_data_api = { PT_IPS_OPTION, s_data_name, + s_data_help, IPSAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/ips_options/ips_bufferlen.cc b/src/ips_options/ips_bufferlen.cc index 026452dbe..895a5e80d 100644 --- a/src/ips_options/ips_bufferlen.cc +++ b/src/ips_options/ips_bufferlen.cc @@ -41,6 +41,9 @@ static const char* s_name = "bufferlen"; +static const char* s_help = + "rule option to check length of current buffer"; + static THREAD_LOCAL ProfileStats lenCheckPerfStats; class LenOption : public IpsOption @@ -112,9 +115,6 @@ static const Parameter s_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* s_help = - "rule option to check length of current buffer"; - class LenModule : public Module { public: @@ -173,6 +173,7 @@ static const IpsApi len_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_byte_extract.cc b/src/ips_options/ips_byte_extract.cc index cdd6ab3b2..4dc5f98f7 100644 --- a/src/ips_options/ips_byte_extract.cc +++ b/src/ips_options/ips_byte_extract.cc @@ -43,6 +43,9 @@ static THREAD_LOCAL ProfileStats byteExtractPerfStats; static const char* s_name = "byte_extract"; +static const char* s_help = + "rule option to convert data to an integer variable"; + #define MAX_BYTES_TO_GRAB 4 typedef struct _ByteExtractData @@ -424,9 +427,6 @@ static const Parameter s_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* s_help = - "rule option to convert data to an integer variable"; - class ExtractModule : public Module { public: @@ -554,6 +554,7 @@ static const IpsApi byte_extract_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_byte_jump.cc b/src/ips_options/ips_byte_jump.cc index 8b4c9d8aa..968bd9cc5 100644 --- a/src/ips_options/ips_byte_jump.cc +++ b/src/ips_options/ips_byte_jump.cc @@ -490,6 +490,7 @@ static const IpsApi byte_jump_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_byte_test.cc b/src/ips_options/ips_byte_test.cc index 6b226f4ea..081fe6813 100644 --- a/src/ips_options/ips_byte_test.cc +++ b/src/ips_options/ips_byte_test.cc @@ -631,6 +631,7 @@ static const IpsApi byte_test_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_classtype.cc b/src/ips_options/ips_classtype.cc index 0f3a02fb3..c90866059 100644 --- a/src/ips_options/ips_classtype.cc +++ b/src/ips_options/ips_classtype.cc @@ -97,6 +97,7 @@ static const IpsApi classtype_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_content.cc b/src/ips_options/ips_content.cc index af316b7d5..406d5bb03 100644 --- a/src/ips_options/ips_content.cc +++ b/src/ips_options/ips_content.cc @@ -846,6 +846,7 @@ static const IpsApi content_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_cvs.cc b/src/ips_options/ips_cvs.cc index 72dfc6222..176fb2cdb 100644 --- a/src/ips_options/ips_cvs.cc +++ b/src/ips_options/ips_cvs.cc @@ -499,6 +499,7 @@ static const IpsApi cvs_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_detection_filter.cc b/src/ips_options/ips_detection_filter.cc index 97a8739d3..9a3b3779f 100644 --- a/src/ips_options/ips_detection_filter.cc +++ b/src/ips_options/ips_detection_filter.cc @@ -126,6 +126,7 @@ static const IpsApi detection_filter_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_dsize.cc b/src/ips_options/ips_dsize.cc index 2f2759334..a1d18993a 100644 --- a/src/ips_options/ips_dsize.cc +++ b/src/ips_options/ips_dsize.cc @@ -191,6 +191,7 @@ static const IpsApi dsize_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_file_data.cc b/src/ips_options/ips_file_data.cc index df70d960f..86252d31f 100644 --- a/src/ips_options/ips_file_data.cc +++ b/src/ips_options/ips_file_data.cc @@ -127,6 +127,7 @@ static const IpsApi file_data_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_flags.cc b/src/ips_options/ips_flags.cc index 9ab82acaf..271a6950a 100644 --- a/src/ips_options/ips_flags.cc +++ b/src/ips_options/ips_flags.cc @@ -476,6 +476,7 @@ static const IpsApi flags_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_flow.cc b/src/ips_options/ips_flow.cc index 28f20c9c2..9282eb7f5 100644 --- a/src/ips_options/ips_flow.cc +++ b/src/ips_options/ips_flow.cc @@ -483,6 +483,7 @@ static const IpsApi flow_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_flowbits.cc b/src/ips_options/ips_flowbits.cc index 0be05fd1c..5a8c0971c 100644 --- a/src/ips_options/ips_flowbits.cc +++ b/src/ips_options/ips_flowbits.cc @@ -1234,6 +1234,7 @@ static const IpsApi flowbits_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_fragbits.cc b/src/ips_options/ips_fragbits.cc index 97f0ea95b..3dc205f42 100644 --- a/src/ips_options/ips_fragbits.cc +++ b/src/ips_options/ips_fragbits.cc @@ -377,6 +377,7 @@ static const IpsApi fragbits_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_fragoffset.cc b/src/ips_options/ips_fragoffset.cc index 053946c6c..f94482c35 100644 --- a/src/ips_options/ips_fragoffset.cc +++ b/src/ips_options/ips_fragoffset.cc @@ -181,6 +181,7 @@ static const IpsApi fragoffset_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_gid.cc b/src/ips_options/ips_gid.cc index c995fd5f5..9e3347965 100644 --- a/src/ips_options/ips_gid.cc +++ b/src/ips_options/ips_gid.cc @@ -93,6 +93,7 @@ static const IpsApi gid_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_http.cc b/src/ips_options/ips_http.cc index e9576d2df..4de79efb3 100644 --- a/src/ips_options/ips_http.cc +++ b/src/ips_options/ips_http.cc @@ -134,6 +134,7 @@ static const IpsApi uri_api = { PT_IPS_OPTION, IPS_OPT, + uri_help, IPSAPI_PLUGIN_V0, 0, uri_mod_ctor, @@ -177,6 +178,7 @@ static const IpsApi client_body_api = { PT_IPS_OPTION, IPS_OPT, + cb_help, IPSAPI_PLUGIN_V0, 0, client_body_mod_ctor, @@ -220,6 +222,7 @@ static const IpsApi method_api = { PT_IPS_OPTION, IPS_OPT, + meth_help, IPSAPI_PLUGIN_V0, 0, method_mod_ctor, @@ -263,6 +266,7 @@ static const IpsApi cookie_api = { PT_IPS_OPTION, IPS_OPT, + cookie_help, IPSAPI_PLUGIN_V0, 0, cookie_mod_ctor, @@ -306,6 +310,7 @@ static const IpsApi stat_code_api = { PT_IPS_OPTION, IPS_OPT, + stat_code_help, IPSAPI_PLUGIN_V0, 0, stat_code_mod_ctor, @@ -349,6 +354,7 @@ static const IpsApi stat_msg_api = { PT_IPS_OPTION, IPS_OPT, + stat_msg_help, IPSAPI_PLUGIN_V0, 0, stat_msg_mod_ctor, @@ -392,6 +398,7 @@ static const IpsApi raw_uri_api = { PT_IPS_OPTION, IPS_OPT, + raw_uri_help, IPSAPI_PLUGIN_V0, 0, raw_uri_mod_ctor, @@ -435,6 +442,7 @@ static const IpsApi raw_header_api = { PT_IPS_OPTION, IPS_OPT, + raw_header_help, IPSAPI_PLUGIN_V0, 0, raw_header_mod_ctor, @@ -478,6 +486,7 @@ static const IpsApi raw_cookie_api = { PT_IPS_OPTION, IPS_OPT, + raw_cookie_help, IPSAPI_PLUGIN_V0, 0, raw_cookie_mod_ctor, diff --git a/src/ips_options/ips_http_header.cc b/src/ips_options/ips_http_header.cc index 11d201b21..f25400f31 100644 --- a/src/ips_options/ips_http_header.cc +++ b/src/ips_options/ips_http_header.cc @@ -211,6 +211,7 @@ static const IpsApi header_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_icmp_id.cc b/src/ips_options/ips_icmp_id.cc index 8b28aaa89..90a7750be 100644 --- a/src/ips_options/ips_icmp_id.cc +++ b/src/ips_options/ips_icmp_id.cc @@ -203,6 +203,7 @@ static const IpsApi icmp_id_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_icmp_seq.cc b/src/ips_options/ips_icmp_seq.cc index 7538d4645..69972a2e9 100644 --- a/src/ips_options/ips_icmp_seq.cc +++ b/src/ips_options/ips_icmp_seq.cc @@ -205,6 +205,7 @@ static const IpsApi icmp_seq_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_icode.cc b/src/ips_options/ips_icode.cc index 0679ea5c0..db5efeba0 100644 --- a/src/ips_options/ips_icode.cc +++ b/src/ips_options/ips_icode.cc @@ -177,6 +177,7 @@ static const IpsApi icode_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_id.cc b/src/ips_options/ips_id.cc index 4f36755ad..b3e851139 100644 --- a/src/ips_options/ips_id.cc +++ b/src/ips_options/ips_id.cc @@ -177,6 +177,7 @@ static const IpsApi id_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_ip_proto.cc b/src/ips_options/ips_ip_proto.cc index f6180a427..2b3e5cd87 100644 --- a/src/ips_options/ips_ip_proto.cc +++ b/src/ips_options/ips_ip_proto.cc @@ -356,6 +356,7 @@ static const IpsApi ip_proto_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_ipopts.cc b/src/ips_options/ips_ipopts.cc index 39ccaf555..c02616fbc 100644 --- a/src/ips_options/ips_ipopts.cc +++ b/src/ips_options/ips_ipopts.cc @@ -283,6 +283,7 @@ static const IpsApi ipopts_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_isdataat.cc b/src/ips_options/ips_isdataat.cc index 20e7959b0..e0728e2a7 100644 --- a/src/ips_options/ips_isdataat.cc +++ b/src/ips_options/ips_isdataat.cc @@ -321,6 +321,7 @@ static const IpsApi isdataat_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_itype.cc b/src/ips_options/ips_itype.cc index 589c8f8ed..1d5b72343 100644 --- a/src/ips_options/ips_itype.cc +++ b/src/ips_options/ips_itype.cc @@ -174,6 +174,7 @@ static const IpsApi itype_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_luajit.cc b/src/ips_options/ips_luajit.cc index e29111ba6..9150e290d 100644 --- a/src/ips_options/ips_luajit.cc +++ b/src/ips_options/ips_luajit.cc @@ -251,6 +251,7 @@ const IpsApi ips_lua_api = { PT_IPS_OPTION, "tbd", + "Lua JIT script for IPS rule option", IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_metadata.cc b/src/ips_options/ips_metadata.cc index 711113d03..9840f6e03 100644 --- a/src/ips_options/ips_metadata.cc +++ b/src/ips_options/ips_metadata.cc @@ -115,6 +115,7 @@ static const IpsApi metadata_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_msg.cc b/src/ips_options/ips_msg.cc index ae10eddec..11f78772a 100644 --- a/src/ips_options/ips_msg.cc +++ b/src/ips_options/ips_msg.cc @@ -95,6 +95,7 @@ static const IpsApi msg_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_pcre.cc b/src/ips_options/ips_pcre.cc index 2ba4b31cd..a1b3e09ca 100644 --- a/src/ips_options/ips_pcre.cc +++ b/src/ips_options/ips_pcre.cc @@ -750,6 +750,7 @@ static const IpsApi pcre_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_pkt_data.cc b/src/ips_options/ips_pkt_data.cc index 171675e9a..6b9ac8623 100644 --- a/src/ips_options/ips_pkt_data.cc +++ b/src/ips_options/ips_pkt_data.cc @@ -104,6 +104,7 @@ static const IpsApi pkt_data_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_priority.cc b/src/ips_options/ips_priority.cc index 3e4271281..36eb06fc3 100644 --- a/src/ips_options/ips_priority.cc +++ b/src/ips_options/ips_priority.cc @@ -93,6 +93,7 @@ static const IpsApi priority_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_raw_data.cc b/src/ips_options/ips_raw_data.cc index 19334fe0d..9317f4e71 100644 --- a/src/ips_options/ips_raw_data.cc +++ b/src/ips_options/ips_raw_data.cc @@ -104,6 +104,7 @@ static const IpsApi raw_data_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_reference.cc b/src/ips_options/ips_reference.cc index 8838e2b49..03a22d6ee 100644 --- a/src/ips_options/ips_reference.cc +++ b/src/ips_options/ips_reference.cc @@ -115,6 +115,7 @@ static const IpsApi reference_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_rem.cc b/src/ips_options/ips_rem.cc index 04aec68d8..a163179ba 100644 --- a/src/ips_options/ips_rem.cc +++ b/src/ips_options/ips_rem.cc @@ -88,6 +88,7 @@ static const IpsApi rem_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_replace.cc b/src/ips_options/ips_replace.cc index 259ae958e..3b1ca1ab7 100644 --- a/src/ips_options/ips_replace.cc +++ b/src/ips_options/ips_replace.cc @@ -276,6 +276,7 @@ static const IpsApi replace_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_rev.cc b/src/ips_options/ips_rev.cc index 4f93b8bb8..aa5fdaa19 100644 --- a/src/ips_options/ips_rev.cc +++ b/src/ips_options/ips_rev.cc @@ -91,6 +91,7 @@ static const IpsApi rev_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_rpc.cc b/src/ips_options/ips_rpc.cc index e53c77db2..3fca5924e 100644 --- a/src/ips_options/ips_rpc.cc +++ b/src/ips_options/ips_rpc.cc @@ -337,6 +337,7 @@ static const IpsApi rpc_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_seq.cc b/src/ips_options/ips_seq.cc index 0bec802e1..2c502d13c 100644 --- a/src/ips_options/ips_seq.cc +++ b/src/ips_options/ips_seq.cc @@ -171,6 +171,7 @@ static const IpsApi seq_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_session.cc b/src/ips_options/ips_session.cc index 96dc1ca5b..533fb0d09 100644 --- a/src/ips_options/ips_session.cc +++ b/src/ips_options/ips_session.cc @@ -390,6 +390,7 @@ static const IpsApi session_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_sid.cc b/src/ips_options/ips_sid.cc index 1d3530c9c..4eb5fffcc 100644 --- a/src/ips_options/ips_sid.cc +++ b/src/ips_options/ips_sid.cc @@ -91,6 +91,7 @@ static const IpsApi sid_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_so.cc b/src/ips_options/ips_so.cc index 0de77e203..11b1a978d 100644 --- a/src/ips_options/ips_so.cc +++ b/src/ips_options/ips_so.cc @@ -191,6 +191,7 @@ static const IpsApi so_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_soid.cc b/src/ips_options/ips_soid.cc index 5fd45e297..e84141b0f 100644 --- a/src/ips_options/ips_soid.cc +++ b/src/ips_options/ips_soid.cc @@ -96,6 +96,7 @@ static const IpsApi soid_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_tag.cc b/src/ips_options/ips_tag.cc index 33234a1f7..7ad5b8993 100644 --- a/src/ips_options/ips_tag.cc +++ b/src/ips_options/ips_tag.cc @@ -165,6 +165,7 @@ static const IpsApi tag_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_tos.cc b/src/ips_options/ips_tos.cc index 8d67bd7b8..a9b51cfac 100644 --- a/src/ips_options/ips_tos.cc +++ b/src/ips_options/ips_tos.cc @@ -174,6 +174,7 @@ static const IpsApi tos_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_ttl.cc b/src/ips_options/ips_ttl.cc index ab90a2cdb..a20d0fe62 100644 --- a/src/ips_options/ips_ttl.cc +++ b/src/ips_options/ips_ttl.cc @@ -173,6 +173,7 @@ static const IpsApi ttl_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/ips_options/ips_window.cc b/src/ips_options/ips_window.cc index 75f98434d..6d366346f 100644 --- a/src/ips_options/ips_window.cc +++ b/src/ips_options/ips_window.cc @@ -171,6 +171,7 @@ static const IpsApi window_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/loggers/alert_csv.cc b/src/loggers/alert_csv.cc index 3817aa76b..f7f77b96a 100644 --- a/src/loggers/alert_csv.cc +++ b/src/loggers/alert_csv.cc @@ -422,6 +422,7 @@ static LogApi csv_api { PT_LOGGER, s_name, + s_help, LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/loggers/alert_fast.cc b/src/loggers/alert_fast.cc index 0bef23892..7837ad5d3 100644 --- a/src/loggers/alert_fast.cc +++ b/src/loggers/alert_fast.cc @@ -281,6 +281,7 @@ static LogApi fast_api { PT_LOGGER, s_name, + s_help, LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/loggers/alert_full.cc b/src/loggers/alert_full.cc index e4f425b8f..74fc40c23 100644 --- a/src/loggers/alert_full.cc +++ b/src/loggers/alert_full.cc @@ -272,6 +272,7 @@ static LogApi full_api { PT_LOGGER, s_name, + s_help, LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/loggers/alert_luajit.cc b/src/loggers/alert_luajit.cc index 1cb91ff0f..59661b746 100644 --- a/src/loggers/alert_luajit.cc +++ b/src/loggers/alert_luajit.cc @@ -224,6 +224,7 @@ static const LogApi log_lua_api = { PT_LOGGER, "luajit", + "Lua JIT script for logging events", LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/loggers/alert_sf_socket.cc b/src/loggers/alert_sf_socket.cc index 1b5814c6d..f12c1f592 100644 --- a/src/loggers/alert_sf_socket.cc +++ b/src/loggers/alert_sf_socket.cc @@ -404,6 +404,7 @@ static LogApi sf_sock_api { PT_LOGGER, s_name, + s_help, LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/loggers/alert_syslog.cc b/src/loggers/alert_syslog.cc index 5e2f29782..470e6e2ad 100644 --- a/src/loggers/alert_syslog.cc +++ b/src/loggers/alert_syslog.cc @@ -350,6 +350,7 @@ static LogApi syslog_api { PT_LOGGER, s_name, + s_help, LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/loggers/alert_test.cc b/src/loggers/alert_test.cc index f962fb78c..389d0e35c 100644 --- a/src/loggers/alert_test.cc +++ b/src/loggers/alert_test.cc @@ -228,6 +228,7 @@ static LogApi test_api { PT_LOGGER, s_name, + s_help, LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/loggers/alert_unixsock.cc b/src/loggers/alert_unixsock.cc index 32b62d0ea..1a2a7deff 100644 --- a/src/loggers/alert_unixsock.cc +++ b/src/loggers/alert_unixsock.cc @@ -291,6 +291,7 @@ static LogApi unix_sock_api { PT_LOGGER, s_name, + s_help, LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/loggers/log_codecs.cc b/src/loggers/log_codecs.cc index 6c9717c9b..194b7fbed 100644 --- a/src/loggers/log_codecs.cc +++ b/src/loggers/log_codecs.cc @@ -190,6 +190,7 @@ static const LogApi log_codecs_api = { PT_LOGGER, LOG_CODECS_NAME, + LOG_CODECS_HELP, LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/loggers/log_null.cc b/src/loggers/log_null.cc index b67248947..aa88e5dd8 100644 --- a/src/loggers/log_null.cc +++ b/src/loggers/log_null.cc @@ -34,6 +34,9 @@ #include "framework/module.h" #include "snort.h" +static const char* s_name = "log_null"; +static const char* s_help = "support for null encapsulation"; + //------------------------------------------------------------------------- // log_null module //------------------------------------------------------------------------- @@ -53,7 +56,8 @@ static LogApi null_api { { PT_LOGGER, - "log_null", + s_name, + s_help, LOGAPI_PLUGIN_V0, 0, nullptr, // mod_ctor, diff --git a/src/loggers/log_tcpdump.cc b/src/loggers/log_tcpdump.cc index 952b430f4..47d381959 100644 --- a/src/loggers/log_tcpdump.cc +++ b/src/loggers/log_tcpdump.cc @@ -378,6 +378,7 @@ static LogApi tcpdump_api { PT_LOGGER, s_name, + s_help, LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/loggers/unified2.cc b/src/loggers/unified2.cc index 9f0905e07..4bb4f40a6 100644 --- a/src/loggers/unified2.cc +++ b/src/loggers/unified2.cc @@ -1251,6 +1251,7 @@ static LogApi u2_api { PT_LOGGER, s_name, + s_help, LOGAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/network_inspectors/arp_spoof/arp_module.cc b/src/network_inspectors/arp_spoof/arp_module.cc index 90d4fc63e..f5c4bc6ab 100644 --- a/src/network_inspectors/arp_spoof/arp_module.cc +++ b/src/network_inspectors/arp_spoof/arp_module.cc @@ -21,11 +21,6 @@ #include "arp_module.h" -static const char* s_name = MOD_NAME; - -static const char* s_help = - "detect ARP attacks and anomalies"; - #define ARPSPOOF_UNICAST_ARP_REQUEST_STR \ "(arp_spoof) Unicast ARP request" #define ARPSPOOF_ETHERFRAME_ARP_MISMATCH_SRC_STR \ @@ -82,7 +77,7 @@ static const RuleMap s_rules[] = //------------------------------------------------------------------------- ArpSpoofModule::ArpSpoofModule() : - Module(s_name, s_help, s_params) + Module(MOD_NAME, MOD_HELP, s_params) { config = new ArpSpoofConfig; config->check_overwrite = false; diff --git a/src/network_inspectors/arp_spoof/arp_module.h b/src/network_inspectors/arp_spoof/arp_module.h index 1a0c8bb2e..f060ce88c 100644 --- a/src/network_inspectors/arp_spoof/arp_module.h +++ b/src/network_inspectors/arp_spoof/arp_module.h @@ -28,6 +28,7 @@ #include "main/thread.h" #define MOD_NAME "arp_spoof" +#define MOD_HELP "detect ARP attacks and anomalies" #define GID_ARP_SPOOF 112 diff --git a/src/network_inspectors/arp_spoof/arp_spoof.cc b/src/network_inspectors/arp_spoof/arp_spoof.cc index ef38581d8..2ffb256b4 100644 --- a/src/network_inspectors/arp_spoof/arp_spoof.cc +++ b/src/network_inspectors/arp_spoof/arp_spoof.cc @@ -298,6 +298,7 @@ static const InspectApi as_api = { PT_INSPECTOR, MOD_NAME, + MOD_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/network_inspectors/binder/bind_module.cc b/src/network_inspectors/binder/bind_module.cc index 39ace5809..4e77e2da4 100644 --- a/src/network_inspectors/binder/bind_module.cc +++ b/src/network_inspectors/binder/bind_module.cc @@ -41,11 +41,6 @@ static const char* bind_pegs[] = nullptr }; -static const char* s_name = "binder"; - -static const char* s_help = - "configure processing based on CIDRs, ports, services, etc."; - //------------------------------------------------------------------------- // binder module //------------------------------------------------------------------------- @@ -110,7 +105,7 @@ static const Parameter s_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -BinderModule::BinderModule() : Module(s_name, s_help, s_params) +BinderModule::BinderModule() : Module(BIND_NAME, BIND_HELP, s_params) { work = nullptr; } BinderModule::~BinderModule() @@ -179,7 +174,7 @@ bool BinderModule::set(const char* fqn, Value& v, SnortConfig*) bool BinderModule::begin(const char* fqn, int idx, SnortConfig*) { - if ( idx && !strcmp(fqn, s_name) ) + if ( idx && !strcmp(fqn, BIND_NAME) ) work = new Binding; return true; @@ -187,7 +182,7 @@ bool BinderModule::begin(const char* fqn, int idx, SnortConfig*) bool BinderModule::end(const char* fqn, int idx, SnortConfig*) { - if ( idx && !strcmp(fqn, s_name) ) + if ( idx && !strcmp(fqn, BIND_NAME) ) { bindings.push_back(work); work = nullptr; diff --git a/src/network_inspectors/binder/bind_module.h b/src/network_inspectors/binder/bind_module.h index 82999a7ae..a745f8f4c 100644 --- a/src/network_inspectors/binder/bind_module.h +++ b/src/network_inspectors/binder/bind_module.h @@ -27,6 +27,9 @@ #include "framework/module.h" #include "main/thread.h" +#define BIND_NAME "binder" +#define BIND_HELP "configure processing based on CIDRs, ports, services, etc." + struct BindStats { PegCount packets; diff --git a/src/network_inspectors/binder/binder.cc b/src/network_inspectors/binder/binder.cc index a38ac98db..3c5849bb6 100644 --- a/src/network_inspectors/binder/binder.cc +++ b/src/network_inspectors/binder/binder.cc @@ -36,8 +36,6 @@ using namespace std; #include "utils/stats.h" #include "log/messages.h" -static const char* mod_name = "binder"; - THREAD_LOCAL ProfileStats bindPerfStats; //------------------------------------------------------------------------- @@ -294,7 +292,8 @@ static const InspectApi bind_api = { { PT_INSPECTOR, - mod_name, + BIND_NAME, + BIND_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/network_inspectors/normalize/norm_module.cc b/src/network_inspectors/normalize/norm_module.cc index 8ccbbd782..754336c2d 100644 --- a/src/network_inspectors/normalize/norm_module.cc +++ b/src/network_inspectors/normalize/norm_module.cc @@ -157,13 +157,8 @@ static const Parameter s_params[] = // normalize parameters //------------------------------------------------------------------------- -static const char* s_name = "normalize"; - -static const char* s_help = - "packet scrubbing for inline mode"; - NormalizeModule::NormalizeModule() : - Module(s_name, s_help, s_params) + Module(NORM_NAME, NORM_HELP, s_params) { memset(&config, 0, sizeof(config)); } @@ -259,7 +254,7 @@ bool NormalizeModule::set(const char* fqn, Value& v, SnortConfig* sc) bool NormalizeModule::begin(const char* fqn, int, SnortConfig*) { - if ( !strcmp(fqn, s_name) ) + if ( !strcmp(fqn, NORM_NAME) ) { NetworkPolicy* policy = get_network_policy(); diff --git a/src/network_inspectors/normalize/norm_module.h b/src/network_inspectors/normalize/norm_module.h index 2d3d766eb..60d967ca1 100644 --- a/src/network_inspectors/normalize/norm_module.h +++ b/src/network_inspectors/normalize/norm_module.h @@ -29,6 +29,9 @@ #include "framework/module.h" #include "norm.h" +#define NORM_NAME "normalizer" +#define NORM_HELP "packet scrubbing for inline mode" + extern THREAD_LOCAL ProfileStats norm_perf_stats; class NormalizeModule : public Module diff --git a/src/network_inspectors/normalize/normalize.cc b/src/network_inspectors/normalize/normalize.cc index d156b7b90..62fbcad19 100644 --- a/src/network_inspectors/normalize/normalize.cc +++ b/src/network_inspectors/normalize/normalize.cc @@ -32,8 +32,6 @@ #define PROTO_BITS (PROTO_BIT__IP|PROTO_BIT__ICMP|PROTO_BIT__TCP) -static const char* name = "normalize"; - THREAD_LOCAL ProfileStats norm_perf_stats; //------------------------------------------------------------------------- @@ -246,7 +244,8 @@ static const InspectApi no_api = { { PT_INSPECTOR, - name, + NORM_NAME, + NORM_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/network_inspectors/perf_monitor/perf_module.cc b/src/network_inspectors/perf_monitor/perf_module.cc index d240a93ac..c738d2b71 100644 --- a/src/network_inspectors/perf_monitor/perf_module.cc +++ b/src/network_inspectors/perf_monitor/perf_module.cc @@ -77,13 +77,8 @@ static const Parameter s_params[] = // perf attributes //------------------------------------------------------------------------- -static const char* s_name = "perf_monitor"; - -static const char* s_help = - "performance monitoring and flow statistics collection"; - PerfMonModule::PerfMonModule() : - Module(s_name, s_help, s_params) + Module(PERF_NAME, PERF_HELP, s_params) { } ProfileStats* PerfMonModule::get_profile() const diff --git a/src/network_inspectors/perf_monitor/perf_module.h b/src/network_inspectors/perf_monitor/perf_module.h index 4fd2e9644..03e862c67 100644 --- a/src/network_inspectors/perf_monitor/perf_module.h +++ b/src/network_inspectors/perf_monitor/perf_module.h @@ -25,6 +25,9 @@ #include "perf.h" #include "framework/module.h" +#define PERF_NAME "perf_monitor" +#define PERF_HELP "performance monitoring and flow statistics collection" + extern THREAD_LOCAL SimpleStats pmstats; extern THREAD_LOCAL ProfileStats perfmonStats; diff --git a/src/network_inspectors/perf_monitor/perf_monitor.cc b/src/network_inspectors/perf_monitor/perf_monitor.cc index 788ba8137..ae83ecc88 100644 --- a/src/network_inspectors/perf_monitor/perf_monitor.cc +++ b/src/network_inspectors/perf_monitor/perf_monitor.cc @@ -56,8 +56,6 @@ THREAD_LOCAL SFPERF* perfmon_config = nullptr; -static const char* mod_name = "perf_monitor"; - THREAD_LOCAL SimpleStats pmstats; THREAD_LOCAL ProfileStats perfmonStats; @@ -379,7 +377,8 @@ static const InspectApi pm_api = { { PT_INSPECTOR, - mod_name, + PERF_NAME, + PERF_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/network_inspectors/port_scan/port_scan.cc b/src/network_inspectors/port_scan/port_scan.cc index 4f52ee2c4..2df1b9f21 100644 --- a/src/network_inspectors/port_scan/port_scan.cc +++ b/src/network_inspectors/port_scan/port_scan.cc @@ -867,7 +867,7 @@ bool PortScan::configure(SnortConfig* sc) // FIXIT-L use fixed base file name config->logfile = SnortStrdup("portscan.log"); - global = (PsData*)DataManager::acquire(PS_GLOBAL, sc); + global = (PsData*)DataManager::acquire(PSG_NAME, sc); config->common = global->data; return true; } @@ -960,7 +960,8 @@ static const DataApi sd_api = { { PT_DATA, - PS_GLOBAL, + PSG_NAME, + PSG_HELP, PDAPI_PLUGIN_V0, 0, gmod_ctor, @@ -994,7 +995,8 @@ static const InspectApi sp_api = { { PT_INSPECTOR, - PS_MODULE, + PS_NAME, + PS_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/network_inspectors/port_scan/ps_module.cc b/src/network_inspectors/port_scan/ps_module.cc index 782490bd6..9f0071608 100644 --- a/src/network_inspectors/port_scan/ps_module.cc +++ b/src/network_inspectors/port_scan/ps_module.cc @@ -102,13 +102,8 @@ static const RuleMap port_scan_rules[] = // port_scan module //------------------------------------------------------------------------- -static const char* ps_name = "port_scan"; - -static const char* ps_help = - "port scan detection"; - PortScanModule::PortScanModule() : - Module(ps_name, ps_help, ps_params) + Module(PS_NAME, PS_HELP, ps_params) { config = nullptr; } @@ -203,10 +198,6 @@ PortscanConfig* PortScanModule::get_data() // port_scan module //------------------------------------------------------------------------- -static const char* psg_name = "port_scan_global"; -static const char* psg_help = - "shared settings for port_scan inspectors"; - static const Parameter psg_params[] = { { "memcap", Parameter::PT_INT, "1:", "1048576", @@ -216,7 +207,7 @@ static const Parameter psg_params[] = }; PortScanGlobalModule::PortScanGlobalModule() : - Module(psg_name, psg_help, psg_params) + Module(PSG_NAME, PSG_HELP, psg_params) { common = nullptr; } diff --git a/src/network_inspectors/port_scan/ps_module.h b/src/network_inspectors/port_scan/ps_module.h index 91cc00c7b..90e3412aa 100644 --- a/src/network_inspectors/port_scan/ps_module.h +++ b/src/network_inspectors/port_scan/ps_module.h @@ -28,8 +28,11 @@ #include "ps_detect.h" #include "main/thread.h" -#define PS_MODULE "port_scan" -#define PS_GLOBAL "port_scan_global" +#define PS_NAME "port_scan" +#define PS_HELP "port scan detection" + +#define PSG_NAME "port_scan_global" +#define PSG_HELP "shared settings for port_scan inspectors" extern THREAD_LOCAL SimpleStats spstats; extern THREAD_LOCAL ProfileStats psPerfStats; diff --git a/src/search_engines/ac_banded.cc b/src/search_engines/ac_banded.cc index 0774f2902..8816bc673 100644 --- a/src/search_engines/ac_banded.cc +++ b/src/search_engines/ac_banded.cc @@ -126,6 +126,7 @@ static const MpseApi acb_api = { PT_SEARCH_ENGINE, "ac_banded", + "Aho-Corasick Banded (high memory, moderate performance)", SEAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/search_engines/ac_bnfa.cc b/src/search_engines/ac_bnfa.cc index d0e064ae9..d26008a3a 100644 --- a/src/search_engines/ac_bnfa.cc +++ b/src/search_engines/ac_bnfa.cc @@ -143,6 +143,7 @@ static const MpseApi bnfa_api = { PT_SEARCH_ENGINE, "ac_bnfa", + "Aho-Corasick Binary NFA (low memory, high performance) MPSE", SEAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/search_engines/ac_bnfa_q.cc b/src/search_engines/ac_bnfa_q.cc index 2f9bbb72b..f2eb08767 100644 --- a/src/search_engines/ac_bnfa_q.cc +++ b/src/search_engines/ac_bnfa_q.cc @@ -144,6 +144,7 @@ static const MpseApi bnfaq_api = { PT_SEARCH_ENGINE, "ac_bnfa_q", + "Aho-Corasick Binary NFA (low memory, high performance) with queued events", SEAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/search_engines/ac_full.cc b/src/search_engines/ac_full.cc index f939583f6..4cc64d47d 100644 --- a/src/search_engines/ac_full.cc +++ b/src/search_engines/ac_full.cc @@ -132,6 +132,7 @@ static const MpseApi acf_api = { PT_SEARCH_ENGINE, "ac_full", + "Aho-Corasick Full (high memory, best performance)", SEAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/search_engines/ac_full_q.cc b/src/search_engines/ac_full_q.cc index eb905f463..cd17264e9 100644 --- a/src/search_engines/ac_full_q.cc +++ b/src/search_engines/ac_full_q.cc @@ -132,6 +132,7 @@ static const MpseApi acfq_api = { PT_SEARCH_ENGINE, "ac_full_q", + "Aho-Corasick Full (high memory, best performance) with queued events", SEAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/search_engines/ac_sparse.cc b/src/search_engines/ac_sparse.cc index 0e7fc2a0c..1fdf42643 100644 --- a/src/search_engines/ac_sparse.cc +++ b/src/search_engines/ac_sparse.cc @@ -124,6 +124,7 @@ static const MpseApi acs_api = { PT_SEARCH_ENGINE, "ac_sparse", + "Aho-Corasick Sparse (high memory, moderate performance) MPSE", SEAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/search_engines/ac_sparse_bands.cc b/src/search_engines/ac_sparse_bands.cc index b6b82d6b6..c8d8536a5 100644 --- a/src/search_engines/ac_sparse_bands.cc +++ b/src/search_engines/ac_sparse_bands.cc @@ -127,6 +127,7 @@ static const MpseApi acsb_api = { PT_SEARCH_ENGINE, "ac_sparse_bands", + "Aho-Corasick Sparse-Banded (high memory, moderate performance) MPSE", SEAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/search_engines/ac_std.cc b/src/search_engines/ac_std.cc index b33f4688b..a4f601de3 100644 --- a/src/search_engines/ac_std.cc +++ b/src/search_engines/ac_std.cc @@ -132,6 +132,7 @@ static const MpseApi ac_api = { PT_SEARCH_ENGINE, "ac_std", + "Aho-Corasick Full (high memory, best performance) MPSE", SEAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/search_engines/intel_cpm.cc b/src/search_engines/intel_cpm.cc index 887e0dd7c..10fd0fe08 100644 --- a/src/search_engines/intel_cpm.cc +++ b/src/search_engines/intel_cpm.cc @@ -150,6 +150,7 @@ static const MpseApi cpm_api = { PT_SEARCH_ENGINE, "intel_cpm", + "Intel CPM library", SEAPI_PLUGIN_V0, 0, nullptr, diff --git a/src/service_inspectors/back_orifice/back_orifice.cc b/src/service_inspectors/back_orifice/back_orifice.cc index c12755864..76144e9b5 100644 --- a/src/service_inspectors/back_orifice/back_orifice.cc +++ b/src/service_inspectors/back_orifice/back_orifice.cc @@ -146,6 +146,9 @@ static const char* s_name = "back_orifice"; +static const char* s_help = + "back orifice detection"; + /* global keyvalue for the BoRand() function */ static THREAD_LOCAL long holdrand = 1L; @@ -186,9 +189,6 @@ static const RuleMap bo_rules[] = { 0, nullptr } }; -static const char* s_help = - "back orifice detection"; - class BoModule : public Module { public: @@ -600,6 +600,7 @@ static const InspectApi bo_api = { PT_INSPECTOR, s_name, + s_help, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/service_inspectors/ftp_telnet/ftp.cc b/src/service_inspectors/ftp_telnet/ftp.cc index 2a8a5e0c2..bc37fe4f8 100644 --- a/src/service_inspectors/ftp_telnet/ftp.cc +++ b/src/service_inspectors/ftp_telnet/ftp.cc @@ -58,6 +58,9 @@ int16_t ftp_data_app_id = SFTARGET_UNKNOWN_PROTOCOL; static const char* client_key = "ftp_client"; static const char* server_key = "ftp_server"; +static const char* client_help = "FTP inspector client module"; +static const char* server_help = "FTP inspector server module"; + THREAD_LOCAL ProfileStats ftpPerfStats; THREAD_LOCAL SimpleStats ftstats; @@ -463,6 +466,7 @@ static const DataApi fc_api = { PT_DATA, client_key, + client_help, MODAPI_PLUGIN_V0, 0, fc_mod_ctor, @@ -505,6 +509,7 @@ static const InspectApi fs_api = { PT_INSPECTOR, server_key, + server_help, INSAPI_PLUGIN_V0, 0, fs_mod_ctor, diff --git a/src/service_inspectors/ftp_telnet/ftp_data.cc b/src/service_inspectors/ftp_telnet/ftp_data.cc index 8fc3b905b..d19eb5450 100644 --- a/src/service_inspectors/ftp_telnet/ftp_data.cc +++ b/src/service_inspectors/ftp_telnet/ftp_data.cc @@ -282,6 +282,7 @@ const InspectApi fd_api = { PT_INSPECTOR, s_name, + s_help, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/service_inspectors/ftp_telnet/telnet.cc b/src/service_inspectors/ftp_telnet/telnet.cc index 2cd6635cf..cab3b7e46 100644 --- a/src/service_inspectors/ftp_telnet/telnet.cc +++ b/src/service_inspectors/ftp_telnet/telnet.cc @@ -46,8 +46,6 @@ #include "framework/inspector.h" #include "utils/sfsnprintfappend.h" -static const char* tn_name = "telnet"; - THREAD_LOCAL ProfileStats telnetPerfStats; THREAD_LOCAL SimpleStats tnstats; @@ -301,7 +299,8 @@ const InspectApi tn_api = { { PT_INSPECTOR, - tn_name, + TEL_NAME, + TEL_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/service_inspectors/ftp_telnet/telnet_module.cc b/src/service_inspectors/ftp_telnet/telnet_module.cc index acc72a256..2d0f6ef6f 100644 --- a/src/service_inspectors/ftp_telnet/telnet_module.cc +++ b/src/service_inspectors/ftp_telnet/telnet_module.cc @@ -25,11 +25,6 @@ using namespace std; -static const char* s_name = "telnet"; - -static const char* s_help = - "telnet inspector"; - //------------------------------------------------------------------------- // telnet module //------------------------------------------------------------------------- @@ -68,7 +63,7 @@ static const RuleMap telnet_rules[] = }; TelnetModule::TelnetModule() : - Module(s_name, s_help, s_params) + Module(TEL_NAME, TEL_HELP, s_params) { conf = nullptr; } diff --git a/src/service_inspectors/ftp_telnet/telnet_module.h b/src/service_inspectors/ftp_telnet/telnet_module.h index 239788d03..c4f98571e 100644 --- a/src/service_inspectors/ftp_telnet/telnet_module.h +++ b/src/service_inspectors/ftp_telnet/telnet_module.h @@ -32,6 +32,9 @@ #define TELNET_ENCRYPTED 2 #define TELNET_SB_NO_SE 3 +#define TEL_NAME "telnet" +#define TEL_HELP "telnet inspection and normalization" + struct SnortConfig; extern THREAD_LOCAL SimpleStats tnstats; diff --git a/src/service_inspectors/http_inspect/hi_module.h b/src/service_inspectors/http_inspect/hi_module.h index 82216e0f4..14be87301 100644 --- a/src/service_inspectors/http_inspect/hi_module.h +++ b/src/service_inspectors/http_inspect/hi_module.h @@ -29,6 +29,9 @@ #define GLOBAL_KEYWORD "http_inspect" #define SERVER_KEYWORD "http_server" +#define GLOBAL_HELP "shared HTTP inspector settings" +#define SERVER_HELP "main HTTP inspector module" + extern THREAD_LOCAL ProfileStats hiPerfStats; class HttpInspectModule : public Module diff --git a/src/service_inspectors/http_inspect/http_inspect.cc b/src/service_inspectors/http_inspect/http_inspect.cc index 20bfbb1e4..4381be08f 100644 --- a/src/service_inspectors/http_inspect/http_inspect.cc +++ b/src/service_inspectors/http_inspect/http_inspect.cc @@ -389,6 +389,7 @@ static const DataApi hg_api = { PT_DATA, GLOBAL_KEYWORD, + GLOBAL_HELP, MODAPI_PLUGIN_V0, 0, hg_mod_ctor, @@ -453,6 +454,7 @@ static const InspectApi hs_api = { PT_INSPECTOR, SERVER_KEYWORD, + SERVER_HELP, INSAPI_PLUGIN_V0, 0, hs_mod_ctor, diff --git a/src/service_inspectors/nhttp_inspect/nhttp_api.cc b/src/service_inspectors/nhttp_inspect/nhttp_api.cc index 751056e9e..6b957ec5a 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_api.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_api.cc @@ -38,6 +38,7 @@ #include "nhttp_api.h" const char* NHttpApi::nhttp_my_name = "nhttp_inspect"; +const char* NHttpApi::nhttp_help = "the new HTTP inspector!"; void NHttpApi::nhttp_init() { @@ -70,6 +71,7 @@ const InspectApi NHttpApi::nhttp_api = { PT_INSPECTOR, NHttpApi::nhttp_my_name, + NHttpApi::nhttp_help, INSAPI_PLUGIN_V0, 0, NHttpApi::nhttp_mod_ctor, diff --git a/src/service_inspectors/nhttp_inspect/nhttp_api.h b/src/service_inspectors/nhttp_inspect/nhttp_api.h index a7212cba0..f4b144de1 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_api.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_api.h @@ -43,6 +43,7 @@ private: static Module* nhttp_mod_ctor() { return new NHttpModule; }; static void nhttp_mod_dtor(Module* m) { delete m; }; static const char* nhttp_my_name; + static const char* nhttp_help; static void nhttp_init(); static void nhttp_term() {}; static Inspector* nhttp_ctor(Module* mod); diff --git a/src/service_inspectors/rpc_decode/rpc_decode.cc b/src/service_inspectors/rpc_decode/rpc_decode.cc index d3d538ca1..10c1c7b24 100644 --- a/src/service_inspectors/rpc_decode/rpc_decode.cc +++ b/src/service_inspectors/rpc_decode/rpc_decode.cc @@ -123,6 +123,7 @@ static THREAD_LOCAL const uint32_t rpc_memcap = 1048510; static THREAD_LOCAL uint32_t rpc_memory = 0; static const char* mod_name = "rpc_decode"; +static const char* mod_help = "RPC inspector"; THREAD_LOCAL ProfileStats rpcdecodePerfStats; THREAD_LOCAL SimpleStats rdstats; @@ -1103,6 +1104,7 @@ static const InspectApi rd_api = { PT_INSPECTOR, mod_name, + mod_help, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/service_inspectors/wizard/wiz_module.cc b/src/service_inspectors/wizard/wiz_module.cc index a068c99af..767fe27f8 100644 --- a/src/service_inspectors/wizard/wiz_module.cc +++ b/src/service_inspectors/wizard/wiz_module.cc @@ -30,10 +30,6 @@ using namespace std; #include "wizard.h" #include "magic.h" -static const char* s_name = "wizard"; -static const char* s_help = - "inspector that implements port-independent protocol identification"; - //------------------------------------------------------------------------- // wizard module //------------------------------------------------------------------------- @@ -105,7 +101,7 @@ static const Parameter s_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -WizardModule::WizardModule() : Module(s_name, s_help, s_params) +WizardModule::WizardModule() : Module(WIZ_NAME, WIZ_HELP, s_params) { c2s_hexes = nullptr; s2c_hexes = nullptr; diff --git a/src/service_inspectors/wizard/wiz_module.h b/src/service_inspectors/wizard/wiz_module.h index ffbe9ffa9..b90fa992d 100644 --- a/src/service_inspectors/wizard/wiz_module.h +++ b/src/service_inspectors/wizard/wiz_module.h @@ -27,6 +27,9 @@ #include "framework/module.h" #include "main/thread.h" +#define WIZ_NAME "wizard" +#define WIZ_HELP "inspector that implements port-independent protocol identification" + extern const char* wiz_pegs[]; extern THREAD_LOCAL struct WizStats tstats; extern THREAD_LOCAL ProfileStats wizPerfStats; diff --git a/src/service_inspectors/wizard/wizard.cc b/src/service_inspectors/wizard/wizard.cc index a72815672..62c2add26 100644 --- a/src/service_inspectors/wizard/wizard.cc +++ b/src/service_inspectors/wizard/wizard.cc @@ -36,8 +36,6 @@ using namespace std; #include "utils/stats.h" #include "log/messages.h" -static const char* mod_name = "wizard"; - THREAD_LOCAL ProfileStats wizPerfStats; struct WizStats @@ -241,7 +239,8 @@ static const InspectApi wiz_api = { { PT_INSPECTOR, - mod_name, + WIZ_NAME, + WIZ_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/stream/base/stream_base.cc b/src/stream/base/stream_base.cc index f432dc48e..0052a6396 100644 --- a/src/stream/base/stream_base.cc +++ b/src/stream/base/stream_base.cc @@ -273,6 +273,7 @@ static const InspectApi base_api = { PT_INSPECTOR, MOD_NAME, + MOD_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/stream/base/stream_module.cc b/src/stream/base/stream_module.cc index 0e9dd0fdb..5dde8e794 100644 --- a/src/stream/base/stream_module.cc +++ b/src/stream/base/stream_module.cc @@ -76,11 +76,8 @@ static const Parameter s_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* s_help = - "base stream inspector for flow tracking"; - StreamModule::StreamModule() : - Module(MOD_NAME, s_help, s_params) + Module(MOD_NAME, MOD_HELP, s_params) { proto = &stream_cfg.ip_cfg; } diff --git a/src/stream/base/stream_module.h b/src/stream/base/stream_module.h index bb60be431..51814d471 100644 --- a/src/stream/base/stream_module.h +++ b/src/stream/base/stream_module.h @@ -34,6 +34,7 @@ struct SnortConfig; //------------------------------------------------------------------------- #define MOD_NAME "stream" +#define MOD_HELP "common flow tracking" struct StreamConfig { diff --git a/src/stream/icmp/icmp_module.cc b/src/stream/icmp/icmp_module.cc index e772eec41..94745c892 100644 --- a/src/stream/icmp/icmp_module.cc +++ b/src/stream/icmp/icmp_module.cc @@ -39,11 +39,8 @@ static const Parameter s_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* s_help = - "stream inspector for ICMP flow tracking"; - StreamIcmpModule::StreamIcmpModule() : - Module(MOD_NAME, s_help, s_params) + Module(MOD_NAME, MOD_HELP, s_params) { config = nullptr; } diff --git a/src/stream/icmp/icmp_module.h b/src/stream/icmp/icmp_module.h index afc894e02..5960f5e74 100644 --- a/src/stream/icmp/icmp_module.h +++ b/src/stream/icmp/icmp_module.h @@ -37,6 +37,7 @@ struct SnortConfig; //------------------------------------------------------------------------- #define MOD_NAME "stream_icmp" +#define MOD_HELP "stream inspector for ICMP flow tracking" struct StreamIcmpConfig; diff --git a/src/stream/icmp/stream_icmp.cc b/src/stream/icmp/stream_icmp.cc index 1fa9ff990..a3f22fbd9 100644 --- a/src/stream/icmp/stream_icmp.cc +++ b/src/stream/icmp/stream_icmp.cc @@ -115,6 +115,7 @@ static const InspectApi icmp_api = { PT_INSPECTOR, MOD_NAME, + MOD_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/stream/ip/ip_module.cc b/src/stream/ip/ip_module.cc index 8c6a1f154..3ad54b43c 100644 --- a/src/stream/ip/ip_module.cc +++ b/src/stream/ip/ip_module.cc @@ -120,11 +120,8 @@ static const Parameter s_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* s_help = - "stream inspector for IP flow tracking"; - StreamIpModule::StreamIpModule() : - Module(MOD_NAME, s_help, s_params) + Module(MOD_NAME, MOD_HELP, s_params) { config = nullptr; } diff --git a/src/stream/ip/ip_module.h b/src/stream/ip/ip_module.h index 4bb4edcfc..bf1aeeb0b 100644 --- a/src/stream/ip/ip_module.h +++ b/src/stream/ip/ip_module.h @@ -66,6 +66,7 @@ extern THREAD_LOCAL ProfileStats fragRebuildPerfStats; //------------------------------------------------------------------------- #define MOD_NAME "stream_ip" +#define MOD_HELP "stream inspector for IP flow tracking and defragmentation" struct StreamIpConfig; diff --git a/src/stream/ip/stream_ip.cc b/src/stream/ip/stream_ip.cc index b35daa207..4be0ca33c 100644 --- a/src/stream/ip/stream_ip.cc +++ b/src/stream/ip/stream_ip.cc @@ -162,6 +162,7 @@ static const InspectApi ip_api = { PT_INSPECTOR, MOD_NAME, + MOD_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/stream/tcp/ips_stream_reassemble.cc b/src/stream/tcp/ips_stream_reassemble.cc index 81d339cd5..4db36a551 100644 --- a/src/stream/tcp/ips_stream_reassemble.cc +++ b/src/stream/tcp/ips_stream_reassemble.cc @@ -245,6 +245,7 @@ static const IpsApi reassemble_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, reassemble_mod_ctor, diff --git a/src/stream/tcp/ips_stream_size.cc b/src/stream/tcp/ips_stream_size.cc index c2a2eb9c2..ce52cf662 100644 --- a/src/stream/tcp/ips_stream_size.cc +++ b/src/stream/tcp/ips_stream_size.cc @@ -300,6 +300,7 @@ static const IpsApi size_api = { PT_IPS_OPTION, s_name, + s_help, IPSAPI_PLUGIN_V0, 0, size_mod_ctor, diff --git a/src/stream/tcp/stream_tcp.cc b/src/stream/tcp/stream_tcp.cc index 2499cfb4b..44e8f2912 100644 --- a/src/stream/tcp/stream_tcp.cc +++ b/src/stream/tcp/stream_tcp.cc @@ -139,6 +139,7 @@ static const InspectApi tcp_api = { PT_INSPECTOR, MOD_NAME, + MOD_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/stream/tcp/tcp_module.cc b/src/stream/tcp/tcp_module.cc index 05a6b4659..504451c39 100644 --- a/src/stream/tcp/tcp_module.cc +++ b/src/stream/tcp/tcp_module.cc @@ -172,11 +172,8 @@ static const RuleMap stream_tcp_rules[] = { 0, nullptr } }; -static const char* s_help = - "stream inspector for TCP flow tracking and stream normalization and reassembly"; - StreamTcpModule::StreamTcpModule() : - Module(MOD_NAME, s_help, s_params) + Module(MOD_NAME, MOD_HELP, s_params) { config = nullptr; } diff --git a/src/stream/tcp/tcp_module.h b/src/stream/tcp/tcp_module.h index 769fb12fe..38a18f1ec 100644 --- a/src/stream/tcp/tcp_module.h +++ b/src/stream/tcp/tcp_module.h @@ -71,6 +71,7 @@ extern THREAD_LOCAL ProfileStats streamSizePerfStats; //------------------------------------------------------------------------- #define MOD_NAME "stream_tcp" +#define MOD_HELP "stream inspector for TCP flow tracking and stream normalization and reassembly" struct SnortConfig; struct StreamTcpConfig; diff --git a/src/stream/udp/stream_udp.cc b/src/stream/udp/stream_udp.cc index 3ed751649..2075a0fd9 100644 --- a/src/stream/udp/stream_udp.cc +++ b/src/stream/udp/stream_udp.cc @@ -130,6 +130,7 @@ static const InspectApi udp_api = { PT_INSPECTOR, MOD_NAME, + MOD_HELP, INSAPI_PLUGIN_V0, 0, mod_ctor, diff --git a/src/stream/udp/udp_module.cc b/src/stream/udp/udp_module.cc index e09adcc59..ef24e165f 100644 --- a/src/stream/udp/udp_module.cc +++ b/src/stream/udp/udp_module.cc @@ -42,11 +42,8 @@ static const Parameter s_params[] = { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } }; -static const char* s_help = - "stream inspector for UDP flow tracking"; - StreamUdpModule::StreamUdpModule() : - Module(MOD_NAME, s_help, s_params) + Module(MOD_NAME, MOD_HELP, s_params) { config = nullptr; } diff --git a/src/stream/udp/udp_module.h b/src/stream/udp/udp_module.h index 03a56810c..3285df1e6 100644 --- a/src/stream/udp/udp_module.h +++ b/src/stream/udp/udp_module.h @@ -40,6 +40,7 @@ extern THREAD_LOCAL ProfileStats udp_perf_stats; //------------------------------------------------------------------------- #define MOD_NAME "stream_udp" +#define MOD_HELP "stream inspector for UDP flow tracking" struct StreamUdpConfig;