Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
14d7b2bc
Commit
14d7b2bc
authored
Mar 14, 2011
by
Jelte Jansen
Browse files
Merge branch 'master' of
ssh://bind10.isc.org/var/bind10/git/bind10
parents
8af77178
ce374384
Changes
27
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
14d7b2bc
200. [bug] Jelte
Fixed a bug where incoming TCP connections were not closed.
(Trac #589, git 1d88daaa24e8b1ab27f28be876f40a144241e93b)
199. [func] ocean
Cache negative responses (NXDOMAIN/NODATA) from authoritative
server for recursive resolver.
...
...
src/bin/resolver/response_scrubber.h
View file @
14d7b2bc
...
...
@@ -177,7 +177,7 @@
/// Qu: www.sub.example.com\n
/// Zo: example.com
///
/// An:
<
nothing
>
/// An:
(
nothing
)
///
/// Au(1): sub.example.com NS ns0.sub.example.com\n
/// 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.
///
/// \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
/// independently exist, and the caller retains ownership of them and is
/// assumed to destroy them when needed.
...
...
src/lib/asiolink/dns_lookup.h
View file @
14d7b2bc
...
...
@@ -63,8 +63,10 @@ public:
///
/// \param io_message The event message to handle
/// \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
DNSS
erver DNSServer object to use
/// \param
s
erver DNSServer object to use
virtual
void
operator
()(
const
IOMessage
&
io_message
,
isc
::
dns
::
MessagePtr
message
,
isc
::
dns
::
MessagePtr
answer_message
,
...
...
src/lib/asiolink/dns_service.h
View file @
14d7b2bc
...
...
@@ -66,8 +66,8 @@ public:
///
/// \param io_service The IOService to work with
/// \param port the port to listen on
/// \param ipv4 If true, listen on ipv4 'any'
/// \param ipv6 If true, listen on ipv6 'any'
/// \param
use_
ipv4 If true, listen on ipv4 'any'
/// \param
use_
ipv6 If true, listen on ipv6 'any'
/// \param checkin Provider for cc-channel events (see \c SimpleCallback)
/// \param lookup The lookup provider (see \c DNSLookup)
/// \param answer The answer provider (see \c DNSAnswer)
...
...
src/lib/asiolink/io_address.h
View file @
14d7b2bc
...
...
@@ -61,7 +61,7 @@ public:
/// This constructor never throws an exception.
///
/// \param asio_address The ASIO \c ip::address to be converted.
IOAddress
(
const
asio
::
ip
::
address
&
asio_adress
);
IOAddress
(
const
asio
::
ip
::
address
&
asio_ad
d
ress
);
//@}
/// \brief Convert the address to a string.
...
...
src/lib/asiolink/tcp_server.cc
View file @
14d7b2bc
...
...
@@ -115,6 +115,7 @@ TCPServer::operator()(error_code ec, size_t length) {
CORO_YIELD
async_read
(
*
socket_
,
asio
::
buffer
(
data_
.
get
(),
TCP_MESSAGE_LENGTHSIZE
),
*
this
);
if
(
ec
)
{
socket_
->
close
();
CORO_YIELD
return
;
}
...
...
@@ -127,6 +128,7 @@ TCPServer::operator()(error_code ec, size_t length) {
}
if
(
ec
)
{
socket_
->
close
();
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
// continuing; we exit the coroutine permanently.
if
(
lookup_callback_
==
NULL
)
{
socket_
->
close
();
CORO_YIELD
return
;
}
...
...
@@ -177,6 +180,9 @@ TCPServer::operator()(error_code ec, size_t length) {
// The 'done_' flag indicates whether we have an answer
// to send back. If not, exit the coroutine permanently.
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
;
}
...
...
@@ -195,6 +201,10 @@ TCPServer::operator()(error_code ec, size_t length) {
// (though we have nothing further to do, so the coroutine
// will simply exit at that time).
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
();
}
}
...
...
src/lib/cc/data.h
View file @
14d7b2bc
...
...
@@ -222,6 +222,7 @@ public:
/// Sets the ElementPtr at the given key
/// \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
);
/// Remove the ElementPtr at the given key
...
...
@@ -315,10 +316,11 @@ public:
/// Creates an Element from the given input stream, where we keep
/// 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
/// 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.
/// \return An ElementPtr that contains the element(s) specified
/// in the given input stream.
...
...
@@ -548,18 +550,18 @@ void merge(ElementPtr element, ConstElementPtr other);
///
/// \brief Insert the Element as a string into stream.
///
/// This method converts the \c ElemetPtr into a string with
/// This method converts the \c Eleme
n
tPtr into a string with
/// \c Element::str() and inserts it into the
/// output stream \c out.
///
/// This function overloads the global operator<< to behave as described in
/// ostream::operator<< but applied to \c ElementPtr objects.
///
/// \param o
s
A \c std::ostream object on which the insertion operation is
/// \param o
ut
A \c std::ostream object on which the insertion operation is
/// performed.
/// \param e The \c ElementPtr object to insert.
/// \return A reference to the same \c std::ostream object referenced by
/// parameter \c o
s
after the insertion operation.
/// parameter \c o
ut
after the insertion operation.
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Element
&
e
);
bool
operator
==
(
const
Element
&
a
,
const
Element
&
b
);
...
...
src/lib/cc/session.h
View file @
14d7b2bc
...
...
@@ -99,7 +99,7 @@ namespace isc {
/// \brief Sets the default timeout for blocking reads
/// in this session to the given number of milliseconds
/// \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.
virtual
void
setTimeout
(
size_t
milliseconds
)
=
0
;
...
...
src/lib/config/module_spec.h
View file @
14d7b2bc
...
...
@@ -53,6 +53,8 @@ namespace isc { namespace config {
/// Create a \c ModuleSpec instance with the given data as
/// the 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
,
const
bool
check
=
true
)
throw
(
ModuleSpecError
);
...
...
@@ -86,6 +88,8 @@ namespace isc { namespace config {
// configuration specification
/// Validates the given configuration data for this specification.
/// \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,
/// false otherwise.
bool
validateConfig
(
isc
::
data
::
ConstElementPtr
data
,
...
...
src/lib/datasrc/memory_datasrc.h
View file @
14d7b2bc
...
...
@@ -289,7 +289,7 @@ public:
/// - \c result::PARTIALMATCH: A zone whose origin is a
// super domain of \c name is found (but there is no exact match)
/// - \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.
///
/// This method never throws an exception.
...
...
src/lib/datasrc/zonetable.h
View file @
14d7b2bc
...
...
@@ -107,7 +107,7 @@ public:
/// - \c result::PARTIALMATCH: A zone whose origin is a
/// super domain of \c name is found (but there is no exact match)
/// - \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.
///
/// This method never throws an exception.
...
...
src/lib/dns/edns.h
View file @
14d7b2bc
...
...
@@ -213,7 +213,7 @@ public:
/// \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 rrtype This must specify the OPT RR type.
/// \param
rr
ttl The TTL of the OPT RR.
/// \param ttl The TTL of the OPT RR.
/// \param rdata The RDATA of the OPT RR.
EDNS
(
const
Name
&
name
,
const
RRClass
&
rrclass
,
const
RRType
&
rrtype
,
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 rrclass The RR class of the OPT RR.
/// \param rrtype This must specify the OPT RR type.
/// \param
rr
ttl The TTL of the OPT RR.
/// \param ttl The TTL 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
/// extended Rcode.
...
...
src/lib/dns/masterload.h
View file @
14d7b2bc
...
...
@@ -110,7 +110,7 @@ typedef boost::function<void(RRsetPtr)> MasterLoadCallback;
/// but this is not even though it's valid per RFC1035:
/// \code example.com. IN 3600 A 192.0.2.1
/// \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,
/// 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
...
...
@@ -213,7 +213,7 @@ typedef boost::function<void(RRsetPtr)> MasterLoadCallback;
/// \param filename A path to a master zone file to be loaded.
/// \param origin The origin name 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 callb
a
ck A callback functor or function that is to be called
/// for each RRset.
void
masterLoad
(
const
char
*
const
filename
,
const
Name
&
origin
,
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 origin The origin name 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 callb
a
ck A callback functor or function that is to be called for
/// each RRset.
void
masterLoad
(
std
::
istream
&
input
,
const
Name
&
origin
,
const
RRClass
&
zone_class
,
MasterLoadCallback
callback
);
...
...
src/lib/dns/message.h
View file @
14d7b2bc
...
...
@@ -141,7 +141,7 @@ typedef SectionIterator<RRsetPtr> RRsetIterator;
/// - 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,
/// 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.
class
Message
{
public:
...
...
@@ -155,8 +155,8 @@ public:
///
/// Only the defined constants are valid where a header flag is required
/// in this library (e.g., in \c Message::setHeaderFlag()).
/// Since these are enum constants, however, invalid value could be
passed
/// via casting without an error at compilation time.
/// Since these are enum constants, however,
an
invalid value could be
///
passed
via casting without an error at compilation time.
/// It is generally the callee's responsibility to check and reject invalid
/// values.
/// 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
/// in order to make the internal implementation simpler.
/// For example, \c HEADERFLAG_QR is defined to be 0x8000 as the QR
/// bit is the most significant bit of the
2
nd 16 bits of the header.
/// bit is the most significant bit of the
seco
nd 16 bits of the header.
/// However, applications should not assume this coincidence and
/// must solely use the enum representations.
/// Any usage based on the assumption of the underlying values is invalid
...
...
src/lib/dns/question.h
View file @
14d7b2bc
...
...
@@ -54,13 +54,13 @@ typedef boost::shared_ptr<const Question> ConstQuestionPtr;
/// class.
/// 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;
/// 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,
/// 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.
/// 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.
/// 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
...
...
@@ -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
/// \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
/// straightforward implementation should suffice for any use cases
/// 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
/// as we have more experience
s
with this implementation.
/// as we have more experience with this implementation.
///
/// One disadvantage of defining RRsets and Questions as unrelated classes
/// is that we cannot handle them in a polymorphic way.
...
...
src/lib/dns/rrset.h
View file @
14d7b2bc
...
...
@@ -278,8 +278,6 @@ public:
/// name when possible in the context of zone dump. This is a future
/// 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.
virtual
std
::
string
toText
()
const
=
0
;
...
...
src/lib/dns/rrttl.h
View file @
14d7b2bc
...
...
@@ -118,7 +118,8 @@ public:
/// If resource allocation in rendering process fails, a corresponding
/// 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
;
/// \brief Render the \c RRTTL in the wire format.
///
...
...
@@ -128,8 +129,7 @@ public:
/// If resource allocation in rendering process fails, a corresponding
/// standard exception will be thrown.
///
/// \param renderer DNS message rendering context that encapsulates the
/// output buffer in which the RRTTL is to be stored.
/// \param buffer An output buffer to store the wire data.
void
toWire
(
OutputBuffer
&
buffer
)
const
;
//@}
...
...
src/lib/log/dummylog.h
View file @
14d7b2bc
...
...
@@ -34,7 +34,7 @@ extern std::string dprefix;
* \short Temporary interface to logging.
*
* 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
* 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
* more parameters.
* \param error_flag TODO
*/
void
dlog
(
const
std
::
string
&
message
,
bool
error_flag
=
false
);
...
...
src/lib/log/filename.h
View file @
14d7b2bc
...
...
@@ -131,7 +131,7 @@ public:
/// \param name Name to expand
///
/// \return Name expanded with stored name
std
::
string
useAsDefault
(
const
std
::
string
&
)
const
;
std
::
string
useAsDefault
(
const
std
::
string
&
name
)
const
;
private:
/// \brief Split Name into Components
...
...
src/lib/log/message_dictionary.h
View file @
14d7b2bc
...
...
@@ -116,7 +116,7 @@ public:
/// const char* and adds them to the dictionary. The messages are added
/// 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
/// elemnent being NULL. If it is an even number of elements long, the
/// last ID is ignored.
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment