Commit 7ebd4f56 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

[3417] "bind 10" => Kea converted in many .cc/.h files

parent 393e456b
......@@ -12,7 +12,7 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
// host rewritten in C++ using BIND 10 DNS library
// host rewritten in C++ using Kea DNS library
#include <arpa/inet.h>
#include <netdb.h> // for getaddrinfo
......
......@@ -184,9 +184,9 @@ void ControlledDhcpv4Srv::init(const std::string& config_file) {
}
/// Integrate the asynchronous I/O model of BIND 10 configuration
/// control with the "select" model of the DHCP server. This is
/// fully explained in \ref dhcpv4Session.
/// Integrate the asynchronous I/O model of former BIND 10/Bundy
/// configuration control with the "select" model of the DHCP server.
/// This is fully explained in \ref dhcpv4Session.
int ctrl_socket = cc_session_->getSocketDesc();
LOG_DEBUG(dhcp4_logger, DBG_DHCP4_START, DHCP4_CCSESSION_STARTED)
.arg(ctrl_socket);
......
......@@ -310,13 +310,12 @@ Dhcpv4Srv::run() {
}
} catch (const isc::Exception& e) {
// Catch-all exception (at least for ones based on the isc
// Exception class, which covers more or less all that
// are explicitly raised in the BIND 10 code). Just log
// the problem and ignore the packet. (The problem is logged
// as a debug message because debug is disabled by default -
// it prevents a DDOS attack based on the sending of problem
// packets.)
// Catch-all exception (at least for ones based on the isc Exception
// class, which covers more or less all that are explicitly raised
// in the Kea code). Just log the problem and ignore the packet.
// (The problem is logged as a debug message because debug is
// disabled by default - it prevents a DDOS attack based on the
// sending of problem packets.)
if (dhcp4_logger.isDebugEnabled(DBG_DHCP4_BASIC)) {
std::string source = "unknown";
HWAddrPtr hwptr = query->getHWAddr();
......
......@@ -413,13 +413,12 @@ bool Dhcpv6Srv::run() {
} catch (const isc::Exception& e) {
// Catch-all exception (at least for ones based on the isc
// Exception class, which covers more or less all that
// are explicitly raised in the BIND 10 code). Just log
// the problem and ignore the packet. (The problem is logged
// as a debug message because debug is disabled by default -
// it prevents a DDOS attack based on the sending of problem
// packets.)
// Catch-all exception (at least for ones based on the isc Exception
// class, which covers more or less all that are explicitly raised
// in the Kea code). Just log the problem and ignore the packet.
// (The problem is logged as a debug message because debug is
// disabled by default - it prevents a DDOS attack based on the
// sending of problem packets.)
LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_PACKET_PROCESS_FAIL)
.arg(query->getName())
.arg(query->getRemoteAddr().toText())
......
......@@ -191,7 +191,7 @@ public:
/// \brief Return the native \c io_service object used in this wrapper.
///
/// This is a short term work around to support other BIND 10 modules
/// This is a short term work around to support other Kea modules
/// that share the same \c io_service with the authoritative server.
/// It will eventually be removed once the wrapper interface is
/// generalized.
......
......@@ -310,7 +310,7 @@ TCPServer::resume(const bool done) {
done_ = done;
// post() can throw due to memory allocation failure, but as like other
// cases of the entire BIND 10 implementation, we consider it fatal and
// cases of the entire Kea implementation, we consider it fatal and
// let the exception be propagated.
io_.post(*this);
}
......
......@@ -35,7 +35,7 @@
/// The \c asiolink namespace is used to define a set of wrapper interfaces
/// for the ASIO library.
///
/// BIND 10 uses the non-Boost version of ASIO because it's header-only,
/// Kea uses the non-Boost version of ASIO because it's header-only,
/// i.e., does not require a separate library object to be linked, and thus
/// lowers the bar for introduction.
///
......@@ -49,7 +49,7 @@
/// of including header files, ASIO may or may not work on some platforms.
///
/// This wrapper interface is intended to centralize these
/// problematic issues in a single sub module. Other BIND 10 modules should
/// problematic issues in a single sub module. Other Kea modules should
/// simply include \c asiolink.h and use the wrapper API instead of
/// including ASIO header files and using ASIO-specific classes directly.
///
......
......@@ -167,7 +167,7 @@ public:
/// output stream \c os.
///
/// This method converts the address and port of the endpoint in the textual
/// format that other BIND 10 modules would use in logging, i.e.,
/// format that other Kea modules would use in logging, i.e.,
/// - For IPv6 address: [&lt;address&gt;]:port (e.g., [2001:db8::5300]:53)
/// - For IPv4 address: &lt;address&gt;:port (e.g., 192.0.2.53:5300)
///
......
......@@ -75,7 +75,7 @@ public:
/// \brief Return the native \c io_service object used in this wrapper.
///
/// This is a short term work around to support other BIND 10 modules
/// This is a short term work around to support other Kea modules
/// that share the same \c io_service with the authoritative server.
/// It will eventually be removed once the wrapper interface is
/// generalized.
......
......@@ -66,7 +66,7 @@ public:
/// \brief Return the native \c io_service object used in this wrapper.
///
/// This is a short term work around to support other BIND 10 modules
/// This is a short term work around to support other Kea modules
/// that share the same \c io_service with the authoritative server.
/// It will eventually be removed once the wrapper interface is
/// generalized.
......
......@@ -178,18 +178,22 @@ ConstElementPtr getValueOrDefault(ConstElementPtr config_part,
}
}
// Prefix name with "b10-".
//
// In BIND 10, modules have names taken from the .spec file, which are typically
// names starting with a capital letter (e.g. "Resolver", "Auth" etc.). The
// names of the associated binaries are derived from the module names, being
// prefixed "b10-" and having the first letter of the module name lower-cased
// (e.g. "b10-resolver", "b10-auth"). (It is a required convention that there
// be this relationship between the names.)
/// @brief Prefix name with "b10-".
///
/// In BIND 10, modules had names taken from the .spec file, which are typically
/// names starting with a capital letter (e.g. "Resolver", "Auth" etc.). The
/// names of the associated binaries are derived from the module names, being
/// prefixed "b10-" and having the first letter of the module name lower-cased
/// (e.g. "b10-resolver", "b10-auth"). (It is a required convention that there
/// be this relationship between the names.)
///
/// In Kea we're not using module names, but we do still keep some capability to
/// run Kea servers in Bundy framework. For that reason the whole discussion here
/// applies only to case when Kea is compiled with Bundy configuration backend.
//
// Within the binaries the root loggers are named after the binaries themselves.
// (The reason for this is that the name of the logger is included in the
// message logged, so making it clear which message comes from which BIND 10
// message logged, so making it clear which message comes from which Kea
// process.) As logging is configured using module names, the configuration code
// has to match these with the corresponding logger names. This function
// converts a module name to a root logger name by lowercasing the first letter
......
......@@ -350,7 +350,7 @@ TEST_F(CCSessionTest, session2) {
ConstElementPtr msg;
std::string group, to;
msg = session.getFirstMessage(group, to);
EXPECT_EQ("{ \"command\": [ \"module_spec\", { \"commands\": [ { \"command_args\": [ { \"item_default\": \"\", \"item_name\": \"message\", \"item_optional\": false, \"item_type\": \"string\" } ], \"command_description\": \"Print the given message to stdout\", \"command_name\": \"print_message\" }, { \"command_args\": [ ], \"command_description\": \"Shut down BIND 10\", \"command_name\": \"shutdown\" } ], \"config_data\": [ { \"item_default\": 1, \"item_name\": \"item1\", \"item_optional\": false, \"item_type\": \"integer\" }, { \"item_default\": 1.1, \"item_name\": \"item2\", \"item_optional\": false, \"item_type\": \"real\" }, { \"item_default\": true, \"item_name\": \"item3\", \"item_optional\": false, \"item_type\": \"boolean\" }, { \"item_default\": \"test\", \"item_name\": \"item4\", \"item_optional\": false, \"item_type\": \"string\" }, { \"item_default\": [ \"a\", \"b\" ], \"item_name\": \"item5\", \"item_optional\": false, \"item_type\": \"list\", \"list_item_spec\": { \"item_default\": \"\", \"item_name\": \"list_element\", \"item_optional\": false, \"item_type\": \"string\" } }, { \"item_default\": { }, \"item_name\": \"item6\", \"item_optional\": false, \"item_type\": \"map\", \"map_item_spec\": [ { \"item_default\": \"default\", \"item_name\": \"value1\", \"item_optional\": true, \"item_type\": \"string\" }, { \"item_name\": \"value2\", \"item_optional\": true, \"item_type\": \"integer\" } ] } ], \"module_name\": \"Spec2\", \"statistics\": [ { \"item_default\": \"1970-01-01T00:00:00Z\", \"item_description\": \"A dummy date time\", \"item_format\": \"date-time\", \"item_name\": \"dummy_time\", \"item_optional\": false, \"item_title\": \"Dummy Time\", \"item_type\": \"string\" } ] } ] }", msg->str());
EXPECT_EQ("{ \"command\": [ \"module_spec\", { \"commands\": [ { \"command_args\": [ { \"item_default\": \"\", \"item_name\": \"message\", \"item_optional\": false, \"item_type\": \"string\" } ], \"command_description\": \"Print the given message to stdout\", \"command_name\": \"print_message\" }, { \"command_args\": [ ], \"command_description\": \"Shut down Kea\", \"command_name\": \"shutdown\" } ], \"config_data\": [ { \"item_default\": 1, \"item_name\": \"item1\", \"item_optional\": false, \"item_type\": \"integer\" }, { \"item_default\": 1.1, \"item_name\": \"item2\", \"item_optional\": false, \"item_type\": \"real\" }, { \"item_default\": true, \"item_name\": \"item3\", \"item_optional\": false, \"item_type\": \"boolean\" }, { \"item_default\": \"test\", \"item_name\": \"item4\", \"item_optional\": false, \"item_type\": \"string\" }, { \"item_default\": [ \"a\", \"b\" ], \"item_name\": \"item5\", \"item_optional\": false, \"item_type\": \"list\", \"list_item_spec\": { \"item_default\": \"\", \"item_name\": \"list_element\", \"item_optional\": false, \"item_type\": \"string\" } }, { \"item_default\": { }, \"item_name\": \"item6\", \"item_optional\": false, \"item_type\": \"map\", \"map_item_spec\": [ { \"item_default\": \"default\", \"item_name\": \"value1\", \"item_optional\": true, \"item_type\": \"string\" }, { \"item_name\": \"value2\", \"item_optional\": true, \"item_type\": \"integer\" } ] } ], \"module_name\": \"Spec2\", \"statistics\": [ { \"item_default\": \"1970-01-01T00:00:00Z\", \"item_description\": \"A dummy date time\", \"item_format\": \"date-time\", \"item_name\": \"dummy_time\", \"item_optional\": false, \"item_title\": \"Dummy Time\", \"item_type\": \"string\" } ] } ] }", msg->str());
EXPECT_EQ("ConfigManager", group);
EXPECT_EQ("*", to);
EXPECT_EQ(0, session.getMsgQueue()->size());
......@@ -458,7 +458,7 @@ TEST_F(CCSessionTest, session3) {
ConstElementPtr msg;
std::string group, to;
msg = session.getFirstMessage(group, to);
EXPECT_EQ("{ \"command\": [ \"module_spec\", { \"commands\": [ { \"command_args\": [ { \"item_default\": \"\", \"item_name\": \"message\", \"item_optional\": false, \"item_type\": \"string\" } ], \"command_description\": \"Print the given message to stdout\", \"command_name\": \"print_message\" }, { \"command_args\": [ ], \"command_description\": \"Shut down BIND 10\", \"command_name\": \"shutdown\" } ], \"config_data\": [ { \"item_default\": 1, \"item_name\": \"item1\", \"item_optional\": false, \"item_type\": \"integer\" }, { \"item_default\": 1.1, \"item_name\": \"item2\", \"item_optional\": false, \"item_type\": \"real\" }, { \"item_default\": true, \"item_name\": \"item3\", \"item_optional\": false, \"item_type\": \"boolean\" }, { \"item_default\": \"test\", \"item_name\": \"item4\", \"item_optional\": false, \"item_type\": \"string\" }, { \"item_default\": [ \"a\", \"b\" ], \"item_name\": \"item5\", \"item_optional\": false, \"item_type\": \"list\", \"list_item_spec\": { \"item_default\": \"\", \"item_name\": \"list_element\", \"item_optional\": false, \"item_type\": \"string\" } }, { \"item_default\": { }, \"item_name\": \"item6\", \"item_optional\": false, \"item_type\": \"map\", \"map_item_spec\": [ { \"item_default\": \"default\", \"item_name\": \"value1\", \"item_optional\": true, \"item_type\": \"string\" }, { \"item_name\": \"value2\", \"item_optional\": true, \"item_type\": \"integer\" } ] } ], \"module_name\": \"Spec2\", \"statistics\": [ { \"item_default\": \"1970-01-01T00:00:00Z\", \"item_description\": \"A dummy date time\", \"item_format\": \"date-time\", \"item_name\": \"dummy_time\", \"item_optional\": false, \"item_title\": \"Dummy Time\", \"item_type\": \"string\" } ] } ] }", msg->str());
EXPECT_EQ("{ \"command\": [ \"module_spec\", { \"commands\": [ { \"command_args\": [ { \"item_default\": \"\", \"item_name\": \"message\", \"item_optional\": false, \"item_type\": \"string\" } ], \"command_description\": \"Print the given message to stdout\", \"command_name\": \"print_message\" }, { \"command_args\": [ ], \"command_description\": \"Shut down Kea\", \"command_name\": \"shutdown\" } ], \"config_data\": [ { \"item_default\": 1, \"item_name\": \"item1\", \"item_optional\": false, \"item_type\": \"integer\" }, { \"item_default\": 1.1, \"item_name\": \"item2\", \"item_optional\": false, \"item_type\": \"real\" }, { \"item_default\": true, \"item_name\": \"item3\", \"item_optional\": false, \"item_type\": \"boolean\" }, { \"item_default\": \"test\", \"item_name\": \"item4\", \"item_optional\": false, \"item_type\": \"string\" }, { \"item_default\": [ \"a\", \"b\" ], \"item_name\": \"item5\", \"item_optional\": false, \"item_type\": \"list\", \"list_item_spec\": { \"item_default\": \"\", \"item_name\": \"list_element\", \"item_optional\": false, \"item_type\": \"string\" } }, { \"item_default\": { }, \"item_name\": \"item6\", \"item_optional\": false, \"item_type\": \"map\", \"map_item_spec\": [ { \"item_default\": \"default\", \"item_name\": \"value1\", \"item_optional\": true, \"item_type\": \"string\" }, { \"item_name\": \"value2\", \"item_optional\": true, \"item_type\": \"integer\" } ] } ], \"module_name\": \"Spec2\", \"statistics\": [ { \"item_default\": \"1970-01-01T00:00:00Z\", \"item_description\": \"A dummy date time\", \"item_format\": \"date-time\", \"item_name\": \"dummy_time\", \"item_optional\": false, \"item_title\": \"Dummy Time\", \"item_type\": \"string\" } ] } ] }", msg->str());
EXPECT_EQ("ConfigManager", group);
EXPECT_EQ("*", to);
EXPECT_EQ(1, session.getMsgQueue()->size());
......
......@@ -58,7 +58,7 @@ TEST(ModuleSpec, ReadingSpecfiles) {
": No such file or directory");
dd = moduleSpecFromFile(specfile("spec2.spec"));
EXPECT_EQ("[ { \"command_args\": [ { \"item_default\": \"\", \"item_name\": \"message\", \"item_optional\": false, \"item_type\": \"string\" } ], \"command_description\": \"Print the given message to stdout\", \"command_name\": \"print_message\" }, { \"command_args\": [ ], \"command_description\": \"Shut down BIND 10\", \"command_name\": \"shutdown\" } ]", dd.getCommandsSpec()->str());
EXPECT_EQ("[ { \"command_args\": [ { \"item_default\": \"\", \"item_name\": \"message\", \"item_optional\": false, \"item_type\": \"string\" } ], \"command_description\": \"Print the given message to stdout\", \"command_name\": \"print_message\" }, { \"command_args\": [ ], \"command_description\": \"Shut down Kea\", \"command_name\": \"shutdown\" } ]", dd.getCommandsSpec()->str());
EXPECT_EQ("[ { \"item_default\": \"1970-01-01T00:00:00Z\", \"item_description\": \"A dummy date time\", \"item_format\": \"date-time\", \"item_name\": \"dummy_time\", \"item_optional\": false, \"item_title\": \"Dummy Time\", \"item_type\": \"string\" } ]", dd.getStatisticsSpec()->str());
EXPECT_EQ("Spec2", dd.getModuleName());
EXPECT_EQ("", dd.getModuleDescription());
......
......@@ -63,7 +63,7 @@
},
{
"command_name": "shutdown",
"command_description": "Shut down BIND 10",
"command_description": "Shut down Kea",
"command_args": []
}
],
......
......@@ -171,9 +171,9 @@ public:
/// @brief Version of parser with protected methods public
///
/// Some of the methods in DbAccessParser are not required to be public in
/// BIND 10. Instead of being declared "private", they are declared "protected"
/// so that they can be accessed through a derived class in the unit tests.
/// Some of the methods in DbAccessParser are not required to be public in Kea.
/// Instead of being declared "private", they are declared "protected" so that
/// they can be accessed through a derived class in the unit tests.
class TestDbAccessParser : public DbAccessParser {
public:
......
......@@ -606,7 +606,7 @@ public:
/// member function that could be implemented using other member functions.
/// We considered making it a non member function, but we could not come
/// up with an intuitive function name to represent the specific service.
/// Some other BIND 10 developers argued, probably partly because of the
/// Some other developers argued, probably partly because of the
/// counter intuitive function name, a different signature of \c split
/// would be better to improve code readability.
/// While that may be a matter of personal preference, we accepted the
......
......@@ -23,7 +23,7 @@
// library.
//
// Note: if it turns out that we need this shortcut for many other places
// we may even want to make it expose to other BIND 10 modules, but for now
// we may even want to make it expose to other Kea modules, but for now
// we'll keep it semi-private (note also that except for very performance
// sensitive applications the standard std::tolower() function should be just
// sufficient).
......
......@@ -438,12 +438,13 @@ public:
/// signatures for this RRset. It can be argued that this is not a
/// fundamental part of the RRset abstraction, since RFC 2181 defined an
/// RRset as a group of records with the same label, class and type but
/// different data. However, BIND 10 has to deal with DNSSEC and in
/// different data. However, BIND 10 had to deal with DNSSEC and in
/// practice, including the information at the AbstractRRset level makes
/// implementation easier. (If a class is ever needed that must be
/// ignorant of the idea of an associated RRSIG RRset - e.g. a specialised
/// RRSIG RRset class - these methods can just throw a "NotImplemented"
/// exception.)
/// exception.) DNSSEC is unlikely to be ever needed in Kea, but it does
/// not make sense to redesign the abstract RRSet class now.
//@{
/// \brief Return pointer to this RRset's RRSIG RRset
///
......
......@@ -41,7 +41,7 @@ public:
/// @brief Callout Manager
///
/// This class manages the registration, deregistration and execution of the
/// library callouts. It is part of the hooks framework used by the BIND 10
/// library callouts. It is part of the hooks framework used by the Kea
/// server, and is not for use by user-written code in a hooks library.
///
/// In operation, the class needs to know two items of data:
......
......@@ -39,9 +39,9 @@ typedef int (*unload_function_ptr)();
namespace isc {
namespace hooks {
/// @brief User-Library Initialization for Statically-Linked BIND 10
/// @brief User-Library Initialization for Statically-Linked Kea
///
/// If BIND 10 is statically-linked, a user-created hooks library will not be
/// If Kea is statically-linked, a user-created hooks library will not be
/// able to access symbols in it. In particular, it will not be able to access
/// singleton objects.
///
......@@ -49,20 +49,20 @@ namespace hooks {
/// a singleton ServerHooks object, hooks framework objects store a reference
/// to it when they are created. When the user library needs to register a
/// callout (which requires access to the ServerHooks information), it accesses
/// the ServerHooks object through a pointer passed from the BIND 10 image.
/// the ServerHooks object through a pointer passed from the Kea image.
///
/// The logging framework is more problematical. Here the code is partly
/// statically linked (the BIND 10 logging library) and partly shared (the
/// statically linked (the Kea logging library) and partly shared (the
/// log4cplus). The state of the former is not accessible to the user library,
/// but the state of the latter is. So within the user library, we need to
/// initialize the BIND 10 logging library but not initialize the log4cplus
/// initialize the Kea logging library but not initialize the log4cplus
/// code. Some of the initialization is done when the library is loaded, but
/// other parts are done at run-time.
///
/// This function - to be called by the user library code in its load() function
/// when running against a statically linked BIND 10 - initializes the BIND 10
/// when running against a statically linked Kea - initializes the Kea
/// logging library. In particular, it loads the message dictionary with the
/// text of the BIND 10 messages.
/// text of the Kea messages.
///
/// @note This means that the virtual address space is loaded with two copies
/// of the message dictionary. Depending on how the user libraries are linked,
......
......@@ -35,7 +35,7 @@ class LibraryManagerCollection;
/// @brief Hooks Manager
///
/// This is the overall manager of the hooks framework and is the main class
/// used by a BIND 10 module when handling hooks. It is responsible for the
/// used by a Kea module when handling hooks. It is responsible for the
/// loading and unloading of user libraries, and for calling the callouts on
/// each hook point.
///
......
......@@ -170,7 +170,7 @@ protected:
///
/// With the library open, accesses the "version()" function and, if
/// present, checks the returned value against the hooks version symbol
/// for the currently running BIND 10. The "version()" function is
/// for the currently running Kea. The "version()" function is
/// mandatory and must be present (and return the correct value) for the
/// library to load.
///
......
......@@ -44,9 +44,9 @@ void Logger::initLoggerImpl() {
Logger::~Logger() {
delete loggerptr_;
// The next statement is required for the BIND 10 hooks framework, where
// a statically-linked BIND 10 loads and unloads multiple libraries. See
// the hooks documentation for more details.
// The next statement is required for the Kea hooks framework, where a
// statically-linked Kea loads and unloads multiple libraries. See the hooks
// documentation for more details.
loggerptr_ = 0;
}
......
......@@ -38,7 +38,7 @@ class InterprocessSync;
/// \page LoggingApi Logging API
/// \section LoggingApiOverview Overview
/// BIND 10 logging uses the concepts of the widely-used Java logging
/// Kea logging uses the concepts of the widely-used Java logging
/// package log4j (http://logging.apache.log/log4j), albeit implemented
/// in C++ using an open-source port. Features of the system are:
///
......@@ -57,12 +57,12 @@ class InterprocessSync;
/// to the logger severity level or greater, e.g. if the logger's severity
/// is WARN, only messages logged at WARN, ERROR or FATAL will be output.
///
/// \section LoggingApiLoggerNames BIND 10 Logger Names
/// Within BIND 10, the root logger root logger is given the name of the
/// \section LoggingApiLoggerNames Kea Logger Names
/// Within Kea, the root logger root logger is given the name of the
/// program (via the stand-alone function setRootLoggerName()). Other loggers
/// are children of the root logger and are named "<program>.<sublogger>".
/// This name appears in logging output, allowing users to identify both
/// the BIND 10 program and the component within the program that generated
/// the Kea program and the component within the program that generated
/// the message.
///
/// When creating a logger, the abbreviated name "<sublogger>" can be used;
......
......@@ -36,7 +36,7 @@
#include <util/strutil.h>
// Note: as log4cplus and the BIND 10 logger have many concepts in common, and
// Note: as log4cplus and the Kea logger have many concepts in common, and
// thus many similar names, to disambiguate types we don't "use" the log4cplus
// namespace: instead, all log4cplus types are explicitly qualified.
......
......@@ -29,7 +29,7 @@
// log4cplus logger header file
#include <log4cplus/logger.h>
// BIND-10 logger files
// Kea logger files
#include <log/logger_level_impl.h>
#include <log/message_types.h>
#include <log/interprocess/interprocess_sync.h>
......@@ -46,14 +46,14 @@ namespace log {
/// This particular implementation is based on log4cplus (from sourceforge:
/// http://log4cplus.sourceforge.net). Particular items of note:
///
/// a) BIND 10 loggers have names of the form "program.sublogger". In other
/// a) Kea loggers have names of the form "program.sublogger". In other
/// words, each of the loggers is a sub-logger of the main program logger.
/// In log4cplus, there is a root logger (called "root" according to the
/// documentation, but actually unnamed) and all loggers created are subloggers
/// if it.
///
/// In this implementation, the log4cplus root logger is unused. Instead, the
/// BIND 10 root logger is created as a child of the log4cplus root logger,
/// Kea root logger is created as a child of the log4cplus root logger,
/// and all other loggers used in the program are created as sub-loggers of
/// that. In this way, the logging system can just include the name of the
/// logger in each message without the need to specially consider if the
......
......@@ -34,11 +34,11 @@ isc::log::Logger logger("log");
namespace isc {
namespace log {
// Convert BIND 10 level to a log4cplus logging level.
// Convert Kea level to a log4cplus logging level.
log4cplus::LogLevel
LoggerLevelImpl::convertFromBindLevel(const Level& level) {
// BIND 10 logging levels are small integers so we can do a table lookup
// Kea logging levels are small integers so we can do a table lookup
static const log4cplus::LogLevel log4cplus_levels[] = {
log4cplus::NOT_SET_LOG_LEVEL,
log4cplus::DEBUG_LOG_LEVEL,
......@@ -81,7 +81,7 @@ LoggerLevelImpl::convertFromBindLevel(const Level& level) {
}
}
// Convert log4cplus logging level to BIND 10 debug level. It is up to the
// Convert log4cplus logging level to Kea debug level. It is up to the
// caller to validate that the debug level is valid.
Level
LoggerLevelImpl::convertToBindLevel(const log4cplus::LogLevel loglevel) {
......
......@@ -33,9 +33,9 @@ namespace log {
/// defines the following logging levels: OFF_LOG_LEVEL, FATAL_LOG_LEVEL,
/// ERROR_LOG_LEVEL, WARN_LOG_LEVEL, INFO_LOG_LEVEL, DEBUG_LOG_LEVEL,
/// TRACE_LOG_LEVEL, ALL_LOG_LEVEL (which here will be abbreviated OFF, FATAL
/// etc.). Within the context of BIND-10, OFF, TRACE and ALL are not used
/// etc.). Within the context of Kea, OFF, TRACE and ALL are not used
/// and the idea of DEBUG has been extended, as will be seen below. In
/// BIND 10 terms, this is known as "severity"; the "logging level" usage will
/// Kea terms, this is known as "severity"; the "logging level" usage will
/// usually be used when talking about log4cplus aspects of the idea (as
/// log4cplus uses that teminology).
///
......@@ -60,7 +60,7 @@ namespace log {
/// it corresponds to the default level of DEBUG.
///
/// This class comprises nothing more than static methods to aid the conversion
/// of logging levels between log4cplus and BIND 10, and to register those
/// of logging levels between log4cplus and Kea, and to register those
/// levels with log4cplus.
class LoggerLevelImpl {
......@@ -72,33 +72,33 @@ public:
typedef log4cplus::tstring LogLevelString;
#endif
/// \brief Convert BIND 10 level to log4cplus logging level
/// \brief Convert Kea level to log4cplus logging level
///
/// Converts the BIND 10 severity level into a log4cplus logging level.
/// If the severity is DEBUG, the current BIND 10 debug level is taken
/// Converts the Kea severity level into a log4cplus logging level.
/// If the severity is DEBUG, the current Kea debug level is taken
/// into account when doing the conversion.
///
/// \param level BIND 10 severity and debug level
/// \param level Kea severity and debug level
///
/// \return Equivalent log4cplus logging level.
static
log4cplus::LogLevel convertFromBindLevel(const isc::log::Level& level);
/// \brief Convert log4cplus logging level to BIND 10 logging level
/// \brief Convert log4cplus logging level to Kea logging level
///
/// Converts the log4cplus log level into a BIND 10 severity level.
/// Converts the log4cplus log level into a Kea severity level.
/// The log4cplus log level may be non-standard in which case it is
/// encoding a BIND 10 debug level as well.
/// encoding a Kea debug level as well.
///
/// \param loglevel log4cplus log level
///
/// \return Equivalent BIND 10 severity and debug level
/// \return Equivalent Kea severity and debug level
static
isc::log::Level convertToBindLevel(const log4cplus::LogLevel loglevel);
/// \brief Convert string to log4cplus logging level
///
/// BIND 10 extends the set of logging levels in log4cplus with a group
/// Kea extends the set of logging levels in log4cplus with a group
/// of debug levels. These are given names DEBUG0 through DEBUG99 (with
/// DEBUG0 being equivalent to DEBUG, the standard log level. If the name
/// is DEBUGn but n lies outside the range of debug levels, debug level
......
......@@ -107,7 +107,7 @@ LoggerManager::init(const std::string& root, isc::log::Severity severity,
initSeverity() = severity;
initDebugLevel() = dbglevel;
// Create the BIND 10 root logger and set the default severity and
// Create the Kea root logger and set the default severity and
// debug level. This is the logger that has the name of the application.
// All other loggers created in this application will be its children.
setRootLoggerName(root);
......
......@@ -225,7 +225,7 @@ void LoggerManagerImpl::initRootLogger(isc::log::Severity severity,
// ignoring it.
log4cplus::Logger::getRoot().setLogLevel(log4cplus::OFF_LOG_LEVEL);
// Set the level for the BIND 10 root logger to the given severity and
// Set the level for the Kea root logger to the given severity and
// debug level.
log4cplus::Logger b10root = log4cplus::Logger::getInstance(
getRootLoggerName());
......
......@@ -43,7 +43,7 @@ struct OutputOption;
/// of those specifications.
///
/// Note: the logging has been implemented using a "pimpl" idiom to conceal
/// the underlying implementation (log4cplus) from the BIND 10 interface.
/// the underlying implementation (log4cplus) from the Kea interface.
/// This requires that there be an implementation class, even though in this
/// case, all the implementation class methods can be declared static.
......@@ -80,7 +80,7 @@ public:
/// messages) is called before a message is logged, log4cplus will output
/// a message to stderr noting that logging has not been initialized.
///
/// It is assumed here that the name of the BIND 10 root logger can be
/// It is assumed here that the name of the Kea root logger can be
/// obtained from the global function getRootLoggerName().
///
/// \param severity Severity to be associated with this logger
......@@ -144,7 +144,7 @@ private:
/// \brief Set default layout and severity for root logger
///
/// Initializes the root logger to BIND 10 defaults - console or buffered
/// Initializes the root logger to Kea defaults - console or buffered
/// output and the passed severity/debug level.
///
/// \param severity Severity of messages that the logger should output.
......
......@@ -170,7 +170,7 @@ void initLogger(isc::log::Severity severity, int dbglevel) {
// the default severity, debug level and destination with those specified
// in the environment variables. (The two-step approach is used as the
// setUnitTestRootLoggerCharacteristics() function is used in several
// places in the BIND 10 tests, and it avoid duplicating code.)
// places in the Kea tests, and it avoid duplicating code.)
resetUnitTestRootLogger();
}
......
......@@ -131,7 +131,7 @@ int main(int argc, char** argv) {
// is encountered, the previous one is added to the list.
//
// One complication is that there is deemed to be a default active when
// the parsing starts (console output for the BIND 10 root logger). This
// the parsing starts (console output for the Kea root logger). This
// is included in the logging specifications UNLESS the first switch on
// the command line is a "-l" flag starting a new logger. To track this,
// the "sw_found" flag is set when a switch is completely processed. The
......
......@@ -38,7 +38,7 @@ protected:
};
// Checks that the log4cplus and BIND 10 levels convert correctly
// Checks that the log4cplus and Kea levels convert correctly
TEST_F(LoggerLevelImplTest, DefaultConversionFromBind) {
log4cplus::LogLevel fatal =
LoggerLevelImpl::convertFromBindLevel(Level(FATAL));
......
......@@ -436,7 +436,7 @@ private:
bool was_unlocked_;
};
// Checks that the logger logs exclusively and other BIND 10 components
// Checks that the logger logs exclusively and other Kea components
// are locked out.
TEST_F(LoggerTest, Lock) {
......
......@@ -140,7 +140,7 @@ namespace io {
/// is malicious or extremely buggy and intentionally sends partial session
/// and keeps the connection, the receiver could block in receiving a session.
/// In general, we assume the forwarder doesn't do intentional blocking
/// as it's a local node and is generally a module of the same (BIND 10)
/// as it's a local node and is generally a module of the same (Kea)
/// system. The minimum requirement for the forwarder implementation (and
/// application) is to make sure the connection is closed once it detects
/// an error on it. Even a naive implementation that simply dies due to
......
......@@ -195,10 +195,11 @@ private:
/// used to construct the \c locker.
///
/// Right now there is no equivalent to pthread_cond_broadcast() or
/// pthread_cond_timedwait() in this class, because this class is meant
/// pthread_cond_timedwait() in this class, because this class was meant
/// for internal development of BIND 10 and we don't need these at the
/// moment. If and when we need these interfaces they can be added at that
/// point.
/// point. Also, Kea likely to not use threading model, so the usefulness
/// of this class is uncertain.
///
/// \note This class is defined as a friend class of \c Mutex and directly
/// refers to and modifies private internals of the \c Mutex class. It breaks
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment