mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 22:45:18 +00:00
Merge branch 'master' of ssh://bind10.isc.org/var/bind10/git/bind10
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
200. [bug] Jelte
|
||||||
|
Fixed a bug where incoming TCP connections were not closed.
|
||||||
|
(Trac #589, git 1d88daaa24e8b1ab27f28be876f40a144241e93b)
|
||||||
|
|
||||||
199. [func] ocean
|
199. [func] ocean
|
||||||
Cache negative responses (NXDOMAIN/NODATA) from authoritative
|
Cache negative responses (NXDOMAIN/NODATA) from authoritative
|
||||||
server for recursive resolver.
|
server for recursive resolver.
|
||||||
|
@@ -177,7 +177,7 @@
|
|||||||
/// Qu: www.sub.example.com\n
|
/// Qu: www.sub.example.com\n
|
||||||
/// Zo: example.com
|
/// Zo: example.com
|
||||||
///
|
///
|
||||||
/// An: <nothing>
|
/// An: (nothing)
|
||||||
///
|
///
|
||||||
/// Au(1): sub.example.com NS ns0.sub.example.com\n
|
/// Au(1): sub.example.com NS ns0.sub.example.com\n
|
||||||
/// Au(2): sub.example.com NS ns1.example.net
|
/// Au(2): sub.example.com NS ns1.example.net
|
||||||
@@ -312,7 +312,7 @@ public:
|
|||||||
/// QNAME is equal to or in the supplied relationship with the given name.
|
/// QNAME is equal to or in the supplied relationship with the given name.
|
||||||
///
|
///
|
||||||
/// \param section Section of the message to be scrubbed.
|
/// \param section Section of the message to be scrubbed.
|
||||||
/// \param zone Names against which RRsets should be checked. Note that
|
/// \param names Names against which RRsets should be checked. Note that
|
||||||
/// this is a vector of pointers to Name objects; they are assumed to
|
/// this is a vector of pointers to Name objects; they are assumed to
|
||||||
/// independently exist, and the caller retains ownership of them and is
|
/// independently exist, and the caller retains ownership of them and is
|
||||||
/// assumed to destroy them when needed.
|
/// assumed to destroy them when needed.
|
||||||
|
@@ -63,8 +63,10 @@ public:
|
|||||||
///
|
///
|
||||||
/// \param io_message The event message to handle
|
/// \param io_message The event message to handle
|
||||||
/// \param message The DNS MessagePtr that needs handling
|
/// \param message The DNS MessagePtr that needs handling
|
||||||
|
/// \param answer_message The final answer will be constructed in
|
||||||
|
/// this MessagePtr
|
||||||
/// \param buffer The final answer is put here
|
/// \param buffer The final answer is put here
|
||||||
/// \param DNSServer DNSServer object to use
|
/// \param server DNSServer object to use
|
||||||
virtual void operator()(const IOMessage& io_message,
|
virtual void operator()(const IOMessage& io_message,
|
||||||
isc::dns::MessagePtr message,
|
isc::dns::MessagePtr message,
|
||||||
isc::dns::MessagePtr answer_message,
|
isc::dns::MessagePtr answer_message,
|
||||||
|
@@ -66,8 +66,8 @@ public:
|
|||||||
///
|
///
|
||||||
/// \param io_service The IOService to work with
|
/// \param io_service The IOService to work with
|
||||||
/// \param port the port to listen on
|
/// \param port the port to listen on
|
||||||
/// \param ipv4 If true, listen on ipv4 'any'
|
/// \param use_ipv4 If true, listen on ipv4 'any'
|
||||||
/// \param ipv6 If true, listen on ipv6 'any'
|
/// \param use_ipv6 If true, listen on ipv6 'any'
|
||||||
/// \param checkin Provider for cc-channel events (see \c SimpleCallback)
|
/// \param checkin Provider for cc-channel events (see \c SimpleCallback)
|
||||||
/// \param lookup The lookup provider (see \c DNSLookup)
|
/// \param lookup The lookup provider (see \c DNSLookup)
|
||||||
/// \param answer The answer provider (see \c DNSAnswer)
|
/// \param answer The answer provider (see \c DNSAnswer)
|
||||||
|
@@ -61,7 +61,7 @@ public:
|
|||||||
/// This constructor never throws an exception.
|
/// This constructor never throws an exception.
|
||||||
///
|
///
|
||||||
/// \param asio_address The ASIO \c ip::address to be converted.
|
/// \param asio_address The ASIO \c ip::address to be converted.
|
||||||
IOAddress(const asio::ip::address& asio_adress);
|
IOAddress(const asio::ip::address& asio_address);
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/// \brief Convert the address to a string.
|
/// \brief Convert the address to a string.
|
||||||
|
@@ -115,6 +115,7 @@ TCPServer::operator()(error_code ec, size_t length) {
|
|||||||
CORO_YIELD async_read(*socket_, asio::buffer(data_.get(),
|
CORO_YIELD async_read(*socket_, asio::buffer(data_.get(),
|
||||||
TCP_MESSAGE_LENGTHSIZE), *this);
|
TCP_MESSAGE_LENGTHSIZE), *this);
|
||||||
if (ec) {
|
if (ec) {
|
||||||
|
socket_->close();
|
||||||
CORO_YIELD return;
|
CORO_YIELD return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,6 +128,7 @@ TCPServer::operator()(error_code ec, size_t length) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ec) {
|
if (ec) {
|
||||||
|
socket_->close();
|
||||||
CORO_YIELD return;
|
CORO_YIELD return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,6 +162,7 @@ TCPServer::operator()(error_code ec, size_t length) {
|
|||||||
// If we don't have a DNS Lookup provider, there's no point in
|
// If we don't have a DNS Lookup provider, there's no point in
|
||||||
// continuing; we exit the coroutine permanently.
|
// continuing; we exit the coroutine permanently.
|
||||||
if (lookup_callback_ == NULL) {
|
if (lookup_callback_ == NULL) {
|
||||||
|
socket_->close();
|
||||||
CORO_YIELD return;
|
CORO_YIELD return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,6 +180,9 @@ TCPServer::operator()(error_code ec, size_t length) {
|
|||||||
// The 'done_' flag indicates whether we have an answer
|
// The 'done_' flag indicates whether we have an answer
|
||||||
// to send back. If not, exit the coroutine permanently.
|
// to send back. If not, exit the coroutine permanently.
|
||||||
if (!done_) {
|
if (!done_) {
|
||||||
|
// TODO: should we keep the connection open for a short time
|
||||||
|
// to see if new requests come in?
|
||||||
|
socket_->close();
|
||||||
CORO_YIELD return;
|
CORO_YIELD return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,6 +201,10 @@ TCPServer::operator()(error_code ec, size_t length) {
|
|||||||
// (though we have nothing further to do, so the coroutine
|
// (though we have nothing further to do, so the coroutine
|
||||||
// will simply exit at that time).
|
// will simply exit at that time).
|
||||||
CORO_YIELD async_write(*socket_, bufs, *this);
|
CORO_YIELD async_write(*socket_, bufs, *this);
|
||||||
|
|
||||||
|
// TODO: should we keep the connection open for a short time
|
||||||
|
// to see if new requests come in?
|
||||||
|
socket_->close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -222,6 +222,7 @@ public:
|
|||||||
|
|
||||||
/// Sets the ElementPtr at the given key
|
/// Sets the ElementPtr at the given key
|
||||||
/// \param name The key of the Element to set
|
/// \param name The key of the Element to set
|
||||||
|
/// \param element The ElementPtr to set at the given key.
|
||||||
virtual void set(const std::string& name, ConstElementPtr element);
|
virtual void set(const std::string& name, ConstElementPtr element);
|
||||||
|
|
||||||
/// Remove the ElementPtr at the given key
|
/// Remove the ElementPtr at the given key
|
||||||
@@ -315,10 +316,11 @@ public:
|
|||||||
/// Creates an Element from the given input stream, where we keep
|
/// Creates an Element from the given input stream, where we keep
|
||||||
/// track of the location in the stream for error reporting.
|
/// track of the location in the stream for error reporting.
|
||||||
///
|
///
|
||||||
/// \param in The string to parse the element from
|
/// \param in The string to parse the element from.
|
||||||
|
/// \param file The input file name.
|
||||||
/// \param line A reference to the int where the function keeps
|
/// \param line A reference to the int where the function keeps
|
||||||
/// track of the current line.
|
/// track of the current line.
|
||||||
/// \param line A reference to the int where the function keeps
|
/// \param pos A reference to the int where the function keeps
|
||||||
/// track of the current position within the current line.
|
/// track of the current position within the current line.
|
||||||
/// \return An ElementPtr that contains the element(s) specified
|
/// \return An ElementPtr that contains the element(s) specified
|
||||||
/// in the given input stream.
|
/// in the given input stream.
|
||||||
@@ -548,18 +550,18 @@ void merge(ElementPtr element, ConstElementPtr other);
|
|||||||
///
|
///
|
||||||
/// \brief Insert the Element as a string into stream.
|
/// \brief Insert the Element as a string into stream.
|
||||||
///
|
///
|
||||||
/// This method converts the \c ElemetPtr into a string with
|
/// This method converts the \c ElementPtr into a string with
|
||||||
/// \c Element::str() and inserts it into the
|
/// \c Element::str() and inserts it into the
|
||||||
/// output stream \c out.
|
/// output stream \c out.
|
||||||
///
|
///
|
||||||
/// This function overloads the global operator<< to behave as described in
|
/// This function overloads the global operator<< to behave as described in
|
||||||
/// ostream::operator<< but applied to \c ElementPtr objects.
|
/// ostream::operator<< but applied to \c ElementPtr objects.
|
||||||
///
|
///
|
||||||
/// \param os A \c std::ostream object on which the insertion operation is
|
/// \param out A \c std::ostream object on which the insertion operation is
|
||||||
/// performed.
|
/// performed.
|
||||||
/// \param e The \c ElementPtr object to insert.
|
/// \param e The \c ElementPtr object to insert.
|
||||||
/// \return A reference to the same \c std::ostream object referenced by
|
/// \return A reference to the same \c std::ostream object referenced by
|
||||||
/// parameter \c os after the insertion operation.
|
/// parameter \c out after the insertion operation.
|
||||||
std::ostream& operator<<(std::ostream& out, const Element& e);
|
std::ostream& operator<<(std::ostream& out, const Element& e);
|
||||||
|
|
||||||
bool operator==(const Element& a, const Element& b);
|
bool operator==(const Element& a, const Element& b);
|
||||||
|
@@ -99,7 +99,7 @@ namespace isc {
|
|||||||
/// \brief Sets the default timeout for blocking reads
|
/// \brief Sets the default timeout for blocking reads
|
||||||
/// in this session to the given number of milliseconds
|
/// in this session to the given number of milliseconds
|
||||||
/// \param milliseconds the timeout for blocking reads in
|
/// \param milliseconds the timeout for blocking reads in
|
||||||
/// milliseconds, if this is set to 0, reads will block
|
/// milliseconds; if this is set to 0, reads will block
|
||||||
/// forever.
|
/// forever.
|
||||||
virtual void setTimeout(size_t milliseconds) = 0;
|
virtual void setTimeout(size_t milliseconds) = 0;
|
||||||
|
|
||||||
|
@@ -53,6 +53,8 @@ namespace isc { namespace config {
|
|||||||
/// Create a \c ModuleSpec instance with the given data as
|
/// Create a \c ModuleSpec instance with the given data as
|
||||||
/// the specification
|
/// the specification
|
||||||
/// \param e The Element containing the data specification
|
/// \param e The Element containing the data specification
|
||||||
|
/// \param check If false, the module specification in the file
|
||||||
|
/// is not checked to be of the correct form.
|
||||||
explicit ModuleSpec(isc::data::ConstElementPtr e,
|
explicit ModuleSpec(isc::data::ConstElementPtr e,
|
||||||
const bool check = true)
|
const bool check = true)
|
||||||
throw(ModuleSpecError);
|
throw(ModuleSpecError);
|
||||||
@@ -86,6 +88,8 @@ namespace isc { namespace config {
|
|||||||
// configuration specification
|
// configuration specification
|
||||||
/// Validates the given configuration data for this specification.
|
/// Validates the given configuration data for this specification.
|
||||||
/// \param data The base \c Element of the data to check
|
/// \param data The base \c Element of the data to check
|
||||||
|
/// \param full If true, all non-optional configuration parameters
|
||||||
|
/// must be specified.
|
||||||
/// \return true if the data conforms to the specification,
|
/// \return true if the data conforms to the specification,
|
||||||
/// false otherwise.
|
/// false otherwise.
|
||||||
bool validateConfig(isc::data::ConstElementPtr data,
|
bool validateConfig(isc::data::ConstElementPtr data,
|
||||||
|
@@ -289,7 +289,7 @@ public:
|
|||||||
/// - \c result::PARTIALMATCH: A zone whose origin is a
|
/// - \c result::PARTIALMATCH: A zone whose origin is a
|
||||||
// super domain of \c name is found (but there is no exact match)
|
// super domain of \c name is found (but there is no exact match)
|
||||||
/// - \c result::NOTFOUND: For all other cases.
|
/// - \c result::NOTFOUND: For all other cases.
|
||||||
/// - \c zone: A <Boost> shared pointer to the found \c Zone object if one
|
/// - \c zone: A "Boost" shared pointer to the found \c Zone object if one
|
||||||
// is found; otherwise \c NULL.
|
// is found; otherwise \c NULL.
|
||||||
///
|
///
|
||||||
/// This method never throws an exception.
|
/// This method never throws an exception.
|
||||||
|
@@ -107,7 +107,7 @@ public:
|
|||||||
/// - \c result::PARTIALMATCH: A zone whose origin is a
|
/// - \c result::PARTIALMATCH: A zone whose origin is a
|
||||||
/// super domain of \c name is found (but there is no exact match)
|
/// super domain of \c name is found (but there is no exact match)
|
||||||
/// - \c result::NOTFOUND: For all other cases.
|
/// - \c result::NOTFOUND: For all other cases.
|
||||||
/// - \c zone: A <Boost> shared pointer to the found \c Zone object if one
|
/// - \c zone: A "Boost" shared pointer to the found \c Zone object if one
|
||||||
/// is found; otherwise \c NULL.
|
/// is found; otherwise \c NULL.
|
||||||
///
|
///
|
||||||
/// This method never throws an exception.
|
/// This method never throws an exception.
|
||||||
|
@@ -213,7 +213,7 @@ public:
|
|||||||
/// \param name The owner name of the OPT RR. This must be the root name.
|
/// \param name The owner name of the OPT RR. This must be the root name.
|
||||||
/// \param rrclass The RR class of the OPT RR.
|
/// \param rrclass The RR class of the OPT RR.
|
||||||
/// \param rrtype This must specify the OPT RR type.
|
/// \param rrtype This must specify the OPT RR type.
|
||||||
/// \param rrttl The TTL of the OPT RR.
|
/// \param ttl The TTL of the OPT RR.
|
||||||
/// \param rdata The RDATA of the OPT RR.
|
/// \param rdata The RDATA of the OPT RR.
|
||||||
EDNS(const Name& name, const RRClass& rrclass, const RRType& rrtype,
|
EDNS(const Name& name, const RRClass& rrclass, const RRType& rrtype,
|
||||||
const RRTTL& ttl, const rdata::Rdata& rdata);
|
const RRTTL& ttl, const rdata::Rdata& rdata);
|
||||||
@@ -418,7 +418,7 @@ private:
|
|||||||
/// \param name The owner name of the OPT RR. This must be the root name.
|
/// \param name The owner name of the OPT RR. This must be the root name.
|
||||||
/// \param rrclass The RR class of the OPT RR.
|
/// \param rrclass The RR class of the OPT RR.
|
||||||
/// \param rrtype This must specify the OPT RR type.
|
/// \param rrtype This must specify the OPT RR type.
|
||||||
/// \param rrttl The TTL of the OPT RR.
|
/// \param ttl The TTL of the OPT RR.
|
||||||
/// \param rdata The RDATA of the OPT RR.
|
/// \param rdata The RDATA of the OPT RR.
|
||||||
/// \param extended_rcode A placeholder to store the topmost 8 bits of the
|
/// \param extended_rcode A placeholder to store the topmost 8 bits of the
|
||||||
/// extended Rcode.
|
/// extended Rcode.
|
||||||
|
@@ -110,7 +110,7 @@ typedef boost::function<void(RRsetPtr)> MasterLoadCallback;
|
|||||||
/// but this is not even though it's valid per RFC1035:
|
/// but this is not even though it's valid per RFC1035:
|
||||||
/// \code example.com. IN 3600 A 192.0.2.1
|
/// \code example.com. IN 3600 A 192.0.2.1
|
||||||
/// \endcode
|
/// \endcode
|
||||||
/// - <TTL>, <RRCLASS>, and <RRTYPE> must be recognizable by the \c RRTTL,
|
/// - "TTL", "RRCLASS", and "RRTYPE" must be recognizable by the \c RRTTL,
|
||||||
/// RRClass and RRType class implementations of this library. In particular,
|
/// RRClass and RRType class implementations of this library. In particular,
|
||||||
/// as of this writing TTL must be a decimal number (a convenient extension
|
/// as of this writing TTL must be a decimal number (a convenient extension
|
||||||
/// such as "1H" instead of 3600 cannot be used). Not all standard RR
|
/// such as "1H" instead of 3600 cannot be used). Not all standard RR
|
||||||
@@ -213,7 +213,7 @@ typedef boost::function<void(RRsetPtr)> MasterLoadCallback;
|
|||||||
/// \param filename A path to a master zone file to be loaded.
|
/// \param filename A path to a master zone file to be loaded.
|
||||||
/// \param origin The origin name of the zone.
|
/// \param origin The origin name of the zone.
|
||||||
/// \param zone_class The RR class of the zone.
|
/// \param zone_class The RR class of the zone.
|
||||||
/// \param callbck A callback functor or function that is to be called
|
/// \param callback A callback functor or function that is to be called
|
||||||
/// for each RRset.
|
/// for each RRset.
|
||||||
void masterLoad(const char* const filename, const Name& origin,
|
void masterLoad(const char* const filename, const Name& origin,
|
||||||
const RRClass& zone_class, MasterLoadCallback callback);
|
const RRClass& zone_class, MasterLoadCallback callback);
|
||||||
@@ -231,7 +231,7 @@ void masterLoad(const char* const filename, const Name& origin,
|
|||||||
/// \param input An input stream object that is to emit zone's RRs.
|
/// \param input An input stream object that is to emit zone's RRs.
|
||||||
/// \param origin The origin name of the zone.
|
/// \param origin The origin name of the zone.
|
||||||
/// \param zone_class The RR class of the zone.
|
/// \param zone_class The RR class of the zone.
|
||||||
/// \param callbck A callback functor or function that is to be called for
|
/// \param callback A callback functor or function that is to be called for
|
||||||
/// each RRset.
|
/// each RRset.
|
||||||
void masterLoad(std::istream& input, const Name& origin,
|
void masterLoad(std::istream& input, const Name& origin,
|
||||||
const RRClass& zone_class, MasterLoadCallback callback);
|
const RRClass& zone_class, MasterLoadCallback callback);
|
||||||
|
@@ -141,7 +141,7 @@ typedef SectionIterator<RRsetPtr> RRsetIterator;
|
|||||||
/// - We may want to provide an "iterator" for all RRsets/RRs for convenience.
|
/// - We may want to provide an "iterator" for all RRsets/RRs for convenience.
|
||||||
/// This will be for applications that do not care about performance much,
|
/// This will be for applications that do not care about performance much,
|
||||||
/// so the implementation can only be moderately efficient.
|
/// so the implementation can only be moderately efficient.
|
||||||
/// - may want to provide a "find" method for a specified type
|
/// - We may want to provide a "find" method for a specified type
|
||||||
/// of RR in the message.
|
/// of RR in the message.
|
||||||
class Message {
|
class Message {
|
||||||
public:
|
public:
|
||||||
@@ -155,8 +155,8 @@ public:
|
|||||||
///
|
///
|
||||||
/// Only the defined constants are valid where a header flag is required
|
/// Only the defined constants are valid where a header flag is required
|
||||||
/// in this library (e.g., in \c Message::setHeaderFlag()).
|
/// in this library (e.g., in \c Message::setHeaderFlag()).
|
||||||
/// Since these are enum constants, however, invalid value could be passed
|
/// Since these are enum constants, however, an invalid value could be
|
||||||
/// via casting without an error at compilation time.
|
/// passed via casting without an error at compilation time.
|
||||||
/// It is generally the callee's responsibility to check and reject invalid
|
/// It is generally the callee's responsibility to check and reject invalid
|
||||||
/// values.
|
/// values.
|
||||||
/// Of course, applications shouldn't pass invalid values even if the
|
/// Of course, applications shouldn't pass invalid values even if the
|
||||||
@@ -168,7 +168,7 @@ public:
|
|||||||
/// specified flag in the second 16 bits of the DNS Header section
|
/// specified flag in the second 16 bits of the DNS Header section
|
||||||
/// in order to make the internal implementation simpler.
|
/// in order to make the internal implementation simpler.
|
||||||
/// For example, \c HEADERFLAG_QR is defined to be 0x8000 as the QR
|
/// For example, \c HEADERFLAG_QR is defined to be 0x8000 as the QR
|
||||||
/// bit is the most significant bit of the 2nd 16 bits of the header.
|
/// bit is the most significant bit of the second 16 bits of the header.
|
||||||
/// However, applications should not assume this coincidence and
|
/// However, applications should not assume this coincidence and
|
||||||
/// must solely use the enum representations.
|
/// must solely use the enum representations.
|
||||||
/// Any usage based on the assumption of the underlying values is invalid
|
/// Any usage based on the assumption of the underlying values is invalid
|
||||||
|
@@ -54,13 +54,13 @@ typedef boost::shared_ptr<const Question> ConstQuestionPtr;
|
|||||||
/// class.
|
/// class.
|
||||||
/// This may look odd in that an "RRset" and "Question" are similar from the
|
/// This may look odd in that an "RRset" and "Question" are similar from the
|
||||||
/// protocol point of view: Both are used as a semantics unit of DNS messages;
|
/// protocol point of view: Both are used as a semantics unit of DNS messages;
|
||||||
/// both share the same set of components, name, RR type and RR class.
|
/// both share the same set of components (name, RR type and RR class).
|
||||||
///
|
///
|
||||||
/// In fact, BIND9 didn't introduce a separate data structure for Questions,
|
/// In fact, BIND9 didn't introduce a separate data structure for Questions,
|
||||||
/// and use the same \c "rdataset" structure for both RRsets and Questions.
|
/// and use the same \c "rdataset" structure for both RRsets and Questions.
|
||||||
/// We could take the same approach, but chose to adopt the different design.
|
/// We could take the same approach, but chose to adopt the different design.
|
||||||
/// One reason for that is because a Question and an RRset are still
|
/// One reason for that is because a Question and an RRset are still
|
||||||
/// different, and a Question might not be cleanly defined if (e.g.) it were
|
/// different, and a Question might not be cleanly defined, e.g., if it were
|
||||||
/// a derived class of some "RRset-like" class.
|
/// a derived class of some "RRset-like" class.
|
||||||
/// For example, we couldn't give a reasonable semantics for \c %getTTL() or
|
/// For example, we couldn't give a reasonable semantics for \c %getTTL() or
|
||||||
/// \c %setTTL() methods for a Question, since it's not associated with the
|
/// \c %setTTL() methods for a Question, since it's not associated with the
|
||||||
@@ -74,14 +74,14 @@ typedef boost::shared_ptr<const Question> ConstQuestionPtr;
|
|||||||
///
|
///
|
||||||
/// On the other hand, we do not expect a strong need for customizing the
|
/// On the other hand, we do not expect a strong need for customizing the
|
||||||
/// \c Question class, unlike the RRset.
|
/// \c Question class, unlike the RRset.
|
||||||
/// Handling the Question section of a DNS message is relatively a
|
/// Handling the "Question" section of a DNS message is relatively a
|
||||||
/// simple work comparing to RRset-involved operations, so a unified
|
/// simple work comparing to RRset-involved operations, so a unified
|
||||||
/// straightforward implementation should suffice for any use cases
|
/// straightforward implementation should suffice for any use cases
|
||||||
/// including performance sensitive ones.
|
/// including performance sensitive ones.
|
||||||
///
|
///
|
||||||
/// We may, however, still want to have customized version of Question
|
/// We may, however, still want to have a customized version of Question
|
||||||
/// for, e.g, highly optimized behavior, and may revisit this design choice
|
/// for, e.g, highly optimized behavior, and may revisit this design choice
|
||||||
/// as we have more experiences with this implementation.
|
/// as we have more experience with this implementation.
|
||||||
///
|
///
|
||||||
/// One disadvantage of defining RRsets and Questions as unrelated classes
|
/// One disadvantage of defining RRsets and Questions as unrelated classes
|
||||||
/// is that we cannot handle them in a polymorphic way.
|
/// is that we cannot handle them in a polymorphic way.
|
||||||
|
@@ -278,8 +278,6 @@ public:
|
|||||||
/// name when possible in the context of zone dump. This is a future
|
/// name when possible in the context of zone dump. This is a future
|
||||||
/// TODO item.
|
/// TODO item.
|
||||||
///
|
///
|
||||||
/// \param rrset A reference to a (derived class of) \c AbstractRRset object
|
|
||||||
/// whose content is to be converted.
|
|
||||||
/// \return A string representation of the RRset.
|
/// \return A string representation of the RRset.
|
||||||
virtual std::string toText() const = 0;
|
virtual std::string toText() const = 0;
|
||||||
|
|
||||||
|
@@ -118,7 +118,8 @@ public:
|
|||||||
/// If resource allocation in rendering process fails, a corresponding
|
/// If resource allocation in rendering process fails, a corresponding
|
||||||
/// standard exception will be thrown.
|
/// standard exception will be thrown.
|
||||||
///
|
///
|
||||||
/// \param buffer An output buffer to store the wire data.
|
/// \param renderer DNS message rendering context that encapsulates the
|
||||||
|
/// output buffer in which the RRTTL is to be stored.
|
||||||
void toWire(MessageRenderer& renderer) const;
|
void toWire(MessageRenderer& renderer) const;
|
||||||
/// \brief Render the \c RRTTL in the wire format.
|
/// \brief Render the \c RRTTL in the wire format.
|
||||||
///
|
///
|
||||||
@@ -128,8 +129,7 @@ public:
|
|||||||
/// If resource allocation in rendering process fails, a corresponding
|
/// If resource allocation in rendering process fails, a corresponding
|
||||||
/// standard exception will be thrown.
|
/// standard exception will be thrown.
|
||||||
///
|
///
|
||||||
/// \param renderer DNS message rendering context that encapsulates the
|
/// \param buffer An output buffer to store the wire data.
|
||||||
/// output buffer in which the RRTTL is to be stored.
|
|
||||||
void toWire(OutputBuffer& buffer) const;
|
void toWire(OutputBuffer& buffer) const;
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ extern std::string dprefix;
|
|||||||
* \short Temporary interface to logging.
|
* \short Temporary interface to logging.
|
||||||
*
|
*
|
||||||
* This is a temporary function to do logging. It has wrong interface currently
|
* This is a temporary function to do logging. It has wrong interface currently
|
||||||
* and should be replaced by something else. It's main purpose now is to mark
|
* and should be replaced by something else. Its main purpose now is to mark
|
||||||
* places where logging should happen. When it is removed, compiler will do
|
* places where logging should happen. When it is removed, compiler will do
|
||||||
* our work of finding the places.
|
* our work of finding the places.
|
||||||
*
|
*
|
||||||
@@ -51,6 +51,7 @@ extern std::string dprefix;
|
|||||||
*
|
*
|
||||||
* @param message The message to log. The real interface will probably have
|
* @param message The message to log. The real interface will probably have
|
||||||
* more parameters.
|
* more parameters.
|
||||||
|
* \param error_flag TODO
|
||||||
*/
|
*/
|
||||||
void dlog(const std::string& message, bool error_flag=false);
|
void dlog(const std::string& message, bool error_flag=false);
|
||||||
|
|
||||||
|
@@ -131,7 +131,7 @@ public:
|
|||||||
/// \param name Name to expand
|
/// \param name Name to expand
|
||||||
///
|
///
|
||||||
/// \return Name expanded with stored name
|
/// \return Name expanded with stored name
|
||||||
std::string useAsDefault(const std::string&) const;
|
std::string useAsDefault(const std::string& name) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// \brief Split Name into Components
|
/// \brief Split Name into Components
|
||||||
|
@@ -116,7 +116,7 @@ public:
|
|||||||
/// const char* and adds them to the dictionary. The messages are added
|
/// const char* and adds them to the dictionary. The messages are added
|
||||||
/// using "Add".
|
/// using "Add".
|
||||||
///
|
///
|
||||||
/// \param data null-terminated array of const char* alternating ID and
|
/// \param elements null-terminated array of const char* alternating ID and
|
||||||
/// message text. This should be an odd number of elements long, the last
|
/// message text. This should be an odd number of elements long, the last
|
||||||
/// elemnent being NULL. If it is an even number of elements long, the
|
/// elemnent being NULL. If it is an even number of elements long, the
|
||||||
/// last ID is ignored.
|
/// last ID is ignored.
|
||||||
|
@@ -132,7 +132,7 @@ public:
|
|||||||
/// \return Pointer to the desired logging level object.
|
/// \return Pointer to the desired logging level object.
|
||||||
static LevelPtr toLevel(int val, const LevelPtr& defaultLevel);
|
static LevelPtr toLevel(int val, const LevelPtr& defaultLevel);
|
||||||
|
|
||||||
/// \param Convert String to Logging Level
|
/// \brief Convert String to Logging Level
|
||||||
///
|
///
|
||||||
/// Returns a logging level object corresponding to the given name. If the
|
/// Returns a logging level object corresponding to the given name. If the
|
||||||
/// name is invalid, an object of logging level DEBUG (the minimum debug
|
/// name is invalid, an object of logging level DEBUG (the minimum debug
|
||||||
@@ -143,7 +143,7 @@ public:
|
|||||||
/// \return Pointer to the desired logging level object.
|
/// \return Pointer to the desired logging level object.
|
||||||
static LevelPtr toLevelLS(const LogString& sArg);
|
static LevelPtr toLevelLS(const LogString& sArg);
|
||||||
|
|
||||||
/// \param Convert String to Logging Level
|
/// \brief Convert String to Logging Level
|
||||||
///
|
///
|
||||||
/// Returns a logging level object corresponding to the given name. If the
|
/// Returns a logging level object corresponding to the given name. If the
|
||||||
/// name is invalid, the given default is returned.
|
/// name is invalid, the given default is returned.
|
||||||
|
@@ -59,7 +59,7 @@ public:
|
|||||||
/// sequence could lead to problems in checking results.
|
/// sequence could lead to problems in checking results.
|
||||||
Hash(uint32_t tablesize, uint32_t maxkeylen = 255, bool randomise = true);
|
Hash(uint32_t tablesize, uint32_t maxkeylen = 255, bool randomise = true);
|
||||||
|
|
||||||
/// \bool Virtual Destructor
|
/// \brief Virtual Destructor
|
||||||
virtual ~Hash()
|
virtual ~Hash()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@@ -126,7 +126,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// Initialises the hash table.
|
/// Initialises the hash table.
|
||||||
///
|
///
|
||||||
/// \param CmpFn Compare function (or object) used to compare an object with
|
/// \param cmp Compare function (or object) used to compare an object with
|
||||||
/// to get the name to be used as a key in the table. The object should be
|
/// to get the name to be used as a key in the table. The object should be
|
||||||
/// created via a "new" as ownership passes to the hash table. The hash
|
/// created via a "new" as ownership passes to the hash table. The hash
|
||||||
/// table will take the responsibility of deleting it.
|
/// table will take the responsibility of deleting it.
|
||||||
|
@@ -133,7 +133,7 @@ public:
|
|||||||
|
|
||||||
/// \brief Set Maximum Size
|
/// \brief Set Maximum Size
|
||||||
///
|
///
|
||||||
/// \param new_size New maximum list size
|
/// \param max_size New maximum list size
|
||||||
virtual void setMaxSize(uint32_t max_size) {
|
virtual void setMaxSize(uint32_t max_size) {
|
||||||
max_size_ = max_size;
|
max_size_ = max_size;
|
||||||
}
|
}
|
||||||
|
@@ -60,10 +60,10 @@ public:
|
|||||||
/// pointed to NameserverEntry which contains the address as well as it's
|
/// pointed to NameserverEntry which contains the address as well as it's
|
||||||
/// corresponding index. The user can update it's RTT with the index later.
|
/// corresponding index. The user can update it's RTT with the index later.
|
||||||
///
|
///
|
||||||
/// \param namerserver A shared_ptr that points to a NameserverEntry object
|
/// \param nameserver A shared_ptr that points to a NameserverEntry object
|
||||||
/// the shared_ptr can avoid the NameserverEntry object being dropped while the
|
/// the shared_ptr can avoid the NameserverEntry object being dropped while the
|
||||||
/// request is processing.
|
/// request is processing.
|
||||||
/// \param index The address's index in NameserverEntry's addresses vector
|
/// \param address The address's index in NameserverEntry's addresses vector
|
||||||
/// \param family Address family, V4_ONLY or V6_ONLY
|
/// \param family Address family, V4_ONLY or V6_ONLY
|
||||||
NameserverAddress(const boost::shared_ptr<NameserverEntry>& nameserver,
|
NameserverAddress(const boost::shared_ptr<NameserverEntry>& nameserver,
|
||||||
const AddressEntry& address, AddressFamily family):
|
const AddressEntry& address, AddressFamily family):
|
||||||
|
@@ -60,7 +60,7 @@ public:
|
|||||||
/// tests) should it use to ask questions.
|
/// tests) should it use to ask questions.
|
||||||
/// \param zonehashsize Size of the zone hash table. The default value of
|
/// \param zonehashsize Size of the zone hash table. The default value of
|
||||||
/// 1009 is the first prime number above 1000.
|
/// 1009 is the first prime number above 1000.
|
||||||
/// \param nshash size Size of the nameserver hash table. The default
|
/// \param nshashsize Size of the nameserver hash table. The default
|
||||||
/// value of 3001 is the first prime number over 3000, and by implication,
|
/// value of 3001 is the first prime number over 3000, and by implication,
|
||||||
/// there is an assumption that there will be more nameservers than zones
|
/// there is an assumption that there will be more nameservers than zones
|
||||||
/// in the store.
|
/// in the store.
|
||||||
|
@@ -151,7 +151,7 @@ public:
|
|||||||
/// Updates the RTT for a particular address
|
/// Updates the RTT for a particular address
|
||||||
///
|
///
|
||||||
/// \param address Address to update
|
/// \param address Address to update
|
||||||
/// \param RTT New RTT for the address
|
/// \param rtt New RTT for the address
|
||||||
void setAddressRTT(const asiolink::IOAddress& address, uint32_t rtt);
|
void setAddressRTT(const asiolink::IOAddress& address, uint32_t rtt);
|
||||||
|
|
||||||
/// \brief Update RTT of the address that corresponding to the index
|
/// \brief Update RTT of the address that corresponding to the index
|
||||||
|
Reference in New Issue
Block a user