BIND 10 trac1039, updated. 77c17d3f03de64646da89de238288a22c49e3eb5 [trac1039] Modifications to messages and put in alphabetical order
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Jun 24 11:01:09 UTC 2011
The branch, trac1039 has been updated
via 77c17d3f03de64646da89de238288a22c49e3eb5 (commit)
via 6f8383136ae83eb439c71a70c4bde83524b72c5e (commit)
via a16c7925f9a00f44680e2ca984def99d6bb3cecf (commit)
via 12c37af78f65301858be28679695a9e818270947 (commit)
from fef88019d325474471a353304499e7919023912e (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 77c17d3f03de64646da89de238288a22c49e3eb5
Author: Stephen Morris <stephen at isc.org>
Date: Fri Jun 24 12:00:47 2011 +0100
[trac1039] Modifications to messages and put in alphabetical order
commit 6f8383136ae83eb439c71a70c4bde83524b72c5e
Author: Stephen Morris <stephen at isc.org>
Date: Fri Jun 24 11:49:42 2011 +0100
[trac1039] Rename some message IDs
commit a16c7925f9a00f44680e2ca984def99d6bb3cecf
Author: Stephen Morris <stephen at isc.org>
Date: Fri Jun 24 11:31:40 2011 +0100
[trac1039] Remove $PREFIX
commit 12c37af78f65301858be28679695a9e818270947
Author: Stephen Morris <stephen at isc.org>
Date: Fri Jun 24 11:29:53 2011 +0100
[trac1039] Renamed message file to resolver_messages.mes
-----------------------------------------------------------------------
Summary of changes:
src/bin/resolver/Makefile.am | 12 +-
src/bin/resolver/main.cc | 8 +-
src/bin/resolver/resolver.cc | 52 ++++----
src/bin/resolver/resolver_log.h | 2 +-
.../{resolverdef.mes => resolver_messages.mes} | 133 ++++++++++----------
src/bin/resolver/tests/Makefile.am | 2 +-
6 files changed, 104 insertions(+), 105 deletions(-)
rename src/bin/resolver/{resolverdef.mes => resolver_messages.mes} (74%)
-----------------------------------------------------------------------
diff --git a/src/bin/resolver/Makefile.am b/src/bin/resolver/Makefile.am
index e826081..bce8307 100644
--- a/src/bin/resolver/Makefile.am
+++ b/src/bin/resolver/Makefile.am
@@ -20,10 +20,10 @@ pkglibexecdir = $(libexecdir)/@PACKAGE@
CLEANFILES = *.gcno *.gcda
CLEANFILES += resolver.spec spec_config.h
-CLEANFILES += resolverdef.cc resolverdef.h
+CLEANFILES += resolver_messages.cc resolver_messages.h
man_MANS = b10-resolver.8
-EXTRA_DIST = $(man_MANS) b10-resolver.xml resolverdef.mes
+EXTRA_DIST = $(man_MANS) b10-resolver.xml resolver_messages.mes
if ENABLE_MAN
@@ -39,11 +39,11 @@ spec_config.h: spec_config.h.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@
# Define rule to build logging source files from message file
-resolverdef.h resolverdef.cc: resolverdef.mes
- $(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/resolver/resolverdef.mes
+resolver_messages.h resolver_messages.cc: resolver_messages.mes
+ $(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/resolver/resolver_messages.mes
-BUILT_SOURCES = spec_config.h resolverdef.cc resolverdef.h
+BUILT_SOURCES = spec_config.h resolver_messages.cc resolver_messages.h
pkglibexec_PROGRAMS = b10-resolver
b10_resolver_SOURCES = resolver.cc resolver.h
@@ -53,7 +53,7 @@ b10_resolver_SOURCES += $(top_builddir)/src/bin/auth/change_user.h
b10_resolver_SOURCES += $(top_builddir)/src/bin/auth/common.h
b10_resolver_SOURCES += main.cc
-nodist_b10_resolver_SOURCES = resolverdef.cc resolverdef.h
+nodist_b10_resolver_SOURCES = resolver_messages.cc resolver_messages.h
b10_resolver_LDADD = $(top_builddir)/src/lib/dns/libdns++.la
diff --git a/src/bin/resolver/main.cc b/src/bin/resolver/main.cc
index 530f689..e7cc4cf 100644
--- a/src/bin/resolver/main.cc
+++ b/src/bin/resolver/main.cc
@@ -80,7 +80,7 @@ my_command_handler(const string& command, ConstElementPtr args) {
ConstElementPtr answer = createAnswer();
if (command == "print_message") {
- LOG_INFO(resolver_logger, RESOLVER_PRINTMSG).arg(args);
+ LOG_INFO(resolver_logger, RESOLVER_PRINT_COMMAND).arg(args);
/* let's add that message to our answer as well */
answer = createAnswer(0, args);
} else if (command == "shutdown") {
@@ -203,14 +203,14 @@ main(int argc, char* argv[]) {
DNSService dns_service(io_service, checkin, lookup, answer);
resolver->setDNSService(dns_service);
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_SERVICE);
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_SERVICE_CREATED);
cc_session = new Session(io_service.get_io_service());
config_session = new ModuleCCSession(specfile, *cc_session,
my_config_handler,
my_command_handler,
true, true);
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_CONFIGCHAN);
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_CONFIG_CHANNEL);
// FIXME: This does not belong here, but inside Boss
if (uid != NULL) {
@@ -218,7 +218,7 @@ main(int argc, char* argv[]) {
}
resolver->setConfigSession(config_session);
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_CONFIGLOAD);
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_CONFIG_LOADED);
LOG_INFO(resolver_logger, RESOLVER_STARTED);
io_service.run();
diff --git a/src/bin/resolver/resolver.cc b/src/bin/resolver/resolver.cc
index 934fbdf..1b8f1d9 100644
--- a/src/bin/resolver/resolver.cc
+++ b/src/bin/resolver/resolver.cc
@@ -83,7 +83,7 @@ public:
isc::cache::ResolverCache& cache)
{
assert(!rec_query_); // queryShutdown must be called first
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_QUSETUP);
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_RECQ_SETUP);
rec_query_ = new RecursiveQuery(dnss,
nsas, cache,
upstream_,
@@ -99,7 +99,7 @@ public:
// (this is not a safety check, just to prevent logging of
// actions that are not performed
if (rec_query_) {
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_QUSHUT);
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_RECQ_SHUTDOWN);
delete rec_query_;
rec_query_ = NULL;
}
@@ -112,7 +112,7 @@ public:
if (dnss) {
if (!upstream_.empty()) {
BOOST_FOREACH(const AddressPair& address, upstream) {
- LOG_INFO(resolver_logger, RESOLVER_FWDADDR)
+ LOG_INFO(resolver_logger, RESOLVER_FWD_ADDRESS)
.arg(address.first).arg(address.second);
}
} else {
@@ -128,11 +128,11 @@ public:
if (dnss) {
if (!upstream_root_.empty()) {
BOOST_FOREACH(const AddressPair& address, upstream_root) {
- LOG_INFO(resolver_logger, RESOLVER_ROOTADDR)
+ LOG_INFO(resolver_logger, RESOLVER_SET_ROOT_ADDRESS)
.arg(address.first).arg(address.second);
}
} else {
- LOG_WARN(resolver_logger, RESOLVER_NOROOTADDR);
+ LOG_WARN(resolver_logger, RESOLVER_NO_ROOT_ADDRESS);
}
}
}
@@ -302,7 +302,7 @@ public:
answer_message->toWire(renderer);
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_DETAIL, RESOLVER_DNSMSGSENT)
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_DETAIL, RESOLVER_DNS_MSG_SENT)
.arg(renderer.getLength()).arg(*answer_message);
}
};
@@ -395,13 +395,13 @@ Resolver::processMessage(const IOMessage& io_message,
// Ignore all responses.
if (query_message->getHeaderFlag(Message::HEADERFLAG_QR)) {
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_UNEXRESP);
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_UNEXPECTED_RESPONSE);
server->resume(false);
return;
}
} catch (const Exception& ex) {
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_HDRERR)
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_HEADER_ERROR)
.arg(ex.what());
server->resume(false);
return;
@@ -411,14 +411,14 @@ Resolver::processMessage(const IOMessage& io_message,
try {
query_message->fromWire(request_buffer);
} catch (const DNSProtocolError& error) {
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_PROTERR)
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_PROTOCOL_ERROR)
.arg(error.what()).arg(error.getRcode());
makeErrorMessage(query_message, answer_message,
buffer, error.getRcode());
server->resume(true);
return;
} catch (const Exception& ex) {
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_PROTERR)
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_PROTOCOL_ERROR)
.arg(ex.what()).arg(Rcode::SERVFAIL());
makeErrorMessage(query_message, answer_message,
buffer, Rcode::SERVFAIL());
@@ -429,7 +429,7 @@ Resolver::processMessage(const IOMessage& io_message,
// Note: there appears to be no LOG_DEBUG for a successfully-received
// message. This is not an oversight - it is handled below. In the
// meantime, output the full message for debug purposes (if requested).
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_DETAIL, RESOLVER_DNSMSGRCVD)
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_DETAIL, RESOLVER_DNS_MSG_RECVD)
.arg(*query_message);
// Perform further protocol-level validation.
@@ -439,12 +439,12 @@ Resolver::processMessage(const IOMessage& io_message,
makeErrorMessage(query_message, answer_message,
buffer, Rcode::NOTAUTH());
// Notify arrived, but we are not authoritative.
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_PROCESS, RESOLVER_NFYNOTAUTH);
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_PROCESS, RESOLVER_NOTIFY_RECVD);
} else if (query_message->getOpcode() != Opcode::QUERY()) {
// Unsupported opcode.
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_PROCESS, RESOLVER_OPCODEUNS)
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_PROCESS, RESOLVER_UNSUPPORTED_OPCODE)
.arg(query_message->getOpcode());
makeErrorMessage(query_message, answer_message,
buffer, Rcode::NOTIMP());
@@ -452,7 +452,7 @@ Resolver::processMessage(const IOMessage& io_message,
} else if (query_message->getRRCount(Message::SECTION_QUESTION) != 1) {
// Not one question
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_PROCESS, RESOLVER_NOTONEQUES)
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_PROCESS, RESOLVER_NOT_ONE_QUEST)
.arg(query_message->getRRCount(Message::SECTION_QUESTION));
makeErrorMessage(query_message, answer_message,
buffer, Rcode::FORMERR());
@@ -464,14 +464,14 @@ Resolver::processMessage(const IOMessage& io_message,
// Can't process AXFR request receoved over UDP
LOG_DEBUG(resolver_logger, RESOLVER_DBG_PROCESS,
- RESOLVER_AXFRUDP);
+ RESOLVER_AXFR_UDP);
makeErrorMessage(query_message, answer_message,
buffer, Rcode::FORMERR());
} else {
// ... or over TCP for that matter
LOG_DEBUG(resolver_logger, RESOLVER_DBG_PROCESS,
- RESOLVER_AXFRTCP);
+ RESOLVER_AXFR_TCP);
makeErrorMessage(query_message, answer_message,
buffer, Rcode::NOTIMP());
}
@@ -485,7 +485,7 @@ Resolver::processMessage(const IOMessage& io_message,
} else if (question->getClass() != RRClass::IN()) {
// Non-IN message received, refuse it.
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_PROCESS, RESOLVER_NOTIN)
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_PROCESS, RESOLVER_NON_IN_PACKET)
.arg(question->getClass());
makeErrorMessage(query_message, answer_message,
buffer, Rcode::REFUSED());
@@ -518,21 +518,21 @@ ResolverImpl::processNormalQuery(ConstMessagePtr query_message,
{
if (upstream_.empty()) {
// Processing normal query
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_NORMQUERY);
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_NORMAL_QUERY);
ConstQuestionPtr question = *query_message->beginQuestion();
rec_query_->resolve(*question, answer_message, buffer, server);
} else {
// Processing forward query
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_FWDQUERY);
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_IO, RESOLVER_FWD_QUERY);
rec_query_->forward(query_message, answer_message, buffer, server);
}
}
ConstElementPtr
Resolver::updateConfig(ConstElementPtr config) {
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_CONFIG, RESOLVER_CONFIGUPD)
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_CONFIG, RESOLVER_CONFIG_UPDATED)
.arg(*config);
try {
@@ -560,7 +560,7 @@ Resolver::updateConfig(ConstElementPtr config) {
// check for us
qtimeout = qtimeoutE->intValue();
if (qtimeout < -1) {
- LOG_ERROR(resolver_logger, RESOLVER_QUTMOSMALL).arg(qtimeout);
+ LOG_ERROR(resolver_logger, RESOLVER_QUERY_TMO_SMALL).arg(qtimeout);
isc_throw(BadValue, "Query timeout too small");
}
set_timeouts = true;
@@ -568,7 +568,7 @@ Resolver::updateConfig(ConstElementPtr config) {
if (ctimeoutE) {
ctimeout = ctimeoutE->intValue();
if (ctimeout < -1) {
- LOG_ERROR(resolver_logger, RESOLVER_CLTMOSMALL).arg(ctimeout);
+ LOG_ERROR(resolver_logger, RESOLVER_CLI_TMO_SMALL).arg(ctimeout);
isc_throw(BadValue, "Client timeout too small");
}
set_timeouts = true;
@@ -576,7 +576,7 @@ Resolver::updateConfig(ConstElementPtr config) {
if (ltimeoutE) {
ltimeout = ltimeoutE->intValue();
if (ltimeout < -1) {
- LOG_ERROR(resolver_logger, RESOLVER_LKTMOSMALL).arg(ltimeout);
+ LOG_ERROR(resolver_logger, RESOLVER_LKUP_TMO_SMALL).arg(ltimeout);
isc_throw(BadValue, "Lookup timeout too small");
}
set_timeouts = true;
@@ -586,7 +586,7 @@ Resolver::updateConfig(ConstElementPtr config) {
// _after_ the comparison (as opposed to before it for the timeouts)
// because "retries" is unsigned.
if (retriesE->intValue() < 0) {
- LOG_ERROR(resolver_logger, RESOLVER_RETRYNEG)
+ LOG_ERROR(resolver_logger, RESOLVER_NEG_RETRIES)
.arg(retriesE->intValue());
isc_throw(BadValue, "Negative number of retries");
}
@@ -633,7 +633,7 @@ Resolver::updateConfig(ConstElementPtr config) {
} catch (const isc::Exception& error) {
// Configuration error
- LOG_ERROR(resolver_logger, RESOLVER_CONFIGERR).arg(error.what());
+ LOG_ERROR(resolver_logger, RESOLVER_CONFIG_ERROR).arg(error.what());
return (isc::config::createAnswer(1, error.what()));
}
}
@@ -673,7 +673,7 @@ Resolver::setListenAddresses(const AddressList& addresses) {
void
Resolver::setTimeouts(int query_timeout, int client_timeout,
int lookup_timeout, unsigned retries) {
- LOG_DEBUG(resolver_logger, RESOLVER_DBG_CONFIG, RESOLVER_SETPARAM)
+ LOG_DEBUG(resolver_logger, RESOLVER_DBG_CONFIG, RESOLVER_SET_PARAMS)
.arg(query_timeout).arg(client_timeout).arg(lookup_timeout)
.arg(retries);
diff --git a/src/bin/resolver/resolver_log.h b/src/bin/resolver/resolver_log.h
index 63f6abb..8378b98 100644
--- a/src/bin/resolver/resolver_log.h
+++ b/src/bin/resolver/resolver_log.h
@@ -16,7 +16,7 @@
#define __RESOLVER_LOG__H
#include <log/macros.h>
-#include "resolverdef.h"
+#include "resolver_messages.h"
/// \brief Resolver Logging
///
diff --git a/src/bin/resolver/resolver_messages.mes b/src/bin/resolver/resolver_messages.mes
new file mode 100644
index 0000000..c379f2b
--- /dev/null
+++ b/src/bin/resolver/resolver_messages.mes
@@ -0,0 +1,192 @@
+# Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+# No namespace declaration - these constants go in the global namespace
+# along with the resolver methods.
+
+% RESOLVER_AXFR_TCP AXFR request received over TCP
+A debug message, the resolver received a NOTIFY message over TCP. The server
+cannot process it and will return an error message to the sender with the
+RCODE set to NOTIMP.
+
+% RESOLVER_AXFR_UDP AXFR request received over UDP
+A debug message, the resolver received a NOTIFY message over UDP. The server
+cannot process it (and in any case, an AXFR request should be sent over TCP)
+and will return an error message to the sender with the RCODE set to FORMERR.
+
+% RESOLVER_CLI_TMO_SMALL client timeout of %1 is too small
+An error indicating that the configuration value specified for the query
+timeout is too small.
+
+% RESOLVER_CONFIG_CHANNEL configuration channel created
+A debug message, output when the resolver has successfully established a
+connection to the configuration channel.
+
+% RESOLVER_CONFIG_ERROR error in configuration: %1
+An error was detected in a configuration update received by the resolver. This
+may be in the format of the configuration message (in which case this is a
+programming error) or it may be in the data supplied (in which case it is
+a user error). The reason for the error, given as a parameter in the message,
+will give more details.
+
+% RESOLVER_CONFIG_LOADED configuration loaded
+A debug message, output when the resolver configuration has been successfully
+loaded.
+
+% RESOLVER_CONFIG_UPDATED configuration updated: %1
+A debug message, the configuration has been updated with the specified
+information.
+
+% RESOLVER_CREATED main resolver object created
+A debug message, output when the Resolver() object has been created.
+
+% RESOLVER_DNS_MSG_RECVD DNS message received: %1
+A debug message, this always precedes some other logging message and is the
+formatted contents of the DNS packet that the other message refers to.
+
+% RESOLVER_DNS_MSG_SENT DNS message of %1 bytes sent: %2
+A debug message, this contains details of the response sent back to the querying
+system.
+
+% RESOLVER_FAILED resolver failed, reason: %1
+This is an error message output when an unhandled exception is caught by the
+resolver. All it can do is to shut down.
+
+% RESOLVER_FWD_ADDRESS setting forward address %1(%2)
+This message may appear multiple times during startup, and it lists the
+forward addresses used by the resolver when running in forwarding mode.
+
+% RESOLVER_FWD_QUERY processing forward query
+The received query has passed all checks and is being forwarded to upstream
+servers.
+
+% RESOLVER_HEADER_ERROR message received, exception when processing header: %1
+A debug message noting that an exception occurred during the processing of
+a received packet. The packet has been dropped.
+
+% RESOLVER_IXFR IXFR request received
+The resolver received a NOTIFY message over TCP. The server cannot process it
+and will return an error message to the sender with the RCODE set to NOTIMP.
+
+% RESOLVER_LKUP_TMO_SMALL lookup timeout of %1 is too small
+An error indicating that the configuration value specified for the lookup
+timeout is too small.
+
+% RESOLVER_NEG_RETRIES negative number of retries (%1) specified in the configuration
+An error message indicating that the resolver configuration has specified a
+negative retry count. Only zero or positive values are valid.
+
+% RESOLVER_NON_IN_PACKET non-IN class request received, returning REFUSED message
+A debug message, the resolver has received a DNS packet that was not IN class.
+The resolver cannot handle such packets, so is returning a REFUSED response to
+the sender.
+
+% RESOLVER_NORMAL_QUERY processing normal query
+The received query has passed all checks and is being processed by the resolver.
+
+% RESOLVER_NOTIFY_RECVD NOTIFY arrived but server is not authoritative
+The resolver received a NOTIFY message. As the server is not authoritative it
+cannot process it, so it returns an error message to the sender with the RCODE
+set to NOTAUTH.
+
+% RESOLVER_NOT_ONE_QUEST query contained %1 questions, exactly one question was expected
+A debug message, the resolver received a query that contained the number of
+entires in the question section detailed in the message. This is a malformed
+message, as a DNS query must contain only one question. The resolver will
+return a message to the sender with the RCODE set to FORMERR.
+
+% RESOLVER_NO_ROOT_ADDRESS no root addresses available
+A warning message during startup, indicates that no root addresses have been
+set. This may be because the resolver will get them from a priming query.
+
+% RESOLVER_PARSE_ERROR error parsing received message: %1 - returning %2
+A debug message noting that the resolver received a message and the parsing
+of the body of the message failed due to some non-protocol related reason
+(although the parsing of the header succeeded). The message parameters give
+a textual description of the problem and the RCODE returned.
+
+% RESOLVER_PRINT_COMMAND print message command, arguments are: %1
+This message is logged when a "print_message" command is received over the
+command channel.
+
+% RESOLVER_PROTOCOL_ERROR protocol error parsing received message: %1 - returning %2
+A debug message noting that the resolver received a message and the parsing
+of the body of the message failed due to some protocol error (although the
+parsing of the header succeeded). The message parameters give a textual
+description of the problem and the RCODE returned.
+
+% RESOLVER_QUERY_TMO_SMALL query timeout of %1 is too small
+An error indicating that the configuration value specified for the query
+timeout is too small.
+
+% RESOLVER_RECEIVED_MSG resolver has received a DNS message
+A debug message indicating that the resolver has received a message. Depending
+on the debug settings, subsequent log output will indicate the nature of the
+message.
+
+% RESOLVER_RECQ_SETUP query setup
+A debug message noting that the resolver is creating a RecursiveQuery object.
+
+% RESOLVER_RECQ_SHUTDOWN query shutdown
+A debug message noting that the resolver is destroying a RecursiveQuery object.
+
+% RESOLVER_RECURSIVE running in recursive mode
+This is an informational message that appears at startup noting that the
+resolver is running in recursive mode.
+
+% RESOLVER_SERVICE_CREATED service object created
+A debug message, output when the main service object (which handles the
+received queries) is created.
+
+% RESOLVER_SET_PARAMS query timeout: %1, client timeout: %2, lookup timeout: %3, retry count: %4
+A debug message, lists the parameters being set for the resolver. These are:
+query timeout: the timeout (in ms) used for queries originated by the resolver
+to upstream servers. Client timeout: the interval to resolver a query by
+a client: after this time, the resolver sends back a SERVFAIL to the client
+whilst continuing to resolver the query. Lookup timeout: the time at which the
+resolver gives up trying to resolve a query. Retry count: the number of times
+the resolver will retry a query to an upstream server if it gets a timeout.
+
+The client and lookup timeouts require a bit more explanation. The
+resolution of the client query might require a large number of queries to
+upstream nameservers. Even if none of these queries timeout, the total time
+taken to perform all the queries may exceed the client timeout. When this
+happens, a SERVFAIL is returned to the client, but the resolver continues
+with the resolution process. Data received is added to the cache. However,
+there comes a time - the lookup timeout - when even the resolver gives up.
+At this point it will wait for pending upstream queries to complete or
+timeout and drop the query.
+
+% RESOLVER_SET_ROOT_ADDRESS setting root address %1(%2)
+This message may appear multiple times during startup; it lists the root
+addresses used by the resolver.
+
+% RESOLVER_SHUTDOWN resolver shutdown complete
+This information message is output when the resolver has shut down.
+
+% RESOLVER_STARTED resolver started
+This informational message is output by the resolver when all initialization
+has been completed and it is entering its main loop.
+
+% RESOLVER_STARTING starting resolver with command line '%1'
+An informational message, this is output when the resolver starts up.
+
+% RESOLVER_UNEXPECTED_RESPONSE received unexpected response, ignoring
+A debug message noting that the server has received a response instead of a
+query and is ignoring it.
+
+% RESOLVER_UNSUPPORTED_OPCODE opcode %1 not supported by the resolver
+A debug message, the resolver received a message with an unsupported opcode
+(it can only process QUERY opcodes). It will return a message to the sender
+with the RCODE set to NOTIMP.
diff --git a/src/bin/resolver/resolverdef.mes b/src/bin/resolver/resolverdef.mes
deleted file mode 100644
index 47433a4..0000000
--- a/src/bin/resolver/resolverdef.mes
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-$PREFIX RESOLVER_
-# No namespace declaration - these constants go in the global namespace
-# along with the resolver methods.
-
-% AXFRTCP AXFR request received over TCP
-A debug message, the resolver received a NOTIFY message over TCP. The server
-cannot process it and will return an error message to the sender with the
-RCODE set to NOTIMP.
-
-% AXFRUDP AXFR request received over UDP
-A debug message, the resolver received a NOTIFY message over UDP. The server
-cannot process it (and in any case, an AXFR request should be sent over TCP)
-and will return an error message to the sender with the RCODE set to FORMERR.
-
-% CONFIGCHAN configuration channel created
-A debug message, output when the resolver has successfully established a
-connection to the configuration channel.
-
-% CONFIGERR error in configuration: %1
-An error was detected in a configuration update received by the resolver. This
-may be in the format of the configuration message (in which case this is a
-programming error) or it may be in the data supplied (in which case it is
-a user error). The reason for the error, given as a parameter in the message,
-will give more details.
-
-% CONFIGLOAD configuration loaded
-A debug message, output when the resolver configuration has been successfully
-loaded.
-
-% CONFIGUPD configuration updated: %1
-A debug message, the configuration has been updated with the specified
-information.
-
-% DNSMSGRCVD DNS message received: %1
-A debug message, this always precedes some other logging message and is the
-formatted contents of the DNS packet that the other message refers to.
-
-% DNSMSGSENT DNS message of %1 bytes sent: %2
-A debug message, this contains details of the response sent back to the querying
-system.
-
-% CLTMOSMALL client timeout of %1 is too small
-An error indicating that the configuration value specified for the query
-timeout is too small.
-
-% CREATED main resolver object created
-A debug message, output when the Resolver() object has been created.
-
-% FAILED resolver failed, reason: %1
-This is an error message output when an unhandled exception is caught by the
-resolver. All it can do is to shut down.
-
-% FWDADDR setting forward address %1(%2)
-This message may appear multiple times during startup, and it lists the
-forward addresses used by the resolver when running in forwarding mode.
-
-% FWDQUERY processing forward query
-The received query has passed all checks and is being forwarded to upstream
-servers.
-
-% HDRERR message received, exception when processing header: %1
-A debug message noting that an exception occurred during the processing of
-a received packet. The packet has been dropped.
-
-% IXFR IXFR request received
-The resolver received a NOTIFY message over TCP. The server cannot process it
-and will return an error message to the sender with the RCODE set to NOTIMP.
-
-% LKTMOSMALL lookup timeout of %1 is too small
-An error indicating that the configuration value specified for the lookup
-timeout is too small.
-
-% NFYNOTAUTH NOTIFY arrived but server is not authoritative
-The resolver received a NOTIFY message. As the server is not authoritative it
-cannot process it, so it returns an error message to the sender with the RCODE
-set to NOTAUTH.
-
-% NORMQUERY processing normal query
-The received query has passed all checks and is being processed by the resolver.
-
-% NOTIN non-IN class request received, returning REFUSED message
-A debug message, the resolver has received a DNS packet that was not IN class.
-The resolver cannot handle such packets, so is returning a REFUSED response to
-the sender.
-
-% NOROOTADDR no root addresses available
-A warning message during startup, indicates that no root addresses have been
-set. This may be because the resolver will get them from a priming query.
-
-% NOTONEQUES query contained %1 questions, exactly one question was expected
-A debug message, the resolver received a query that contained the number of
-entires in the question section detailed in the message. This is a malformed
-message, as a DNS query must contain only one question. The resolver will
-return a message to the sender with the RCODE set to FORMERR.
-
-% OPCODEUNS opcode %1 not supported by the resolver
-A debug message, the resolver received a message with an unsupported opcode
-(it can only process QUERY opcodes). It will return a message to the sender
-with the RCODE set to NOTIMP.
-
-% PARSEERR error parsing received message: %1 - returning %2
-A debug message noting that the resolver received a message and the parsing
-of the body of the message failed due to some non-protocol related reason
-(although the parsing of the header succeeded). The message parameters give
-a textual description of the problem and the RCODE returned.
-
-% PRINTMSG print message command, arguments are: %1
-This message is logged when a "print_message" command is received over the
-command channel.
-
-% PROTERR protocol error parsing received message: %1 - returning %2
-A debug message noting that the resolver received a message and the parsing
-of the body of the message failed due to some protocol error (although the
-parsing of the header succeeded). The message parameters give a textual
-description of the problem and the RCODE returned.
-
-% QUSETUP query setup
-A debug message noting that the resolver is creating a RecursiveQuery object.
-
-% QUSHUT query shutdown
-A debug message noting that the resolver is destroying a RecursiveQuery object.
-
-% QUTMOSMALL query timeout of %1 is too small
-An error indicating that the configuration value specified for the query
-timeout is too small.
-
-% RECURSIVE running in recursive mode
-This is an informational message that appears at startup noting that the
-resolver is running in recursive mode.
-
-% RECVMSG resolver has received a DNS message
-A debug message indicating that the resolver has received a message. Depending
-on the debug settings, subsequent log output will indicate the nature of the
-message.
-
-% RETRYNEG negative number of retries (%1) specified in the configuration
-An error message indicating that the resolver configuration has specified a
-negative retry count. Only zero or positive values are valid.
-
-% ROOTADDR setting root address %1(%2)
-This message may appear multiple times during startup; it lists the root
-addresses used by the resolver.
-
-% SERVICE service object created
-A debug message, output when the main service object (which handles the
-received queries) is created.
-
-% SETPARAM query timeout: %1, client timeout: %2, lookup timeout: %3, retry count: %4
-A debug message, lists the parameters associated with the message. These are:
-query timeout: the timeout (in ms) used for queries originated by the resolver
-to upstream servers. Client timeout: the interval to resolver a query by
-a client: after this time, the resolver sends back a SERVFAIL to the client
-whilst continuing to resolver the query. Lookup timeout: the time at which the
-resolver gives up trying to resolve a query. Retry count: the number of times
-the resolver will retry a query to an upstream server if it gets a timeout.
-
-The client and lookup timeouts require a bit more explanation. The
-resolution of the client query might require a large number of queries to
-upstream nameservers. Even if none of these queries timeout, the total time
-taken to perform all the queries may exceed the client timeout. When this
-happens, a SERVFAIL is returned to the client, but the resolver continues
-with the resolution process. Data received is added to the cache. However,
-there comes a time - the lookup timeout - when even the resolve gives up.
-At this point it will wait for pending upstream queries to complete or
-timeout and drop the query.
-
-% SHUTDOWN resolver shutdown complete
-This information message is output when the resolver has shut down.
-
-% STARTED resolver started
-This informational message is output by the resolver when all initialization
-has been completed and it is entering its main loop.
-
-% STARTING starting resolver with command line '%1'
-An informational message, this is output when the resolver starts up.
-
-% UNEXRESP received unexpected response, ignoring
-A debug message noting that the server has received a response instead of a
-query and is ignoring it.
diff --git a/src/bin/resolver/tests/Makefile.am b/src/bin/resolver/tests/Makefile.am
index 35b5398..e0d9fd4 100644
--- a/src/bin/resolver/tests/Makefile.am
+++ b/src/bin/resolver/tests/Makefile.am
@@ -28,7 +28,7 @@ run_unittests_SOURCES += resolver_config_unittest.cc
run_unittests_SOURCES += response_scrubber_unittest.cc
run_unittests_SOURCES += run_unittests.cc
-nodist_run_unittests_SOURCES = ../resolverdef.h ../resolverdef.cc
+nodist_run_unittests_SOURCES = ../resolver_messages.h ../resolver_messages.cc
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
More information about the bind10-changes
mailing list