Kea  1.5.0
subnet.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 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>
15 #include <dhcpsrv/lease.h>
16 #include <dhcpsrv/pool.h>
17 #include <dhcpsrv/subnet_id.h>
18 #include <dhcpsrv/triplet.h>
19 
20 #include <boost/multi_index/mem_fun.hpp>
21 #include <boost/multi_index/indexed_by.hpp>
22 #include <boost/multi_index/ordered_index.hpp>
23 #include <boost/multi_index/random_access_index.hpp>
24 #include <boost/multi_index_container.hpp>
25 #include <boost/date_time/posix_time/posix_time.hpp>
26 #include <boost/pointer_cast.hpp>
27 #include <boost/shared_ptr.hpp>
28 #include <cstdint>
29 #include <map>
30 #include <utility>
31 
32 namespace isc {
33 namespace dhcp {
34 
35 class Subnet : public virtual data::UserContext, public data::CfgToElement {
36 
37  // Assignable network is our friend to allow it to call
38  // @ref Subnet::setSharedNetwork private function.
39  friend class AssignableNetwork;
40 
41 public:
42 
44  bool inRange(const isc::asiolink::IOAddress& addr) const;
45 
60  bool inPool(Lease::Type type, const isc::asiolink::IOAddress& addr) const;
61 
71  bool inPool(Lease::Type type,
72  const isc::asiolink::IOAddress& addr,
73  const ClientClasses& client_classes) const;
74 
87 
97  boost::posix_time::ptime getLastAllocatedTime(const Lease::Type& lease_type) const;
98 
109  void setLastAllocated(Lease::Type type,
110  const isc::asiolink::IOAddress& addr);
111 
114  SubnetID getID() const { return (id_); }
115 
119  std::pair<isc::asiolink::IOAddress, uint8_t> get() const {
120  return (std::make_pair(prefix_, prefix_len_));
121  }
122 
145  void addPool(const PoolPtr& pool);
146 
151  void delPools(Lease::Type type);
152 
171  const PoolPtr getPool(Lease::Type type, const isc::asiolink::IOAddress& addr,
172  bool anypool = true) const;
173 
181  const PoolPtr getPool(Lease::Type type,
182  const ClientClasses& client_classes,
183  const isc::asiolink::IOAddress& addr) const;
184 
190  return (getPool(type, default_pool()));
191  }
192 
198 
205  const PoolCollection& getPools(Lease::Type type) const;
206 
210  uint64_t getPoolCapacity(Lease::Type type) const;
211 
217  uint64_t getPoolCapacity(Lease::Type type,
218  const ClientClasses& client_classes) const;
219 
224  virtual std::string toText() const;
225 
231  static void resetSubnetID() {
232  static_id_ = 1;
233  }
234 
251  template<typename SharedNetworkPtrType>
252  void getSharedNetwork(SharedNetworkPtrType& shared_network) const {
253  shared_network = boost::dynamic_pointer_cast<
254  typename SharedNetworkPtrType::element_type>(shared_network_.lock());
255  }
256 
257 private:
258 
266  void setSharedNetwork(const NetworkPtr& shared_network) {
267  shared_network_ = shared_network;
268  }
269 
270 public:
271 
273  std::string getSharedNetworkName() const {
274  return (shared_network_name_);
275  }
276 
289  void setSharedNetworkName(const std::string& shared_network_name) {
290  shared_network_name_ = shared_network_name;
291  }
292 
293 protected:
301 
303  //
316  Subnet(const isc::asiolink::IOAddress& prefix, uint8_t len,
317  const SubnetID id);
318 
323  virtual ~Subnet() { };
324 
333 
343  if (static_id_ == SUBNET_ID_MAX) {
344  resetSubnetID();
345  }
346 
347  return (static_id_++);
348  }
349 
358  virtual void checkType(Lease::Type type) const = 0;
359 
363  uint64_t sumPoolCapacity(const PoolCollection& pools) const;
364 
369  uint64_t sumPoolCapacity(const PoolCollection& pools,
370  const ClientClasses& client_classes) const;
371 
380  bool poolOverlaps(const Lease::Type& pool_type, const PoolPtr& pool) const;
381 
385  virtual data::ElementPtr toElement() const;
386 
395  static std::pair<asiolink::IOAddress, uint8_t>
396  parsePrefixCommon(const std::string& prefix);
397 
403 
406 
409 
412 
415 
417  uint8_t prefix_len_;
418 
429 
434 
439 
442  std::map<Lease::Type, boost::posix_time::ptime> last_allocated_time_;
443 
445  std::string iface_;
446 
449 
451  std::string shared_network_name_;
452 };
453 
455 typedef boost::shared_ptr<Subnet> SubnetPtr;
456 
457 
458 class Subnet4;
459 
461 typedef boost::shared_ptr<const Subnet4> ConstSubnet4Ptr;
462 
464 typedef boost::shared_ptr<Subnet4> Subnet4Ptr;
465 
471 class Subnet4 : public Subnet, public Network4 {
472 public:
473 
485  Subnet4(const isc::asiolink::IOAddress& prefix, uint8_t length,
486  const Triplet<uint32_t>& t1,
487  const Triplet<uint32_t>& t2,
488  const Triplet<uint32_t>& valid_lifetime,
489  const SubnetID id = 0);
490 
503  Subnet4Ptr getNextSubnet(const Subnet4Ptr& first_subnet) const;
504 
517  Subnet4Ptr getNextSubnet(const Subnet4Ptr& first_subnet,
518  const ClientClasses& client_classes) const;
519 
531  virtual bool
532  clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
533 
539  void setSiaddr(const isc::asiolink::IOAddress& siaddr);
540 
545 
549  void setSname(const std::string& sname);
550 
554  const std::string& getSname() const;
555 
559  void setFilename(const std::string& filename);
560 
564  const std::string& getFilename() const;
565 
571  return (dhcp4o6_);
572  }
573 
578  const Cfg4o6& get4o6() const {
579  return (dhcp4o6_);
580  }
581 
585  virtual data::ElementPtr toElement() const;
586 
591  static std::pair<asiolink::IOAddress, uint8_t>
592  parsePrefix(const std::string& prefix);
593 
594 private:
595 
598  virtual isc::asiolink::IOAddress default_pool() const {
599  return (isc::asiolink::IOAddress("0.0.0.0"));
600  }
601 
608  virtual void checkType(Lease::Type type) const;
609 
611  isc::asiolink::IOAddress siaddr_;
612 
614  std::string sname_;
615 
617  std::string filename_;
618 
620  Cfg4o6 dhcp4o6_;
621 };
622 
623 class Subnet6;
624 
626 typedef boost::shared_ptr<const Subnet6> ConstSubnet6Ptr;
627 
629 typedef boost::shared_ptr<Subnet6> Subnet6Ptr;
630 
636 class Subnet6 : public Subnet, public Network6 {
637 public:
638 
651  Subnet6(const isc::asiolink::IOAddress& prefix, uint8_t length,
652  const Triplet<uint32_t>& t1,
653  const Triplet<uint32_t>& t2,
654  const Triplet<uint32_t>& preferred_lifetime,
655  const Triplet<uint32_t>& valid_lifetime,
656  const SubnetID id = 0);
657 
670  Subnet6Ptr getNextSubnet(const Subnet6Ptr& first_subnet) const;
671 
684  Subnet6Ptr getNextSubnet(const Subnet6Ptr& first_subnet,
685  const ClientClasses& client_classes) const;
686 
698  virtual bool
699  clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
700 
704  virtual data::ElementPtr toElement() const;
705 
710  static std::pair<asiolink::IOAddress, uint8_t>
711  parsePrefix(const std::string& prefix);
712 
713 private:
714 
717  virtual isc::asiolink::IOAddress default_pool() const {
718  return (isc::asiolink::IOAddress("::"));
719  }
720 
727  virtual void checkType(Lease::Type type) const;
728 
729 };
730 
733 
734 
737 
740 
743 
746 
770 typedef boost::multi_index_container<
771  // Multi index container holds pointers to the subnets.
772  Subnet4Ptr,
773  // The following holds all indexes.
774  boost::multi_index::indexed_by<
775  // First is the random access index allowing for accessing
776  // objects just like we'd do with a vector.
777  boost::multi_index::random_access<
778  boost::multi_index::tag<SubnetRandomAccessIndexTag>
779  >,
780  // Second index allows for searching using subnet identifier.
781  boost::multi_index::ordered_unique<
782  boost::multi_index::tag<SubnetSubnetIdIndexTag>,
783  boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
784  >,
785  // Third index allows for searching using an output from toText function.
786  boost::multi_index::ordered_unique<
787  boost::multi_index::tag<SubnetPrefixIndexTag>,
788  boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
789  >,
790 
791  // Fourth index allows for searching using an output from getServerId
792  boost::multi_index::ordered_non_unique<
793  boost::multi_index::tag<SubnetServerIdIndexTag>,
794  boost::multi_index::const_mem_fun<Network4, asiolink::IOAddress,
796  >
797  >
799 
822 typedef boost::multi_index_container<
823  // Multi index container holds pointers to the subnets.
824  Subnet6Ptr,
825  // The following holds all indexes.
826  boost::multi_index::indexed_by<
827  // First is the random access index allowing for accessing
828  // objects just like we'd do with a vector.
829  boost::multi_index::random_access<
830  boost::multi_index::tag<SubnetRandomAccessIndexTag>
831  >,
832  // Second index allows for searching using subnet identifier.
833  boost::multi_index::ordered_unique<
834  boost::multi_index::tag<SubnetSubnetIdIndexTag>,
835  boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
836  >,
837  // Third index allows for searching using an output from toText function.
838  boost::multi_index::ordered_unique<
839  boost::multi_index::tag<SubnetPrefixIndexTag>,
840  boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
841  >
842  >
844 
846 
847 } // end of isc::dhcp namespace
848 } // end of isc namespace
849 
850 #endif // SUBNET_H
isc::dhcp::Subnet::delPools
void delPools(Lease::Type type)
Deletes all pools of specified type.
Definition: subnet.cc:498
isc::dhcp::Subnet::checkType
virtual void checkType(Lease::Type type) const =0
Checks if used pool type is valid.
isc::dhcp::Subnet6Collection
boost::multi_index_container< Subnet6Ptr, boost::multi_index::indexed_by< boost::multi_index::random_access< boost::multi_index::tag< SubnetRandomAccessIndexTag > >, 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 > > >> Subnet6Collection
A collection of Subnet6 objects.
Definition: subnet.h:843
isc::dhcp::Subnet6::Subnet6
Subnet6(const isc::asiolink::IOAddress &prefix, uint8_t length, const Triplet< uint32_t > &t1, const Triplet< uint32_t > &t2, const Triplet< uint32_t > &preferred_lifetime, const Triplet< uint32_t > &valid_lifetime, const SubnetID id=0)
Constructor with all parameters.
Definition: subnet.cc:613
isc::dhcp::Subnet
Definition: subnet.h:35
isc::dhcp::SubnetPtr
boost::shared_ptr< Subnet > SubnetPtr
A generic pointer to either Subnet4 or Subnet6 object.
Definition: subnet.h:455
isc::dhcp::Subnet::getAnyPool
PoolPtr getAnyPool(Lease::Type type)
Returns a pool without any address specified.
Definition: subnet.h:189
isc::dhcp::AssignableNetwork
Represents a network that can be associated with a subnet.
Definition: assignable_network.h:23
user_context.h
isc::dhcp::Subnet::resetSubnetID
static void resetSubnetID()
Resets subnet-id counter to its initial value (1)
Definition: subnet.h:231
isc::dhcp::Subnet::~Subnet
virtual ~Subnet()
virtual destructor
Definition: subnet.h:323
isc::dhcp::Subnet::generateNextID
static SubnetID generateNextID()
returns the next unique Subnet-ID
Definition: subnet.h:342
isc::dhcp::Subnet::last_allocated_time_
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.
Definition: subnet.h:442
io_address.h
isc::dhcp::Subnet4
A configuration holder for IPv4 subnet.
Definition: subnet.h:471
isc::dhcp::Subnet::id_
SubnetID id_
subnet-id
Definition: subnet.h:402
isc::data::CfgToElement
Abstract class for configuration Cfg_* classes.
Definition: cfg_to_element.h:29
isc::data::UserContext
Base class for user context.
Definition: user_context.h:22
isc::dhcp::SubnetServerIdIndexTag
Tag for the index for searching by server identifier.
Definition: subnet.h:745
isc::dhcp::Lease::Type
Type
Type of lease or pool.
Definition: lease.h:38
isc::dhcp::ConstSubnet6Ptr
boost::shared_ptr< const Subnet6 > ConstSubnet6Ptr
A const pointer to a Subnet6 object.
Definition: subnet.h:623
isc::dhcp::Subnet4::setSname
void setSname(const std::string &sname)
Sets server hostname for the Subnet4.
Definition: subnet.cc:324
isc::dhcp::Subnet::default_pool
virtual isc::asiolink::IOAddress default_pool() const =0
Returns the default address that will be used for pool selection.
isc::dhcp::Subnet4::Subnet4
Subnet4(const isc::asiolink::IOAddress &prefix, uint8_t length, const Triplet< uint32_t > &t1, const Triplet< uint32_t > &t2, const Triplet< uint32_t > &valid_lifetime, const SubnetID id=0)
Constructor with all parameters.
Definition: subnet.cc:244
isc::dhcp::Subnet::shared_network_name_
std::string shared_network_name_
Shared network name.
Definition: subnet.h:451
isc::dhcp::Subnet::getPools
const PoolCollection & getPools(Lease::Type type) const
Returns all pools (const variant)
Definition: subnet.cc:339
isc::dhcp::Subnet::toElement
virtual data::ElementPtr toElement() const
Unparse a subnet object.
Definition: subnet.cc:691
isc::dhcp::Subnet::toText
virtual std::string toText() const
Returns textual representation of the subnet (e.g.
Definition: subnet.cc:139
isc::dhcp::Subnet4::getSname
const std::string & getSname() const
Returns server hostname for this subnet.
Definition: subnet.cc:328
isc::dhcp::Subnet::last_allocated_ia_
isc::asiolink::IOAddress last_allocated_ia_
last allocated address
Definition: subnet.h:428
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition: agent_parser.cc:144
isc::dhcp::Subnet4::setSiaddr
void setSiaddr(const isc::asiolink::IOAddress &siaddr)
Sets siaddr for the Subnet4.
Definition: subnet.cc:312
isc::dhcp::Network6
Specialization of the Network object for DHCPv6 case.
Definition: network.h:431
isc::dhcp::Subnet::prefix_len_
uint8_t prefix_len_
a prefix length of the subnet
Definition: subnet.h:417
pool.h
isc::dhcp::Subnet::getPool
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:375
isc::dhcp::Subnet4Ptr
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
Definition: subnet.h:464
isc::dhcp::Subnet::get
std::pair< isc::asiolink::IOAddress, uint8_t > get() const
Returns subnet parameters (prefix and prefix length)
Definition: subnet.h:119
isc::dhcp::Subnet::iface_
std::string iface_
Name of the network interface (if connected directly)
Definition: subnet.h:445
isc::dhcp::Subnet::parsePrefixCommon
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:219
isc::dhcp::ConstSubnet4Ptr
boost::shared_ptr< const Subnet4 > ConstSubnet4Ptr
A const pointer to a Subnet4 object.
Definition: subnet.h:458
isc::dhcp::Subnet::poolOverlaps
bool poolOverlaps(const Lease::Type &pool_type, const PoolPtr &pool) const
Checks if the specified pool overlaps with an existing pool.
Definition: subnet.cc:548
isc::dhcp::PoolPtr
boost::shared_ptr< Pool > PoolPtr
a pointer to either IPv4 or IPv6 Pool
Definition: pool.h:405
assignable_network.h
isc::dhcp::Subnet6::toElement
virtual data::ElementPtr toElement() const
Unparse a subnet object.
Definition: subnet.cc:752
isc::dhcp::Subnet::static_id_
static SubnetID static_id_
keeps the subnet-id value
Definition: subnet.h:323
isc::dhcp::Subnet::getPoolCapacity
uint64_t getPoolCapacity(Lease::Type type) const
Returns the number of possible leases for specified lease type.
Definition: subnet.cc:146
isc::dhcp::SubnetPrefixIndexTag
Tag for the index for searching by subnet prefix.
Definition: subnet.h:742
isc::dhcp::Subnet6
A configuration holder for IPv6 subnet.
Definition: subnet.h:636
isc::dhcp::Network4::getServerId
virtual asiolink::IOAddress getServerId() const
Returns binary representation of the dhcp-server-identifier option (54).
Definition: network.cc:205
isc::dhcp::Subnet::getSharedNetwork
void getSharedNetwork(SharedNetworkPtrType &shared_network) const
Retrieves pointer to a shared network associated with a subnet.
Definition: subnet.h:252
isc::dhcp::Subnet::last_allocated_ta_
isc::asiolink::IOAddress last_allocated_ta_
last allocated temporary address
Definition: subnet.h:433
isc::dhcp::Subnet::prefix_
isc::asiolink::IOAddress prefix_
a prefix of the subnet
Definition: subnet.h:414
triplet.h
isc::dhcp::Subnet::pools_
PoolCollection pools_
collection of IPv4 or non-temporary IPv6 pools in that subnet
Definition: subnet.h:405
isc::dhcp::Subnet4::get4o6
const Cfg4o6 & get4o6() const
Returns const DHCP4o6 configuration parameters.
Definition: subnet.h:578
isc::dhcp::Subnet6::getNextSubnet
Subnet6Ptr getNextSubnet(const Subnet6Ptr &first_subnet) const
Returns next subnet within shared network.
Definition: subnet.cc:642
isc::dhcp::Subnet::setLastAllocated
void setLastAllocated(Lease::Type type, const isc::asiolink::IOAddress &addr)
sets the last address that was tried from this subnet
Definition: subnet.cc:113
isc::dhcp::Subnet::getPoolsWritable
PoolCollection & getPoolsWritable(Lease::Type type)
Returns all pools (non-const variant)
Definition: subnet.cc:357
isc::dhcp::Subnet::getSharedNetworkName
std::string getSharedNetworkName() const
Returns shared network name.
Definition: subnet.h:273
isc::dhcp::Subnet4::clientSupported
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:302
isc::dhcp::Subnet4::toElement
virtual data::ElementPtr toElement() const
Unparse a subnet object.
Definition: subnet.cc:708
isc::dhcp::Subnet::getLastAllocatedTime
boost::posix_time::ptime getLastAllocatedTime(const Lease::Type &lease_type) const
Returns the timestamp when the setLastAllocated function was called.
Definition: subnet.cc:101
isc::dhcp::Subnet4::getFilename
const std::string & getFilename() const
Returns boot file name for this subnet.
Definition: subnet.cc:335
isc::dhcp::Subnet::pools_ta_
PoolCollection pools_ta_
collection of IPv6 temporary address pools in that subnet
Definition: subnet.h:408
isc::dhcp::SubnetRandomAccessIndexTag
Tag for the random access index.
Definition: subnet.h:736
isc::dhcp::Subnet4::get4o6
Cfg4o6 & get4o6()
Returns DHCP4o6 configuration parameters.
Definition: subnet.h:570
isc::dhcp::Subnet::getID
SubnetID getID() const
Returns unique ID for that subnet.
Definition: subnet.h:114
isc::dhcp::Subnet6Ptr
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
Definition: subnet.h:629
isc::dhcp::Subnet::inRange
bool inRange(const isc::asiolink::IOAddress &addr) const
checks if specified address is in range
Definition: subnet.cc:76
isc::dhcp::WeakNetworkPtr
boost::weak_ptr< Network > WeakNetworkPtr
Weak pointer to the Network object.
Definition: network.h:363
isc::dhcp::Subnet::setSharedNetworkName
void setSharedNetworkName(const std::string &shared_network_name)
Sets new shared network name.
Definition: subnet.h:289
isc::dhcp::Subnet::inPool
bool inPool(Lease::Type type, const isc::asiolink::IOAddress &addr) const
checks if the specified address is in pools
Definition: subnet.cc:503
data.h
isc::dhcp::Subnet6::clientSupported
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:680
isc::dhcp::PoolCollection
std::vector< PoolPtr > PoolCollection
a container for either IPv4 or IPv6 Pools
Definition: pool.h:408
subnet_id.h
isc::dhcp::Subnet4::getNextSubnet
Subnet4Ptr getNextSubnet(const Subnet4Ptr &first_subnet) const
Returns next subnet within shared network.
Definition: subnet.cc:263
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition: data.h:20
isc::dhcp::Subnet::shared_network_
WeakNetworkPtr shared_network_
Pointer to a shared network that subnet belongs to.
Definition: subnet.h:448
isc::dhcp::SubnetSubnetIdIndexTag
Tag for the index for searching by subnet identifier.
Definition: subnet.h:739
isc::dhcp::SubnetID
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
Definition: lease.h:24
isc::dhcp::Subnet::sumPoolCapacity
uint64_t sumPoolCapacity(const PoolCollection &pools) const
Returns a sum of possible leases in all pools.
Definition: subnet.cc:179
isc::dhcp::Network4
Specialization of the Network object for DHCPv4 case.
Definition: network.h:366
isc::dhcp::Subnet::Subnet
Subnet(const isc::asiolink::IOAddress &prefix, uint8_t len, const SubnetID id)
Protected constructor.
Definition: subnet.cc:54
lease.h
isc::dhcp::Subnet4::getSiaddr
isc::asiolink::IOAddress getSiaddr() const
Returns siaddr for this subnet.
Definition: subnet.cc:320
isc::dhcp::Subnet6::parsePrefix
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:783
isc::dhcp::Subnet::addPool
void addPool(const PoolPtr &pool)
Adds a new pool for the subnet.
Definition: subnet.cc:443
isc::dhcp::Subnet4::parsePrefix
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:742
isc::dhcp::Triplet< uint32_t >
isc::dhcp::Subnet4::setFilename
void setFilename(const std::string &filename)
Sets boot file name for the Subnet4.
Definition: subnet.cc:331
isc::dhcp::ClientClasses
Container for storing client class names.
Definition: classify.h:43
isc::dhcp::NetworkPtr
boost::shared_ptr< Network > NetworkPtr
Pointer to the Network object.
Definition: network.h:360
isc::dhcp::Subnet::pools_pd_
PoolCollection pools_pd_
collection of IPv6 prefix pools in that subnet
Definition: subnet.h:411
option_space_container.h
isc::dhcp::Subnet::last_allocated_pd_
isc::asiolink::IOAddress last_allocated_pd_
last allocated IPv6 prefix
Definition: subnet.h:438
isc::dhcp::Subnet::getLastAllocated
isc::asiolink::IOAddress getLastAllocated(Lease::Type type) const
returns the last address that was tried from this subnet
Definition: subnet.cc:83
isc::dhcp::Subnet4Collection
boost::multi_index_container< Subnet4Ptr, boost::multi_index::indexed_by< boost::multi_index::random_access< boost::multi_index::tag< SubnetRandomAccessIndexTag > >, 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 > > >> Subnet4Collection
A collection of Subnet4 objects.
Definition: subnet.h:798
isc::dhcp::Cfg4o6
This structure contains information about DHCP4o6 (RFC7341)
Definition: cfg_4o6.h:21