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