Kea 2.5.7
subnet.h
Go to the documentation of this file.
1// Copyright (C) 2012-2023 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef SUBNET_H
8#define SUBNET_H
9
10#include <asiolink/io_address.h>
11#include <cc/data.h>
12#include <cc/user_context.h>
14#include <dhcpsrv/allocator.h>
16#include <dhcpsrv/lease.h>
17#include <dhcpsrv/network.h>
18#include <dhcpsrv/pool.h>
19#include <dhcpsrv/subnet_id.h>
20#include <util/bigints.h>
21#include <util/dhcp_space.h>
22#include <util/triplet.h>
23
24#include <boost/enable_shared_from_this.hpp>
25#include <boost/multi_index/mem_fun.hpp>
26#include <boost/multi_index/indexed_by.hpp>
27#include <boost/multi_index/ordered_index.hpp>
28#include <boost/multi_index/random_access_index.hpp>
29#include <boost/multi_index_container.hpp>
30#include <boost/date_time/posix_time/posix_time.hpp>
31#include <boost/pointer_cast.hpp>
32#include <boost/shared_ptr.hpp>
33
34#include <cstdint>
35#include <map>
36#include <utility>
37
38namespace isc {
39namespace dhcp {
40
41class Subnet : public virtual Network {
42public:
43
49 bool inRange(const isc::asiolink::IOAddress& addr) const;
50
65 bool inPool(Lease::Type type, const isc::asiolink::IOAddress& addr) const;
66
76 bool inPool(Lease::Type type,
77 const isc::asiolink::IOAddress& addr,
78 const ClientClasses& client_classes) const;
79
83 SubnetID getID() const {
84 return (id_);
85 }
86
90 std::pair<isc::asiolink::IOAddress, uint8_t> get() const {
91 return (std::make_pair(prefix_, prefix_len_));
92 }
93
115 void addPool(const PoolPtr& pool);
116
122 void delPools(Lease::Type type);
123
142 const PoolPtr getPool(Lease::Type type, const isc::asiolink::IOAddress& addr,
143 bool anypool = true) const;
144
152 const PoolPtr getPool(Lease::Type type,
153 const ClientClasses& client_classes,
154 const isc::asiolink::IOAddress& addr) const;
155
161 return (getPool(type, default_pool()));
162 }
163
169
176 const PoolCollection& getPools(Lease::Type type) const;
177
182
190 const ClientClasses& client_classes) const;
191
204 const ClientClasses& client_classes,
205 Allocator::PrefixLenMatchType prefix_length_match,
206 uint8_t hint_prefix_length) const;
207
212 virtual std::string toText() const;
213
219 static void resetSubnetID() {
220 static_id_ = 1;
221 }
222
239 template<typename SharedNetworkPtrType>
240 void getSharedNetwork(SharedNetworkPtrType& shared_network) const {
241 shared_network = boost::dynamic_pointer_cast<
242 typename SharedNetworkPtrType::element_type>(parent_network_.lock());
243 }
244
252 void setSharedNetwork(const NetworkPtr& shared_network) {
253 parent_network_ = shared_network;
254 }
255
259 std::string getSharedNetworkName() const {
260 return (shared_network_name_);
261 }
262
275 void setSharedNetworkName(const std::string& shared_network_name) {
276 shared_network_name_ = shared_network_name;
277 }
278
286
298
306 void setAllocator(Lease::Type type, const AllocatorPtr& allocator);
307
315
320 void setAllocationState(Lease::Type type, const SubnetAllocationStatePtr& allocation_state);
321
329 virtual void createAllocators() = 0;
330
333
334protected:
335
337 //
350 Subnet(const isc::asiolink::IOAddress& prefix, uint8_t len,
351 const SubnetID id);
352
357 virtual ~Subnet() { };
358
367
377 if (static_id_ == SUBNET_ID_MAX) {
379 }
380
381 return (static_id_++);
382 }
383
392 virtual void checkType(Lease::Type type) const = 0;
393
399
406 const ClientClasses& client_classes) const;
407
421 const ClientClasses& client_classes,
422 Allocator::PrefixLenMatchType prefix_length_match,
423 uint8_t hint_prefix_length) const;
424
433 bool poolOverlaps(const Lease::Type& pool_type, const PoolPtr& pool) const;
434
438 virtual data::ElementPtr toElement() const;
439
440 virtual std::string getLabel() const {
441 std::stringstream ss;
442 ss << "subnet-id " << id_;
443 return (ss.str());
444 }
445
454 static std::pair<asiolink::IOAddress, uint8_t>
455 parsePrefixCommon(const std::string& prefix);
456
462
465
468
471
474
476 uint8_t prefix_len_;
477
480
482 std::map<Lease::Type, AllocatorPtr> allocators_;
483
485 std::map<Lease::Type, SubnetAllocationStatePtr> allocation_states_;
486};
487
489typedef boost::shared_ptr<Subnet> SubnetPtr;
490
491
492class Subnet4;
493
495typedef boost::shared_ptr<const Subnet4> ConstSubnet4Ptr;
496
498typedef boost::shared_ptr<Subnet4> Subnet4Ptr;
499
505class Subnet4 : public Subnet, public Network4, public boost::enable_shared_from_this<Subnet4> {
506public:
507
518 Subnet4(const isc::asiolink::IOAddress& prefix, uint8_t length,
519 const util::Triplet<uint32_t>& t1,
520 const util::Triplet<uint32_t>& t2,
521 const util::Triplet<uint32_t>& valid_lifetime,
522 const SubnetID id);
523
543 static Subnet4Ptr
544 create(const isc::asiolink::IOAddress& prefix, uint8_t length,
545 const util::Triplet<uint32_t>& t1,
546 const util::Triplet<uint32_t>& t2,
547 const util::Triplet<uint32_t>& valid_lifetime,
548 const SubnetID id);
549
562 Subnet4Ptr getNextSubnet(const Subnet4Ptr& first_subnet) const;
563
576 Subnet4Ptr getNextSubnet(const Subnet4Ptr& first_subnet,
577 const ClientClasses& client_classes) const;
578
590 virtual bool
591 clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
592
598 return (dhcp4o6_);
599 }
600
605 const Cfg4o6& get4o6() const {
606 return (dhcp4o6_);
607 }
608
612 virtual data::ElementPtr toElement() const;
613
621 virtual void createAllocators();
622
627 static std::pair<asiolink::IOAddress, uint8_t>
628 parsePrefix(const std::string& prefix);
629
630private:
631
633 Subnet4(const Subnet4&) = delete;
634
636 Subnet4& operator=(const Subnet4&) = delete;
637
641 virtual isc::asiolink::IOAddress default_pool() const {
642 return (isc::asiolink::IOAddress("0.0.0.0"));
643 }
644
651 virtual void checkType(Lease::Type type) const;
652
654 Cfg4o6 dhcp4o6_;
655};
656
657class Subnet6;
658
660typedef boost::shared_ptr<const Subnet6> ConstSubnet6Ptr;
661
663typedef boost::shared_ptr<Subnet6> Subnet6Ptr;
664
670class Subnet6 : public Subnet, public Network6, public boost::enable_shared_from_this<Subnet6> {
671public:
672
685 Subnet6(const isc::asiolink::IOAddress& prefix, uint8_t length,
686 const util::Triplet<uint32_t>& t1,
687 const util::Triplet<uint32_t>& t2,
688 const util::Triplet<uint32_t>& preferred_lifetime,
689 const util::Triplet<uint32_t>& valid_lifetime,
690 const SubnetID id);
691
712 static Subnet6Ptr
713 create(const isc::asiolink::IOAddress& prefix, uint8_t length,
714 const util::Triplet<uint32_t>& t1,
715 const util::Triplet<uint32_t>& t2,
716 const util::Triplet<uint32_t>& preferred_lifetime,
717 const util::Triplet<uint32_t>& valid_lifetime,
718 const SubnetID id);
719
732 Subnet6Ptr getNextSubnet(const Subnet6Ptr& first_subnet) const;
733
746 Subnet6Ptr getNextSubnet(const Subnet6Ptr& first_subnet,
747 const ClientClasses& client_classes) const;
748
760 virtual bool
761 clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
762
770 virtual void createAllocators();
771
775 virtual data::ElementPtr toElement() const;
776
781 static std::pair<asiolink::IOAddress, uint8_t>
782 parsePrefix(const std::string& prefix);
783
784private:
785
787 Subnet6(const Subnet6&) = delete;
788
790 Subnet6& operator=(const Subnet6&) = delete;
791
795 virtual isc::asiolink::IOAddress default_pool() const {
796 return (isc::asiolink::IOAddress("::"));
797 }
798
805 virtual void checkType(Lease::Type type) const;
806
807};
808
811
812
815
818
821
824
831typedef boost::multi_index_container<
832 // Multi index container holds pointers to the subnets.
834 // The following holds all indexes.
835 boost::multi_index::indexed_by<
836 // First index allows for searching using subnet identifier.
837 boost::multi_index::ordered_unique<
838 boost::multi_index::tag<SubnetSubnetIdIndexTag>,
839 boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
840 >,
841 // Second index allows for searching using an output from toText function.
842 boost::multi_index::ordered_unique<
843 boost::multi_index::tag<SubnetPrefixIndexTag>,
844 boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
845 >
846 >
848
872typedef boost::multi_index_container<
873 // Multi index container holds pointers to the subnets.
875 // The following holds all indexes.
876 boost::multi_index::indexed_by<
877 // First index allows for searching using subnet identifier.
878 boost::multi_index::ordered_unique<
879 boost::multi_index::tag<SubnetSubnetIdIndexTag>,
880 boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
881 >,
882 // Second index allows for searching using an output from toText function.
883 boost::multi_index::ordered_unique<
884 boost::multi_index::tag<SubnetPrefixIndexTag>,
885 boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
886 >,
887
888 // Third index allows for searching using an output from getServerId.
889 boost::multi_index::ordered_non_unique<
890 boost::multi_index::tag<SubnetServerIdIndexTag>,
891 boost::multi_index::const_mem_fun<Network4, asiolink::IOAddress,
893 >,
894
895 // Forth index allows for searching using subnet modification time.
896 boost::multi_index::ordered_non_unique<
897 boost::multi_index::tag<SubnetModificationTimeIndexTag>,
898 boost::multi_index::const_mem_fun<data::BaseStampedElement,
899 boost::posix_time::ptime,
901 >
902 >
904
911typedef boost::multi_index_container<
912 // Multi index container holds pointers to the subnets.
914 // The following holds all indexes.
915 boost::multi_index::indexed_by<
916 // First index allows for searching using subnet identifier.
917 boost::multi_index::ordered_unique<
918 boost::multi_index::tag<SubnetSubnetIdIndexTag>,
919 boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
920 >,
921 // Second index allows for searching using an output from toText function.
922 boost::multi_index::ordered_unique<
923 boost::multi_index::tag<SubnetPrefixIndexTag>,
924 boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
925 >
926 >
928
951typedef boost::multi_index_container<
952 // Multi index container holds pointers to the subnets.
954 // The following holds all indexes.
955 boost::multi_index::indexed_by<
956 // First index allows for searching using subnet identifier.
957 boost::multi_index::ordered_unique<
958 boost::multi_index::tag<SubnetSubnetIdIndexTag>,
959 boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
960 >,
961 // Second index allows for searching using an output from toText function.
962 boost::multi_index::ordered_unique<
963 boost::multi_index::tag<SubnetPrefixIndexTag>,
964 boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
965 >,
966 // Third index allows for searching using subnet modification time.
967 boost::multi_index::ordered_non_unique<
968 boost::multi_index::tag<SubnetModificationTimeIndexTag>,
969 boost::multi_index::const_mem_fun<data::BaseStampedElement,
970 boost::posix_time::ptime,
972 >
973 >
975
983template<typename ReturnPtrType, typename CollectionType>
985public:
986
994 static ReturnPtrType get(const CollectionType& collection,
995 const SubnetID& subnet_id) {
996 auto& index = collection.template get<SubnetSubnetIdIndexTag>();
997 auto s = index.find(subnet_id);
998 if (s != index.end()) {
999 return (*s);
1000 }
1001 // No subnet found. Return null pointer.
1002 return (ReturnPtrType());
1003 }
1004};
1005
1008
1012
1015namespace {
1016
1017template <isc::util::DhcpSpace D>
1018struct AdapterSubnet {};
1019
1020template <>
1021struct AdapterSubnet<isc::util::DHCPv4> {
1022 using type = Subnet4;
1023};
1024
1025template <>
1026struct AdapterSubnet<isc::util::DHCPv6> {
1027 using type = Subnet6;
1028};
1029
1030} // namespace
1031
1032template <isc::util::DhcpSpace D>
1033using SubnetT = typename AdapterSubnet<D>::type;
1034
1035template <isc::util::DhcpSpace D>
1036using SubnetTPtr = boost::shared_ptr<SubnetT<D>>;
1038
1039} // end of isc::dhcp namespace
1040} // end of isc namespace
1041
1042#endif // SUBNET_H
This class represents configuration element which is associated with database identifier and the modi...
boost::posix_time::ptime getModificationTime() const
Returns timestamp.
PrefixLenMatchType
Type of preferred PD-pool prefix length selection criteria.
Definition: allocator.h:61
Container for storing client class names.
Definition: classify.h:108
Specialization of the Network object for DHCPv4 case.
Definition: network.h:1260
virtual asiolink::IOAddress getServerId() const
Returns binary representation of the dhcp-server-identifier option (54).
Definition: network.cc:335
Specialization of the Network object for DHCPv6 case.
Definition: network.h:1421
Common interface representing a network to which the DHCP clients are connected.
Definition: network.h:154
WeakNetworkPtr parent_network_
Pointer to another network that this network belongs to.
Definition: network.h:1252
A configuration holder for IPv4 subnet.
Definition: subnet.h:505
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 cl...
Definition: subnet.cc:326
Cfg4o6 & get4o6()
Returns DHCP4o6 configuration parameters.
Definition: subnet.h:597
Subnet4Ptr getNextSubnet(const Subnet4Ptr &first_subnet) const
Returns next subnet within shared network.
Definition: subnet.cc:287
virtual void createAllocators()
Instantiates the allocator and its state.
Definition: subnet.cc:762
virtual data::ElementPtr toElement() const
Unparse a subnet object.
Definition: subnet.cc:801
static Subnet4Ptr 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 > &valid_lifetime, const SubnetID id)
Factory function creating an instance of the Subnet4.
Definition: subnet.cc:270
const Cfg4o6 & get4o6() const
Returns const DHCP4o6 configuration parameters.
Definition: subnet.h:605
static std::pair< asiolink::IOAddress, uint8_t > parsePrefix(const std::string &prefix)
Converts subnet prefix to a pair of prefix/length pair.
Definition: subnet.cc:825
A configuration holder for IPv6 subnet.
Definition: subnet.h:670
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 cl...
Definition: subnet.cc:734
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)
Factory function creating an instance of the Subnet4.
Definition: subnet.cc:658
static std::pair< asiolink::IOAddress, uint8_t > parsePrefix(const std::string &prefix)
Converts subnet prefix to a pair of prefix/length pair.
Definition: subnet.cc:942
virtual void createAllocators()
Instantiates the allocators and their states.
Definition: subnet.cc:835
Subnet6Ptr getNextSubnet(const Subnet6Ptr &first_subnet) const
Returns next subnet within shared network.
Definition: subnet.cc:696
virtual data::ElementPtr toElement() const
Unparse a subnet object.
Definition: subnet.cc:913
A class containing static convenience methods to fetch the subnets from the containers.
Definition: subnet.h:984
static ReturnPtrType get(const CollectionType &collection, const SubnetID &subnet_id)
Fetches subnets by id.
Definition: subnet.h:994
isc::util::uint128_t getPoolCapacity(Lease::Type type) const
Returns the number of possible leases for specified lease type.
Definition: subnet.cc:104
void setSharedNetworkName(const std::string &shared_network_name)
Sets new shared network name.
Definition: subnet.h:275
isc::asiolink::IOAddress prefix_
a prefix of the subnet.
Definition: subnet.h:473
SubnetID getID() const
Returns unique ID for that subnet.
Definition: subnet.h:83
uint8_t prefix_len_
a prefix length of the subnet.
Definition: subnet.h:476
isc::util::uint128_t sumPoolCapacity(const PoolCollection &pools) const
Returns a sum of possible leases in all pools.
Definition: subnet.cc:157
static void resetSubnetID()
Resets subnet-id counter to its initial value (1).
Definition: subnet.h:219
virtual data::ElementPtr toElement() const
Unparse a subnet object.
Definition: subnet.cc:745
AllocatorPtr getAllocator(Lease::Type type) const
Returns lease allocator instance.
Definition: subnet.cc:373
static SubnetID generateNextID()
returns the next unique Subnet-ID.
Definition: subnet.h:376
PoolCollection pools_ta_
collection of IPv6 temporary address pools in that subnet.
Definition: subnet.h:467
void getSharedNetwork(SharedNetworkPtrType &shared_network) const
Retrieves pointer to a shared network associated with a subnet.
Definition: subnet.h:240
void initAllocatorsAfterConfigure()
Calls initAfterConfigure for each allocator.
Definition: subnet.cc:444
SubnetID id_
subnet-id
Definition: subnet.h:461
SubnetAllocationStatePtr getAllocationState(Lease::Type type) const
Returns subnet-specific allocation state.
Definition: subnet.cc:389
PoolPtr getAnyPool(Lease::Type type)
Returns a pool without any address specified.
Definition: subnet.h:160
void addPool(const PoolPtr &pool)
Adds a new pool for the subnet.
Definition: subnet.cc:479
virtual ~Subnet()
virtual destructor.
Definition: subnet.h:357
bool inRange(const isc::asiolink::IOAddress &addr) const
checks if specified address is in range.
Definition: subnet.cc:89
std::map< Lease::Type, AllocatorPtr > allocators_
Lease allocators used by the subnet.
Definition: subnet.h:482
virtual std::string toText() const
Returns textual representation of the subnet (e.g.
Definition: subnet.cc:97
void delPools(Lease::Type type)
Deletes all pools of specified type.
Definition: subnet.cc:534
std::pair< isc::asiolink::IOAddress, uint8_t > get() const
Returns subnet parameters (prefix and prefix length).
Definition: subnet.h:90
virtual std::string getLabel() const
Generates an identifying label for logging.
Definition: subnet.h:440
static std::pair< asiolink::IOAddress, uint8_t > parsePrefixCommon(const std::string &prefix)
Converts subnet prefix to a pair of prefix/length pair.
Definition: subnet.cc:228
void setAllocator(Lease::Type type, const AllocatorPtr &allocator)
Sets new allocator instance.
Definition: subnet.cc:384
std::string getSharedNetworkName() const
Returns shared network name.
Definition: subnet.h:259
PoolCollection pools_
collection of IPv4 or non-temporary IPv6 pools in that subnet.
Definition: subnet.h:464
PoolCollection & getPoolsWritable(Lease::Type type)
Returns all pools (non-const variant).
Definition: subnet.cc:354
const PoolPtr getPool(Lease::Type type, const isc::asiolink::IOAddress &addr, bool anypool=true) const
Returns a pool that specified address belongs to.
Definition: subnet.cc:404
std::string shared_network_name_
Shared network name.
Definition: subnet.h:479
bool poolOverlaps(const Lease::Type &pool_type, const PoolPtr &pool) const
Checks if the specified pool overlaps with an existing pool.
Definition: subnet.cc:580
virtual isc::asiolink::IOAddress default_pool() const =0
Returns the default address that will be used for pool selection.
PoolCollection pools_pd_
collection of IPv6 prefix pools in that subnet.
Definition: subnet.h:470
const PoolCollection & getPools(Lease::Type type) const
Returns all pools (const variant).
Definition: subnet.cc:336
static SubnetID static_id_
keeps the subnet-id value.
Definition: subnet.h:366
virtual void checkType(Lease::Type type) const =0
Checks if used pool type is valid.
std::map< Lease::Type, SubnetAllocationStatePtr > allocation_states_
Holds subnet-specific allocation state.
Definition: subnet.h:485
virtual void createAllocators()=0
Instantiates the allocators and their states.
bool inPool(Lease::Type type, const isc::asiolink::IOAddress &addr) const
checks if the specified address is in pools.
Definition: subnet.cc:539
void setSharedNetwork(const NetworkPtr &shared_network)
Assigns shared network to a subnet.
Definition: subnet.h:252
void setAllocationState(Lease::Type type, const SubnetAllocationStatePtr &allocation_state)
Sets subnet-specific allocation state.
Definition: subnet.cc:400
This template specifies a parameter value.
Definition: triplet.h:37
boost::shared_ptr< Element > ElementPtr
Definition: data.h:28
boost::shared_ptr< Subnet > SubnetPtr
A generic pointer to either Subnet4 or Subnet6 object.
Definition: subnet.h:489
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
Definition: subnet.h:498
boost::shared_ptr< const Subnet6 > ConstSubnet6Ptr
A const pointer to a Subnet6 object.
Definition: subnet.h:660
boost::shared_ptr< const Subnet4 > ConstSubnet4Ptr
A const pointer to a Subnet4 object.
Definition: subnet.h:495
typename AdapterSubnet< D >::type SubnetT
Definition: subnet.h:1033
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
Definition: subnet.h:663
boost::multi_index_container< Subnet6Ptr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetSubnetIdIndexTag >, boost::multi_index::const_mem_fun< Subnet, SubnetID, &Subnet::getID > >, boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetPrefixIndexTag >, boost::multi_index::const_mem_fun< Subnet, std::string, &Subnet::toText > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetModificationTimeIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, boost::posix_time::ptime, &data::BaseStampedElement::getModificationTime > > > > Subnet6Collection
A collection of Subnet6 objects.
Definition: subnet.h:974
std::vector< PoolPtr > PoolCollection
a container for either IPv4 or IPv6 Pools
Definition: pool.h:486
boost::multi_index_container< Subnet4Ptr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetSubnetIdIndexTag >, boost::multi_index::const_mem_fun< Subnet, SubnetID, &Subnet::getID > >, boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetPrefixIndexTag >, boost::multi_index::const_mem_fun< Subnet, std::string, &Subnet::toText > > > > Subnet4SimpleCollection
A simple collection of Subnet4 objects.
Definition: subnet.h:847
boost::shared_ptr< Pool > PoolPtr
a pointer to either IPv4 or IPv6 Pool
Definition: pool.h:483
boost::multi_index_container< Subnet4Ptr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetSubnetIdIndexTag >, boost::multi_index::const_mem_fun< Subnet, SubnetID, &Subnet::getID > >, boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetPrefixIndexTag >, boost::multi_index::const_mem_fun< Subnet, std::string, &Subnet::toText > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetServerIdIndexTag >, boost::multi_index::const_mem_fun< Network4, asiolink::IOAddress, &Network4::getServerId > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetModificationTimeIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, boost::posix_time::ptime, &data::BaseStampedElement::getModificationTime > > > > Subnet4Collection
A collection of Subnet4 objects.
Definition: subnet.h:903
boost::shared_ptr< SubnetT< D > > SubnetTPtr
Definition: subnet.h:1036
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition: subnet_id.h:25
boost::multi_index_container< Subnet6Ptr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetSubnetIdIndexTag >, boost::multi_index::const_mem_fun< Subnet, SubnetID, &Subnet::getID > >, boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetPrefixIndexTag >, boost::multi_index::const_mem_fun< Subnet, std::string, &Subnet::toText > > > > Subnet6SimpleCollection
A simple collection of Subnet6 objects.
Definition: subnet.h:927
boost::shared_ptr< Network > NetworkPtr
Pointer to the Network object.
Definition: network.h:73
boost::shared_ptr< Allocator > AllocatorPtr
Defines a pointer to an allocator.
Definition: allocator.h:239
boost::shared_ptr< SubnetAllocationState > SubnetAllocationStatePtr
boost::multiprecision::checked_uint128_t uint128_t
Definition: bigints.h:21
Defines the logger used by the top-level component of kea-lfc.
This structure contains information about DHCP4o6 (RFC7341)
Definition: cfg_4o6.h:22
Type
Type of lease or pool.
Definition: lease.h:46
Tag for the index for searching by subnet modification time.
Definition: subnet.h:823
Tag for the index for searching by subnet prefix.
Definition: subnet.h:817
Tag for the index for searching by server identifier.
Definition: subnet.h:820
Tag for the index for searching by subnet identifier.
Definition: subnet.h:814