]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2785 in SNORT/snort3 from ~RUCOMBS/snort3:dash_h to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 15 Mar 2021 19:09:14 +0000 (19:09 +0000)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 15 Mar 2021 19:09:14 +0000 (19:09 +0000)
Squashed commit of the following:

commit b929e28aecf5a4b9eb7ab8ccf5266971a53cc7ec
Author: russ <rucombs@cisco.com>
Date:   Tue Mar 9 11:23:06 2021 -0500

    snort: Add -h to output the help overview (same as --help)

src/main/snort_module.cc

index 0e2cf0d2aa3704c238c96a790ed0ff0385acdd7a..a85821d4c9762b619eb16609b60ca3adcbc2ef98 100644 (file)
@@ -227,6 +227,9 @@ static const Parameter s_params[] =
     { "-H", Parameter::PT_IMPLIED, nullptr, nullptr,
       "make hash tables deterministic" },
 
+    { "-h", Parameter::PT_IMPLIED, nullptr, nullptr,
+      "show help overview (same as --help)" },
+
     { "-i", Parameter::PT_STRING, nullptr, nullptr,
       "<iface>... list of interfaces" },
 
@@ -377,7 +380,7 @@ static const Parameter s_params[] =
       "dump configured rules in gen-msg.map format for use by other tools" },
 
     { "--help", Parameter::PT_IMPLIED, nullptr, nullptr,
-      "list command line options" },
+      "show help overview" },
 
     { "--help-commands", Parameter::PT_STRING, "(optional)", nullptr,
       "[<module prefix>] output matching commands" },
@@ -718,6 +721,9 @@ bool SnortModule::set(const char*, Value& v, SnortConfig* sc)
     else if ( v.is("-H") )
         sc->run_flags |= RUN_FLAG__STATIC_HASH;
 
+    else if ( v.is("-h") )
+        help_basic(sc, v.get_string());
+
     else if ( v.is("-i") )
         sc->daq_config->add_input(v.get_string());