From: Russ Combs (rucombs) Date: Mon, 15 Mar 2021 19:09:14 +0000 (+0000) Subject: Merge pull request #2785 in SNORT/snort3 from ~RUCOMBS/snort3:dash_h to master X-Git-Tag: 3.1.3.0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d73c365d3b6082cb3221fe2e7d02dca8cc3f58d1;p=thirdparty%2Fsnort3.git Merge pull request #2785 in SNORT/snort3 from ~RUCOMBS/snort3:dash_h to master Squashed commit of the following: commit b929e28aecf5a4b9eb7ab8ccf5266971a53cc7ec Author: russ Date: Tue Mar 9 11:23:06 2021 -0500 snort: Add -h to output the help overview (same as --help) --- diff --git a/src/main/snort_module.cc b/src/main/snort_module.cc index 0e2cf0d2a..a85821d4c 100644 --- a/src/main/snort_module.cc +++ b/src/main/snort_module.cc @@ -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, "... 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, "[] 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());