20#include <boost/shared_ptr.hpp>
21#include <boost/weak_ptr.hpp>
371 :
Network(), match_client_id_(true), authoritative_(false) {
379 return (match_client_id_);
388 match_client_id_ = match;
397 return (authoritative_);
406 authoritative_ = authoritative;
424 bool match_client_id_;
436 :
Network(), preferred_(0), interface_id_(), rapid_commit_(false) {
450 preferred_ = preferred;
457 return (interface_id_);
464 interface_id_ = ifaceid;
472 return (rapid_commit_);
480 rapid_commit_ = rapid_commit;
Defines elements for storing the names of client classes.
The IOAddress class represents an IP addresses (version agnostic)
This class represents configuration element which is associated with the modification timestamp.
Represents option data configuration for the DHCP server.
Container for storing client class names.
Specialization of the Network object for DHCPv4 case.
void setAuthoritative(const bool authoritative)
Sets the flag indicating if requests for unknown IP addresses should be rejected with DHCPNAK instead...
bool getAuthoritative() const
Returns the flag indicating if requests for unknown IP addresses should be rejected with DHCPNAK inst...
virtual asiolink::IOAddress getServerId() const
Returns binary representation of the dhcp-server-identifier option (54).
bool getMatchClientId() const
Returns the flag indicating if the client identifiers should be used to identify the client's lease.
virtual data::ElementPtr toElement() const
Unparses network object.
void setMatchClientId(const bool match)
Sets the flag indicating if the client identifier should be used to identify the client's lease.
Specialization of the Network object for DHCPv6 case.
bool getRapidCommit() const
Returns boolean value indicating that the Rapid Commit option is supported or unsupported for the sub...
void setRapidCommit(const bool rapid_commit)
Enables or disables Rapid Commit option support for the subnet.
OptionPtr getInterfaceId() const
Returns interface-id value (if specified)
void setInterfaceId(const OptionPtr &ifaceid)
sets interface-id option (if defined)
void setPreferred(const Triplet< uint32_t > &preferred)
Sets new preferred lifetime for a network.
virtual data::ElementPtr toElement() const
Unparses network object.
Triplet< uint32_t > getPreferred() const
Returns preferred lifetime (in seconds)
Holds optional information about relay.
const IOAddressList & getAddresses() const
Returns const reference to the list of addresses.
void addAddress(const asiolink::IOAddress &addr)
Adds an address to the list of addresses.
bool containsAddress(const asiolink::IOAddress &addr) const
Checks the address list for the given address.
bool hasAddresses() const
Indicates whether or not the address list has entries.
Common interface representing a network to which the DHCP clients are connected.
virtual bool clientSupported(const isc::dhcp::ClientClasses &client_classes) const
Checks whether this network supports client that belongs to specified classes.
void addRelayAddress(const asiolink::IOAddress &addr)
Adds an address to the list addresses in the network's relay info.
void setHostReservationMode(HRMode mode)
Sets host reservation mode.
RelayInfo relay_
Relay information.
HRMode
Specifies allowed host reservation mode.
@ HR_DISABLED
None - host reservation is disabled.
@ HR_OUT_OF_POOL
Only out-of-pool reservations is allowed.
@ HR_GLOBAL
Only global reservations are allowed.
@ HR_ALL
Both out-of-pool and in-pool reservations are allowed.
boost::shared_ptr< Network::RelayInfo > RelayInfoPtr
Pointer to the RelayInfo structure.
HRMode host_reservation_mode_
Specifies host reservation mode.
Triplet< uint32_t > getValid() const
Return valid-lifetime for addresses in that prefix.
CfgOptionPtr cfg_option_
Pointer to the option data configuration for this subnet.
void requireClientClass(const isc::dhcp::ClientClass &class_name)
Adds class class_name to classes required to be evaluated.
const IOAddressList & getRelayAddresses() const
Returns the list of relay addresses from the network's relay info.
void allowClientClass(const isc::dhcp::ClientClass &class_name)
Sets the supported class to class class_name.
void setValid(const Triplet< uint32_t > &valid)
Sets new valid lifetime for a network.
const RelayInfo & getRelayInfo() const
Returns const reference to relay information.
bool hasRelays() const
Indicates if network's relay info has relay addresses.
const isc::dhcp::ClientClass & getClientClass() const
returns the client class
std::string getIface() const
Returns name of the local interface for which this network is selected.
HRMode getHostReservationMode() const
Specifies what type of Host Reservations are supported.
void setT2(const Triplet< uint32_t > &t2)
Sets new rebind timer for a network.
virtual data::ElementPtr toElement() const
Unparses network object.
void setIface(const std::string &iface_name)
Sets local name of the interface for which this network is selected.
std::string iface_name_
Holds interface name for which this network is selected.
bool hasRelayAddress(const asiolink::IOAddress &address) const
Tests if the network's relay info contains the given address.
Triplet< uint32_t > getT2() const
Returns T2 (rebind timer), expressed in seconds.
Triplet< uint32_t > valid_
a Triplet (min/default/max) holding allowed valid lifetime values
const isc::dhcp::ClientClasses & getRequiredClasses() const
Returns classes which are required to be evaluated.
virtual ~Network()
Virtual destructor.
Triplet< uint32_t > t1_
a Triplet (min/default/max) holding allowed renew timer values
ConstCfgOptionPtr getCfgOption() const
Returns const pointer to the option data configuration for this subnet.
ClientClass client_class_
Optional definition of a client class.
ClientClasses required_classes_
Required classes.
Triplet< uint32_t > t2_
a Triplet (min/default/max) holding allowed rebind timer values
void setT1(const Triplet< uint32_t > &t1)
Sets new renew timer for a network.
Triplet< uint32_t > getT1() const
Returns T1 (renew timer), expressed in seconds.
void setRelayInfo(const RelayInfo &relay)
Sets information about relay.
CfgOptionPtr getCfgOption()
Returns pointer to the option data configuration for this subnet.
This template specifies a parameter value.
boost::shared_ptr< Element > ElementPtr
std::string ClientClass
Defines a single class name.
boost::shared_ptr< CfgOption > CfgOptionPtr
Non-const pointer.
std::vector< isc::asiolink::IOAddress > IOAddressList
List of IOAddresses.
boost::weak_ptr< Network > WeakNetworkPtr
Weak pointer to the Network object.
boost::shared_ptr< Network > NetworkPtr
Pointer to the Network object.
boost::shared_ptr< Option > OptionPtr
boost::shared_ptr< const CfgOption > ConstCfgOptionPtr
Const pointer.
Defines the logger used by the top-level component of kea-dhcp-ddns.
Abstract class for configuration Cfg_* classes.
Base class for user context.