|
@@ -19,6 +19,7 @@
|
|
|
#include <dhcpsrv/cfgmgr.h>
|
|
|
#include <log/logger_support.h>
|
|
|
#include <log/logger_manager.h>
|
|
|
+#include <cfgrpt/config_report.h>
|
|
|
|
|
|
#include <boost/lexical_cast.hpp>
|
|
|
|
|
@@ -48,13 +49,14 @@ usage() {
|
|
|
cerr << "Kea DHCPv4 server, version " << VERSION << endl;
|
|
|
cerr << endl;
|
|
|
cerr << "Usage: " << DHCP4_NAME
|
|
|
- << " [-v] [-V] [-d] [-p number] [-c file]" << endl;
|
|
|
+ << " -[v|V|W] [-d] [-p number] [-c file]" << endl;
|
|
|
cerr << " -c file: specify configuration file" << endl;
|
|
|
cerr << " -d: debug mode with extra verbosity (former -v)" << endl;
|
|
|
cerr << " -p number: specify non-standard port number 1-65535 "
|
|
|
<< "(useful for testing only)" << endl;
|
|
|
cerr << " -v: print version number and exit" << endl;
|
|
|
cerr << " -V: print extended version and exit" << endl;
|
|
|
+ cerr << " -W: display the configuration report and exit" << endl;
|
|
|
exit(EXIT_FAILURE);
|
|
|
}
|
|
|
} // end of anonymous namespace
|
|
@@ -69,7 +71,7 @@ main(int argc, char* argv[]) {
|
|
|
// The standard config file
|
|
|
std::string config_file("");
|
|
|
|
|
|
- while ((ch = getopt(argc, argv, "dvVp:c:")) != -1) {
|
|
|
+ while ((ch = getopt(argc, argv, "dvVWp:c:")) != -1) {
|
|
|
switch (ch) {
|
|
|
case 'd':
|
|
|
verbose_mode = true;
|
|
@@ -83,6 +85,10 @@ main(int argc, char* argv[]) {
|
|
|
cout << Daemon::getVersion(true) << endl;
|
|
|
return (EXIT_SUCCESS);
|
|
|
|
|
|
+ case 'W':
|
|
|
+ cout << isc::detail::getConfigReport() << endl;
|
|
|
+ return (EXIT_SUCCESS);
|
|
|
+
|
|
|
case 'p':
|
|
|
try {
|
|
|
port_number = boost::lexical_cast<int>(optarg);
|