Kea: isc::dhcp_ddns Namespace Reference

| Kea 2.2.0

Classes | Typedefs | Enumerations | Functions | Variables
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::ConstElementPtr > | ElementMap
| Defines a map of Elements, keyed by their string name. More...
typedef boost::shared_ptr< NameChangeListener > | NameChangeListenerPtr
| Defines a smart pointer to an instance of a listener. More...
typedef boost::shared_ptr< NameChangeRequest > | NameChangeRequestPtr
| Defines a pointer to a NameChangeRequest. More...
typedef boost::shared_ptr< NameChangeSender > | NameChangeSenderPtr
| Defines a smart pointer to an instance of a sender. More...
typedef isc::asiolink::UDPSocket< UDPCallback > | NameChangeUDPSocket
| 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::UDPEndpoint > | UDPEndpointPtr

## 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

typedef std::map<std::string, isc::data::ConstElementPtr> isc::dhcp_ddns::ElementMap

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

Definition at line 217 of file ncr_msg.h.

## ◆ NameChangeListenerPtr

typedef boost::shared_ptr<NameChangeListener> isc::dhcp_ddns::NameChangeListenerPtr

Defines a smart pointer to an instance of a listener.

Definition at line 353 of file ncr_io.h.

## ◆ NameChangeRequestPtr

typedef boost::shared_ptr<NameChangeRequest> isc::dhcp_ddns::NameChangeRequestPtr

Defines a pointer to a NameChangeRequest.

Definition at line 214 of file ncr_msg.h.

## ◆ NameChangeSenderPtr

typedef boost::shared_ptr<NameChangeSender> isc::dhcp_ddns::NameChangeSenderPtr

Defines a smart pointer to an instance of a sender.

Definition at line 848 of file ncr_io.h.

## ◆ NameChangeUDPSocket

typedef isc::asiolink::UDPSocket<UDPCallback> isc::dhcp_ddns::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 131 of file ncr_udp.h.

## ◆ UDPEndpointPtr

typedef boost::shared_ptr<asiolink::UDPEndpoint> isc::dhcp_ddns::UDPEndpointPtr

Definition at line 136 of file ncr_udp.h.

## Enumeration Type Documentation

## ◆ NameChangeFormat

enum isc::dhcp_ddns::NameChangeFormat

Defines the list of data wire formats supported.

Enumerator
FMT_JSON |

Definition at line 60 of file ncr_msg.h.

## ◆ NameChangeProtocol

enum isc::dhcp_ddns::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

enum isc::dhcp_ddns::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

enum isc::dhcp_ddns::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

  format | enum 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, and isc::util::str::format().

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

Here is the call graph for this function:

## ◆ ncrProtocolToString()

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

Function which converts NameChangeProtocol enums to text labels.

Parameters

  protocol | enum 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::d2::D2Params::toText(), isc::dhcp::D2ClientConfig::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 215 of file ncr_msg.cc.

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

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_str | text to convert to an enum. Valid string values: "JSON"

Returns
  NameChangeFormat value which maps to the given string.

Exceptions

  isc::BadValue | if 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_str | text to convert to an enum. Valid string values: "UDP", "TCP"

Returns
  NameChangeProtocol value which maps to the given string.

Exceptions

  isc::BadValue | if 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

Definition at line 11 of file dhcp_ddns_messages.h.

Referenced by isc::dhcp_ddns::NameChangeUDPListener::receiveCompletionHandler().

## ◆ dhcp_ddns_logger

isc::log::Logger isc::dhcp_ddns::dhcp_ddns_logger | ( | "libdhcp-ddns" |  | ) |

Defines the logger used within lib dhcp_ddns.

Define the logger for the "dhcp_ddns" logging.

Definition at line 18 of file dhcp_ddns_log.h.

Referenced by isc::dhcp_ddns::NameChangeListener::invokeRecvHandler(), isc::dhcp_ddns::NameChangeUDPListener::receiveCompletionHandler(), isc::dhcp_ddns::NameChangeUDPSender::sendCompletionHandler(), isc::dhcp_ddns::NameChangeListener::stopListening(), and isc::dhcp_ddns::NameChangeSender::stopSending().

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

Definition at line 13 of file dhcp_ddns_messages.h.

Referenced by isc::dhcp_ddns::NameChangeListener::stopListening().

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

Definition at line 14 of file dhcp_ddns_messages.h.

Referenced by isc::dhcp_ddns::NameChangeListener::invokeRecvHandler().

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

Definition at line 17 of file dhcp_ddns_messages.h.

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

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

Definition at line 18 of file dhcp_ddns_messages.h.

Referenced by isc::dhcp_ddns::NameChangeUDPListener::receiveCompletionHandler().

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

Definition at line 19 of file dhcp_ddns_messages.h.

Referenced by isc::dhcp_ddns::NameChangeUDPListener::receiveCompletionHandler().

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

Definition at line 20 of file dhcp_ddns_messages.h.

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

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

Definition at line 21 of file dhcp_ddns_messages.h.

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

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

Definition at line 23 of file dhcp_ddns_messages.h.

Referenced by isc::dhcp_ddns::NameChangeListener::invokeRecvHandler().

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