Kea  2.3.5-git
isc::dhcp::Network Class Reference

Common interface representing a network to which the DHCP clients are connected. More...

#include <network.h>

+ Inheritance diagram for isc::dhcp::Network:

Classes

class  RelayInfo
 Holds optional information about relay. More...
 

Public Types

enum  Inheritance { Inheritance::NONE, Inheritance::PARENT_NETWORK, Inheritance::GLOBAL, Inheritance::ALL }
 Inheritance "mode" used when fetching an optional Network parameter. More...
 
typedef boost::shared_ptr< Network::RelayInfoRelayInfoPtr
 Pointer to the RelayInfo structure. More...
 

Public Member Functions

 Network ()
 Constructor. More...
 
virtual ~Network ()
 Virtual destructor. More...
 
void addRelayAddress (const asiolink::IOAddress &addr)
 Adds an address to the list addresses in the network's relay info. More...
 
void allowClientClass (const isc::dhcp::ClientClass &class_name)
 Sets the supported class to class class_name. More...
 
virtual bool clientSupported (const isc::dhcp::ClientClasses &client_classes) const
 Checks whether this network supports client that belongs to specified classes. More...
 
util::Optional< std::string > getAllocatorType (const Inheritance &inheritance=Inheritance::ALL) const
 Returns allocator type. More...
 
util::Optional< uint32_t > getCacheMaxAge (const Inheritance &inheritance=Inheritance::ALL) const
 Returns value in seconds to use as cache maximum age. More...
 
util::Optional< double > getCacheThreshold (const Inheritance &inheritance=Inheritance::ALL) const
 Returns percentage to use as cache threshold. More...
 
util::Optional< bool > getCalculateTeeTimes (const Inheritance &inheritance=Inheritance::ALL) const
 Returns whether or not T1/T2 calculation is enabled. More...
 
CfgOptionPtr getCfgOption ()
 Returns pointer to the option data configuration for this network. More...
 
ConstCfgOptionPtr getCfgOption () const
 Returns const pointer to the option data configuration for this network. More...
 
util::Optional< ClientClassgetClientClass (const Inheritance &inheritance=Inheritance::ALL) const
 returns the client class More...
 
util::Optional< std::string > getDdnsGeneratedPrefix (const Inheritance &inheritance=Inheritance::ALL) const
 Returns ddns-generated-prefix. More...
 
util::Optional< bool > getDdnsOverrideClientUpdate (const Inheritance &inheritance=Inheritance::ALL) const
 Returns ddns-override-client-update. More...
 
util::Optional< bool > getDdnsOverrideNoUpdate (const Inheritance &inheritance=Inheritance::ALL) const
 Returns ddns-override-no-update. More...
 
util::Optional< std::string > getDdnsQualifyingSuffix (const Inheritance &inheritance=Inheritance::ALL) const
 Returns ddns-qualifying-suffix. More...
 
util::Optional< D2ClientConfig::ReplaceClientNameModegetDdnsReplaceClientNameMode (const Inheritance &inheritance=Inheritance::ALL) const
 Returns ddns-replace-client-name-mode. More...
 
util::Optional< bool > getDdnsSendUpdates (const Inheritance &inheritance=Inheritance::ALL) const
 Returns ddns-send-updates. More...
 
util::Optional< bool > getDdnsUpdateOnRenew (const Inheritance &inheritance=Inheritance::ALL) const
 Returns ddns-update-on-renew. More...
 
util::Optional< bool > getDdnsUseConflictResolution (const Inheritance &inheritance=Inheritance::ALL) const
 Returns ddns-use-conflict-resolution. More...
 
util::Optional< std::string > getHostnameCharReplacement (const Inheritance &inheritance=Inheritance::ALL) const
 Return the invalid char replacement used to sanitize client hostnames. More...
 
util::Optional< std::string > getHostnameCharSet (const Inheritance &inheritance=Inheritance::ALL) const
 Return the char set regexp used to sanitize client hostnames. More...
 
util::Optional< std::string > getIface (const Inheritance &inheritance=Inheritance::ALL) const
 Returns name of the local interface for which this network is selected. More...
 
const IOAddressListgetRelayAddresses () const
 Returns the list of relay addresses from the network's relay info. More...
 
const RelayInfogetRelayInfo () const
 Returns const reference to relay information. More...
 
const ClientClassesgetRequiredClasses () const
 Returns classes which are required to be evaluated. More...
 
util::Optional< bool > getReservationsGlobal (const Inheritance &inheritance=Inheritance::ALL) const
 Returns whether global reservations should be fetched. More...
 
util::Optional< bool > getReservationsInSubnet (const Inheritance &inheritance=Inheritance::ALL) const
 Returns whether subnet reservations should be fetched. More...
 
util::Optional< bool > getReservationsOutOfPool (const Inheritance &inheritance=Inheritance::ALL) const
 Returns whether only out-of-pool reservations are allowed. More...
 
util::Optional< bool > getStoreExtendedInfo (const Inheritance &inheritance=Inheritance::ALL) const
 Returns store-extended-info. More...
 
isc::util::Triplet< uint32_t > getT1 (const Inheritance &inheritance=Inheritance::ALL) const
 Returns T1 (renew timer), expressed in seconds. More...
 
util::Optional< double > getT1Percent (const Inheritance &inheritance=Inheritance::ALL) const
 Returns percentage to use when calculating the T1 (renew timer). More...
 
isc::util::Triplet< uint32_t > getT2 (const Inheritance &inheritance=Inheritance::ALL) const
 Returns T2 (rebind timer), expressed in seconds. More...
 
util::Optional< double > getT2Percent (const Inheritance &inheritance=Inheritance::ALL) const
 Returns percentage to use when calculating the T2 (rebind timer). More...
 
isc::util::Triplet< uint32_t > getValid (const Inheritance &inheritance=Inheritance::ALL) const
 Return valid-lifetime for addresses in that prefix. More...
 
bool hasFetchGlobalsFn () const
 Checks if the network is associated with a function used to fetch globally configured parameters. More...
 
bool hasRelayAddress (const asiolink::IOAddress &address) const
 Tests if the network's relay info contains the given address. More...
 
bool hasRelays () const
 Indicates if network's relay info has relay addresses. More...
 
void requireClientClass (const isc::dhcp::ClientClass &class_name)
 Adds class class_name to classes required to be evaluated. More...
 
void setAllocatorType (const util::Optional< std::string > &allocator_type)
 Sets new allocator type. More...
 
void setCacheMaxAge (const util::Optional< uint32_t > &cache_max_age)
 Sets cache max for a network. More...
 
void setCacheThreshold (const util::Optional< double > &cache_threshold)
 Sets cache threshold for a network. More...
 
void setCalculateTeeTimes (const util::Optional< bool > &calculate_tee_times)
 Sets whether or not T1/T2 calculation is enabled. More...
 
void setDdnsGeneratedPrefix (const util::Optional< std::string > &ddns_generated_prefix)
 Sets new ddns-generated-prefix. More...
 
void setDdnsOverrideClientUpdate (const util::Optional< bool > &ddns_override_client_update)
 Sets new ddns-override-client-update. More...
 
void setDdnsOverrideNoUpdate (const util::Optional< bool > &ddns_override_no_update)
 Sets new ddns-override-no-update. More...
 
void setDdnsQualifyingSuffix (const util::Optional< std::string > &ddns_qualifying_suffix)
 Sets new ddns-qualifying-suffix. More...
 
void setDdnsReplaceClientNameMode (const util::Optional< D2ClientConfig::ReplaceClientNameMode > &ddns_replace_client_name_mode)
 Sets new ddns-replace-client-name-mode. More...
 
void setDdnsSendUpdates (const util::Optional< bool > &ddns_send_updates)
 Sets new ddns-send-updates. More...
 
void setDdnsUpdateOnRenew (const util::Optional< bool > &ddns_update_on_renew)
 Sets new ddns-update-on-renew. More...
 
void setDdnsUseConflictResolution (const util::Optional< bool > &ddns_use_conflict_resolution)
 Sets new ddns-use-conflict-resolution. More...
 
void setFetchGlobalsFn (FetchNetworkGlobalsFn fetch_globals_fn)
 Sets the optional callback function used to fetch globally configured parameters. More...
 
void setHostnameCharReplacement (const util::Optional< std::string > &hostname_char_replacement)
 Sets new hostname-char-replacement. More...
 
void setHostnameCharSet (const util::Optional< std::string > &hostname_char_set)
 Sets new hostname-char-set. More...
 
void setIface (const util::Optional< std::string > &iface_name)
 Sets local name of the interface for which this network is selected. More...
 
void setRelayInfo (const RelayInfo &relay)
 Sets information about relay. More...
 
void setReservationsGlobal (const util::Optional< bool > &reservations_global)
 Sets whether global reservations should be fetched. More...
 
void setReservationsInSubnet (const util::Optional< bool > &reservations_in_subnet)
 Sets whether subnet reservations should be fetched. More...
 
void setReservationsOutOfPool (const util::Optional< bool > &reservations_out_of_pool)
 Sets whether only out-of-pool reservations are allowed. More...
 
void setStoreExtendedInfo (const util::Optional< bool > &store_extended_info)
 Sets new store-extended-info. More...
 
void setT1 (const isc::util::Triplet< uint32_t > &t1)
 Sets new renew timer for a network. More...
 
void setT1Percent (const util::Optional< double > &t1_percent)
 Sets new percentage for calculating T1 (renew timer). More...
 
void setT2 (const isc::util::Triplet< uint32_t > &t2)
 Sets new rebind timer for a network. More...
 
void setT2Percent (const util::Optional< double > &t2_percent)
 Sets new percentage for calculating T2 (rebind timer). More...
 
void setValid (const isc::util::Triplet< uint32_t > &valid)
 Sets new valid lifetime for a network. More...
 
virtual data::ElementPtr toElement () const
 Unparses network object. More...
 
- Public Member Functions inherited from isc::data::StampedElement
 StampedElement ()
 Constructor. More...
 
void delServerTag (const std::string &server_tag)
 Deletes server tag. More...
 
isc::data::ElementPtr getMetadata () const
 Returns an object representing metadata to be returned with objects from the configuration backend. More...
 
std::set< ServerTaggetServerTags () const
 Returns server tags. More...
 
bool hasAllServerTag () const
 Checks if the element has 'all' server tag. More...
 
bool hasServerTag (const ServerTag &server_tag) const
 Checks if the element has the given server tag. More...
 
void setServerTag (const std::string &server_tag)
 Adds new server tag. More...
 
- Public Member Functions inherited from isc::data::BaseStampedElement
 BaseStampedElement ()
 Constructor. More...
 
uint64_t getId () const
 Returns element's database identifier. More...
 
boost::posix_time::ptime getModificationTime () const
 Returns timestamp. More...
 
void setId (const uint64_t id)
 Sets element's database identifier. More...
 
void setModificationTime (const boost::posix_time::ptime &timestamp)
 Sets timestamp to the explicitly provided value. More...
 
void updateModificationTime ()
 Sets timestamp to the current time. More...
 
- Public Member Functions inherited from isc::data::UserContext
void contextToElement (data::ElementPtr map) const
 Merge unparse a user_context object. More...
 
data::ConstElementPtr getContext () const
 Returns const pointer to the user context. More...
 
void setContext (const data::ConstElementPtr &ctx)
 Sets user context. More...
 
- Public Member Functions inherited from isc::data::CfgToElement
virtual ~CfgToElement ()
 Destructor. More...
 

Protected Member Functions

FetchNetworkGlobalsFn getFetchGlobalsFn () const
 Gets the optional callback function used to fetch globally configured parameters. More...
 
template<typename ReturnType >
ReturnType getGlobalProperty (ReturnType property, const int global_index, const int min_index=-1, const int max_index=-1) const
 Returns a value of global configuration parameter with a given index. More...
 
template<typename NumType >
isc::util::Triplet< NumType > getGlobalProperty (isc::util::Triplet< NumType > property, const int global_index, const int min_index=-1, const int max_index=-1) const
 The getGlobalProperty specialization for isc::util::Triplet<T>. More...
 
util::Optional< asiolink::IOAddressgetGlobalProperty (util::Optional< asiolink::IOAddress > property, const int global_index, const int min_index=-1, const int max_index=-1) const
 The getGlobalProperty specialization for Optional<IOAddress>. More...
 
template<typename BaseType >
OptionPtr getOptionProperty (OptionPtr(BaseType::*MethodPointer)(const Inheritance &inheritance) const, OptionPtr property, const Inheritance &inheritance) const
 Returns option pointer associated with a network using inheritance. More...
 
template<typename BaseType , typename ReturnType >
ReturnType getProperty (ReturnType(BaseType::*MethodPointer)(const Inheritance &) const, ReturnType property, const Inheritance &inheritance, const int global_index=-1, const int min_index=-1, const int max_index=-1) const
 Returns a value associated with a network using inheritance. More...
 

Protected Attributes

util::Optional< std::string > allocator_type_
 Allocator used for IP address allocations. More...
 
util::Optional< uint32_t > cache_max_age_
 Value in seconds to use as cache maximal age. More...
 
util::Optional< double > cache_threshold_
 Percentage of the lease lifetime to use as cache threshold. More...
 
util::Optional< bool > calculate_tee_times_
 Enables calculation of T1 and T2 timers. More...
 
CfgOptionPtr cfg_option_
 Pointer to the option data configuration for this subnet. More...
 
util::Optional< ClientClassclient_class_
 Optional definition of a client class. More...
 
util::Optional< std::string > ddns_generated_prefix_
 Prefix Kea should use when generating domain-names. More...
 
util::Optional< bool > ddns_override_client_update_
 Should Kea perform updates, even if client requested delegation. More...
 
util::Optional< bool > ddns_override_no_update_
 Should Kea perform updates, even if client requested no updates. More...
 
util::Optional< std::string > ddns_qualifying_suffix_
 Suffix Kea should use when to qualify partial domain-names. More...
 
util::Optional< D2ClientConfig::ReplaceClientNameModeddns_replace_client_name_mode_
 How Kea should handle the domain-name supplied by the client. More...
 
util::Optional< bool > ddns_send_updates_
 Should Kea perform DNS updates. More...
 
util::Optional< bool > ddns_update_on_renew_
 Should Kea perform updates when leases are extended. More...
 
util::Optional< bool > ddns_use_conflict_resolution_
 Used to to tell kea-dhcp-ddns whether or not to use conflict resolution. More...
 
FetchNetworkGlobalsFn fetch_globals_fn_
 Pointer to the optional callback used to fetch globally configured parameters inherited to the Network object. More...
 
util::Optional< std::string > hostname_char_replacement_
 A string to replace invalid characters when scrubbing hostnames. More...
 
util::Optional< std::string > hostname_char_set_
 Regular expression describing invalid characters for client hostnames. More...
 
util::Optional< std::string > iface_name_
 Holds interface name for which this network is selected. More...
 
WeakNetworkPtr parent_network_
 Pointer to another network that this network belongs to. More...
 
RelayInfo relay_
 Relay information. More...
 
ClientClasses required_classes_
 Required classes. More...
 
util::Optional< bool > reservations_global_
 Enables global reservations. More...
 
util::Optional< bool > reservations_in_subnet_
 Enables subnet reservations. More...
 
util::Optional< bool > reservations_out_of_pool_
 Enables out-of-pool reservations optimization. More...
 
util::Optional< bool > store_extended_info_
 Should Kea store additional client query data (e.g. More...
 
isc::util::Triplet< uint32_t > t1_
 a isc::util::Triplet (min/default/max) holding allowed renew timer values More...
 
util::Optional< double > t1_percent_
 Percentage of the lease lifetime to use when calculating T1 timer. More...
 
isc::util::Triplet< uint32_t > t2_
 a isc::util::Triplet (min/default/max) holding allowed rebind timer values More...
 
util::Optional< double > t2_percent_
 Percentage of the lease lifetime to use when calculating T2 timer. More...
 
isc::util::Triplet< uint32_t > valid_
 a isc::util::Triplet (min/default/max) holding allowed valid lifetime values More...
 
- Protected Attributes inherited from isc::data::BaseStampedElement
uint64_t id_
 Database identifier of the configuration element. More...
 
boost::posix_time::ptime timestamp_
 Holds timestamp value. More...
 
- Protected Attributes inherited from isc::data::UserContext
data::ConstElementPtr user_context_
 Pointer to the user context (may be NULL) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from isc::data::UserContext
static data::ElementPtr toElement (data::ConstElementPtr map)
 Copy an Element map. More...
 

Detailed Description

Common interface representing a network to which the DHCP clients are connected.

The most common type of network, in Kea's terminology, is a subnet. The Subnet derives from this class. Another types of objects implementing this interface are SharedNetwork4 and SharedNetwork6 objects. They group multiple subnets together to provide means for extending available address pools (a single client may obtain IP address from any of the pools belonging to subnets in the shared network), or for selecting a subnet on a given link, depending on the class of the client (e.g. cable network case: different subnet is selected for cable modems, different one for routers).

The subnets and shared networks share many data structures, e.g. DHCP options, local interface name, address manipulation methods. Both subnets and shared networks derive from this class to provide the common functionality.

The DHCP server configuration is complex because many parameters may be specified at different levels of hierarchy. The lower level values, e.g. subnet specific values, take precedence over upper level values, e.g. shared network specific ones. For historical reasons, the DHCP servers expect that the appropriate values are inherited from the upper configuration levels to the lower configuration levels upon the reconfiguration. For example: if a user didn't specify valid-lifetime for a subnet, calling Subnet4::getValid() should result in returning a global value of valid-lifetime. In the early Kea days it was achieved by the configuration parsers which would explicitly assign the global valid lifetime to the Subnet4 instances for which the subnet specific value was not provided. This approach has a major benefit that it is fast. However, it makes the subnets tightly dependent on the global values (and shared network specific values). Modification of the global value must result in modification of this value in all subnets for which there is no explicit value provided. This issue became a serious road block during the implementation of the Configuration Backend.

The Network object has been modified to address the problem of inheritance of global, shared network specific and subnet specific parameters in a generic way, at the same time minimizing the need to change the existing server logic.

The Network object now holds the pointer to the "parent" Network object. Thus subnets which belong to a shared network will have that shared network as its parent. Stand-alone subnets, will have no parent.

The general idea is that the accessor functions of the network will first check if the accessed value is specified or not (that is handled by util::Optional object). If the value is specified it is returned. Otherwise, the object will check if there is a parent object it belongs to and will call the appropriate method of that object. If the value is present it is returned. Otherwise the global value is returned.

Accessing global values from the Network object is troublesome. There is no uniform way to access those values. For example, the given network may be in a staging or current configuration and it really has no means to know in which of the two it belongs. In fact, an attempt to pass the pointer to the SrvConfig object would cause a circular dependency between the Network and the SrvConfig. Even if it was possible and the Network had access to the specific SrvConfig instance, it doesn't handle the cases when the SrvConfig instance was modified.

To deal with the problem of accessing the global parameters in a flexible manner, we elected to use an optional callback function which can be associated with the Network object. This callback implements the logic to retrieve global parameters and return them in a well known form, so as the Network accessors can use them.

Definition at line 152 of file network.h.

Member Typedef Documentation

◆ RelayInfoPtr

Pointer to the RelayInfo structure.

Definition at line 210 of file network.h.

Member Enumeration Documentation

◆ Inheritance

Inheritance "mode" used when fetching an optional Network parameter.

The following modes are currently supported:

  • NONE: no inheritance is used, the network specific value is returned regardless if it is specified or not.
  • PARENT_NETWORK: parent network specific value is returned or unspecified if the parent network doesn't exist.
  • GLOBAL: global specific value is returned.
  • ALL: inheritance is used on all levels: network specific value takes precedence over parent specific value over the global value.
Enumerator
NONE 
PARENT_NETWORK 
GLOBAL 
ALL 

Definition at line 202 of file network.h.

Constructor & Destructor Documentation

◆ Network()

isc::dhcp::Network::Network ( )
inline

Constructor.

Definition at line 213 of file network.h.

◆ ~Network()

virtual isc::dhcp::Network::~Network ( )
inlinevirtual

Virtual destructor.

Does nothing at the moment.

Definition at line 228 of file network.h.

Member Function Documentation

◆ addRelayAddress()

void isc::dhcp::Network::addRelayAddress ( const asiolink::IOAddress addr)

Adds an address to the list addresses in the network's relay info.

Parameters
addraddress of the relay
Exceptions
BadValueif the address is already in the list

Definition at line 49 of file network.cc.

◆ allowClientClass()

void isc::dhcp::Network::allowClientClass ( const isc::dhcp::ClientClass class_name)

Sets the supported class to class class_name.

Parameters
class_nameclient class to be supported by this network

Definition at line 80 of file network.cc.

◆ clientSupported()

bool isc::dhcp::Network::clientSupported ( const isc::dhcp::ClientClasses client_classes) const
virtual

Checks whether this network supports client that belongs to specified classes.

This method checks whether a client that belongs to given classes can use this network. For example, if this class is reserved for client class "foo" and the client belongs to classes "foo", "bar" and "baz", it is supported. On the other hand, client belonging to classes "foobar" and "zyxxy" is not supported.

Note
: changed the planned white and black lists idea to a simple client class name.
Parameters
client_classeslist of all classes the client belongs to
Returns
true if client can be supported, false otherwise

Reimplemented in isc::dhcp::Subnet6, and isc::dhcp::Subnet4.

Definition at line 69 of file network.cc.

References isc::dhcp::ClientClasses::contains().

Referenced by isc::dhcp::Subnet4::clientSupported(), and isc::dhcp::Subnet6::clientSupported().

+ Here is the call graph for this function:

◆ getAllocatorType()

util::Optional<std::string> isc::dhcp::Network::getAllocatorType ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns allocator type.

Parameters
inheritanceinheritance mode to be used.

Definition at line 786 of file network.h.

References isc::dhcp::CfgGlobals::ALLOCATOR.

◆ getCacheMaxAge()

util::Optional<uint32_t> isc::dhcp::Network::getCacheMaxAge ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns value in seconds to use as cache maximum age.

Parameters
inheritanceinheritance mode to be used.

Definition at line 735 of file network.h.

References isc::dhcp::CfgGlobals::CACHE_MAX_AGE.

◆ getCacheThreshold()

util::Optional<double> isc::dhcp::Network::getCacheThreshold ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns percentage to use as cache threshold.

Parameters
inheritanceinheritance mode to be used.

Definition at line 718 of file network.h.

References isc::dhcp::CfgGlobals::CACHE_THRESHOLD.

◆ getCalculateTeeTimes()

util::Optional<bool> isc::dhcp::Network::getCalculateTeeTimes ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns whether or not T1/T2 calculation is enabled.

Parameters
inheritanceinheritance mode to be used.

Definition at line 488 of file network.h.

References isc::dhcp::CfgGlobals::CALCULATE_TEE_TIMES.

◆ getCfgOption() [1/2]

CfgOptionPtr isc::dhcp::Network::getCfgOption ( )
inline

Returns pointer to the option data configuration for this network.

Definition at line 474 of file network.h.

◆ getCfgOption() [2/2]

ConstCfgOptionPtr isc::dhcp::Network::getCfgOption ( ) const
inline

Returns const pointer to the option data configuration for this network.

Definition at line 480 of file network.h.

◆ getClientClass()

util::Optional<ClientClass> isc::dhcp::Network::getClientClass ( const Inheritance inheritance = Inheritance::ALL) const
inline

returns the client class

Note
The returned reference is only valid as long as the object returned it is valid.
Parameters
inheritanceinheritance mode to be used.
Returns
client class client_class_

Definition at line 367 of file network.h.

◆ getDdnsGeneratedPrefix()

util::Optional<std::string> isc::dhcp::Network::getDdnsGeneratedPrefix ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns ddns-generated-prefix.

Parameters
inheritanceinheritance mode to be used.

Definition at line 636 of file network.h.

References isc::dhcp::CfgGlobals::DDNS_GENERATED_PREFIX.

◆ getDdnsOverrideClientUpdate()

util::Optional<bool> isc::dhcp::Network::getDdnsOverrideClientUpdate ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns ddns-override-client-update.

Parameters
inheritanceinheritance mode to be used.

Definition at line 572 of file network.h.

References isc::dhcp::CfgGlobals::DDNS_OVERRIDE_CLIENT_UPDATE.

◆ getDdnsOverrideNoUpdate()

util::Optional<bool> isc::dhcp::Network::getDdnsOverrideNoUpdate ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns ddns-override-no-update.

Parameters
inheritanceinheritance mode to be used.

Definition at line 555 of file network.h.

References isc::dhcp::CfgGlobals::DDNS_OVERRIDE_NO_UPDATE.

◆ getDdnsQualifyingSuffix()

util::Optional<std::string> isc::dhcp::Network::getDdnsQualifyingSuffix ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns ddns-qualifying-suffix.

Parameters
inheritanceinheritance mode to be used.

Definition at line 653 of file network.h.

References isc::dhcp::CfgGlobals::DDNS_QUALIFYING_SUFFIX.

◆ getDdnsReplaceClientNameMode()

util::Optional<D2ClientConfig::ReplaceClientNameMode> isc::dhcp::Network::getDdnsReplaceClientNameMode ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns ddns-replace-client-name-mode.

Parameters
inheritanceinheritance mode to be used.

Definition at line 590 of file network.h.

References isc::dhcp::CfgGlobals::DDNS_REPLACE_CLIENT_NAME, isc::util::Optional< T >::get(), isc::log::NONE, isc::dhcp::D2ClientConfig::stringToReplaceClientNameMode(), and isc::util::Optional< T >::unspecified().

+ Here is the call graph for this function:

◆ getDdnsSendUpdates()

util::Optional<bool> isc::dhcp::Network::getDdnsSendUpdates ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns ddns-send-updates.

Parameters
inheritanceinheritance mode to be used.

Definition at line 538 of file network.h.

References isc::dhcp::CfgGlobals::DDNS_SEND_UPDATES.

◆ getDdnsUpdateOnRenew()

util::Optional<bool> isc::dhcp::Network::getDdnsUpdateOnRenew ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns ddns-update-on-renew.

Parameters
inheritanceinheritance mode to be used.

Definition at line 751 of file network.h.

References isc::dhcp::CfgGlobals::DDNS_UPDATE_ON_RENEW.

◆ getDdnsUseConflictResolution()

util::Optional<bool> isc::dhcp::Network::getDdnsUseConflictResolution ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns ddns-use-conflict-resolution.

Parameters
inheritanceinheritance mode to be used.

Definition at line 768 of file network.h.

References isc::dhcp::CfgGlobals::DDNS_USE_CONFLICT_RESOLUTION.

◆ getFetchGlobalsFn()

FetchNetworkGlobalsFn isc::dhcp::Network::getFetchGlobalsFn ( ) const
inlineprotected

Gets the optional callback function used to fetch globally configured parameters.

Returns
Pointer to the function.

Definition at line 815 of file network.h.

◆ getGlobalProperty() [1/3]

template<typename ReturnType >
ReturnType isc::dhcp::Network::getGlobalProperty ( ReturnType  property,
const int  global_index,
const int  min_index = -1,
const int  max_index = -1 
) const
inlineprotected

Returns a value of global configuration parameter with a given index.

If the ferch_globals_fn_ function is non-null, this method will invoke this function to retrieve a global value having the given index. Typically, this method is invoked by getProperty when network specific value of the parameter is not found. In some cases it may be called by other methods. One such example is the getDdnsReplaceClientNameMode which needs to call getGlobalProperty explicitly to convert the global replace client name mode value from a string to an enum.

Template Parameters
ReturnTypeType of the returned value, e.g. Optional<std::string>.
Parameters
propertyValue to be returned when it is specified or when no global value is found.
global_indexIndex of the global parameter which value should be returned
min_indexIndex of the min global parameter which value should be returned for triplets
max_indexIndex of the max global parameter which value should be returned for triplets
Returns
Optional value fetched from the global level or the value of property.

Definition at line 846 of file network.h.

◆ getGlobalProperty() [2/3]

template<typename NumType >
isc::util::Triplet<NumType> isc::dhcp::Network::getGlobalProperty ( isc::util::Triplet< NumType >  property,
const int  global_index,
const int  min_index = -1,
const int  max_index = -1 
) const
inlineprotected

The getGlobalProperty specialization for isc::util::Triplet<T>.

Note
: use overloading vs specialization because full specialization is not allowed in this scope.
Template Parameters
NumTypeType of the encapsulated value(s).
Parameters
propertyValue to be returned when it is specified or when no global value is found.
global_indexIndex of the global parameter which value should be returned
min_indexIndex of the min global parameter which value should be returned for triplets
max_indexIndex of the max global parameter which value should be returned for triplets
Returns
Optional value fetched from the global level or the value of property.

Definition at line 884 of file network.h.

◆ getGlobalProperty() [3/3]

Optional< IOAddress > isc::dhcp::Network::getGlobalProperty ( util::Optional< asiolink::IOAddress property,
const int  global_index,
const int  min_index = -1,
const int  max_index = -1 
) const
protected

The getGlobalProperty specialization for Optional<IOAddress>.

This does two things:

  • uses the string value of the parameter
  • falls back when the value is empty
Note
: use overloading vs specialization because full specialization is not allowed in this scope.
Parameters
propertyValue to be returned when it is specified or when no global value is found.
global_indexIndex of the global parameter which value should be returned
min_indexIndex of the min global parameter which value should be returned for triplets
max_indexIndex of the max global parameter which value should be returned for triplets
Returns
Optional value fetched from the global level or the value of property.

Definition at line 97 of file network.cc.

◆ getHostnameCharReplacement()

util::Optional<std::string> isc::dhcp::Network::getHostnameCharReplacement ( const Inheritance inheritance = Inheritance::ALL) const
inline

Return the invalid char replacement used to sanitize client hostnames.

Definition at line 683 of file network.h.

References isc::dhcp::CfgGlobals::HOSTNAME_CHAR_REPLACEMENT.

◆ getHostnameCharSet()

util::Optional<std::string> isc::dhcp::Network::getHostnameCharSet ( const Inheritance inheritance = Inheritance::ALL) const
inline

Return the char set regexp used to sanitize client hostnames.

Definition at line 668 of file network.h.

References isc::dhcp::CfgGlobals::HOSTNAME_CHAR_SET.

◆ getIface()

util::Optional<std::string> isc::dhcp::Network::getIface ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns name of the local interface for which this network is selected.

Parameters
inheritanceinheritance mode to be used.
Returns
Interface name as optional text.

Definition at line 269 of file network.h.

◆ getOptionProperty()

template<typename BaseType >
OptionPtr isc::dhcp::Network::getOptionProperty ( OptionPtr(BaseType::*)(const Inheritance &inheritance) const  MethodPointer,
OptionPtr  property,
const Inheritance inheritance 
) const
inlineprotected

Returns option pointer associated with a network using inheritance.

This template method provides a generic mechanism to retrieve a network parameter using inheritance. It is called from public accessor methods which return an OptionPtr.

Template Parameters
BaseTypeType of this instance, e.g. Network, Network4 etc, which exposes a method to be called.
Parameters
MethodPointerPointer to the method of the base class which should be called on the parent network instance (typically on SharedNetwork4 or SharedNetwork6) to fetch the parent specific value if the value is unspecified for this instance.
propertythe value to return when inheritance mode is NONE, or when the mode is PARENT_NETWORK and the property has not been specified by a parent network.
inheritanceinheritance mode to be used.
Returns
Option pointer fetched from this instance level or parent network level.

Definition at line 1049 of file network.h.

References GLOBAL, NONE, and PARENT_NETWORK.

◆ getProperty()

template<typename BaseType , typename ReturnType >
ReturnType isc::dhcp::Network::getProperty ( ReturnType(BaseType::*)(const Inheritance &) const  MethodPointer,
ReturnType  property,
const Inheritance inheritance,
const int  global_index = -1,
const int  min_index = -1,
const int  max_index = -1 
) const
inlineprotected

Returns a value associated with a network using inheritance.

This template method provides a generic mechanism to retrieve a network parameter using inheritance. It is called from public accessor methods which return an OptionalValue or isc::util::Triplet.

Template Parameters
BaseTypeType of this instance, e.g. Network, Network4 etc, which exposes a method to be called.
ReturnTypeType of the returned value, e.g. Optional<std::string>.
Parameters
MethodPointerPointer to the method of the base class which should be called on the parent network instance (typically on SharedNetwork4 or SharedNetwork6) to fetch the parent specific value if the value is unspecified for this instance.
propertyValue to be returned when it is specified or when no explicit value is specified on upper inheritance levels.
inheritanceinheritance mode to be used.
global_indexOptional index of the global parameter which value should be returned if the given parameter is not specified on network level. This value is empty by default, which indicates that the global value for the given parameter is not supported and shouldn't be fetched.
min_indexIndex of the min global parameter which value should be returned for triplets
max_indexIndex of the max global parameter which value should be returned for triplets
Returns
Optional value fetched from this instance level, parent network level or global level

Definition at line 973 of file network.h.

References isc::log::NONE, and NONE.

◆ getRelayAddresses()

const IOAddressList & isc::dhcp::Network::getRelayAddresses ( ) const

Returns the list of relay addresses from the network's relay info.

Returns
const reference to the list of addresses

Definition at line 64 of file network.cc.

◆ getRelayInfo()

const RelayInfo& isc::dhcp::Network::getRelayInfo ( ) const
inline

Returns const reference to relay information.

Note
The returned reference is only valid as long as the object returned it is valid.
Returns
const reference to the relay information

Definition at line 303 of file network.h.

◆ getRequiredClasses()

const ClientClasses & isc::dhcp::Network::getRequiredClasses ( ) const

Returns classes which are required to be evaluated.

Definition at line 92 of file network.cc.

◆ getReservationsGlobal()

util::Optional<bool> isc::dhcp::Network::getReservationsGlobal ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns whether global reservations should be fetched.

Parameters
inheritanceinheritance mode to be used.

Definition at line 423 of file network.h.

References isc::dhcp::CfgGlobals::RESERVATIONS_GLOBAL.

◆ getReservationsInSubnet()

util::Optional<bool> isc::dhcp::Network::getReservationsInSubnet ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns whether subnet reservations should be fetched.

Parameters
inheritanceinheritance mode to be used.

Definition at line 441 of file network.h.

References isc::dhcp::CfgGlobals::RESERVATIONS_IN_SUBNET.

◆ getReservationsOutOfPool()

util::Optional<bool> isc::dhcp::Network::getReservationsOutOfPool ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns whether only out-of-pool reservations are allowed.

Parameters
inheritanceinheritance mode to be used.

Definition at line 459 of file network.h.

References isc::dhcp::CfgGlobals::RESERVATIONS_OUT_OF_POOL.

◆ getStoreExtendedInfo()

util::Optional<bool> isc::dhcp::Network::getStoreExtendedInfo ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns store-extended-info.

Parameters
inheritanceinheritance mode to be used.

Definition at line 701 of file network.h.

References isc::dhcp::CfgGlobals::STORE_EXTENDED_INFO.

◆ getT1()

isc::util::Triplet<uint32_t> isc::dhcp::Network::getT1 ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns T1 (renew timer), expressed in seconds.

Parameters
inheritanceinheritance mode to be used.

Definition at line 392 of file network.h.

References isc::dhcp::CfgGlobals::RENEW_TIMER.

◆ getT1Percent()

util::Optional<double> isc::dhcp::Network::getT1Percent ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns percentage to use when calculating the T1 (renew timer).

Parameters
inheritanceinheritance mode to be used.

Definition at line 506 of file network.h.

References isc::dhcp::CfgGlobals::T1_PERCENT.

◆ getT2()

isc::util::Triplet<uint32_t> isc::dhcp::Network::getT2 ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns T2 (rebind timer), expressed in seconds.

Parameters
inheritanceinheritance mode to be used.

Definition at line 407 of file network.h.

References isc::dhcp::CfgGlobals::REBIND_TIMER.

◆ getT2Percent()

util::Optional<double> isc::dhcp::Network::getT2Percent ( const Inheritance inheritance = Inheritance::ALL) const
inline

Returns percentage to use when calculating the T2 (rebind timer).

Parameters
inheritanceinheritance mode to be used.

Definition at line 522 of file network.h.

References isc::dhcp::CfgGlobals::T2_PERCENT.

◆ getValid()

isc::util::Triplet<uint32_t> isc::dhcp::Network::getValid ( const Inheritance inheritance = Inheritance::ALL) const
inline

Return valid-lifetime for addresses in that prefix.

Parameters
inheritanceinheritance mode to be used.

Definition at line 375 of file network.h.

References isc::dhcp::CfgGlobals::MAX_VALID_LIFETIME, isc::dhcp::CfgGlobals::MIN_VALID_LIFETIME, and isc::dhcp::CfgGlobals::VALID_LIFETIME.

◆ hasFetchGlobalsFn()

bool isc::dhcp::Network::hasFetchGlobalsFn ( ) const
inline

Checks if the network is associated with a function used to fetch globally configured parameters.

Returns
true if it is associated, false otherwise.

Definition at line 242 of file network.h.

◆ hasRelayAddress()

bool isc::dhcp::Network::hasRelayAddress ( const asiolink::IOAddress address) const

Tests if the network's relay info contains the given address.

Parameters
addressaddress to search for in the relay list
Returns
True if a relay with the given address is found, false otherwise

Definition at line 59 of file network.cc.

◆ hasRelays()

bool isc::dhcp::Network::hasRelays ( ) const

Indicates if network's relay info has relay addresses.

Returns
True the relay list is not empty, false otherwise

Definition at line 54 of file network.cc.

◆ requireClientClass()

void isc::dhcp::Network::requireClientClass ( const isc::dhcp::ClientClass class_name)

Adds class class_name to classes required to be evaluated.

Parameters
class_nameclient class required to be evaluated

Definition at line 85 of file network.cc.

◆ setAllocatorType()

void isc::dhcp::Network::setAllocatorType ( const util::Optional< std::string > &  allocator_type)
inline

Sets new allocator type.

It doesn't set the actual allocator instance. It merely remembers the value specified in the configuration, so it can be output in the toElement call.

Parameters
allocator_typenew allocator type to use.

Definition at line 800 of file network.h.

◆ setCacheMaxAge()

void isc::dhcp::Network::setCacheMaxAge ( const util::Optional< uint32_t > &  cache_max_age)
inline

Sets cache max for a network.

Parameters
cache_max_ageNew cache maximum value in seconds to use.

Definition at line 743 of file network.h.

◆ setCacheThreshold()

void isc::dhcp::Network::setCacheThreshold ( const util::Optional< double > &  cache_threshold)
inline

Sets cache threshold for a network.

Parameters
cache_thresholdNew cache threshold percentage to use.

Definition at line 727 of file network.h.

◆ setCalculateTeeTimes()

void isc::dhcp::Network::setCalculateTeeTimes ( const util::Optional< bool > &  calculate_tee_times)
inline

Sets whether or not T1/T2 calculation is enabled.

Parameters
calculate_tee_timesnew value of enabled/disabled.

Definition at line 498 of file network.h.

◆ setDdnsGeneratedPrefix()

void isc::dhcp::Network::setDdnsGeneratedPrefix ( const util::Optional< std::string > &  ddns_generated_prefix)
inline

Sets new ddns-generated-prefix.

Parameters
ddns_generated_prefixNew value to use.

Definition at line 645 of file network.h.

◆ setDdnsOverrideClientUpdate()

void isc::dhcp::Network::setDdnsOverrideClientUpdate ( const util::Optional< bool > &  ddns_override_client_update)
inline

Sets new ddns-override-client-update.

Parameters
ddns_override_client_updateNew value to use.

Definition at line 581 of file network.h.

◆ setDdnsOverrideNoUpdate()

void isc::dhcp::Network::setDdnsOverrideNoUpdate ( const util::Optional< bool > &  ddns_override_no_update)
inline

Sets new ddns-override-no-update.

Parameters
ddns_override_no_updateNew value to use.

Definition at line 564 of file network.h.

◆ setDdnsQualifyingSuffix()

void isc::dhcp::Network::setDdnsQualifyingSuffix ( const util::Optional< std::string > &  ddns_qualifying_suffix)
inline

Sets new ddns-qualifying-suffix.

Parameters
ddns_qualifying_suffixNew value to use.

Definition at line 662 of file network.h.

◆ setDdnsReplaceClientNameMode()

void isc::dhcp::Network::setDdnsReplaceClientNameMode ( const util::Optional< D2ClientConfig::ReplaceClientNameMode > &  ddns_replace_client_name_mode)
inline

Sets new ddns-replace-client-name-mode.

Parameters
ddns_replace_client_name_modeNew value to use.

Definition at line 627 of file network.h.

◆ setDdnsSendUpdates()

void isc::dhcp::Network::setDdnsSendUpdates ( const util::Optional< bool > &  ddns_send_updates)
inline

Sets new ddns-send-updates.

Parameters
ddns_send_updatesNew value to use.

Definition at line 547 of file network.h.

◆ setDdnsUpdateOnRenew()

void isc::dhcp::Network::setDdnsUpdateOnRenew ( const util::Optional< bool > &  ddns_update_on_renew)
inline

Sets new ddns-update-on-renew.

Parameters
ddns_update_on_renewNew value to use.

Definition at line 760 of file network.h.

◆ setDdnsUseConflictResolution()

void isc::dhcp::Network::setDdnsUseConflictResolution ( const util::Optional< bool > &  ddns_use_conflict_resolution)
inline

Sets new ddns-use-conflict-resolution.

Parameters
ddns_use_conflict_resolutionNew value to use.

Definition at line 778 of file network.h.

◆ setFetchGlobalsFn()

void isc::dhcp::Network::setFetchGlobalsFn ( FetchNetworkGlobalsFn  fetch_globals_fn)
inline

Sets the optional callback function used to fetch globally configured parameters.

Parameters
fetch_globals_fnPointer to the function.

Definition at line 234 of file network.h.

◆ setHostnameCharReplacement()

void isc::dhcp::Network::setHostnameCharReplacement ( const util::Optional< std::string > &  hostname_char_replacement)
inline

Sets new hostname-char-replacement.

Parameters
hostname_char_replacementNew value to use.

Definition at line 692 of file network.h.

◆ setHostnameCharSet()

void isc::dhcp::Network::setHostnameCharSet ( const util::Optional< std::string > &  hostname_char_set)
inline

Sets new hostname-char-set.

Parameters
hostname_char_setNew value to use.

Definition at line 677 of file network.h.

◆ setIface()

void isc::dhcp::Network::setIface ( const util::Optional< std::string > &  iface_name)
inline

Sets local name of the interface for which this network is selected.

If the interface is specified, the server will use the network associated with this local interface to allocate IP addresses and other resources to a client. Empty values are translated into unspecified.

Parameters
iface_nameInterface name.

Definition at line 255 of file network.h.

References isc::util::Optional< T >::empty().

+ Here is the call graph for this function:

◆ setRelayInfo()

void isc::dhcp::Network::setRelayInfo ( const RelayInfo relay)
inline

Sets information about relay.

In some situations where there are shared subnets (i.e. two different subnets are available on the same physical link), there is only one relay that handles incoming requests from clients. In such a case, the usual subnet selection criteria based on relay belonging to the subnet being selected are no longer sufficient and we need to explicitly specify a relay. One notable example of such uncommon, but valid scenario is a cable network, where there is only one CMTS (one relay), but there are 2 distinct subnets behind it: one for cable modems and another one for CPEs and other user equipment behind modems. From manageability perspective, it is essential that modems get addresses from different subnet, so users won't tinker with their modems.

Setting this parameter is not needed in most deployments. This structure holds IP address only for now, but it is expected to be extended in the future.

Parameters
relaystructure that contains relay information

Definition at line 293 of file network.h.

◆ setReservationsGlobal()

void isc::dhcp::Network::setReservationsGlobal ( const util::Optional< bool > &  reservations_global)
inline

Sets whether global reservations should be fetched.

Parameters
reservations_globalnew value of enabled/disabled.

Definition at line 433 of file network.h.

◆ setReservationsInSubnet()

void isc::dhcp::Network::setReservationsInSubnet ( const util::Optional< bool > &  reservations_in_subnet)
inline

Sets whether subnet reservations should be fetched.

Parameters
reservations_in_subnetnew value of enabled/disabled.

Definition at line 451 of file network.h.

◆ setReservationsOutOfPool()

void isc::dhcp::Network::setReservationsOutOfPool ( const util::Optional< bool > &  reservations_out_of_pool)
inline

Sets whether only out-of-pool reservations are allowed.

Parameters
reservations_out_of_poolnew value of enabled/disabled.

Definition at line 469 of file network.h.

◆ setStoreExtendedInfo()

void isc::dhcp::Network::setStoreExtendedInfo ( const util::Optional< bool > &  store_extended_info)
inline

Sets new store-extended-info.

Parameters
store_extended_infoNew value to use.

Definition at line 710 of file network.h.

◆ setT1()

void isc::dhcp::Network::setT1 ( const isc::util::Triplet< uint32_t > &  t1)
inline

Sets new renew timer for a network.

Parameters
t1New renew timer value in seconds.

Definition at line 400 of file network.h.

Referenced by isc::dhcp::Subnet4::Subnet4(), and isc::dhcp::Subnet6::Subnet6().

◆ setT1Percent()

void isc::dhcp::Network::setT1Percent ( const util::Optional< double > &  t1_percent)
inline

Sets new percentage for calculating T1 (renew timer).

Parameters
t1_percentNew percentage to use.

Definition at line 514 of file network.h.

◆ setT2()

void isc::dhcp::Network::setT2 ( const isc::util::Triplet< uint32_t > &  t2)
inline

Sets new rebind timer for a network.

Parameters
t2New rebind timer value in seconds.

Definition at line 415 of file network.h.

Referenced by isc::dhcp::Subnet4::Subnet4(), and isc::dhcp::Subnet6::Subnet6().

◆ setT2Percent()

void isc::dhcp::Network::setT2Percent ( const util::Optional< double > &  t2_percent)
inline

Sets new percentage for calculating T2 (rebind timer).

Parameters
t2_percentNew percentage to use.

Definition at line 530 of file network.h.

◆ setValid()

void isc::dhcp::Network::setValid ( const isc::util::Triplet< uint32_t > &  valid)
inline

Sets new valid lifetime for a network.

Parameters
validNew valid lifetime in seconds.

Definition at line 385 of file network.h.

Referenced by isc::dhcp::Subnet4::Subnet4(), and isc::dhcp::Subnet6::Subnet6().

◆ toElement()

ElementPtr isc::dhcp::Network::toElement ( ) const
virtual

Unparses network object.

Returns
A pointer to unparsed network configuration.

Implements isc::data::CfgToElement.

Reimplemented in isc::dhcp::Network6, isc::dhcp::Network4, isc::dhcp::Subnet6, isc::dhcp::Subnet4, isc::dhcp::Subnet, isc::dhcp::SharedNetwork6, and isc::dhcp::SharedNetwork4.

Definition at line 117 of file network.cc.

References isc::dhcp::ClientClasses::cbegin(), isc::dhcp::ClientClasses::cend(), and isc::dhcp::ClientClasses::empty().

+ Here is the call graph for this function:

Member Data Documentation

◆ allocator_type_

util::Optional<std::string> isc::dhcp::Network::allocator_type_
protected

Allocator used for IP address allocations.

Definition at line 1189 of file network.h.

◆ cache_max_age_

util::Optional<uint32_t> isc::dhcp::Network::cache_max_age_
protected

Value in seconds to use as cache maximal age.

Definition at line 1180 of file network.h.

◆ cache_threshold_

util::Optional<double> isc::dhcp::Network::cache_threshold_
protected

Percentage of the lease lifetime to use as cache threshold.

Definition at line 1177 of file network.h.

◆ calculate_tee_times_

util::Optional<bool> isc::dhcp::Network::calculate_tee_times_
protected

Enables calculation of T1 and T2 timers.

Definition at line 1136 of file network.h.

◆ cfg_option_

CfgOptionPtr isc::dhcp::Network::cfg_option_
protected

Pointer to the option data configuration for this subnet.

Definition at line 1133 of file network.h.

◆ client_class_

util::Optional<ClientClass> isc::dhcp::Network::client_class_
protected

Optional definition of a client class.

If defined, only clients belonging to that class will be allowed to use this particular network. The default value for this is an empty string, which means that any client is allowed, regardless of its class.

Definition at line 1102 of file network.h.

◆ ddns_generated_prefix_

util::Optional<std::string> isc::dhcp::Network::ddns_generated_prefix_
protected

Prefix Kea should use when generating domain-names.

Definition at line 1159 of file network.h.

◆ ddns_override_client_update_

util::Optional<bool> isc::dhcp::Network::ddns_override_client_update_
protected

Should Kea perform updates, even if client requested delegation.

Definition at line 1153 of file network.h.

◆ ddns_override_no_update_

util::Optional<bool> isc::dhcp::Network::ddns_override_no_update_
protected

Should Kea perform updates, even if client requested no updates.

Overrides the client request for no updates via the N flag.

Definition at line 1150 of file network.h.

◆ ddns_qualifying_suffix_

util::Optional<std::string> isc::dhcp::Network::ddns_qualifying_suffix_
protected

Suffix Kea should use when to qualify partial domain-names.

Definition at line 1162 of file network.h.

◆ ddns_replace_client_name_mode_

util::Optional<D2ClientConfig::ReplaceClientNameMode> isc::dhcp::Network::ddns_replace_client_name_mode_
protected

How Kea should handle the domain-name supplied by the client.

Definition at line 1156 of file network.h.

◆ ddns_send_updates_

util::Optional<bool> isc::dhcp::Network::ddns_send_updates_
protected

Should Kea perform DNS updates.

Used to provide scoped enabling and disabling of updates.

Definition at line 1146 of file network.h.

◆ ddns_update_on_renew_

util::Optional<bool> isc::dhcp::Network::ddns_update_on_renew_
protected

Should Kea perform updates when leases are extended.

Definition at line 1183 of file network.h.

◆ ddns_use_conflict_resolution_

util::Optional<bool> isc::dhcp::Network::ddns_use_conflict_resolution_
protected

Used to to tell kea-dhcp-ddns whether or not to use conflict resolution.

Definition at line 1186 of file network.h.

◆ fetch_globals_fn_

FetchNetworkGlobalsFn isc::dhcp::Network::fetch_globals_fn_
protected

Pointer to the optional callback used to fetch globally configured parameters inherited to the Network object.

Definition at line 1201 of file network.h.

◆ hostname_char_replacement_

util::Optional<std::string> isc::dhcp::Network::hostname_char_replacement_
protected

A string to replace invalid characters when scrubbing hostnames.

Meaningful only if hostname_char_set_ is not empty.

Definition at line 1170 of file network.h.

◆ hostname_char_set_

util::Optional<std::string> isc::dhcp::Network::hostname_char_set_
protected

Regular expression describing invalid characters for client hostnames.

Definition at line 1166 of file network.h.

◆ iface_name_

util::Optional<std::string> isc::dhcp::Network::iface_name_
protected

Holds interface name for which this network is selected.

Definition at line 1090 of file network.h.

◆ parent_network_

WeakNetworkPtr isc::dhcp::Network::parent_network_
protected

Pointer to another network that this network belongs to.

The most common case is that this instance is a subnet which belongs to a shared network and the parent_network_ points to the shared network object. If the network instance (subnet) doesn't belong to a shared network this pointer is null.

Definition at line 1197 of file network.h.

Referenced by isc::dhcp::Subnet::getSharedNetwork(), and isc::dhcp::Subnet::setSharedNetwork().

◆ relay_

RelayInfo isc::dhcp::Network::relay_
protected

Relay information.

See RelayInfo for detailed description.

Definition at line 1095 of file network.h.

◆ required_classes_

ClientClasses isc::dhcp::Network::required_classes_
protected

Required classes.

If the network is selected these classes will be added to the incoming packet and their evaluation will be required.

Definition at line 1108 of file network.h.

◆ reservations_global_

util::Optional<bool> isc::dhcp::Network::reservations_global_
protected

Enables global reservations.

Definition at line 1120 of file network.h.

◆ reservations_in_subnet_

util::Optional<bool> isc::dhcp::Network::reservations_in_subnet_
protected

Enables subnet reservations.

Definition at line 1123 of file network.h.

◆ reservations_out_of_pool_

util::Optional<bool> isc::dhcp::Network::reservations_out_of_pool_
protected

Enables out-of-pool reservations optimization.

When true only out-of-pool reservations are allowed. This allows AllocEngine to skip reservation checks when dealing with addresses that are in pool.

Definition at line 1130 of file network.h.

◆ store_extended_info_

util::Optional<bool> isc::dhcp::Network::store_extended_info_
protected

Should Kea store additional client query data (e.g.

relay-agent-info) on the lease.

Definition at line 1174 of file network.h.

◆ t1_

isc::util::Triplet<uint32_t> isc::dhcp::Network::t1_
protected

a isc::util::Triplet (min/default/max) holding allowed renew timer values

Definition at line 1111 of file network.h.

◆ t1_percent_

util::Optional<double> isc::dhcp::Network::t1_percent_
protected

Percentage of the lease lifetime to use when calculating T1 timer.

Definition at line 1139 of file network.h.

◆ t2_

isc::util::Triplet<uint32_t> isc::dhcp::Network::t2_
protected

a isc::util::Triplet (min/default/max) holding allowed rebind timer values

Definition at line 1114 of file network.h.

◆ t2_percent_

util::Optional<double> isc::dhcp::Network::t2_percent_
protected

Percentage of the lease lifetime to use when calculating T2 timer.

Definition at line 1142 of file network.h.

◆ valid_

isc::util::Triplet<uint32_t> isc::dhcp::Network::valid_
protected

a isc::util::Triplet (min/default/max) holding allowed valid lifetime values

Definition at line 1117 of file network.h.


The documentation for this class was generated from the following files: