Kea  2.3.9
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 
38 namespace isc {
39 namespace dhcp {
40 
41 class Subnet : public virtual Network {
42 public:
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 
334 protected:
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) {
378  resetSubnetID();
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 
479  std::string shared_network_name_;
480 
482  std::map<Lease::Type, AllocatorPtr> allocators_;
483 
485  std::map<Lease::Type, SubnetAllocationStatePtr> allocation_states_;
486 };
487 
489 typedef boost::shared_ptr<Subnet> SubnetPtr;
490 
491 
492 class Subnet4;
493 
495 typedef boost::shared_ptr<const Subnet4> ConstSubnet4Ptr;
496 
498 typedef boost::shared_ptr<Subnet4> Subnet4Ptr;
499 
505 class Subnet4 : public Subnet, public Network4, public boost::enable_shared_from_this<Subnet4> {
506 public:
507 
519  Subnet4(const isc::asiolink::IOAddress& prefix, uint8_t length,
520  const util::Triplet<uint32_t>& t1,
521  const util::Triplet<uint32_t>& t2,
522  const util::Triplet<uint32_t>& valid_lifetime,
523  const SubnetID id = 0);
524 
545  static Subnet4Ptr
546  create(const isc::asiolink::IOAddress& prefix, uint8_t length,
547  const util::Triplet<uint32_t>& t1,
548  const util::Triplet<uint32_t>& t2,
549  const util::Triplet<uint32_t>& valid_lifetime,
550  const SubnetID id = 0);
551 
564  Subnet4Ptr getNextSubnet(const Subnet4Ptr& first_subnet) const;
565 
578  Subnet4Ptr getNextSubnet(const Subnet4Ptr& first_subnet,
579  const ClientClasses& client_classes) const;
580 
592  virtual bool
593  clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
594 
600  return (dhcp4o6_);
601  }
602 
607  const Cfg4o6& get4o6() const {
608  return (dhcp4o6_);
609  }
610 
614  virtual data::ElementPtr toElement() const;
615 
623  virtual void createAllocators();
624 
629  static std::pair<asiolink::IOAddress, uint8_t>
630  parsePrefix(const std::string& prefix);
631 
632 private:
633 
635  Subnet4(const Subnet4&) = delete;
636 
638  Subnet4& operator=(const Subnet4&) = delete;
639 
643  virtual isc::asiolink::IOAddress default_pool() const {
644  return (isc::asiolink::IOAddress("0.0.0.0"));
645  }
646 
653  virtual void checkType(Lease::Type type) const;
654 
656  Cfg4o6 dhcp4o6_;
657 };
658 
659 class Subnet6;
660 
662 typedef boost::shared_ptr<const Subnet6> ConstSubnet6Ptr;
663 
665 typedef boost::shared_ptr<Subnet6> Subnet6Ptr;
666 
672 class Subnet6 : public Subnet, public Network6, public boost::enable_shared_from_this<Subnet6> {
673 public:
674 
687  Subnet6(const isc::asiolink::IOAddress& prefix, uint8_t length,
688  const util::Triplet<uint32_t>& t1,
689  const util::Triplet<uint32_t>& t2,
690  const util::Triplet<uint32_t>& preferred_lifetime,
691  const util::Triplet<uint32_t>& valid_lifetime,
692  const SubnetID id = 0);
693 
715  static Subnet6Ptr
716  create(const isc::asiolink::IOAddress& prefix, uint8_t length,
717  const util::Triplet<uint32_t>& t1,
718  const util::Triplet<uint32_t>& t2,
719  const util::Triplet<uint32_t>& preferred_lifetime,
720  const util::Triplet<uint32_t>& valid_lifetime,
721  const SubnetID id = 0);
722 
735  Subnet6Ptr getNextSubnet(const Subnet6Ptr& first_subnet) const;
736 
749  Subnet6Ptr getNextSubnet(const Subnet6Ptr& first_subnet,
750  const ClientClasses& client_classes) const;
751 
763  virtual bool
764  clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
765 
773  virtual void createAllocators();
774 
778  virtual data::ElementPtr toElement() const;
779 
784  static std::pair<asiolink::IOAddress, uint8_t>
785  parsePrefix(const std::string& prefix);
786 
787 private:
788 
790  Subnet6(const Subnet6&) = delete;
791 
793  Subnet6& operator=(const Subnet6&) = delete;
794 
798  virtual isc::asiolink::IOAddress default_pool() const {
799  return (isc::asiolink::IOAddress("::"));
800  }
801 
808  virtual void checkType(Lease::Type type) const;
809 
810 };
811 
814 
815 
818 
821 
824 
827 
834 typedef boost::multi_index_container<
835  // Multi index container holds pointers to the subnets.
836  Subnet4Ptr,
837  // The following holds all indexes.
838  boost::multi_index::indexed_by<
839  // First index allows for searching using subnet identifier.
840  boost::multi_index::ordered_unique<
841  boost::multi_index::tag<SubnetSubnetIdIndexTag>,
842  boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
843  >,
844  // Second index allows for searching using an output from toText function.
845  boost::multi_index::ordered_unique<
846  boost::multi_index::tag<SubnetPrefixIndexTag>,
847  boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
848  >
849  >
851 
875 typedef boost::multi_index_container<
876  // Multi index container holds pointers to the subnets.
877  Subnet4Ptr,
878  // The following holds all indexes.
879  boost::multi_index::indexed_by<
880  // First index allows for searching using subnet identifier.
881  boost::multi_index::ordered_unique<
882  boost::multi_index::tag<SubnetSubnetIdIndexTag>,
883  boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
884  >,
885  // Second index allows for searching using an output from toText function.
886  boost::multi_index::ordered_unique<
887  boost::multi_index::tag<SubnetPrefixIndexTag>,
888  boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
889  >,
890 
891  // Third index allows for searching using an output from getServerId.
892  boost::multi_index::ordered_non_unique<
893  boost::multi_index::tag<SubnetServerIdIndexTag>,
894  boost::multi_index::const_mem_fun<Network4, asiolink::IOAddress,
896  >,
897 
898  // Forth index allows for searching using subnet modification time.
899  boost::multi_index::ordered_non_unique<
900  boost::multi_index::tag<SubnetModificationTimeIndexTag>,
901  boost::multi_index::const_mem_fun<data::BaseStampedElement,
902  boost::posix_time::ptime,
904  >
905  >
907 
914 typedef boost::multi_index_container<
915  // Multi index container holds pointers to the subnets.
916  Subnet6Ptr,
917  // The following holds all indexes.
918  boost::multi_index::indexed_by<
919  // First index allows for searching using subnet identifier.
920  boost::multi_index::ordered_unique<
921  boost::multi_index::tag<SubnetSubnetIdIndexTag>,
922  boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
923  >,
924  // Second index allows for searching using an output from toText function.
925  boost::multi_index::ordered_unique<
926  boost::multi_index::tag<SubnetPrefixIndexTag>,
927  boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
928  >
929  >
931 
954 typedef boost::multi_index_container<
955  // Multi index container holds pointers to the subnets.
956  Subnet6Ptr,
957  // The following holds all indexes.
958  boost::multi_index::indexed_by<
959  // First index allows for searching using subnet identifier.
960  boost::multi_index::ordered_unique<
961  boost::multi_index::tag<SubnetSubnetIdIndexTag>,
962  boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
963  >,
964  // Second index allows for searching using an output from toText function.
965  boost::multi_index::ordered_unique<
966  boost::multi_index::tag<SubnetPrefixIndexTag>,
967  boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
968  >,
969  // Third index allows for searching using subnet modification time.
970  boost::multi_index::ordered_non_unique<
971  boost::multi_index::tag<SubnetModificationTimeIndexTag>,
972  boost::multi_index::const_mem_fun<data::BaseStampedElement,
973  boost::posix_time::ptime,
975  >
976  >
978 
986 template<typename ReturnPtrType, typename CollectionType>
988 public:
989 
997  static ReturnPtrType get(const CollectionType& collection,
998  const SubnetID& subnet_id) {
999  auto& index = collection.template get<SubnetSubnetIdIndexTag>();
1000  auto s = index.find(subnet_id);
1001  if (s != index.end()) {
1002  return (*s);
1003  }
1004  // No subnet found. Return null pointer.
1005  return (ReturnPtrType());
1006  }
1007 };
1008 
1011 
1015 
1018 namespace {
1019 
1020 template <isc::util::DhcpSpace D>
1021 struct AdapterSubnet {};
1022 
1023 template <>
1024 struct AdapterSubnet<isc::util::DHCPv4> {
1025  using type = Subnet4;
1026 };
1027 
1028 template <>
1029 struct AdapterSubnet<isc::util::DHCPv6> {
1030  using type = Subnet6;
1031 };
1032 
1033 } // namespace
1034 
1035 template <isc::util::DhcpSpace D>
1036 using SubnetT = typename AdapterSubnet<D>::type;
1037 
1038 template <isc::util::DhcpSpace D>
1039 using SubnetTPtr = boost::shared_ptr<SubnetT<D>>;
1041 
1042 } // end of isc::dhcp namespace
1043 } // end of isc namespace
1044 
1045 #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:1259
virtual asiolink::IOAddress getServerId() const
Returns binary representation of the dhcp-server-identifier option (54).
Definition: network.cc:336
Specialization of the Network object for DHCPv6 case.
Definition: network.h:1420
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:1251
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:320
const Cfg4o6 & get4o6() const
Returns const DHCP4o6 configuration parameters.
Definition: subnet.h:607
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=0)
Constructor with all parameters.
Definition: subnet.cc:247
Subnet4Ptr getNextSubnet(const Subnet4Ptr &first_subnet) const
Returns next subnet within shared network.
Definition: subnet.cc:281
Cfg4o6 & get4o6()
Returns DHCP4o6 configuration parameters.
Definition: subnet.h:599
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=0)
Factory function creating an instance of the Subnet4.
Definition: subnet.cc:264
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:672
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
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.
Definition: subnet.cc:638
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
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.
Definition: subnet.cc:658
A class containing static convenience methods to fetch the subnets from the containers.
Definition: subnet.h:987
static ReturnPtrType get(const CollectionType &collection, const SubnetID &subnet_id)
Fetches subnets by id.
Definition: subnet.h:997
isc::util::uint128_t getPoolCapacity(Lease::Type type) const
Returns the number of possible leases for specified lease type.
Definition: subnet.cc:98
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:151
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:367
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:438
SubnetID id_
subnet-id
Definition: subnet.h:461
SubnetAllocationStatePtr getAllocationState(Lease::Type type) const
Returns subnet-specific allocation state.
Definition: subnet.cc:383
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:473
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:83
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:91
void delPools(Lease::Type type)
Deletes all pools of specified type.
Definition: subnet.cc:534
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:222
void setAllocator(Lease::Type type, const AllocatorPtr &allocator)
Sets new allocator instance.
Definition: subnet.cc:378
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:348
std::pair< isc::asiolink::IOAddress, uint8_t > get() const
Returns subnet parameters (prefix and prefix length).
Definition: subnet.h:90
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:398
Subnet(const isc::asiolink::IOAddress &prefix, uint8_t len, const SubnetID id)
Protected constructor.
Definition: subnet.cc:70
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:330
static SubnetID static_id_
keeps the subnet-id value.
Definition: subnet.h:357
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:394
boost::shared_ptr< Element > ElementPtr
Definition: data.h:26
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:659
boost::shared_ptr< const Subnet4 > ConstSubnet4Ptr
A const pointer to a Subnet4 object.
Definition: subnet.h:492
typename AdapterSubnet< D >::type SubnetT
Definition: subnet.h:1036
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
Definition: subnet.h:665
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:977
std::vector< PoolPtr > PoolCollection
a container for either IPv4 or IPv6 Pools
Definition: pool.h:499
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:850
boost::shared_ptr< Pool > PoolPtr
a pointer to either IPv4 or IPv6 Pool
Definition: pool.h:496
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:906
boost::shared_ptr< SubnetT< D > > SubnetTPtr
Definition: subnet.h:1039
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:930
boost::shared_ptr< Network > NetworkPtr
Pointer to the Network object.
Definition: network.h:70
boost::shared_ptr< Allocator > AllocatorPtr
Defines a pointer to an allocator.
Definition: allocator.h:239
boost::shared_ptr< SubnetAllocationState > SubnetAllocationStatePtr
boost::multiprecision::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:826
Tag for the index for searching by subnet prefix.
Definition: subnet.h:820
Tag for the index for searching by server identifier.
Definition: subnet.h:823
Tag for the index for searching by subnet identifier.
Definition: subnet.h:817