Skip to content
GitLab
Menu
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
56fe1731
Commit
56fe1731
authored
Feb 14, 2017
by
Tomek Mrugalski
🛰
Browse files
Merge branch 'trac3770_rebase' of
ssh://git.kea.isc.org/git/kea
into trac3770_rebase
parents
52503607
bbf4883c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/main.cc
View file @
56fe1731
// Copyright (C) 2011-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -42,13 +42,13 @@ usage() {
cerr
<<
"Kea DHCPv4 server, version "
<<
VERSION
<<
endl
;
cerr
<<
endl
;
cerr
<<
"Usage: "
<<
DHCP4_NAME
<<
" -[v|V|W] [-d] [-
t] [-c
cfgfile] [-p number]"
<<
endl
;
<<
" -[v|V|W] [-d] [-
{c|t}
cfgfile] [-p number]"
<<
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
;
cerr
<<
" -d: debug mode with extra verbosity (former -v)"
<<
endl
;
cerr
<<
" -t: check the configuration file syntax and exit"
<<
endl
;
cerr
<<
" -c file: specify configuration file"
<<
endl
;
cerr
<<
" -t file: check the configuration file syntax and exit"
<<
endl
;
cerr
<<
" -p number: specify non-standard port number 1-65535 "
<<
"(useful for testing only)"
<<
endl
;
exit
(
EXIT_FAILURE
);
...
...
@@ -66,16 +66,12 @@ main(int argc, char* argv[]) {
// The standard config file
std
::
string
config_file
(
""
);
while
((
ch
=
getopt
(
argc
,
argv
,
"d
t
vVWc:p:"
))
!=
-
1
)
{
while
((
ch
=
getopt
(
argc
,
argv
,
"dvVWc:p:
t:
"
))
!=
-
1
)
{
switch
(
ch
)
{
case
'd'
:
verbose_mode
=
true
;
break
;
case
't'
:
check_mode
=
true
;
break
;
case
'v'
:
cout
<<
Dhcpv4Srv
::
getVersion
(
false
)
<<
endl
;
return
(
EXIT_SUCCESS
);
...
...
@@ -88,6 +84,10 @@ main(int argc, char* argv[]) {
cout
<<
isc
::
detail
::
getConfigReport
()
<<
endl
;
return
(
EXIT_SUCCESS
);
case
't'
:
check_mode
=
true
;
// falls through
case
'c'
:
// config file
config_file
=
optarg
;
break
;
...
...
src/bin/dhcp6/main.cc
View file @
56fe1731
// Copyright (C) 2011-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -46,13 +46,13 @@ usage() {
cerr
<<
"Kea DHCPv6 server, version "
<<
VERSION
<<
endl
;
cerr
<<
endl
;
cerr
<<
"Usage: "
<<
DHCP6_NAME
<<
" -[v|V|W] [-d] [-
t] [-c
cfgfile] [-p port_number]"
<<
endl
;
<<
" -[v|V|W] [-d] [-
{c|t}
cfgfile] [-p port_number]"
<<
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
;
cerr
<<
" -d: debug mode with extra verbosity (former -v)"
<<
endl
;
cerr
<<
" -t: check the configuration file syntax and exit"
<<
endl
;
cerr
<<
" -c file: specify configuration file"
<<
endl
;
cerr
<<
" -t file: check the configuration file syntax and exit"
<<
endl
;
cerr
<<
" -p number: specify non-standard port number 1-65535 "
<<
"(useful for testing only)"
<<
endl
;
exit
(
EXIT_FAILURE
);
...
...
@@ -70,16 +70,12 @@ main(int argc, char* argv[]) {
// The standard config file
std
::
string
config_file
(
""
);
while
((
ch
=
getopt
(
argc
,
argv
,
"d
t
vVWc:p:"
))
!=
-
1
)
{
while
((
ch
=
getopt
(
argc
,
argv
,
"dvVWc:p:
t:
"
))
!=
-
1
)
{
switch
(
ch
)
{
case
'd'
:
verbose_mode
=
true
;
break
;
case
't'
:
check_mode
=
true
;
break
;
case
'v'
:
cout
<<
Dhcpv6Srv
::
getVersion
(
false
)
<<
endl
;
return
(
EXIT_SUCCESS
);
...
...
@@ -92,6 +88,10 @@ main(int argc, char* argv[]) {
cout
<<
isc
::
detail
::
getConfigReport
()
<<
endl
;
return
(
EXIT_SUCCESS
);
case
't'
:
check_mode
=
true
;
// falls through
case
'c'
:
// config file
config_file
=
optarg
;
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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