Kea 2.7.5
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.
 
typedef boost::shared_ptr< NameChangeListenerNameChangeListenerPtr
 Defines a smart pointer to an instance of a listener.
 
typedef boost::shared_ptr< NameChangeRequestNameChangeRequestPtr
 Defines a pointer to a NameChangeRequest.
 
typedef boost::shared_ptr< NameChangeSenderNameChangeSenderPtr
 Defines a smart pointer to an instance of a sender.
 
typedef isc::asiolink::UDPSocket< UDPCallbackNameChangeUDPSocket
 Convenience type for UDP socket based listener.
 
typedef boost::shared_array< uint8_t > RawBufferPtr
 Defines a dynamically allocated shared array.
 
typedef std::function< void(const bool, const UDPCallback *) UDPCompletionHandler)
 Defines a function pointer for NameChangeRequest completion handlers.
 
typedef boost::shared_ptr< asiolink::UDPEndpointUDPEndpointPtr
 

Enumerations

enum  ConflictResolutionMode { CHECK_WITH_DHCID , NO_CHECK_WITH_DHCID , CHECK_EXISTS_WITH_DHCID , NO_CHECK_WITHOUT_DHCID }
 
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 ConflictResolutionModeToString (const ConflictResolutionMode &mode)
 Function which converts ConflictResolutionMode enums to text labels.
 
std::string ncrFormatToString (NameChangeFormat format)
 Function which converts NameChangeFormat enums to text labels.
 
std::string ncrProtocolToString (NameChangeProtocol protocol)
 Function which converts NameChangeProtocol enums to text labels.
 
std::ostream & operator<< (std::ostream &os, const D2Dhcid &dhcid)
 
ConflictResolutionMode StringToConflictResolutionMode (const std::string &mode_str)
 Function which converts string to ConflictResolutionMode enum values.
 
NameChangeFormat stringToNcrFormat (const std::string &fmt_str)
 Function which converts labels to NameChangeFormat enum values.
 
NameChangeProtocol stringToNcrProtocol (const std::string &protocol_str)
 Function which converts text labels to NameChangeProtocol enums.
 

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.
 
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 244 of file ncr_msg.h.

◆ NameChangeListenerPtr

Defines a smart pointer to an instance of a listener.

Definition at line 357 of file ncr_io.h.

◆ NameChangeRequestPtr

Defines a pointer to a NameChangeRequest.

Definition at line 241 of file ncr_msg.h.

◆ NameChangeSenderPtr

Defines a smart pointer to an instance of a sender.

Definition at line 857 of file ncr_io.h.

◆ NameChangeUDPSocket

Convenience type for UDP socket based listener.

Definition at line 309 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 133 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 130 of file ncr_udp.h.

◆ UDPEndpointPtr

Definition at line 135 of file ncr_udp.h.

Enumeration Type Documentation

◆ ConflictResolutionMode

Enumerator
CHECK_WITH_DHCID 
NO_CHECK_WITH_DHCID 
CHECK_EXISTS_WITH_DHCID 
NO_CHECK_WITHOUT_DHCID 

Definition at line 64 of file ncr_msg.h.

◆ NameChangeFormat

Defines the list of data wire formats supported.

Enumerator
FMT_JSON 

Definition at line 59 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 69 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 51 of file ncr_msg.h.

◆ NameChangeType

Defines the types of DNS updates that can be requested.

Enumerator
CHG_ADD 
CHG_REMOVE 

Definition at line 45 of file ncr_msg.h.

Function Documentation

◆ ConflictResolutionModeToString()

std::string isc::dhcp_ddns::ConflictResolutionModeToString ( const ConflictResolutionMode & mode)

Function which converts ConflictResolutionMode enums to text labels.

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

Definition at line 66 of file ncr_msg.cc.

References CHECK_EXISTS_WITH_DHCID, CHECK_WITH_DHCID, NO_CHECK_WITH_DHCID, and NO_CHECK_WITHOUT_DHCID.

Referenced by isc::dhcp_ddns::NameChangeRequest::toJSON(), and isc::dhcp_ddns::NameChangeRequest::toText().

◆ 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::d2::D2Params::toText(), isc::d2::D2Params::validateContents(), and isc::dhcp::D2ClientConfig::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::D2SimpleParser::parse(), isc::dhcp::D2ClientConfigParser::parse(), isc::d2::D2Process::reconfigureQueueMgr(), isc::d2::D2CfgContext::toElement(), isc::dhcp::D2ClientConfig::toElement(), isc::d2::D2Params::toText(), isc::d2::D2Params::validateContents(), and isc::dhcp::D2ClientConfig::validateContents().

◆ operator<<()

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

Definition at line 255 of file ncr_msg.cc.

◆ StringToConflictResolutionMode()

ConflictResolutionMode isc::dhcp_ddns::StringToConflictResolutionMode ( const std::string & mode_str)

Function which converts string to ConflictResolutionMode enum values.

Parameters
mode_strtext to convert to an enum. Valid string values: "check-with-dhcid", "no-check-with-dhcid", "check-exists-with-dhcid", "no-check-without-dhcid"
Returns
ConflictResolutionMode 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 45 of file ncr_msg.cc.

References CHECK_EXISTS_WITH_DHCID, CHECK_WITH_DHCID, isc_throw, NO_CHECK_WITH_DHCID, and NO_CHECK_WITHOUT_DHCID.

Referenced by isc::dhcp::Dhcpv6Srv::createNameChangeRequests(), and isc::dhcp_ddns::NameChangeRequest::setConflictResolutionMode().

◆ 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.

◆ 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.

Variable Documentation

◆ DHCP_DDNS_INVALID_NCR

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

◆ 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"
extern

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"
extern

◆ 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"
extern

◆ 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"
extern

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"
extern

Definition at line 16 of file dhcp_ddns_messages.h.

◆ 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"
extern

◆ 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"
extern

◆ 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"
extern

◆ 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"
extern

◆ 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"
extern

◆ 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"
extern

Definition at line 22 of file dhcp_ddns_messages.h.

◆ 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"
extern

◆ 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"
extern

Definition at line 24 of file dhcp_ddns_messages.h.