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
ISC Open Source Projects
Kea
Commits
0dcc4f4f
Commit
0dcc4f4f
authored
May 16, 2013
by
Thomas Markwalder
Browse files
[2954] Additional review comment cleanup.
parent
b3dda76d
Changes
8
Hide whitespace changes
Inline
Side-by-side
doc/Doxyfile
View file @
0dcc4f4f
...
...
@@ -689,6 +689,7 @@ INPUT = ../src/lib/exceptions \
../src/lib/dhcp \
../src/lib/dhcpsrv \
../src/bin/dhcp4 \
../src/bin/d2 \
../tests/tools/perfdhcp \
devel
...
...
src/bin/d2/Makefile.am
View file @
0dcc4f4f
...
...
@@ -53,6 +53,7 @@ nodist_b10_d2_SOURCES = d2_messages.h d2_messages.cc
EXTRA_DIST
+=
d2_messages.mes
b10_d2_LDADD
=
$(top_builddir)
/src/lib/log/libb10-log.la
b10_d2_LDADD
+=
$(top_builddir)
/src/lib/exceptions/libb10-exceptions.la
b10_d2dir
=
$(pkgdatadir)
b10_d2_DATA
=
d2.spec
src/bin/d2/b10-d2.xml
View file @
0dcc4f4f
...
...
@@ -48,6 +48,14 @@
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>
b10-d2
</command>
<arg><option>
-s
</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>
DESCRIPTION
</title>
<para>
...
...
@@ -67,8 +75,16 @@
<varlistentry>
<term><option>
-v
</option></term>
<listitem><para>
Enable verbose mode.
<!-- TODO: what does this do? -->
Verbose mode sets the logging level to debug. This is primarily
for development purposes in stand-alone mode.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>
-s
</option></term>
<listitem><para>
Causes the process to run without attempting to connect to the
BIND10 message queue. This is for development purposes.
</para></listitem>
</varlistentry>
...
...
src/bin/d2/d2_log.cc
View file @
0dcc4f4f
...
...
@@ -12,7 +12,7 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
/// Defines the logger used by the top-level component of b10-d
hcp4
.
/// Defines the logger used by the top-level component of b10-d
2
.
#include
<d2/d2_log.h>
...
...
src/bin/d2/d2_log.h
View file @
0dcc4f4f
...
...
@@ -22,7 +22,7 @@
namespace
isc
{
namespace
d2
{
/// Define the logger for the "d
hcp4
" module part of b10-d
hcp4
. We could define
/// Define the logger for the "d
2
" module part of b10-d
2
. We could define
/// a logger in each file, but we would want to define a common name to avoid
/// spelling mistakes, so it is just one small step from there to define a
/// module-common logger.
...
...
src/bin/d2/d2_messages.mes
View file @
0dcc4f4f
...
...
@@ -19,10 +19,10 @@ This is a debug message issued during a D2 process startup.
% D2_START_INFO pid: %1, verbose: %2, standalone: %3
This is a debug message issued during the D2 process startup.
It lists some information about the parameters with which the
It lists some information about the parameters with which the
process is running.
% D2_SHUTDOWN : process is performing a normal shutting down
This is a debug message issued when a D2 process shuts down
This is a debug message issued when a D2 process shuts down
normally in response to command to stop.
src/bin/d2/main.cc
View file @
0dcc4f4f
...
...
@@ -23,13 +23,13 @@ using namespace isc::d2;
using
namespace
std
;
/// This file contains entry point (main() function) for standard DHCP-DDNS
/// process, b10-d2, component for BIND10 framework. It parses command-line
/// arguments and instantiates D2Controller class that is responsible for
/// establishing connection with msgq (receiving commands and configuration)
/// process, b10-d2, component for BIND10 framework. It parses command-line
/// arguments and instantiates D2Controller class that is responsible for
/// establishing connection with msgq (receiving commands and configuration)
/// and also creating D2Server object as well.
///
/// For detailed explanation or relations between main(), D2Controller,
/// D2Server and other classes, see \ref d2Session.
/// D2Server and other classes, see \ref d2Session.
namespace
{
...
...
@@ -38,8 +38,8 @@ const char* const D2_NAME = "b10-d2";
void
usage
()
{
cerr
<<
"Usage: "
<<
D2_NAME
<<
" [-v] [-s]"
<<
endl
;
cerr
<<
" -v: verbose output"
<<
endl
;
cerr
<<
" -s: stand-alone mode (don't connect to BIND10)"
<<
endl
;
cerr
<<
" -v: verbose output (only when in stand-alone mode"
<<
endl
;
exit
(
EXIT_FAILURE
);
}
}
// end of anonymous namespace
...
...
@@ -48,11 +48,10 @@ int
main
(
int
argc
,
char
*
argv
[])
{
int
ch
;
// NOTE these parameters are preliminary only. They are here to
//
@TODO
NOTE these parameters are preliminary only. They are here to
// for symmetry with the DHCP servers. They may or may not
// become part of the eventual implementation.
bool
stand_alone
=
false
;
// Should be connect to BIND10 msgq?
bool
verbose_mode
=
false
;
// Should server be verbose?
...
...
@@ -78,16 +77,17 @@ main(int argc, char* argv[]) {
// Initialize logging. If verbose, we'll use maximum verbosity.
// If standalone is enabled, do not buffer initial log messages
// Verbose logging is only enabled when in stand alone mode.
isc
::
log
::
initLogger
(
D2_NAME
,
(
verbose_mode
?
isc
::
log
::
DEBUG
:
isc
::
log
::
INFO
),
((
verbose_mode
&&
stand_alone
)
?
isc
::
log
::
DEBUG
:
isc
::
log
::
INFO
),
isc
::
log
::
MAX_DEBUG_LEVEL
,
NULL
,
!
stand_alone
);
LOG_INFO
(
d2_logger
,
D2_STARTING
);
LOG_DEBUG
(
d2_logger
,
DBGLVL_START_SHUT
,
D2_START_INFO
)
.
arg
(
getpid
()).
arg
(
verbose_mode
?
"yes"
:
"no"
)
.
arg
(
stand_alone
?
"yes"
:
"no"
);
// For now we will sleep awhile to simulate doing something.
// For now we will sleep awhile to simulate doing something.
// Without at least a sleep, the process will start, exit and be
// restarted by Bind10/Init endlessley in a rapid succession.
sleep
(
1000
);
...
...
src/bin/d2/tests/Makefile.am
View file @
0dcc4f4f
...
...
@@ -58,14 +58,8 @@ nodist_d2_unittests_SOURCES = ../d2_messages.h ../d2_messages.cc
d2_unittests_CPPFLAGS
=
$(AM_CPPFLAGS)
$(GTEST_INCLUDES)
d2_unittests_LDFLAGS
=
$(AM_LDFLAGS)
$(GTEST_LDFLAGS)
d2_unittests_LDADD
=
$(GTEST_LDADD)
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/asiolink/libb10-asiolink.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/cc/libb10-cc.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/config/libb10-cfgclient.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcp/libb10-dhcp++.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libb10-dhcpsrv.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/exceptions/libb10-exceptions.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/log/libb10-log.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/util/libb10-util.la
endif
noinst_PROGRAMS
=
$(TESTS)
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