summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/admin/Makefile.am2
-rwxr-xr-xsrc/bin/admin/admin-utils.sh46
-rw-r--r--src/bin/admin/kea-admin.xml2
-rw-r--r--src/bin/d2/Makefile.am2
-rw-r--r--src/bin/d2/tests/d2_update_message_unittests.cc9
-rw-r--r--src/bin/d2/tests/dns_client_unittests.cc15
-rw-r--r--src/bin/dhcp4/Makefile.am2
-rw-r--r--src/bin/dhcp4/dhcp4_messages.mes10
-rw-r--r--src/bin/dhcp4/dhcp4_srv.h2
-rw-r--r--src/bin/dhcp4/dhcp4to6_ipc.cc4
-rw-r--r--src/bin/keactrl/Makefile.am2
-rw-r--r--src/bin/lfc/Makefile.am2
-rw-r--r--src/bin/perfdhcp/.gitignore1
-rw-r--r--src/bin/perfdhcp/Makefile.am2
-rw-r--r--src/bin/sockcreator/Makefile.am2
-rw-r--r--src/lib/asiolink/io_address.h2
-rw-r--r--src/lib/cryptolink/tests/run_unittests.cc4
-rw-r--r--src/lib/dhcp/option6_pdexclude.cc1
-rw-r--r--src/lib/dhcp/option_definition.cc3
-rw-r--r--src/lib/dhcp/tests/option_definition_unittest.cc2
-rw-r--r--src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc13
-rw-r--r--src/lib/dhcpsrv/alloc_engine.h5
-rw-r--r--src/lib/dhcpsrv/base_host_data_source.h61
-rw-r--r--src/lib/dhcpsrv/dhcp4o6_ipc.cc2
-rw-r--r--src/lib/dhcpsrv/host_mgr.h5
-rw-r--r--src/lib/dhcpsrv/parsers/dhcp_parsers.cc3
-rw-r--r--src/lib/dhcpsrv/pgsql_connection.h7
-rw-r--r--src/lib/dhcpsrv/subnet.h11
-rw-r--r--src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h14
-rw-r--r--src/lib/eval/eval_context.h2
-rw-r--r--src/lib/process/testutils/d_test_stubs.h2
-rw-r--r--src/lib/stats/stats_mgr.h2
32 files changed, 124 insertions, 118 deletions
diff --git a/src/bin/admin/Makefile.am b/src/bin/admin/Makefile.am
index a71ee1c737..775e4cee2f 100644
--- a/src/bin/admin/Makefile.am
+++ b/src/bin/admin/Makefile.am
@@ -10,7 +10,7 @@ EXTRA_DIST = $(man_MANS) kea-admin.xml admin-utils.sh
if GENERATE_DOCS
kea-admin.8: kea-admin.xml
- @XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/kea-admin.xml
+ @XSLTPROC@ --novalid --xinclude -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/kea-admin.xml
else
diff --git a/src/bin/admin/admin-utils.sh b/src/bin/admin/admin-utils.sh
index eb5fbbe63b..33616d9a90 100755
--- a/src/bin/admin/admin-utils.sh
+++ b/src/bin/admin/admin-utils.sh
@@ -19,11 +19,25 @@ mysql_execute() {
QUERY=$1
shift
if [ $# -gt 1 ]; then
- mysql -N -B $* -e "${QUERY}"
+ mysql -N -B "$@" -e "${QUERY}"
retcode=$?
else
- mysql -N -B --host=$db_host --user=$db_user --password=$db_password -e "${QUERY}" $db_name
- retcode="$?"
+ mysql -N -B --database="${db_name}" --user="${db_user}" --password="${db_password}" -e "${QUERY}"
+ retcode=$?
+ fi
+
+ return $retcode
+}
+
+mysql_execute_script() {
+ file=$1
+ shift
+ if [ $# -ge 1 ]; then
+ mysql -N -B "$@" < "${file}"
+ retcode=$?
+ else
+ mysql -N -B --database="${db_name}" --user="${db_user}" --password="${db_password}" < "${file}"
+ retcode=$?
fi
return $retcode
@@ -48,11 +62,11 @@ pgsql_execute() {
QUERY=$1
shift
if [ $# -gt 0 ]; then
- echo $QUERY | psql --set ON_ERROR_STOP=1 -A -t -h localhost -q $*
+ echo "${QUERY}" | psql --set ON_ERROR_STOP=1 -A -t -h localhost -q "$@"
retcode=$?
else
export PGPASSWORD=$db_password
- echo $QUERY | psql --set ON_ERROR_STOP=1 -A -t -h $db_host -q -U $db_user -d $db_name
+ echo "${QUERY}" | psql --set ON_ERROR_STOP=1 -A -t -h localhost -q -U "${db_user}" -d "${db_name}"
retcode=$?
fi
return $retcode
@@ -72,11 +86,11 @@ pgsql_execute_script() {
file=$1
shift
if [ $# -gt 0 ]; then
- psql --set ON_ERROR_STOP=1 -A -t -h localhost -q -f $file $*
+ psql --set ON_ERROR_STOP=1 -A -t -h localhost -q -f "${file}" "$@"
retcode=$?
else
export PGPASSWORD=$db_password
- psql --set ON_ERROR_STOP=1 -A -t -h $db_host -q -U $db_user -d $db_name -f $file
+ psql --set ON_ERROR_STOP=1 -A -t -h localhost -q -U "${db_user}" -d "${db_name}" -f "${file}"
retcode=$?
fi
return $retcode
@@ -91,15 +105,15 @@ cql_execute() {
query=$1
shift
if [ $# -gt 1 ]; then
- cqlsh $* -e "$query"
+ cqlsh "$@" -e "$query"
retcode=$?
else
- cqlsh -u $db_user -p $db_password -k $db_name -e "$query"
+ cqlsh -u "${db_user}" -p "${db_password}" -k "${db_name}" -e "${query}"
retcode=$?
fi
if [ $retcode -ne 0 ]; then
- printf "cqlsh returned with exit status $retcode\n"
+ printf "cqlsh returned with exit status %s\n" "${retcode}"
exit $retcode
fi
@@ -110,15 +124,15 @@ cql_execute_script() {
file=$1
shift
if [ $# -gt 1 ]; then
- cqlsh $* -e "$file"
+ cqlsh "$@" -e "$file"
retcode=$?
else
- cqlsh -u $db_user -p $db_password -k $db_name -f "$file"
+ cqlsh -u "${db_user}" -p "${db_password}" -k "${db_name}" -f "${file}"
retcode=$?
fi
if [ $retcode -ne 0 ]; then
- printf "cqlsh returned with exit status $retcode\n"
+ printf "cqlsh returned with exit status %s\n" "${retcode}"
exit $retcode
fi
@@ -126,8 +140,8 @@ cql_execute_script() {
}
cql_version() {
- version=`cql_execute "SELECT version, minor FROM schema_version" "$@"`
- version=`echo "$version" | grep -A 1 "+" | grep -v "+" | tr -d ' ' | cut -d "|" -f 1-2 --output-delimiter="."`
- echo $version
+ version=$(cql_execute "SELECT version, minor FROM schema_version" "$@")
+ version=$(echo "$version" | grep -A 1 "+" | grep -v "+" | tr -d ' ' | cut -d "|" -f 1-2 --output-delimiter=".")
+ echo "${version}"
return $?
}
diff --git a/src/bin/admin/kea-admin.xml b/src/bin/admin/kea-admin.xml
index 90957bc8d7..0cafdea94d 100644
--- a/src/bin/admin/kea-admin.xml
+++ b/src/bin/admin/kea-admin.xml
@@ -103,7 +103,6 @@
migrating between old and new Kea versions.</para>
</listitem>
</varlistentry>
- </variablelist>
<varlistentry>
<term>lease-dump</term>
@@ -114,6 +113,7 @@
The first line of file is a header line containing the column names.</para>
</listitem>
</varlistentry>
+ </variablelist>
</listitem>
</varlistentry>
diff --git a/src/bin/d2/Makefile.am b/src/bin/d2/Makefile.am
index e8eeb85314..5d27033607 100644
--- a/src/bin/d2/Makefile.am
+++ b/src/bin/d2/Makefile.am
@@ -36,7 +36,7 @@ EXTRA_DIST += images/trans_classes.svg images/update_exec_classes.svg
if GENERATE_DOCS
kea-dhcp-ddns.8: kea-dhcp-ddns.xml
- @XSLTPROC@ --novalid --xinclude --nonet -o $@ \
+ @XSLTPROC@ --novalid --xinclude -o $@ \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
$(srcdir)/kea-dhcp-ddns.xml
diff --git a/src/bin/d2/tests/d2_update_message_unittests.cc b/src/bin/d2/tests/d2_update_message_unittests.cc
index a17211a931..c43ac94426 100644
--- a/src/bin/d2/tests/d2_update_message_unittests.cc
+++ b/src/bin/d2/tests/d2_update_message_unittests.cc
@@ -25,21 +25,20 @@ using namespace isc::dns::rdata;
using namespace isc::util;
namespace {
-
-// @brief Test fixture class for testing D2UpdateMessage object.
+ /// @brief Test fixture class for testing D2UpdateMessage object.
class D2UpdateMessageTest : public ::testing::Test {
public:
- // @brief Constructor.
+ /// @brief Constructor.
//
// Does nothing.
D2UpdateMessageTest() { }
- // @brief Destructor.
+ /// @brief Destructor.
//
// Does nothing.
~D2UpdateMessageTest() { };
- // @brief Return string representation of the name encoded in wire format.
+ /// @brief Return string representation of the name encoded in wire format.
//
// This function reads the number of bytes specified in the second
// argument from the buffer. It doesn't check if buffer has sufficient
diff --git a/src/bin/d2/tests/dns_client_unittests.cc b/src/bin/d2/tests/dns_client_unittests.cc
index e370428867..91c3e8eff0 100644
--- a/src/bin/d2/tests/dns_client_unittests.cc
+++ b/src/bin/d2/tests/dns_client_unittests.cc
@@ -36,8 +36,7 @@ const char* TEST_ADDRESS = "127.0.0.1";
const uint16_t TEST_PORT = 5301;
const size_t MAX_SIZE = 1024;
const long TEST_TIMEOUT = 5 * 1000;
-
-// @brief Test Fixture class.
+/// @brief Test Fixture class.
//
// This test fixture class implements DNSClient::Callback so as it can be
// installed as a completion callback for tests it implements. This callback
@@ -64,7 +63,7 @@ public:
int received_;
int expected_;
- // @brief Constructor.
+ /// @brief Constructor.
//
// This constructor overrides the default logging level of asiodns logger to
// prevent it from emitting debug messages from IOFetch class. Such an error
@@ -88,14 +87,14 @@ public:
TEST_TIMEOUT);
}
- // @brief Destructor.
+ /// @brief Destructor.
//
// Sets the asiodns logging level back to DEBUG.
virtual ~DNSClientTest() {
asiodns::logger.setSeverity(isc::log::DEBUG);
};
- // @brief Exchange completion callback.
+ /// @brief Exchange completion callback.
//
// This callback is called when the exchange with the DNS server is
// complete or an error occurred. This includes the occurrence of a timeout.
@@ -133,7 +132,7 @@ public:
}
}
- // @brief Handler invoked when test timeout is hit.
+ /// @brief Handler invoked when test timeout is hit.
//
// This callback stops all running (hanging) tasks on IO service.
void testTimeoutHandler() {
@@ -141,7 +140,7 @@ public:
FAIL() << "Test timeout hit.";
}
- // @brief Handler invoked when test request is received.
+ /// @brief Handler invoked when test request is received.
//
// This callback handler is installed when performing async read on a
// socket to emulate reception of the DNS Update request by a server.
@@ -180,7 +179,7 @@ public:
*remote);
}
- // @brief Request handler for testing clients using TSIG
+ /// @brief Request handler for testing clients using TSIG
//
// This callback handler is installed when performing async read on a
// socket to emulate reception of the DNS Update request with TSIG by a
diff --git a/src/bin/dhcp4/Makefile.am b/src/bin/dhcp4/Makefile.am
index c75a39a21d..5ac0c15e9c 100644
--- a/src/bin/dhcp4/Makefile.am
+++ b/src/bin/dhcp4/Makefile.am
@@ -30,7 +30,7 @@ EXTRA_DIST += dhcp4_parser.yy
if GENERATE_DOCS
kea-dhcp4.8: kea-dhcp4.xml
- @XSLTPROC@ --novalid --xinclude --nonet -o $@ \
+ @XSLTPROC@ --novalid --xinclude -o $@ \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
$(srcdir)/kea-dhcp4.xml
diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes
index c1b8b22250..f9ca899647 100644
--- a/src/bin/dhcp4/dhcp4_messages.mes
+++ b/src/bin/dhcp4/dhcp4_messages.mes
@@ -193,6 +193,10 @@ a client's error or a server's purged database.
% DHCP4_DHCP4O6_BAD_PACKET received malformed DHCPv4o6 packet: %1
A malformed DHCPv4o6 packet was received.
+% DHCP4_DHCP4O6_PACKET_RECEIVED received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 on interface %3
+This debug message is printed when the server is receiving a DHCPv4o6
+from the DHCPv4 server over inter-process communication.
+
% DHCP4_DHCP4O6_PACKET_SEND %1: trying to send packet %2 (type %3) to %4 on interface %5 encapsulating %6: %7 (type %8)
The arguments specify the client identification information (HW address
and client identifier), DHCPv6 message name and type, source IPv6
@@ -211,7 +215,7 @@ the message.
% DHCP4_DHCP4O6_RECEIVING receiving DHCPv4o6 packet from DHCPv6 server
This debug message is printed when the server is receiving a DHCPv4o6
-from the DHCPv6 server over inter-process communication socket.
+from the DHCPv4 server over inter-process communication socket.
% DHCP4_DHCP4O6_RESPONSE_DATA %1: responding with packet %2 (type %3), packet details: %4
A debug message including the detailed data about the packet being
@@ -696,7 +700,3 @@ will drop its message if the received message was DHCPDISCOVER,
and will send DHCPNAK if the received message was DHCPREQUEST.
The argument includes the client and the transaction identification
information.
-
-% DHCP6_DHCP4O6_PACKET_RECEIVED received DHCPv4o6 packet from DHCPv6 server (type %1) for %2 on interface %3
-This debug message is printed when the server is receiving a DHCPv4o6
-from the DHCPv6 server over inter-process communication.
diff --git a/src/bin/dhcp4/dhcp4_srv.h b/src/bin/dhcp4/dhcp4_srv.h
index c2eec9b0de..c6c6fcb065 100644
--- a/src/bin/dhcp4/dhcp4_srv.h
+++ b/src/bin/dhcp4/dhcp4_srv.h
@@ -235,7 +235,7 @@ public:
/// @brief returns Kea version on stdout and exit.
/// redeclaration/redefinition. @ref Daemon::getVersion()
static std::string getVersion(bool extended);
-
+
/// @brief Main server processing loop.
///
/// Main server processing loop. Call the processing step routine
diff --git a/src/bin/dhcp4/dhcp4to6_ipc.cc b/src/bin/dhcp4/dhcp4to6_ipc.cc
index b219207265..39188c2012 100644
--- a/src/bin/dhcp4/dhcp4to6_ipc.cc
+++ b/src/bin/dhcp4/dhcp4to6_ipc.cc
@@ -63,7 +63,7 @@ void Dhcp4to6Ipc::handler() {
// from Dhcpv4Srv::run_one() after receivePacket()
if (pkt) {
- LOG_DEBUG(packet4_logger, DBG_DHCP4_BASIC, DHCP6_DHCP4O6_PACKET_RECEIVED)
+ LOG_DEBUG(packet4_logger, DBG_DHCP4_BASIC, DHCP4_DHCP4O6_PACKET_RECEIVED)
.arg(static_cast<int>(pkt->getType()))
.arg(pkt->getRemoteAddr().toText())
.arg(pkt->getIface());
@@ -89,7 +89,7 @@ void Dhcp4to6Ipc::handler() {
return;
}
- // Get the DHCPv4 message
+ // Get the DHCPv4 message
OptionPtr msg = msgs.begin()->second;
if (!msg) {
LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_DHCP4O6_BAD_PACKET)
diff --git a/src/bin/keactrl/Makefile.am b/src/bin/keactrl/Makefile.am
index c83a597457..223a6e1939 100644
--- a/src/bin/keactrl/Makefile.am
+++ b/src/bin/keactrl/Makefile.am
@@ -19,7 +19,7 @@ BUILT_SOURCES = kea.conf
if GENERATE_DOCS
keactrl.8: keactrl.xml
- @XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/keactrl.xml
+ @XSLTPROC@ --novalid --xinclude -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/keactrl.xml
else
diff --git a/src/bin/lfc/Makefile.am b/src/bin/lfc/Makefile.am
index 7bfeb96df7..91dee0672b 100644
--- a/src/bin/lfc/Makefile.am
+++ b/src/bin/lfc/Makefile.am
@@ -17,7 +17,7 @@ EXTRA_DIST = $(man_MANS) kea-lfc.xml lfc.dox
if GENERATE_DOCS
kea-lfc.8: kea-lfc.xml
- @XSLTPROC@ --novalid --xinclude --nonet -o $@ \
+ @XSLTPROC@ --novalid --xinclude -o $@ \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
$(srcdir)/kea-lfc.xml
diff --git a/src/bin/perfdhcp/.gitignore b/src/bin/perfdhcp/.gitignore
index 2b5ab596d9..bdb5d378bb 100644
--- a/src/bin/perfdhcp/.gitignore
+++ b/src/bin/perfdhcp/.gitignore
@@ -1,2 +1,3 @@
/perfdhcp
+/perfdhcp.1
/perfdhcp.8
diff --git a/src/bin/perfdhcp/Makefile.am b/src/bin/perfdhcp/Makefile.am
index 74d2975bab..6824093924 100644
--- a/src/bin/perfdhcp/Makefile.am
+++ b/src/bin/perfdhcp/Makefile.am
@@ -53,7 +53,7 @@ EXTRA_DIST += $(man_MANS) perfdhcp.xml
if GENERATE_DOCS
perfdhcp.8: perfdhcp.xml
- @XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/perfdhcp.xml
+ @XSLTPROC@ --novalid --xinclude -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/perfdhcp.xml
else
diff --git a/src/bin/sockcreator/Makefile.am b/src/bin/sockcreator/Makefile.am
index 9fb4c96b3b..c96fd2498b 100644
--- a/src/bin/sockcreator/Makefile.am
+++ b/src/bin/sockcreator/Makefile.am
@@ -19,7 +19,7 @@ EXTRA_DIST = $(man_MANS) kea-sockcreator.xml
if GENERATE_DOCS
kea-sockcreator.8: kea-sockcreator.xml
- @XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/kea-sockcreator.xml
+ @XSLTPROC@ --novalid --xinclude -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/kea-sockcreator.xml
else
diff --git a/src/lib/asiolink/io_address.h b/src/lib/asiolink/io_address.h
index 5747cb9291..4b0fda0af1 100644
--- a/src/lib/asiolink/io_address.h
+++ b/src/lib/asiolink/io_address.h
@@ -136,7 +136,7 @@ public:
/// \brief Creates an address from over wire data.
///
- /// \param family AF_NET for IPv4 or AF_NET6 for IPv6.
+ /// \param family AF_INET for IPv4 or AF_INET6 for IPv6.
/// \param data pointer to first char of data
///
/// \return Created IOAddress object
diff --git a/src/lib/cryptolink/tests/run_unittests.cc b/src/lib/cryptolink/tests/run_unittests.cc
index 59c202c718..6c92b190ca 100644
--- a/src/lib/cryptolink/tests/run_unittests.cc
+++ b/src/lib/cryptolink/tests/run_unittests.cc
@@ -4,11 +4,11 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#include <gtest/gtest.h>
+
#include <log/logger_support.h>
#include <util/unittests/run_all.h>
-#include <gtest/gtest.h>
-
int
main(int argc, char* argv[]) {
::testing::InitGoogleTest(&argc, argv);
diff --git a/src/lib/dhcp/option6_pdexclude.cc b/src/lib/dhcp/option6_pdexclude.cc
index d8b78d4a20..951b3f117f 100644
--- a/src/lib/dhcp/option6_pdexclude.cc
+++ b/src/lib/dhcp/option6_pdexclude.cc
@@ -7,7 +7,6 @@
#include <config.h>
#include <asiolink/io_address.h>
-#include <exceptions/exceptions.h>
#include <dhcp/dhcp6.h>
#include <dhcp/option6_pdexclude.h>
#include <exceptions/exceptions.h>
diff --git a/src/lib/dhcp/option_definition.cc b/src/lib/dhcp/option_definition.cc
index 80c466f70c..fac287e749 100644
--- a/src/lib/dhcp/option_definition.cc
+++ b/src/lib/dhcp/option_definition.cc
@@ -5,6 +5,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
+
#include <dhcp/dhcp4.h>
#include <dhcp/dhcp6.h>
#include <dhcp/option4_addrlst.h>
@@ -39,7 +40,6 @@ using namespace isc::util;
namespace isc {
namespace dhcp {
-
OptionDefinition::OptionDefinition(const std::string& name,
const uint16_t code,
const std::string& type,
@@ -625,7 +625,6 @@ OptionDefinition::writeToBuffer(Option::Universe u,
<< " is not valid.");
}
-
// Write a prefix.
OptionDataTypeUtil::writePrefix(PrefixLen(len), address, buf);
diff --git a/src/lib/dhcp/tests/option_definition_unittest.cc b/src/lib/dhcp/tests/option_definition_unittest.cc
index 7d756c0c56..8b7f827218 100644
--- a/src/lib/dhcp/tests/option_definition_unittest.cc
+++ b/src/lib/dhcp/tests/option_definition_unittest.cc
@@ -38,7 +38,7 @@ namespace {
/// it around for the future.
class OptionDefinitionTest : public ::testing::Test {
public:
- // @brief Constructor.
+ /// @brief Constructor.
OptionDefinitionTest() { }
};
diff --git a/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc b/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc
index b517a6b469..e6ac57a739 100644
--- a/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc
+++ b/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc
@@ -217,9 +217,10 @@ public:
result_ = result;
received_ncr_ = ncr;
}
- // @brief Handler invoked when test timeout is hit.
- //
- // This callback stops all running (hanging) tasks on IO service.
+
+ /// @brief Handler invoked when test timeout is hit.
+ ///
+ /// This callback stops all running (hanging) tasks on IO service.
void testTimeoutHandler() {
io_service_.stop();
FAIL() << "Test timeout hit.";
@@ -656,9 +657,9 @@ public:
sent_ncrs_.push_back(ncr);
}
- // @brief Handler invoked when test timeout is hit.
- //
- // This callback stops all running (hanging) tasks on IO service.
+ /// @brief Handler invoked when test timeout is hit.
+ ///
+ /// This callback stops all running (hanging) tasks on IO service.
void testTimeoutHandler() {
io_service_.stop();
FAIL() << "Test timeout hit.";
diff --git a/src/lib/dhcpsrv/alloc_engine.h b/src/lib/dhcpsrv/alloc_engine.h
index e8e1936c16..3f3623118b 100644
--- a/src/lib/dhcpsrv/alloc_engine.h
+++ b/src/lib/dhcpsrv/alloc_engine.h
@@ -1473,13 +1473,12 @@ private:
/// @brief Number of consecutive DHCPv6 leases' reclamations after
/// which there are still expired leases in the database.
uint16_t incomplete_v6_reclamations_;
-
};
/// @brief A pointer to the @c AllocEngine object.
typedef boost::shared_ptr<AllocEngine> AllocEnginePtr;
-}; // namespace isc::dhcp
-}; // namespace isc
+} // namespace dhcp
+} // namespace isc
#endif // ALLOC_ENGINE_H
diff --git a/src/lib/dhcpsrv/base_host_data_source.h b/src/lib/dhcpsrv/base_host_data_source.h
index 2e3ed16db1..e4d153ea6d 100644
--- a/src/lib/dhcpsrv/base_host_data_source.h
+++ b/src/lib/dhcpsrv/base_host_data_source.h
@@ -7,11 +7,14 @@
#ifndef BASE_HOST_DATA_SOURCE_H
#define BASE_HOST_DATA_SOURCE_H
-#include <asiolink/io_address.h>
#include <dhcp/duid.h>
#include <dhcp/hwaddr.h>
#include <dhcpsrv/host.h>
+
+#include <asiolink/io_address.h>
#include <exceptions/exceptions.h>
+#include <stdint.h>
+
#include <boost/shared_ptr.hpp>
namespace isc {
@@ -95,8 +98,8 @@ public:
/// @param duid client id or NULL if not available, e.g. DHCPv4 client case.
///
/// @return Collection of const @c Host objects.
- virtual ConstHostCollection
- getAll(const HWAddrPtr& hwaddr, const DuidPtr& duid = DuidPtr()) const = 0;
+ virtual ConstHostCollection getAll(const HWAddrPtr& hwaddr,
+ const DuidPtr& duid = DuidPtr()) const = 0;
/// @brief Return all hosts connected to any subnet for which reservations
/// have been made using a specified identifier.
@@ -111,10 +114,9 @@ public:
/// @param identifier_len Identifier length.
///
/// @return Collection of const @c Host objects.
- virtual ConstHostCollection
- getAll(const Host::IdentifierType& identifier_type,
- const uint8_t* identifier_begin,
- const size_t identifier_len) const = 0;
+ virtual ConstHostCollection getAll(const Host::IdentifierType& identifier_type,
+ const uint8_t* identifier_begin,
+ const size_t identifier_len) const = 0;
/// @brief Returns a collection of hosts using the specified IPv4 address.
///
@@ -124,8 +126,7 @@ public:
/// @param address IPv4 address for which the @c Host object is searched.
///
/// @return Collection of const @c Host objects.
- virtual ConstHostCollection
- getAll4(const asiolink::IOAddress& address) const = 0;
+ virtual ConstHostCollection getAll4(const asiolink::IOAddress& address) const = 0;
/// @brief Returns a host connected to the IPv4 subnet.
///
@@ -141,9 +142,8 @@ public:
/// @param duid client id or NULL if not available.
///
/// @return Const @c Host object using a specified HW address or DUID.
- virtual ConstHostPtr
- get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr,
- const DuidPtr& duid = DuidPtr()) const = 0;
+ virtual ConstHostPtr get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr,
+ const DuidPtr& duid = DuidPtr()) const = 0;
/// @brief Returns a host connected to the IPv4 subnet.
@@ -156,11 +156,10 @@ public:
///
/// @return Const @c Host object for which reservation has been made using
/// the specified identifier.
- virtual ConstHostPtr
- get4(const SubnetID& subnet_id,
- const Host::IdentifierType& identifier_type,
- const uint8_t* identifier_begin,
- const size_t identifier_len) const = 0;
+ virtual ConstHostPtr get4(const SubnetID& subnet_id,
+ const Host::IdentifierType& identifier_type,
+ const uint8_t* identifier_begin,
+ const size_t identifier_len) const = 0;
/// @brief Returns a host connected to the IPv4 subnet and having
/// a reservation for a specified IPv4 address.
@@ -178,9 +177,8 @@ public:
/// @param address reserved IPv4 address.
///
/// @return Const @c Host object using a specified IPv4 address.
- virtual ConstHostPtr
- get4(const SubnetID& subnet_id,
- const asiolink::IOAddress& address) const = 0;
+ virtual ConstHostPtr get4(const SubnetID& subnet_id,
+ const asiolink::IOAddress& address) const = 0;
/// @brief Returns a host connected to the IPv6 subnet.
///
@@ -196,9 +194,9 @@ public:
/// @param duid DUID or NULL if not available.
///
/// @return Const @c Host object using a specified HW address or DUID.
- virtual ConstHostPtr
- get6(const SubnetID& subnet_id, const DuidPtr& duid,
- const HWAddrPtr& hwaddr = HWAddrPtr()) const = 0;
+ virtual ConstHostPtr get6(const SubnetID& subnet_id,
+ const DuidPtr& duid,
+ const HWAddrPtr& hwaddr = HWAddrPtr()) const = 0;
/// @brief Returns a host connected to the IPv6 subnet.
///
@@ -210,11 +208,10 @@ public:
///
/// @return Const @c Host object for which reservation has been made using
/// the specified identifier.
- virtual ConstHostPtr
- get6(const SubnetID& subnet_id,
- const Host::IdentifierType& identifier_type,
- const uint8_t* identifier_begin,
- const size_t identifier_len) const = 0;
+ virtual ConstHostPtr get6(const SubnetID& subnet_id,
+ const Host::IdentifierType& identifier_type,
+ const uint8_t* identifier_begin,
+ const size_t identifier_len) const = 0;
/// @brief Returns a host using the specified IPv6 prefix.
///
@@ -222,8 +219,8 @@ public:
/// @param prefix_len IPv6 prefix length.
///
/// @return Const @c Host object using a specified HW address or DUID.
- virtual ConstHostPtr
- get6(const asiolink::IOAddress& prefix, const uint8_t prefix_len) const = 0;
+ virtual ConstHostPtr get6(const asiolink::IOAddress& prefix,
+ const uint8_t prefix_len) const = 0;
/// @brief Returns a host connected to the IPv6 subnet and having
/// a reservation for a specified IPv6 address or prefix.
@@ -310,7 +307,7 @@ public:
/// @brief HostDataSource pointer
typedef boost::shared_ptr<BaseHostDataSource> HostDataSourcePtr;
-}
-}
+} // namespace dhcp
+} // namespace isc
#endif // BASE_HOST_DATA_SOURCE_H
diff --git a/src/lib/dhcpsrv/dhcp4o6_ipc.cc b/src/lib/dhcpsrv/dhcp4o6_ipc.cc
index 86dfafc378..ac58fd11a5 100644
--- a/src/lib/dhcpsrv/dhcp4o6_ipc.cc
+++ b/src/lib/dhcpsrv/dhcp4o6_ipc.cc
@@ -151,7 +151,7 @@ Pkt6Ptr Dhcp4o6IpcBase::receive() {
option_vendor.reset();
}
}
-
+
// Vendor option must exist.
if (!option_vendor) {
LOG_WARN(dhcpsrv_logger, DHCPSRV_DHCP4O6_RECEIVED_BAD_PACKET)
diff --git a/src/lib/dhcpsrv/host_mgr.h b/src/lib/dhcpsrv/host_mgr.h
index c177f58829..dd5177a3dd 100644
--- a/src/lib/dhcpsrv/host_mgr.h
+++ b/src/lib/dhcpsrv/host_mgr.h
@@ -337,7 +337,8 @@ private:
static boost::scoped_ptr<HostMgr>& getHostMgrPtr();
};
-}
-}
+
+} // namespace dhcp
+} // namespace isc
#endif // HOST_MGR_H
diff --git a/src/lib/dhcpsrv/parsers/dhcp_parsers.cc b/src/lib/dhcpsrv/parsers/dhcp_parsers.cc
index 30995de0d0..1a91cdb357 100644
--- a/src/lib/dhcpsrv/parsers/dhcp_parsers.cc
+++ b/src/lib/dhcpsrv/parsers/dhcp_parsers.cc
@@ -523,8 +523,7 @@ SubnetConfigParser::parse(ConstElementPtr subnet) {
Subnet::HRMode
SubnetConfigParser::hrModeFromText(const std::string& txt) {
- if ( (txt.compare("disabled") == 0) ||
- (txt.compare("off") == 0) ) {
+ if ( (txt.compare("disabled") == 0) || (txt.compare("off") == 0) ) {
return (Subnet::HR_DISABLED);
} else if (txt.compare("out-of-pool") == 0) {
return (Subnet::HR_OUT_OF_POOL);
diff --git a/src/lib/dhcpsrv/pgsql_connection.h b/src/lib/dhcpsrv/pgsql_connection.h
index 9788972535..35e1644d64 100644
--- a/src/lib/dhcpsrv/pgsql_connection.h
+++ b/src/lib/dhcpsrv/pgsql_connection.h
@@ -27,7 +27,7 @@ const uint32_t PG_SCHEMA_VERSION_MINOR = 1;
// statement.
const size_t PGSQL_MAX_PARAMETERS_IN_QUERY = 32;
-/// @brief Define a PostgreSQL SQL statement
+/// @brief Define a PostgreSQL statement.
///
/// Each statement is associated with an index, which is used to reference the
/// associated prepared statement.
@@ -49,6 +49,7 @@ struct PgSqlTaggedStatement {
const char* text;
};
+/// @{
/// @brief Constants for PostgreSQL data types
/// These are defined by PostgreSQL in <catalog/pg_type.h>, but including
/// this file is extraordinarily convoluted, so we'll use these to fill-in.
@@ -62,7 +63,7 @@ const size_t OID_INT4 = 23; // 4 byte int
const size_t OID_TEXT = 25;
const size_t OID_VARCHAR = 1043;
const size_t OID_TIMESTAMP = 1114;
-///@}
+/// @}
/// @brief RAII wrapper for PostgreSQL Result sets
///
@@ -293,7 +294,7 @@ private:
/// that use instances of PgSqlConnection.
class PgSqlConnection : public DatabaseConnection {
public:
- /// @brief Define the PgSql error state for a duplicate key error
+ /// @brief Define the PgSql error state for a duplicate key error.
static const char DUPLICATE_KEY[];
/// @brief Constructor
diff --git a/src/lib/dhcpsrv/subnet.h b/src/lib/dhcpsrv/subnet.h
index 3d91ae8bb9..e11187bfa3 100644
--- a/src/lib/dhcpsrv/subnet.h
+++ b/src/lib/dhcpsrv/subnet.h
@@ -306,16 +306,14 @@ public:
///
/// @param client_classes list of all classes the client belongs to
/// @return true if client can be supported, false otherwise
- bool
- clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
+ bool clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
/// @brief adds class class_name to the list of supported classes
///
/// Also see explanation note in @ref white_list_.
///
/// @param class_name client class to be supported by this subnet
- void
- allowClientClass(const isc::dhcp::ClientClass& class_name);
+ void allowClientClass(const isc::dhcp::ClientClass& class_name);
/// @brief returns the client class white list
///
@@ -335,8 +333,7 @@ public:
/// performance reasons.
///
/// @return whether in-pool host reservations are allowed.
- HRMode
- getHostReservationMode() const {
+ HRMode getHostReservationMode() const {
return (host_reservation_mode_);
}
@@ -518,8 +515,8 @@ protected:
///
/// See @ref HRMode type for details.
HRMode host_reservation_mode_;
-private:
+private:
/// @brief Pointer to the option data configuration for this subnet.
CfgOptionPtr cfg_option_;
};
diff --git a/src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h b/src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h
index 1a4b55277c..c2a77d31b5 100644
--- a/src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h
+++ b/src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h
@@ -165,10 +165,10 @@ public:
/// @brief Test lease retrieval using client id, HW address and subnet id.
void testGetLease4ClientIdHWAddrSubnetId();
- // @brief Get lease4 by hardware address (2)
- //
- // Check that the system can cope with getting a hardware address of
- // any size.
+ /// @brief Get lease4 by hardware address (2)
+ ///
+ /// Check that the system can cope with getting a hardware address of
+ /// any size.
void testGetLease4HWAddrSize();
/// @brief Check GetLease4 methods - access by Hardware Address & Subnet ID
@@ -406,8 +406,8 @@ public:
LeaseMgr* lmptr_;
};
-}; // namespace test
-}; // namespace dhcp
-}; // namespace isc
+} // namespace test
+} // namespace dhcp
+} // namespace isc
#endif
diff --git a/src/lib/eval/eval_context.h b/src/lib/eval/eval_context.h
index e2eb816bc5..96c683604c 100644
--- a/src/lib/eval/eval_context.h
+++ b/src/lib/eval/eval_context.h
@@ -169,7 +169,7 @@ public:
return (option_universe_);
}
- private:
+private:
/// @brief Flag determining scanner debugging.
bool trace_scanning_;
diff --git a/src/lib/process/testutils/d_test_stubs.h b/src/lib/process/testutils/d_test_stubs.h
index 6cc5b9aaae..6deaa8346a 100644
--- a/src/lib/process/testutils/d_test_stubs.h
+++ b/src/lib/process/testutils/d_test_stubs.h
@@ -154,7 +154,7 @@ public:
return ("");
}
- // @brief Destructor
+ /// @brief Destructor
virtual ~DStubProcess();
};
diff --git a/src/lib/stats/stats_mgr.h b/src/lib/stats/stats_mgr.h
index fe641372a1..554e309e91 100644
--- a/src/lib/stats/stats_mgr.h
+++ b/src/lib/stats/stats_mgr.h
@@ -327,7 +327,7 @@ class StatsMgr : public boost::noncopyable {
/// @}
- private:
+private:
/// @brief Private constructor.
/// StatsMgr is a singleton. It should be accessed using @ref instance