Kea: isc::dhcp::Subnet6 Class Reference

| Kea 2.2.0

Public Member Functions | Static Public Member Functions | List of all members
isc::dhcp::Subnet6 Class Reference

A configuration holder for IPv6 subnet. More...

`#include <subnet.h>`

Inheritance diagram for isc::dhcp::Subnet6:
[legend]

## Public Member Functions
| Subnet6 (const isc::asiolink::IOAddress &prefix, uint8_t length, const util::Triplet< uint32_t > &t1, const util::Triplet< uint32_t > &t2, const util::Triplet< uint32_t > &preferred_lifetime, const util::Triplet< uint32_t > &valid_lifetime, const SubnetID id=0)
| Constructor with all parameters. More...
virtual bool | clientSupported (const isc::dhcp::ClientClasses &client_classes) const
| Checks whether this subnet and parent shared network supports the client that belongs to specified classes. More...
Subnet6Ptr | getNextSubnet (const Subnet6Ptr &first_subnet) const
| Returns next subnet within shared network. More...
Subnet6Ptr | getNextSubnet (const Subnet6Ptr &first_subnet, const ClientClasses &client_classes) const
| Returns next subnet within shared network that matches client classes. More...
virtual data::ElementPtr | toElement () const
| Unparse a subnet object. More...
Public Member Functions inherited from isc::dhcp::Subnet
void | addPool (const PoolPtr &pool)
| Adds a new pool for the subnet. More...
virtual isc::asiolink::IOAddress | default_pool () const =0
| Returns the default address that will be used for pool selection. More...
void | delPools (Lease::Type type)
| Deletes all pools of specified type. More...
std::pair< isc::asiolink::IOAddress, uint8_t > | get () const
| Returns subnet parameters (prefix and prefix length). More...
PoolPtr | getAnyPool (Lease::Type type)
| Returns a pool without any address specified. More...
SubnetID | getID () const
| Returns unique ID for that subnet. More...
isc::asiolink::IOAddress | getLastAllocated (Lease::Type type) const
| returns the last address that was tried from this subnet. More...
boost::posix_time::ptime | getLastAllocatedTime (const Lease::Type &lease_type) const
| Returns the timestamp when the `setLastAllocated` function was called. More...
const PoolPtr | getPool (Lease::Type type, const ClientClasses &client_classes, const isc::asiolink::IOAddress &addr) const
| Returns a pool that specified address belongs to with classes. More...
const PoolPtr | getPool (Lease::Type type, const isc::asiolink::IOAddress &addr, bool anypool=true) const
| Returns a pool that specified address belongs to. More...
uint64_t | getPoolCapacity (Lease::Type type) const
| Returns the number of possible leases for specified lease type. More...
uint64_t | getPoolCapacity (Lease::Type type, const ClientClasses &client_classes) const
| Returns the number of possible leases for specified lease type allowed for a client which belongs to classes. More...
const PoolCollection & | getPools (Lease::Type type) const
| Returns all pools (const variant). More...
PoolCollection & | getPoolsWritable (Lease::Type type)
| Returns all pools (non-const variant). More...
template<typename SharedNetworkPtrType >
void | getSharedNetwork (SharedNetworkPtrType &shared_network) const
| Retrieves pointer to a shared network associated with a subnet. More...
std::string | getSharedNetworkName () const
| Returns shared network name. More...
bool | inPool (Lease::Type type, const isc::asiolink::IOAddress &addr) const
| checks if the specified address is in pools. More...
bool | inPool (Lease::Type type, const isc::asiolink::IOAddress &addr, const ClientClasses &client_classes) const
| checks if the specified address is in allowed pools. More...
bool | inRange (const isc::asiolink::IOAddress &addr) const
| checks if specified address is in range. More...
void | setLastAllocated (Lease::Type type, const isc::asiolink::IOAddress &addr)
| sets the last address that was tried from this subnet. More...
void | setSharedNetwork (const NetworkPtr &shared_network)
| Assigns shared network to a subnet. More...
void | setSharedNetworkName (const std::string &shared_network_name)
| Sets new shared network name. More...
virtual std::string | toText () const
| Returns textual representation of the subnet (e.g. More...
Public Member Functions inherited from isc::dhcp::Network
| 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< 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< ClientClass > | getClientClass (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::ReplaceClientNameMode > | getDdnsReplaceClientNameMode (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 IOAddressList & | getRelayAddresses () const
| Returns the list of relay addresses from the network's relay info. More...
const RelayInfo & | getRelayInfo () const
| Returns const reference to relay information. More...
const ClientClasses & | getRequiredClasses () 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 | 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< ServerTag > | getServerTags () 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...
virtual isc::data::ElementPtr | toElement () const =0
| Unparse a configuration object. More...
Public Member Functions inherited from isc::dhcp::Network6
| Network6 ()
| Constructor. More...
OptionPtr | getInterfaceId (const Inheritance &inheritance=Inheritance::ALL) const
| Returns interface-id value (if specified) More...
isc::util::Triplet< uint32_t > | getPreferred (const Inheritance &inheritance=Inheritance::ALL) const
| Returns preferred lifetime (in seconds) More...
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. More...
void | setInterfaceId (const OptionPtr &ifaceid)
| sets interface-id option (if defined) More...
void | setPreferred (const isc::util::Triplet< uint32_t > &preferred)
| Sets new preferred lifetime for a network. More...
void | setRapidCommit (const util::Optional< bool > &rapid_commit)
| Enables or disables Rapid Commit option support for the subnet. More...
virtual data::ElementPtr | toElement () const
| Unparses network object. More...

## Static Public Member Functions
static Subnet6Ptr | create (const isc::asiolink::IOAddress &prefix, uint8_t length, const util::Triplet< uint32_t > &t1, const util::Triplet< uint32_t > &t2, const util::Triplet< uint32_t > &preferred_lifetime, const util::Triplet< uint32_t > &valid_lifetime, const SubnetID id=0)
| Factory function creating an instance of the `Subnet4`. More...
static std::pair< asiolink::IOAddress, uint8_t > | parsePrefix (const std::string &prefix)
| Converts subnet prefix to a pair of prefix/length pair. More...
Static Public Member Functions inherited from isc::dhcp::Subnet
static void | resetSubnetID ()
| Resets subnet-id counter to its initial value (1). More...
Static Public Member Functions inherited from isc::data::UserContext
static data::ElementPtr | toElement (data::ConstElementPtr map)
| Copy an Element map. More...

## 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::RelayInfo > | RelayInfoPtr
| Pointer to the RelayInfo structure. More...
Protected Member Functions inherited from isc::dhcp::Subnet
| Subnet (const isc::asiolink::IOAddress &prefix, uint8_t len, const SubnetID id)
| Protected constructor. More...
virtual | ~Subnet ()
| virtual destructor. More...
virtual void | checkType (Lease::Type type) const =0
| Checks if used pool type is valid. More...
bool | poolOverlaps (const Lease::Type &pool_type, const PoolPtr &pool) const
| Checks if the specified pool overlaps with an existing pool. More...
uint64_t | sumPoolCapacity (const PoolCollection &pools) const
| Returns a sum of possible leases in all pools. More...
uint64_t | sumPoolCapacity (const PoolCollection &pools, const ClientClasses &client_classes) const
| Returns a sum of possible leases in all pools allowing classes. More...
virtual data::ElementPtr | toElement () const
| Unparse a subnet object. More...
Protected Member Functions inherited from isc::dhcp::Network
FetchNetworkGlobalsFn | getFetchGlobalsFn () const
| Gets the optional callback function used to fetch globally configured parameters. 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...
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...
util::Optional< asiolink::IOAddress > | getGlobalProperty (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...
Static Protected Member Functions inherited from isc::dhcp::Subnet
static SubnetID | generateNextID ()
| returns the next unique Subnet-ID. More...
static std::pair< asiolink::IOAddress, uint8_t > | parsePrefixCommon (const std::string &prefix)
| Converts subnet prefix to a pair of prefix/length pair. More...
Protected Attributes inherited from isc::dhcp::Subnet
SubnetID | id_
| subnet-id More...
isc::asiolink::IOAddress | last_allocated_ia_
| last allocated address. More...
isc::asiolink::IOAddress | last_allocated_pd_
| last allocated IPv6 prefix. More...
isc::asiolink::IOAddress | last_allocated_ta_
| last allocated temporary address. More...
std::map< Lease::Type, boost::posix_time::ptime > | last_allocated_time_
| Timestamp indicating when a lease of a specified type has been last allocated from this subnet. More...
PoolCollection | pools_
| collection of IPv4 or non-temporary IPv6 pools in that subnet. More...
PoolCollection | pools_pd_
| collection of IPv6 prefix pools in that subnet. More...
PoolCollection | pools_ta_
| collection of IPv6 temporary address pools in that subnet. More...
isc::asiolink::IOAddress | prefix_
| a prefix of the subnet. More...
uint8_t | prefix_len_
| a prefix length of the subnet. More...
std::string | shared_network_name_
| Shared network name. More...
Protected Attributes inherited from isc::dhcp::Network
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< ClientClass > | client_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::ReplaceClientNameMode > | ddns_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...
Static Protected Attributes inherited from isc::dhcp::Subnet
static SubnetID | static_id_ = 1
| keeps the subnet-id value. More...

## Detailed Description

A configuration holder for IPv6 subnet.

This class represents an IPv6 subnet.

Note
  Subnet and Network use virtual inheritance to avoid a diamond issue with UserContext

Definition at line 679 of file subnet.h.

## Constructor & Destructor Documentation

## ◆ Subnet6()

isc::dhcp::Subnet6::Subnet6 | ( | const isc::asiolink::IOAddress & | prefix,
|  | uint8_t | length,
|  | const util::Triplet< uint32_t > & | t1,
|  | const util::Triplet< uint32_t > & | t2,
|  | const util::Triplet< uint32_t > & | preferred_lifetime,
|  | const util::Triplet< uint32_t > & | valid_lifetime,
|  | const SubnetID | id = `0`
| ) |  |

Constructor with all parameters.

This constructor calls Subnet::Subnet, where subnet-id is generated.

Parameters

  prefix | Subnet6 prefix
  length | prefix length
  t1 | renewal timer (in seconds)
  t2 | rebind timer (in seconds)
  preferred_lifetime | preferred lifetime of leases (in seconds)
  valid_lifetime | preferred lifetime of leases (in seconds)
  id | arbitrary subnet id, default value of 0 triggers autogeneration of subnet id

Definition at line 631 of file subnet.cc.

References isc_throw, isc::asiolink::IOAddress::isV6(), isc::dhcp::Network6::setPreferred(), isc::dhcp::Network::setT1(), isc::dhcp::Network::setT2(), and isc::dhcp::Network::setValid().

Here is the call graph for this function:

## Member Function Documentation

## ◆ clientSupported()

bool isc::dhcp::Subnet6::clientSupported | ( | const isc::dhcp::ClientClasses & | client_classes | ) | const
| virtual

Checks whether this subnet and parent shared network supports the client that belongs to specified classes.

This method extends the Network::clientSupported method with additional checks whether shared network owning this class supports the client belonging to specified classes. If the class doesn't belong to a shared network this method only checks if the subnet supports specified classes.

Parameters

  client_classes | List of classes the client belongs to.

Returns
  true if client can be supported, false otherwise.

Reimplemented from isc::dhcp::Network.

Definition at line 710 of file subnet.cc.

References isc::dhcp::Network::clientSupported(), and isc::dhcp::Subnet::getSharedNetwork().

Here is the call graph for this function:

## ◆ create()

Subnet6Ptr isc::dhcp::Subnet6::create | ( | const isc::asiolink::IOAddress & | prefix,
|  | uint8_t | length,
|  | const util::Triplet< uint32_t > & | t1,
|  | const util::Triplet< uint32_t > & | t2,
|  | const util::Triplet< uint32_t > & | preferred_lifetime,
|  | const util::Triplet< uint32_t > & | valid_lifetime,
|  | const SubnetID | id = `0`
| ) |  |
| static

Factory function creating an instance of the `Subnet4`.

This function should be used to create an instance of the subnet object within a hooks library in cases when the library may be unloaded before the object is destroyed. This ensures that the ownership of the object by the Kea process is retained.

Parameters

  prefix | Subnet6 prefix
  length | prefix length
  t1 | renewal timer (in seconds)
  t2 | rebind timer (in seconds)
  preferred_lifetime | preferred lifetime of leases (in seconds)
  valid_lifetime | preferred lifetime of leases (in seconds)
  id | arbitrary subnet id, default value of 0 triggers autogeneration of subnet id

Returns
  Pointer to the `Subnet6` instance.

Definition at line 651 of file subnet.cc.

## ◆ getNextSubnet() [1/2]

Subnet6Ptr isc::dhcp::Subnet6::getNextSubnet | ( | const Subnet6Ptr & | first_subnet | ) | const

Returns next subnet within shared network.

If the current subnet doesn't belong to any shared network or if the next subnet is the same as first subnet (specified in the arguments) a NULL pointer is returned.

Parameters

  first_subnet | Pointer to the subnet from which iterations have started.

Returns
  Pointer to the next subnet or NULL pointer if the next subnet is the first subnet or if the current subnet doesn't belong to a shared network.

Definition at line 672 of file subnet.cc.

References isc::dhcp::Subnet::getID(), and isc::dhcp::Subnet::getSharedNetwork().

Here is the call graph for this function:

## ◆ getNextSubnet() [2/2]

Subnet6Ptr isc::dhcp::Subnet6::getNextSubnet | ( | const Subnet6Ptr & | first_subnet,
|  | const ClientClasses & | client_classes
| ) |  | const

Returns next subnet within shared network that matches client classes.

Parameters

  first_subnet | Pointer to the subnet from which iterations have started.
  client_classes | List of classes that the client belongs to. The subnets not matching the classes aren't returned by this method.

Returns
  Pointer to the next subnet or NULL pointer if the next subnet is the first subnet or if the current subnet doesn't belong to a shared network.

Definition at line 683 of file subnet.cc.

References isc::dhcp::Subnet::getID(), and isc::dhcp::Subnet::getSharedNetwork().

Here is the call graph for this function:

## ◆ parsePrefix()

std::pair< IOAddress, uint8_t > isc::dhcp::Subnet6::parsePrefix | ( | const std::string & | prefix | ) |
| static

Converts subnet prefix to a pair of prefix/length pair.

Parameters

  prefix | Prefix to be parsed.

Exceptions

  BadValue | if provided invalid IPv4 prefix.

Definition at line 804 of file subnet.cc.

References isc_throw, and isc::dhcp::Subnet::parsePrefixCommon().

Here is the call graph for this function:

## ◆ toElement()

data::ElementPtr isc::dhcp::Subnet6::toElement | ( |  | ) | const
| virtual

Unparse a subnet object.

Returns
  A pointer to unparsed subnet configuration.

Reimplemented from isc::dhcp::Network6.

Definition at line 773 of file subnet.cc.

References isc::data::Element::createList(), isc::dhcp::Subnet::getPools(), isc::data::merge(), isc::dhcp::Network6::toElement(), isc::dhcp::Subnet::toElement(), isc::dhcp::Lease::TYPE_NA, and isc::dhcp::Lease::TYPE_PD.

Here is the call graph for this function:

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

- subnet.h
- subnet.cc