Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
c6727e5b
Commit
c6727e5b
authored
Jun 20, 2015
by
Francis Dupont
Browse files
[3882a] Extended -V and added -W
parent
7edc41b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/lfc/kea-lfc.xml
View file @
c6727e5b
...
...
@@ -20,7 +20,7 @@
<refentry>
<refentryinfo>
<date>
Feb 1
, 2015
</date>
<date>
June 20
, 2015
</date>
</refentryinfo>
<refmeta>
...
...
@@ -53,6 +53,7 @@
<arg><option>
-f
<replaceable
class=
"parameter"
>
finish-file
</replaceable></option></arg>
<arg><option>
-v
</option></arg>
<arg><option>
-V
</option></arg>
<arg><option>
-W
</option></arg>
<arg><option>
-d
</option></arg>
<arg><option>
-h
</option></arg>
</cmdsynopsis>
...
...
@@ -99,6 +100,13 @@
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>
-W
</option></term>
<listitem><para>
Display the configuration report.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>
-h
</option></term>
<listitem><para>
...
...
src/bin/lfc/lfc_controller.cc
View file @
c6727e5b
...
...
@@ -20,6 +20,7 @@
#include
<exceptions/exceptions.h>
#include
<dhcpsrv/csv_lease_file4.h>
#include
<dhcpsrv/csv_lease_file6.h>
#include
<dhcpsrv/memfile_lease_mgr.h>
#include
<dhcpsrv/memfile_lease_storage.h>
#include
<dhcpsrv/lease_mgr.h>
#include
<dhcpsrv/lease_file_loader.h>
...
...
@@ -157,7 +158,7 @@ LFCController::parseArgs(int argc, char* argv[]) {
opterr
=
0
;
optind
=
1
;
while
((
ch
=
getopt
(
argc
,
argv
,
":46dvVp:x:i:o:c:f:"
))
!=
-
1
)
{
while
((
ch
=
getopt
(
argc
,
argv
,
":46dvV
W
p:x:i:o:c:f:"
))
!=
-
1
)
{
switch
(
ch
)
{
case
'4'
:
// Process DHCPv4 lease files.
...
...
@@ -179,6 +180,11 @@ LFCController::parseArgs(int argc, char* argv[]) {
std
::
cout
<<
getVersion
(
true
)
<<
std
::
endl
;
exit
(
EXIT_SUCCESS
);
case
'W'
:
// Display the configuration report and exit.
std
::
cout
<<
isc
::
detail
::
getConfigReport
()
<<
std
::
endl
;
exit
(
EXIT_SUCCESS
);
case
'd'
:
// Verbose output.
verbose_
=
true
;
...
...
@@ -325,7 +331,8 @@ LFCController::getVersion(const bool extended) const{
version_stream
<<
VERSION
;
if
(
extended
)
{
version_stream
<<
std
::
endl
<<
EXTENDED_VERSION
;
version_stream
<<
std
::
endl
<<
EXTENDED_VERSION
<<
std
::
endl
<<
"database: "
<<
isc
::
dhcp
::
Memfile_LeaseMgr
::
getDBVersion
();
}
return
(
version_stream
.
str
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment