Kea 2.7.5
isc::dhcp::Network6 Class Reference

Specialization of the Network object for DHCPv6 case. More...

#include <network.h>

+ Inheritance diagram for isc::dhcp::Network6:

Public Member Functions

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

Additional Inherited Members

- Public Types inherited from isc::dhcp::Network
enum class  Inheritance { NONE , PARENT_NETWORK , GLOBAL , ALL }
 Inheritance "mode" used when fetching an optional Network parameter. More...
 
typedef boost::shared_ptr< Network::RelayInfoRelayInfoPtr
 Pointer to the RelayInfo structure.
 
- Static Public Member Functions inherited from isc::data::UserContext
static data::ElementPtr toElement (data::ConstElementPtr map)
 Copy an Element map.
 
- Protected Member Functions inherited from isc::dhcp::Network
FetchNetworkGlobalsFn getFetchGlobalsFn () const
 Gets the optional callback function used to fetch globally configured parameters.
 
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>.
 
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.
 
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>.
 
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.
 
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.
 
- Protected Attributes inherited from isc::dhcp::Network
ClientClasses additional_classes_
 Additional classes.
 
util::Optional< std::string > allocator_type_
 Allocator used for IP address allocations.
 
util::Optional< uint32_t > cache_max_age_
 Value in seconds to use as cache maximal age.
 
util::Optional< double > cache_threshold_
 Percentage of the lease lifetime to use as cache threshold.
 
util::Optional< bool > calculate_tee_times_
 Enables calculation of T1 and T2 timers.
 
CfgOptionPtr cfg_option_
 Pointer to the option data configuration for this subnet.
 
util::Optional< ClientClassclient_class_
 Optional definition of a client class.
 
util::Optional< std::string > ddns_conflict_resolution_mode_
 DDNS conflict resolution mode.
 
util::Optional< std::string > ddns_generated_prefix_
 Prefix Kea should use when generating domain-names.
 
util::Optional< bool > ddns_override_client_update_
 Should Kea perform updates, even if client requested delegation.
 
util::Optional< bool > ddns_override_no_update_
 Should Kea perform updates, even if client requested no updates.
 
util::Optional< std::string > ddns_qualifying_suffix_
 Suffix Kea should use when to qualify partial domain-names.
 
util::Optional< D2ClientConfig::ReplaceClientNameModeddns_replace_client_name_mode_
 How Kea should handle the domain-name supplied by the client.
 
util::Optional< bool > ddns_send_updates_
 Should Kea perform DNS updates.
 
util::Optional< double > ddns_ttl_percent_
 Percentage of the lease lifetime to use for DNS TTL.
 
util::Optional< bool > ddns_update_on_renew_
 Should Kea perform updates when leases are extended.
 
util::Optional< std::string > default_allocator_type_
 Default allocator type.
 
FetchNetworkGlobalsFn fetch_globals_fn_
 Pointer to the optional callback used to fetch globally configured parameters inherited to the Network object.
 
util::Optional< std::string > hostname_char_replacement_
 A string to replace invalid characters when scrubbing hostnames.
 
util::Optional< std::string > hostname_char_set_
 Regular expression describing invalid characters for client hostnames.
 
util::Optional< std::string > iface_name_
 Holds interface name for which this network is selected.
 
WeakNetworkPtr parent_network_
 Pointer to another network that this network belongs to.
 
RelayInfo relay_
 Relay information.
 
util::Optional< bool > reservations_global_
 Enables global reservations.
 
util::Optional< bool > reservations_in_subnet_
 Enables subnet reservations.
 
util::Optional< bool > reservations_out_of_pool_
 Enables out-of-pool reservations optimization.
 
util::Optional< bool > store_extended_info_
 Should Kea store additional client query data (e.g.
 
isc::util::Triplet< uint32_t > t1_
 a isc::util::Triplet (min/default/max) holding allowed renew timer values
 
util::Optional< double > t1_percent_
 Percentage of the lease lifetime to use when calculating T1 timer.
 
isc::util::Triplet< uint32_t > t2_
 a isc::util::Triplet (min/default/max) holding allowed rebind timer values
 
util::Optional< double > t2_percent_
 Percentage of the lease lifetime to use when calculating T2 timer.
 
isc::util::Triplet< uint32_t > valid_
 a isc::util::Triplet (min/default/max) holding allowed valid lifetime values
 
- Protected Attributes inherited from isc::data::BaseStampedElement
uint64_t id_
 Database identifier of the configuration element.
 
boost::posix_time::ptime timestamp_
 Holds timestamp value.
 
- Protected Attributes inherited from isc::data::UserContext
data::ConstElementPtr user_context_
 Pointer to the user context (may be NULL)
 

Detailed Description

Specialization of the Network object for DHCPv6 case.

Definition at line 1427 of file network.h.

Constructor & Destructor Documentation

◆ Network6()

isc::dhcp::Network6::Network6 ( )
inline

Constructor.

Definition at line 1431 of file network.h.

Member Function Documentation

◆ getDefaultPdAllocatorType()

util::Optional< std::string > isc::dhcp::Network6::getDefaultPdAllocatorType ( const Inheritance & inheritance = Inheritance::ALL) const
inline

Returns a default allocator type for prefix delegation.

This allocator type is used when the allocator type is neither specified at the shared network nor subnet level.

Returns
an allocator type as a string.

Definition at line 1523 of file network.h.

Referenced by isc::dhcp::Subnet6::createAllocators().

◆ getInterfaceId()

OptionPtr isc::dhcp::Network6::getInterfaceId ( const Inheritance & inheritance = Inheritance::ALL) const
inline

Returns interface-id value (if specified)

Parameters
inheritanceinheritance mode to be used.
Returns
interface-id option (if defined)

Definition at line 1460 of file network.h.

◆ getPdAllocatorType()

util::Optional< std::string > isc::dhcp::Network6::getPdAllocatorType ( const Inheritance & inheritance = Inheritance::ALL) const
inline

Returns allocator type for prefix delegation.

Parameters
inheritanceinheritance mode to be used.

Definition at line 1498 of file network.h.

Referenced by isc::dhcp::Subnet6::createAllocators().

◆ getPreferred()

isc::util::Triplet< uint32_t > isc::dhcp::Network6::getPreferred ( const Inheritance & inheritance = Inheritance::ALL) const
inline

Returns preferred lifetime (in seconds)

Parameters
inheritanceinheritance mode to be used.
Returns
a triplet with preferred lifetime

Definition at line 1441 of file network.h.

◆ getRapidCommit()

util::Optional< bool > isc::dhcp::Network6::getRapidCommit ( const Inheritance & inheritance = Inheritance::ALL) const
inline

Returns boolean value indicating that the Rapid Commit option is supported or unsupported for the subnet.

Note
This parameter does not exist at the global level.
Parameters
inheritanceinheritance mode to be used.
Returns
true if the Rapid Commit option is supported, false otherwise.

Definition at line 1480 of file network.h.

◆ setDefaultPdAllocatorType()

void isc::dhcp::Network6::setDefaultPdAllocatorType ( const std::string & allocator_type)
inline

Sets a defalt allocator type for prefix delegation.

Parameters
allocator_typea new default allocator type.

Definition at line 1532 of file network.h.

◆ setInterfaceId()

void isc::dhcp::Network6::setInterfaceId ( const OptionPtr & ifaceid)
inline

sets interface-id option (if defined)

Parameters
ifaceidpointer to interface-id option

Definition at line 1468 of file network.h.

◆ setPdAllocatorType()

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

Sets new allocator type for prefix delegation.

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 1512 of file network.h.

◆ setPreferred()

void isc::dhcp::Network6::setPreferred ( const isc::util::Triplet< uint32_t > & preferred)
inline

Sets new preferred lifetime for a network.

Parameters
preferredNew preferred lifetime in seconds.

Definition at line 1452 of file network.h.

Referenced by isc::dhcp::Subnet6::Subnet6().

◆ setRapidCommit()

void isc::dhcp::Network6::setRapidCommit ( const util::Optional< bool > & rapid_commit)
inline

Enables or disables Rapid Commit option support for the subnet.

Parameters
rapid_commitA boolean value indicating that the Rapid Commit option support is enabled (if true), or disabled (if false).

Definition at line 1490 of file network.h.

◆ toElement()

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

Unparses network object.

Returns
A pointer to unparsed network configuration.

Reimplemented from isc::dhcp::Network.

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

Definition at line 350 of file network.cc.

References isc::data::Element::create(), and isc::dhcp::Network::toElement().

Referenced by isc::dhcp::SharedNetwork6::toElement(), and isc::dhcp::Subnet6::toElement().

+ Here is the call graph for this function:

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