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