Move command-line arg parsing functions to Options.{h,cc}

This commit is contained in:
Jon Siwek 2020-01-27 11:24:37 -08:00
parent 5fb01caee6
commit 53363a9bd3
3 changed files with 431 additions and 403 deletions

View file

@ -74,4 +74,24 @@ struct Options {
std::vector<std::string> script_options_to_set;
};
/**
* Parse Zeek command-line arguments.
* @param argc argument count (same semantics as arguments to main())
* @param argv argument strings (same semantics as arguments to main())
* @return the parsed command-line options
*/
zeek::Options parse_cmdline(int argc, char** argv);
/**
* Print command-line Zeek usage information and exit.
* @param prog the name/path of the Zeek command-line invocation
* @code the exit code to use
*/
void usage(const char* prog, int code = 1);
/**
* @return true if zeek is running a "fake" DNS resolver, else false.
*/
bool fake_dns();
} // namespace zeek