Kea  2.3.1-git
isc::dhcp_ddns Namespace Reference

Classes

class  D2Dhcid
 Container class for handling the DHCID value within a NameChangeRequest. More...
 
class  DhcidRdataComputeError
 Exception thrown when there is an error occurred during computation of the DHCID. More...
 
class  NameChangeListener
 Abstract interface for receiving NameChangeRequests. More...
 
class  NameChangeRequest
 Represents a DHCP-DDNS client request. More...
 
class  NameChangeSender
 Abstract interface for sending NameChangeRequests. More...
 
class  NameChangeUDPListener
 Provides the ability to receive NameChangeRequests via UDP socket. More...
 
class  NameChangeUDPSender
 Provides the ability to send NameChangeRequests via UDP socket. More...
 
class  NcrListenerError
 Exception thrown if an NcrListenerError encounters a general error. More...
 
class  NcrListenerOpenError
 Exception thrown if an error occurs during IO source open. More...
 
class  NcrListenerReceiveError
 Exception thrown if an error occurs initiating an IO receive. More...
 
class  NcrMessageError
 Exception thrown when NameChangeRequest marshalling error occurs. More...
 
class  NcrSenderError
 Thrown when a NameChangeSender encounters an error. More...
 
class  NcrSenderOpenError
 Exception thrown if an error occurs during IO source open. More...
 
class  NcrSenderQueueFull
 Exception thrown if an error occurs initiating an IO send. More...
 
class  NcrSenderSendError
 Exception thrown if an error occurs initiating an IO send. More...
 
class  NcrUDPError
 Thrown when a UDP level exception occurs. More...
 
class  UDPCallback
 Implements the callback class passed into UDPSocket calls. More...
 

Typedefs

typedef std::map< std::string, isc::data::ConstElementPtrElementMap
 Defines a map of Elements, keyed by their string name. More...
 
typedef boost::shared_ptr< NameChangeListenerNameChangeListenerPtr
 Defines a smart pointer to an instance of a listener. More...
 
typedef boost::shared_ptr< NameChangeRequestNameChangeRequestPtr
 Defines a pointer to a NameChangeRequest. More...
 
typedef boost::shared_ptr< NameChangeSenderNameChangeSenderPtr
 Defines a smart pointer to an instance of a sender. More...
 
typedef isc::asiolink::UDPSocket< UDPCallbackNameChangeUDPSocket
 Convenience type for UDP socket based listener. More...
 
typedef boost::shared_array< uint8_t > RawBufferPtr
 Defines a dynamically allocated shared array. More...
 
typedef std::function< void(const bool, const UDPCallback *)> UDPCompletionHandler
 Defines a function pointer for NameChangeRequest completion handlers. More...
 
typedef boost::shared_ptr< asiolink::UDPEndpointUDPEndpointPtr
 

Enumerations

enum  NameChangeFormat { FMT_JSON }
 Defines the list of data wire formats supported. More...
 
enum  NameChangeProtocol { NCR_UDP, NCR_TCP }
 Defines the list of socket protocols supported. More...
 
enum  NameChangeStatus { ST_NEW, ST_PENDING, ST_COMPLETED, ST_FAILED }
 Defines the runtime processing status values for requests. More...
 
enum  NameChangeType { CHG_ADD, CHG_REMOVE }
 Defines the types of DNS updates that can be requested. More...
 

Functions

std::string ncrFormatToString (NameChangeFormat format)
 Function which converts NameChangeFormat enums to text labels. More...
 
std::string ncrProtocolToString (NameChangeProtocol protocol)
 Function which converts NameChangeProtocol enums to text labels. More...
 
std::ostream & operator<< (std::ostream &os, const D2Dhcid &dhcid)
 
NameChangeFormat stringToNcrFormat (const std::string &fmt_str)
 Function which converts labels to NameChangeFormat enum values. More...
 
NameChangeProtocol stringToNcrProtocol (const std::string &protocol_str)
 Function which converts text labels to NameChangeProtocol enums. More...
 

Variables

const isc::log::MessageID DHCP_DDNS_INVALID_NCR = "DHCP_DDNS_INVALID_NCR"
 
isc::log::Logger dhcp_ddns_logger ("libdhcp-ddns")
 Defines the logger used within lib dhcp_ddns. More...
 
const isc::log::MessageID DHCP_DDNS_NCR_FLUSH_IO_ERROR = "DHCP_DDNS_NCR_FLUSH_IO_ERROR"
 
const isc::log::MessageID DHCP_DDNS_NCR_LISTEN_CLOSE_ERROR = "DHCP_DDNS_NCR_LISTEN_CLOSE_ERROR"
 
const isc::log::MessageID DHCP_DDNS_NCR_RECV_NEXT_ERROR = "DHCP_DDNS_NCR_RECV_NEXT_ERROR"
 
const isc::log::MessageID DHCP_DDNS_NCR_SEND_CLOSE_ERROR = "DHCP_DDNS_NCR_SEND_CLOSE_ERROR"
 
const isc::log::MessageID DHCP_DDNS_NCR_SEND_NEXT_ERROR = "DHCP_DDNS_NCR_SEND_NEXT_ERROR"
 
const isc::log::MessageID DHCP_DDNS_NCR_UDP_CLEAR_READY_ERROR = "DHCP_DDNS_NCR_UDP_CLEAR_READY_ERROR"
 
const isc::log::MessageID DHCP_DDNS_NCR_UDP_RECV_CANCELED = "DHCP_DDNS_NCR_UDP_RECV_CANCELED"
 
const isc::log::MessageID DHCP_DDNS_NCR_UDP_RECV_ERROR = "DHCP_DDNS_NCR_UDP_RECV_ERROR"
 
const isc::log::MessageID DHCP_DDNS_NCR_UDP_SEND_CANCELED = "DHCP_DDNS_NCR_UDP_SEND_CANCELED"
 
const isc::log::MessageID DHCP_DDNS_NCR_UDP_SEND_ERROR = "DHCP_DDNS_NCR_UDP_SEND_ERROR"
 
const isc::log::MessageID DHCP_DDNS_UDP_SENDER_WATCH_SOCKET_CLOSE_ERROR = "DHCP_DDNS_UDP_SENDER_WATCH_SOCKET_CLOSE_ERROR"
 
const isc::log::MessageID DHCP_DDNS_UNCAUGHT_NCR_RECV_HANDLER_ERROR = "DHCP_DDNS_UNCAUGHT_NCR_RECV_HANDLER_ERROR"
 
const isc::log::MessageID DHCP_DDNS_UNCAUGHT_NCR_SEND_HANDLER_ERROR = "DHCP_DDNS_UNCAUGHT_NCR_SEND_HANDLER_ERROR"
 

Typedef Documentation

◆ ElementMap

Defines a map of Elements, keyed by their string name.

Definition at line 217 of file ncr_msg.h.

◆ NameChangeListenerPtr

Defines a smart pointer to an instance of a listener.

Definition at line 353 of file ncr_io.h.

◆ NameChangeRequestPtr

Defines a pointer to a NameChangeRequest.

Definition at line 212 of file ncr_msg.h.

◆ NameChangeSenderPtr

Defines a smart pointer to an instance of a sender.

Definition at line 848 of file ncr_io.h.

◆ NameChangeUDPSocket

Convenience type for UDP socket based listener.

Definition at line 311 of file ncr_udp.h.

◆ RawBufferPtr

typedef boost::shared_array<uint8_t> isc::dhcp_ddns::RawBufferPtr

Defines a dynamically allocated shared array.

Definition at line 134 of file ncr_udp.h.

◆ UDPCompletionHandler

typedef std::function<void(const bool, const UDPCallback*)> isc::dhcp_ddns::UDPCompletionHandler

Defines a function pointer for NameChangeRequest completion handlers.

Definition at line 128 of file ncr_udp.h.

◆ UDPEndpointPtr

Definition at line 136 of file ncr_udp.h.

Enumeration Type Documentation

◆ NameChangeFormat

Defines the list of data wire formats supported.

Enumerator
FMT_JSON 

Definition at line 60 of file ncr_msg.h.

◆ NameChangeProtocol

Defines the list of socket protocols supported.

Currently only UDP is implemented.

Todo:

TCP is intended to be implemented prior 1.0 release.

Give some thought to an ANY protocol which might try first as UDP then as TCP, etc.

Enumerator
NCR_UDP 
NCR_TCP 

Definition at line 68 of file ncr_io.h.

◆ NameChangeStatus

Defines the runtime processing status values for requests.

Enumerator
ST_NEW 
ST_PENDING 
ST_COMPLETED 
ST_FAILED 

Definition at line 52 of file ncr_msg.h.

◆ NameChangeType

Defines the types of DNS updates that can be requested.

Enumerator
CHG_ADD 
CHG_REMOVE 

Definition at line 46 of file ncr_msg.h.

Function Documentation

◆ ncrFormatToString()

std::string isc::dhcp_ddns::ncrFormatToString ( NameChangeFormat  format)

Function which converts NameChangeFormat enums to text labels.

Parameters
formatenum value to convert to label
Returns
std:string containing the text label if the value is valid, or "UNKNOWN" if not.

Definition at line 35 of file ncr_msg.cc.

References FMT_JSON.

Referenced by isc::d2::D2SimpleParser::parse(), isc::dhcp::D2ClientConfigParser::parse(), isc::d2::D2CfgContext::toElement(), isc::dhcp::D2ClientConfig::toElement(), isc::dhcp::D2ClientConfig::toText(), isc::d2::D2Params::toText(), isc::dhcp::D2ClientConfig::validateContents(), and isc::d2::D2Params::validateContents().

◆ ncrProtocolToString()

std::string isc::dhcp_ddns::ncrProtocolToString ( NameChangeProtocol  protocol)

Function which converts NameChangeProtocol enums to text labels.

Parameters
protocolenum value to convert to label
Returns
std:string containing the text label if the value is valid, or "UNKNOWN" if not.

Definition at line 36 of file ncr_io.cc.

References NCR_TCP, and NCR_UDP.

Referenced by isc::d2::D2Params::getConfigSummary(), isc::d2::D2SimpleParser::parse(), isc::dhcp::D2ClientConfigParser::parse(), isc::d2::D2Process::reconfigureQueueMgr(), isc::d2::D2CfgContext::toElement(), isc::dhcp::D2ClientConfig::toElement(), isc::dhcp::D2ClientConfig::toText(), isc::d2::D2Params::toText(), isc::dhcp::D2ClientConfig::validateContents(), and isc::d2::D2Params::validateContents().

◆ operator<<()

std::ostream & isc::dhcp_ddns::operator<< ( std::ostream &  os,
const D2Dhcid dhcid 
)

Definition at line 216 of file ncr_msg.cc.

References isc::dhcp_ddns::D2Dhcid::toStr().

Referenced by isc::dhcp_ddns::D2Dhcid::operator<().

+ Here is the call graph for this function:

◆ stringToNcrFormat()

NameChangeFormat isc::dhcp_ddns::stringToNcrFormat ( const std::string &  fmt_str)

Function which converts labels to NameChangeFormat enum values.

Parameters
fmt_strtext to convert to an enum. Valid string values: "JSON"
Returns
NameChangeFormat value which maps to the given string.
Exceptions
isc::BadValueif given a string value which does not map to an enum value.

Definition at line 26 of file ncr_msg.cc.

References FMT_JSON, and isc_throw.

Referenced by isc::dhcp::Subnets6ListConfigParser::createSubnetConfigParser().

◆ stringToNcrProtocol()

NameChangeProtocol isc::dhcp_ddns::stringToNcrProtocol ( const std::string &  protocol_str)

Function which converts text labels to NameChangeProtocol enums.

Parameters
protocol_strtext to convert to an enum. Valid string values: "UDP", "TCP"
Returns
NameChangeProtocol value which maps to the given string.
Exceptions
isc::BadValueif given a string value which does not map to an enum value.

Definition at line 23 of file ncr_io.cc.

References isc_throw, NCR_TCP, and NCR_UDP.

Referenced by isc::dhcp::Subnets6ListConfigParser::createSubnetConfigParser().

Variable Documentation

◆ DHCP_DDNS_INVALID_NCR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_INVALID_NCR = "DHCP_DDNS_INVALID_NCR"

◆ dhcp_ddns_logger

◆ DHCP_DDNS_NCR_FLUSH_IO_ERROR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_NCR_FLUSH_IO_ERROR = "DHCP_DDNS_NCR_FLUSH_IO_ERROR"

Definition at line 12 of file dhcp_ddns_messages.h.

Referenced by isc::dhcp_ddns::NameChangeSender::stopSending().

◆ DHCP_DDNS_NCR_LISTEN_CLOSE_ERROR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_NCR_LISTEN_CLOSE_ERROR = "DHCP_DDNS_NCR_LISTEN_CLOSE_ERROR"

◆ DHCP_DDNS_NCR_RECV_NEXT_ERROR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_NCR_RECV_NEXT_ERROR = "DHCP_DDNS_NCR_RECV_NEXT_ERROR"

◆ DHCP_DDNS_NCR_SEND_CLOSE_ERROR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_NCR_SEND_CLOSE_ERROR = "DHCP_DDNS_NCR_SEND_CLOSE_ERROR"

Definition at line 15 of file dhcp_ddns_messages.h.

Referenced by isc::dhcp_ddns::NameChangeSender::stopSending().

◆ DHCP_DDNS_NCR_SEND_NEXT_ERROR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_NCR_SEND_NEXT_ERROR = "DHCP_DDNS_NCR_SEND_NEXT_ERROR"

◆ DHCP_DDNS_NCR_UDP_CLEAR_READY_ERROR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_NCR_UDP_CLEAR_READY_ERROR = "DHCP_DDNS_NCR_UDP_CLEAR_READY_ERROR"

◆ DHCP_DDNS_NCR_UDP_RECV_CANCELED

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_NCR_UDP_RECV_CANCELED = "DHCP_DDNS_NCR_UDP_RECV_CANCELED"

◆ DHCP_DDNS_NCR_UDP_RECV_ERROR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_NCR_UDP_RECV_ERROR = "DHCP_DDNS_NCR_UDP_RECV_ERROR"

◆ DHCP_DDNS_NCR_UDP_SEND_CANCELED

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_NCR_UDP_SEND_CANCELED = "DHCP_DDNS_NCR_UDP_SEND_CANCELED"

◆ DHCP_DDNS_NCR_UDP_SEND_ERROR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_NCR_UDP_SEND_ERROR = "DHCP_DDNS_NCR_UDP_SEND_ERROR"

◆ DHCP_DDNS_UDP_SENDER_WATCH_SOCKET_CLOSE_ERROR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_UDP_SENDER_WATCH_SOCKET_CLOSE_ERROR = "DHCP_DDNS_UDP_SENDER_WATCH_SOCKET_CLOSE_ERROR"

Definition at line 22 of file dhcp_ddns_messages.h.

Referenced by isc::dhcp_ddns::NameChangeUDPSender::ioReady().

◆ DHCP_DDNS_UNCAUGHT_NCR_RECV_HANDLER_ERROR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_UNCAUGHT_NCR_RECV_HANDLER_ERROR = "DHCP_DDNS_UNCAUGHT_NCR_RECV_HANDLER_ERROR"

◆ DHCP_DDNS_UNCAUGHT_NCR_SEND_HANDLER_ERROR

const isc::log::MessageID isc::dhcp_ddns::DHCP_DDNS_UNCAUGHT_NCR_SEND_HANDLER_ERROR = "DHCP_DDNS_UNCAUGHT_NCR_SEND_HANDLER_ERROR"