-// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2014 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
/// @param name the unique label used to identify this key
/// @param algorithm the name of the encryption alogirthm this key uses.
/// (@todo This will be a fixed list of choices)
+ ///
/// @param secret the secret component of this key
TSIGKeyInfo(const std::string& name, const std::string& algorithm,
const std::string& secret);
-// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2014 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
/// Creates an in::A() or in:AAAA() RData instance from the NCR
/// lease address and adds it to the given RRset.
///
- /// @param RRset RRset to which to add the RData
+ /// @param rrset RRset to which to add the RData
///
/// @throw NameChangeTransactionError if RData cannot be constructed or
/// the RData cannot be added to the given RRset.
/// Creates an in::DHCID() RData instance from the NCR DHCID and adds
/// it to the given RRset.
///
- /// @param RRset RRset to which to add the RData
+ /// @param rrset RRset to which to add the RData
///
/// @throw NameChangeTransactionError if RData cannot be constructed or
/// the RData cannot be added to the given RRset.
/// Creates an in::PTR() RData instance from the NCR FQDN and adds
/// it to the given RRset.
///
- /// @param RRset RRset to which to add the RData
+ /// @param rrset RRset to which to add the RData
///
/// @throw NameChangeTransactionError if RData cannot be constructed or
/// the RData cannot be added to the given RRset.
-// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2014 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
CORRUPT_RESP // Generate a corrupt response
};
+ // Reference to IOService to use for IO processing.
asiolink::IOService& io_service_;
+ // IP address at which to listen for requests.
const asiolink::IOAddress& address_;
+ // Port on which to listen for requests.
size_t port_;
+ // Socket on which listening is done.
SocketPtr server_socket_;
+ // Stores the end point of requesting client.
asio::ip::udp::endpoint remote_;
+ // Buffer in which received packets are stuffed.
uint8_t receive_buffer_[TEST_MSG_MAX];
+ // Flag which indicates if a receive has been initiated but
+ // not yet completed.
bool receive_pending_;
+ // Indicates if server is in perpetual receive mode. If true once
+ // a receive has been completed, a new one will be automatically
+ // initiated.
bool perpetual_receive_;
/// @brief Constructor
/// @brief Constructor
///
/// @param io_service IOService to be used for socket IO.
- /// @param server DnServerInfo of server the DNS server. This supplies the
+ /// @param server DnsServerInfo of server the DNS server. This supplies the
/// server's ip address and port.
FauxServer(asiolink::IOService& io_service, DnsServerInfo& server);
const ResponseMode& response_mode,
const dns::Rcode& response_rcode);
+ /// @brief Returns true if a receive has been started but not completed.
bool isReceivePending() {
return receive_pending_;
}
/// This class instantiates an IOService provides a single method, runTimedIO
/// which will run the IOService for no more than a finite amount of time,
/// at least one event is executed or the IOService is stopped.
-/// It provides an overridable handler for timer expiration event. It is
+/// It provides an virtual handler for timer expiration event. It is
/// intended to be used as a base class for test fixtures that need to process
-/// IO by providing them a consistent way to do so while retaining a safety valve
-/// so tests do not hang.
+/// IO by providing them a consistent way to do so while retaining a safety
+/// valve so tests do not hang.
class TimedIO {
public:
IOServicePtr io_service_;
/// Stops the IOService and fails the current test.
virtual void timesUp();
- /// @brief Runs IOService till time expires or at least one handler executes.
+ /// @brief Processes IO till time expires or at least one handler executes.
///
/// This method first polls IOService to run any ready handlers. If no
/// handlers are ready, it starts the internal time to run for the given