Kea 2.7.1
subnet.h
Go to the documentation of this file.
1// Copyright (C) 2012-2024 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
230 template<typename SharedNetworkPtrType>
231 void getSharedNetwork(SharedNetworkPtrType& shared_network) const {
232 shared_network = boost::dynamic_pointer_cast<
233 typename SharedNetworkPtrType::element_type>(parent_network_.lock());
234 }
235
243 void setSharedNetwork(const NetworkPtr& shared_network) {
244 parent_network_ = shared_network;
245 }
246
250 std::string getSharedNetworkName() const {
251 return (shared_network_name_);
252 }
253
266 void setSharedNetworkName(const std::string& shared_network_name) {
267 shared_network_name_ = shared_network_name;
268 }
269
277
289
297 void setAllocator(Lease::Type type, const AllocatorPtr& allocator);
298
306
311 void setAllocationState(Lease::Type type, const SubnetAllocationStatePtr& allocation_state);
312
320 virtual void createAllocators() = 0;
321
324
325protected:
326
328 //
335 Subnet(const isc::asiolink::IOAddress& prefix, uint8_t len,
336 const SubnetID id);
337
342 virtual ~Subnet() { };
343
352 virtual void checkType(Lease::Type type) const = 0;
353
359
366 const ClientClasses& client_classes) const;
367
381 const ClientClasses& client_classes,
382 Allocator::PrefixLenMatchType prefix_length_match,
383 uint8_t hint_prefix_length) const;
384
393 bool poolOverlaps(const Lease::Type& pool_type, const PoolPtr& pool) const;
394
398 virtual data::ElementPtr toElement() const;
399
400 virtual std::string getLabel() const {
401 std::stringstream ss;
402 ss << "subnet-id " << id_;
403 return (ss.str());
404 }
405
414 static std::pair<asiolink::IOAddress, uint8_t>
415 parsePrefixCommon(const std::string& prefix);
416
422
425
428
431
434
436 uint8_t prefix_len_;
437
440
442 std::map<Lease::Type, AllocatorPtr> allocators_;
443
445 std::map<Lease::Type, SubnetAllocationStatePtr> allocation_states_;
446};
447
449typedef boost::shared_ptr<Subnet> SubnetPtr;
450
451
452class Subnet4;
453
455typedef boost::shared_ptr<const Subnet4> ConstSubnet4Ptr;
456
458typedef boost::shared_ptr<Subnet4> Subnet4Ptr;
459
465class Subnet4 : public Subnet, public Network4, public boost::enable_shared_from_this<Subnet4> {
466public:
467
478 Subnet4(const isc::asiolink::IOAddress& prefix, uint8_t length,
479 const util::Triplet<uint32_t>& t1,
480 const util::Triplet<uint32_t>& t2,
481 const util::Triplet<uint32_t>& valid_lifetime,
482 const SubnetID id);
483
503 static Subnet4Ptr
504 create(const isc::asiolink::IOAddress& prefix, uint8_t length,
505 const util::Triplet<uint32_t>& t1,
506 const util::Triplet<uint32_t>& t2,
507 const util::Triplet<uint32_t>& valid_lifetime,
508 const SubnetID id);
509
522 Subnet4Ptr getNextSubnet(const Subnet4Ptr& first_subnet) const;
523
536 Subnet4Ptr getNextSubnet(const Subnet4Ptr& first_subnet,
537 const ClientClasses& client_classes) const;
538
550 virtual bool
551 clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
552
558 return (dhcp4o6_);
559 }
560
565 const Cfg4o6& get4o6() const {
566 return (dhcp4o6_);
567 }
568
572 virtual data::ElementPtr toElement() const;
573
581 virtual void createAllocators();
582
587 static std::pair<asiolink::IOAddress, uint8_t>
588 parsePrefix(const std::string& prefix);
589
590private:
591
593 Subnet4(const Subnet4&) = delete;
594
596 Subnet4& operator=(const Subnet4&) = delete;
597
601 virtual isc::asiolink::IOAddress default_pool() const {
602 return (isc::asiolink::IOAddress("0.0.0.0"));
603 }
604
611 virtual void checkType(Lease::Type type) const;
612
614 Cfg4o6 dhcp4o6_;
615};
616
617class Subnet6;
618
620typedef boost::shared_ptr<const Subnet6> ConstSubnet6Ptr;
621
623typedef boost::shared_ptr<Subnet6> Subnet6Ptr;
624
630class Subnet6 : public Subnet, public Network6, public boost::enable_shared_from_this<Subnet6> {
631public:
632
645 Subnet6(const isc::asiolink::IOAddress& prefix, uint8_t length,
646 const util::Triplet<uint32_t>& t1,
647 const util::Triplet<uint32_t>& t2,
648 const util::Triplet<uint32_t>& preferred_lifetime,
649 const util::Triplet<uint32_t>& valid_lifetime,
650 const SubnetID id);
651
672 static Subnet6Ptr
673 create(const isc::asiolink::IOAddress& prefix, uint8_t length,
674 const util::Triplet<uint32_t>& t1,
675 const util::Triplet<uint32_t>& t2,
676 const util::Triplet<uint32_t>& preferred_lifetime,
677 const util::Triplet<uint32_t>& valid_lifetime,
678 const SubnetID id);
679
692 Subnet6Ptr getNextSubnet(const Subnet6Ptr& first_subnet) const;
693
706 Subnet6Ptr getNextSubnet(const Subnet6Ptr& first_subnet,
707 const ClientClasses& client_classes) const;
708
720 virtual bool
721 clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
722
730 virtual void createAllocators();
731
735 virtual data::ElementPtr toElement() const;
736
741 static std::pair<asiolink::IOAddress, uint8_t>
742 parsePrefix(const std::string& prefix);
743
744private:
745
747 Subnet6(const Subnet6&) = delete;
748
750 Subnet6& operator=(const Subnet6&) = delete;
751
755 virtual isc::asiolink::IOAddress default_pool() const {
756 return (isc::asiolink::IOAddress("::"));
757 }
758
765 virtual void checkType(Lease::Type type) const;
766
767};
768
771
772
775
778
781
784
791typedef boost::multi_index_container<
792 // Multi index container holds pointers to the subnets.
794 // The following holds all indexes.
795 boost::multi_index::indexed_by<
796 // First index allows for searching using subnet identifier.
797 boost::multi_index::ordered_unique<
798 boost::multi_index::tag<SubnetSubnetIdIndexTag>,
799 boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
800 >,
801 // Second index allows for searching using an output from toText function.
802 boost::multi_index::ordered_unique<
803 boost::multi_index::tag<SubnetPrefixIndexTag>,
804 boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
805 >
806 >
808
832typedef boost::multi_index_container<
833 // Multi index container holds pointers to the subnets.
835 // The following holds all indexes.
836 boost::multi_index::indexed_by<
837 // First index allows for searching using subnet identifier.
838 boost::multi_index::ordered_unique<
839 boost::multi_index::tag<SubnetSubnetIdIndexTag>,
840 boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
841 >,
842 // Second index allows for searching using an output from toText function.
843 boost::multi_index::ordered_unique<
844 boost::multi_index::tag<SubnetPrefixIndexTag>,
845 boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
846 >,
847
848 // Third index allows for searching using an output from getServerId.
849 boost::multi_index::ordered_non_unique<
850 boost::multi_index::tag<SubnetServerIdIndexTag>,
851 boost::multi_index::const_mem_fun<Network4, asiolink::IOAddress,
853 >,
854
855 // Forth index allows for searching using subnet modification time.
856 boost::multi_index::ordered_non_unique<
857 boost::multi_index::tag<SubnetModificationTimeIndexTag>,
858 boost::multi_index::const_mem_fun<data::BaseStampedElement,
859 boost::posix_time::ptime,
861 >
862 >
864
871typedef boost::multi_index_container<
872 // Multi index container holds pointers to the subnets.
874 // The following holds all indexes.
875 boost::multi_index::indexed_by<
876 // First index allows for searching using subnet identifier.
877 boost::multi_index::ordered_unique<
878 boost::multi_index::tag<SubnetSubnetIdIndexTag>,
879 boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
880 >,
881 // Second index allows for searching using an output from toText function.
882 boost::multi_index::ordered_unique<
883 boost::multi_index::tag<SubnetPrefixIndexTag>,
884 boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
885 >
886 >
888
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 // Third index allows for searching using subnet modification time.
927 boost::multi_index::ordered_non_unique<
928 boost::multi_index::tag<SubnetModificationTimeIndexTag>,
929 boost::multi_index::const_mem_fun<data::BaseStampedElement,
930 boost::posix_time::ptime,
932 >
933 >
935
943template<typename ReturnPtrType, typename CollectionType>
945public:
946
954 static ReturnPtrType get(const CollectionType& collection,
955 const SubnetID& subnet_id) {
956 auto& index = collection.template get<SubnetSubnetIdIndexTag>();
957 auto s = index.find(subnet_id);
958 if (s != index.end()) {
959 return (*s);
960 }
961 // No subnet found. Return null pointer.
962 return (ReturnPtrType());
963 }
964};
965
967using SubnetFetcher4 = SubnetFetcher<Subnet4Ptr, Subnet4Collection>;
968
970using SubnetFetcher6 = SubnetFetcher<Subnet6Ptr, Subnet6Collection>;
972
975namespace {
976
977template <isc::util::DhcpSpace D>
978struct AdapterSubnet {};
979
980template <>
981struct AdapterSubnet<isc::util::DHCPv4> {
982 using type = Subnet4;
983};
984
985template <>
986struct AdapterSubnet<isc::util::DHCPv6> {
987 using type = Subnet6;
988};
989
990} // namespace
991
992template <isc::util::DhcpSpace D>
993using SubnetT = typename AdapterSubnet<D>::type;
994
995template <isc::util::DhcpSpace D>
996using SubnetTPtr = boost::shared_ptr<SubnetT<D>>;
998
999} // end of isc::dhcp namespace
1000} // end of isc namespace
1001
1002#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:465
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:319
Cfg4o6 & get4o6()
Returns DHCP4o6 configuration parameters.
Definition subnet.h:557
Subnet4Ptr getNextSubnet(const Subnet4Ptr &first_subnet) const
Returns next subnet within shared network.
Definition subnet.cc:280
virtual void createAllocators()
Instantiates the allocator and its state.
Definition subnet.cc:755
virtual data::ElementPtr toElement() const
Unparse a subnet object.
Definition subnet.cc:794
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:263
Subnet4(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)
Constructor with all parameters.
Definition subnet.cc:246
const Cfg4o6 & get4o6() const
Returns const DHCP4o6 configuration parameters.
Definition subnet.h:565
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:818
A configuration holder for IPv6 subnet.
Definition subnet.h:630
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:727
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:651
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:935
virtual void createAllocators()
Instantiates the allocators and their states.
Definition subnet.cc:828
Subnet6Ptr getNextSubnet(const Subnet6Ptr &first_subnet) const
Returns next subnet within shared network.
Definition subnet.cc:689
virtual data::ElementPtr toElement() const
Unparse a subnet object.
Definition subnet.cc:906
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)
Constructor with all parameters.
Definition subnet.cc:631
A class containing static convenience methods to fetch the subnets from the containers.
Definition subnet.h:944
static ReturnPtrType get(const CollectionType &collection, const SubnetID &subnet_id)
Fetches subnets by id.
Definition subnet.h:954
isc::util::uint128_t getPoolCapacity(Lease::Type type) const
Returns the number of possible leases for specified lease type.
Definition subnet.cc:97
void setSharedNetworkName(const std::string &shared_network_name)
Sets new shared network name.
Definition subnet.h:266
isc::asiolink::IOAddress prefix_
a prefix of the subnet.
Definition subnet.h:433
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:436
isc::util::uint128_t sumPoolCapacity(const PoolCollection &pools) const
Returns a sum of possible leases in all pools.
Definition subnet.cc:150
virtual data::ElementPtr toElement() const
Unparse a subnet object.
Definition subnet.cc:738
AllocatorPtr getAllocator(Lease::Type type) const
Returns lease allocator instance.
Definition subnet.cc:366
PoolCollection pools_ta_
collection of IPv6 temporary address pools in that subnet.
Definition subnet.h:427
void getSharedNetwork(SharedNetworkPtrType &shared_network) const
Retrieves pointer to a shared network associated with a subnet.
Definition subnet.h:231
void initAllocatorsAfterConfigure()
Calls initAfterConfigure for each allocator.
Definition subnet.cc:437
SubnetID id_
subnet-id
Definition subnet.h:421
SubnetAllocationStatePtr getAllocationState(Lease::Type type) const
Returns subnet-specific allocation state.
Definition subnet.cc:382
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:472
virtual ~Subnet()
virtual destructor.
Definition subnet.h:342
bool inRange(const isc::asiolink::IOAddress &addr) const
checks if specified address is in range.
Definition subnet.cc:82
std::map< Lease::Type, AllocatorPtr > allocators_
Lease allocators used by the subnet.
Definition subnet.h:442
virtual std::string toText() const
Returns textual representation of the subnet (e.g.
Definition subnet.cc:90
void delPools(Lease::Type type)
Deletes all pools of specified type.
Definition subnet.cc:527
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:400
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:221
void setAllocator(Lease::Type type, const AllocatorPtr &allocator)
Sets new allocator instance.
Definition subnet.cc:377
std::string getSharedNetworkName() const
Returns shared network name.
Definition subnet.h:250
PoolCollection pools_
collection of IPv4 or non-temporary IPv6 pools in that subnet.
Definition subnet.h:424
PoolCollection & getPoolsWritable(Lease::Type type)
Returns all pools (non-const variant).
Definition subnet.cc:347
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:397
Subnet(const isc::asiolink::IOAddress &prefix, uint8_t len, const SubnetID id)
Protected constructor.
Definition subnet.cc:68
std::string shared_network_name_
Shared network name.
Definition subnet.h:439
bool poolOverlaps(const Lease::Type &pool_type, const PoolPtr &pool) const
Checks if the specified pool overlaps with an existing pool.
Definition subnet.cc:573
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:430
const PoolCollection & getPools(Lease::Type type) const
Returns all pools (const variant).
Definition subnet.cc:329
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:445
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:532
void setSharedNetwork(const NetworkPtr &shared_network)
Assigns shared network to a subnet.
Definition subnet.h:243
void setAllocationState(Lease::Type type, const SubnetAllocationStatePtr &allocation_state)
Sets subnet-specific allocation state.
Definition subnet.cc:393
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:449
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
Definition subnet.h:458
boost::shared_ptr< const Subnet6 > ConstSubnet6Ptr
A const pointer to a Subnet6 object.
Definition subnet.h:620
SubnetFetcher< Subnet6Ptr, Subnet6Collection > SubnetFetcher6
Type of the SubnetFetcher used for IPv6.
Definition subnet.h:970
boost::shared_ptr< const Subnet4 > ConstSubnet4Ptr
A const pointer to a Subnet4 object.
Definition subnet.h:455
boost::shared_ptr< SubnetT< D > > SubnetTPtr
Definition subnet.h:996
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
Definition subnet.h:623
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:934
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:807
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:863
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:887
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
SubnetFetcher< Subnet4Ptr, Subnet4Collection > SubnetFetcher4
Type of the SubnetFetcher used for IPv4.
Definition subnet.h:967
typename AdapterSubnet< D >::type SubnetT
Definition subnet.h:993
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:783
Tag for the index for searching by subnet prefix.
Definition subnet.h:777
Tag for the index for searching by server identifier.
Definition subnet.h:780
Tag for the index for searching by subnet identifier.
Definition subnet.h:774