14 #include <boost/shared_ptr.hpp>
183 void openSockets(
const uint16_t family,
const uint16_t port,
184 const bool use_bcast =
true)
const;
207 void use(
const uint16_t family,
const std::string& iface_name);
237 const std::string& socket_type_name);
241 return (socket_type_);
302 re_detect_ = re_detect;
319 bool multipleAddressesPerInterfaceActive()
const;
332 void setState(
const uint16_t family,
const bool inactive,
333 const bool loopback_inactive)
const;
345 void setIfaceAddrsState(
const uint16_t family,
const bool active,
356 static void socketOpenErrorHandler(
const std::string& errmsg);
359 typedef std::set<std::string> IfaceSet;
366 typedef std::multimap<std::string, asiolink::IOAddress> ExplicitAddressMap;
370 ExplicitAddressMap address_map_;
395 #endif // CFG_IFACE_H
Exception thrown when invalid socket type has been specified for the given family.
NoSuchAddress(const char *file, size_t line, const char *what)
static OutboundIface textToOutboundIface(const std::string &txt)
Converts text to outbound interface selection mode.
Exception thrown when specified interface name is invalid.
Base class for user context.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
NoSuchIface(const char *file, size_t line, const char *what)
SocketType
Socket type used by the DHCPv4 server.
Raw socket, used for direct DHCPv4 traffic.
boost::shared_ptr< Element > ElementPtr
std::string socketTypeToText() const
Returns the socket type in the textual format.
boost::shared_ptr< CfgIface > CfgIfacePtr
A pointer to the CfgIface .
Exception thrown when specified unicast address is not assigned to the interface specified.
InvalidIfaceName(const char *file, size_t line, const char *what)
Exception thrown when specified interface doesn't exist in a system.
Represents a single network interface.
Server uses routing to determine the right interface to send response.
bool equals(const CfgIface &other) const
Compares two CfgIface objects for equality.
DuplicateAddress(const char *file, size_t line, const char *what)
bool operator==(const CfgIface &other) const
Equality operator.
void setReDetect(bool re_detect)
Set the re-detect flag.
Abstract class for configuration Cfg_* classes.
static const char * ALL_IFACES_KEYWORD
Keyword used to enable all interfaces.
InvalidSocketType(const char *file, size_t line, const char *what)
void use(const uint16_t family, const std::string &iface_name)
Select interface to be used to receive DHCP traffic.
void useSocketType(const uint16_t family, const SocketType &socket_type)
Sets the specified socket type to be used by the server.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
bool operator!=(const CfgIface &other) const
Inequality operator.
Datagram socket, i.e. IP/UDP socket.
DuplicateIfaceName(const char *file, size_t line, const char *what)
void reset()
Puts the interface configuration into default state.
Exception thrown when duplicated interface names specified.
Server sends responses over the same interface on which queries are received.
boost::shared_ptr< const CfgIface > ConstCfgIfacePtr
A pointer to the const CfgIface.
void openSockets(const uint16_t family, const uint16_t port, const bool use_bcast=true) const
Tries to open sockets on selected interfaces.
Exception thrown when duplicated address specified.
void setOutboundIface(const OutboundIface &outbound_iface)
Sets outbound interface selection mode.
SocketType textToSocketType(const std::string &socket_type_name) const
Converts the socket type in the textual format to the type represented by the SocketType.
std::string outboundTypeToText() const
Returns outbound interface selection mode as string.
SocketType getSocketType() const
Returns DHCP socket type used by the server.
void closeSockets() const
Convenience function which closes all open sockets.
OutboundIface getOutboundIface() const
Returns outbound interface selection mode.
OutboundIface
Indicates how outbound interface is selected for relayed traffic.