BIND 10 trac2954, updated. 0dcc4f4feab96a9a76d33137adeadc488884b0ec [2954] Additional review comment cleanup.
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu May 16 11:57:14 UTC 2013
The branch, trac2954 has been updated
via 0dcc4f4feab96a9a76d33137adeadc488884b0ec (commit)
from b3dda76df66adecf3af2ba419a23b4169bfe9541 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0dcc4f4feab96a9a76d33137adeadc488884b0ec
Author: Thomas Markwalder <tmark at isc.org>
Date: Thu May 16 07:56:32 2013 -0400
[2954] Additional review comment cleanup.
-----------------------------------------------------------------------
Summary of changes:
doc/Doxyfile | 1 +
src/bin/d2/Makefile.am | 1 +
src/bin/d2/b10-d2.xml | 20 ++++++++++++++++++--
src/bin/d2/d2_log.cc | 2 +-
src/bin/d2/d2_log.h | 2 +-
src/bin/d2/d2_messages.mes | 4 ++--
src/bin/d2/main.cc | 20 ++++++++++----------
src/bin/d2/tests/Makefile.am | 6 ------
8 files changed, 34 insertions(+), 22 deletions(-)
-----------------------------------------------------------------------
diff --git a/doc/Doxyfile b/doc/Doxyfile
index 5c071c1..bcb9285 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -689,6 +689,7 @@ INPUT = ../src/lib/exceptions \
../src/lib/dhcp \
../src/lib/dhcpsrv \
../src/bin/dhcp4 \
+ ../src/bin/d2 \
../tests/tools/perfdhcp \
devel
diff --git a/src/bin/d2/Makefile.am b/src/bin/d2/Makefile.am
index 57d7c24..445b21e 100644
--- a/src/bin/d2/Makefile.am
+++ b/src/bin/d2/Makefile.am
@@ -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
diff --git a/src/bin/d2/b10-d2.xml b/src/bin/d2/b10-d2.xml
index 3cb48cd..2202685 100644
--- a/src/bin/d2/b10-d2.xml
+++ b/src/bin/d2/b10-d2.xml
@@ -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>
diff --git a/src/bin/d2/d2_log.cc b/src/bin/d2/d2_log.cc
index b5224c0..37289e1 100644
--- a/src/bin/d2/d2_log.cc
+++ b/src/bin/d2/d2_log.cc
@@ -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-dhcp4.
+/// Defines the logger used by the top-level component of b10-d2.
#include <d2/d2_log.h>
diff --git a/src/bin/d2/d2_log.h b/src/bin/d2/d2_log.h
index cbb3a44..2ddfe5c 100644
--- a/src/bin/d2/d2_log.h
+++ b/src/bin/d2/d2_log.h
@@ -22,7 +22,7 @@
namespace isc {
namespace d2 {
-/// Define the logger for the "dhcp4" module part of b10-dhcp4. We could define
+/// Define the logger for the "d2" module part of b10-d2. 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.
diff --git a/src/bin/d2/d2_messages.mes b/src/bin/d2/d2_messages.mes
index 2557da2..08afb9c 100644
--- a/src/bin/d2/d2_messages.mes
+++ b/src/bin/d2/d2_messages.mes
@@ -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.
diff --git a/src/bin/d2/main.cc b/src/bin/d2/main.cc
index 23f9b18..7ef300b 100644
--- a/src/bin/d2/main.cc
+++ b/src/bin/d2/main.cc
@@ -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);
diff --git a/src/bin/d2/tests/Makefile.am b/src/bin/d2/tests/Makefile.am
index e5afbea..72e6254 100644
--- a/src/bin/d2/tests/Makefile.am
+++ b/src/bin/d2/tests/Makefile.am
@@ -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)
More information about the bind10-changes
mailing list