Kea  2.1.7-git
subnet.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2022 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/lease.h>
15 #include <dhcpsrv/network.h>
16 #include <dhcpsrv/pool.h>
17 #include <dhcpsrv/subnet_id.h>
18 #include <util/dhcp_space.h>
19 #include <util/triplet.h>
20 
21 #include <boost/multi_index/mem_fun.hpp>
22 #include <boost/multi_index/indexed_by.hpp>
23 #include <boost/multi_index/ordered_index.hpp>
24 #include <boost/multi_index/random_access_index.hpp>
25 #include <boost/multi_index_container.hpp>
26 #include <boost/date_time/posix_time/posix_time.hpp>
27 #include <boost/pointer_cast.hpp>
28 #include <boost/scoped_ptr.hpp>
29 #include <boost/shared_ptr.hpp>
30 
31 #include <cstdint>
32 #include <map>
33 #include <mutex>
34 #include <utility>
35 
36 namespace isc {
37 namespace dhcp {
38 
39 class Subnet : public virtual Network {
40 public:
41 
47  bool inRange(const isc::asiolink::IOAddress& addr) const;
48 
63  bool inPool(Lease::Type type, const isc::asiolink::IOAddress& addr) const;
64 
74  bool inPool(Lease::Type type,
75  const isc::asiolink::IOAddress& addr,
76  const ClientClasses& client_classes) const;
77 
92 
104  boost::posix_time::ptime
105  getLastAllocatedTime(const Lease::Type& lease_type) const;
106 
119  void setLastAllocated(Lease::Type type,
120  const isc::asiolink::IOAddress& addr);
121 
125  SubnetID getID() const { return (id_); }
126 
130  std::pair<isc::asiolink::IOAddress, uint8_t> get() const {
131  return (std::make_pair(prefix_, prefix_len_));
132  }
133 
155  void addPool(const PoolPtr& pool);
156 
162  void delPools(Lease::Type type);
163 
182  const PoolPtr getPool(Lease::Type type, const isc::asiolink::IOAddress& addr,
183  bool anypool = true) const;
184 
192  const PoolPtr getPool(Lease::Type type,
193  const ClientClasses& client_classes,
194  const isc::asiolink::IOAddress& addr) const;
195 
201  return (getPool(type, default_pool()));
202  }
203 
208  virtual isc::asiolink::IOAddress default_pool() const = 0;
209 
216  const PoolCollection& getPools(Lease::Type type) const;
217 
221  uint64_t getPoolCapacity(Lease::Type type) const;
222 
229  uint64_t getPoolCapacity(Lease::Type type,
230  const ClientClasses& client_classes) const;
231 
236  virtual std::string toText() const;
237 
243  static void resetSubnetID() {
244  static_id_ = 1;
245  }
246 
263  template<typename SharedNetworkPtrType>
264  void getSharedNetwork(SharedNetworkPtrType& shared_network) const {
265  shared_network = boost::dynamic_pointer_cast<
266  typename SharedNetworkPtrType::element_type>(parent_network_.lock());
267  }
268 
276  void setSharedNetwork(const NetworkPtr& shared_network) {
277  parent_network_ = shared_network;
278  }
279 
283  std::string getSharedNetworkName() const {
284  return (shared_network_name_);
285  }
286 
299  void setSharedNetworkName(const std::string& shared_network_name) {
300  shared_network_name_ = shared_network_name;
301  }
302 
310 
311 protected:
312 
314  //
327  Subnet(const isc::asiolink::IOAddress& prefix, uint8_t len,
328  const SubnetID id);
329 
334  virtual ~Subnet() { };
335 
343  static SubnetID static_id_;
344 
354  if (static_id_ == SUBNET_ID_MAX) {
355  resetSubnetID();
356  }
357 
358  return (static_id_++);
359  }
360 
369  virtual void checkType(Lease::Type type) const = 0;
370 
375  uint64_t sumPoolCapacity(const PoolCollection& pools) const;
376 
382  uint64_t sumPoolCapacity(const PoolCollection& pools,
383  const ClientClasses& client_classes) const;
384 
393  bool poolOverlaps(const Lease::Type& pool_type, const PoolPtr& pool) const;
394 
398  virtual data::ElementPtr toElement() const;
399 
408  static std::pair<asiolink::IOAddress, uint8_t>
409  parsePrefixCommon(const std::string& prefix);
410 
416 
419 
422 
425 
428 
430  uint8_t prefix_len_;
431 
442 
447 
452 
457  std::map<Lease::Type, boost::posix_time::ptime> last_allocated_time_;
458 
460  std::string shared_network_name_;
461 
462 private:
463 
477  isc::asiolink::IOAddress getLastAllocatedInternal(Lease::Type type) const;
478 
490  boost::posix_time::ptime
491  getLastAllocatedTimeInternal(const Lease::Type& lease_type) const;
492 
507  void setLastAllocatedInternal(Lease::Type type,
508  const isc::asiolink::IOAddress& addr);
509 
511  boost::scoped_ptr<std::mutex> mutex_;
512 };
513 
515 typedef boost::shared_ptr<Subnet> SubnetPtr;
516 
517 
518 class Subnet4;
519 
521 typedef boost::shared_ptr<const Subnet4> ConstSubnet4Ptr;
522 
524 typedef boost::shared_ptr<Subnet4> Subnet4Ptr;
525 
531 class Subnet4 : public Subnet, public Network4 {
532 public:
533 
545  Subnet4(const isc::asiolink::IOAddress& prefix, uint8_t length,
546  const util::Triplet<uint32_t>& t1,
547  const util::Triplet<uint32_t>& t2,
548  const util::Triplet<uint32_t>& valid_lifetime,
549  const SubnetID id = 0);
550 
567  static Subnet4Ptr
568  create(const isc::asiolink::IOAddress& prefix, uint8_t length,
569  const util::Triplet<uint32_t>& t1,
570  const util::Triplet<uint32_t>& t2,
571  const util::Triplet<uint32_t>& valid_lifetime,
572  const SubnetID id = 0);
573 
586  Subnet4Ptr getNextSubnet(const Subnet4Ptr& first_subnet) const;
587 
600  Subnet4Ptr getNextSubnet(const Subnet4Ptr& first_subnet,
601  const ClientClasses& client_classes) const;
602 
614  virtual bool
615  clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
616 
622  return (dhcp4o6_);
623  }
624 
629  const Cfg4o6& get4o6() const {
630  return (dhcp4o6_);
631  }
632 
636  virtual data::ElementPtr toElement() const;
637 
642  static std::pair<asiolink::IOAddress, uint8_t>
643  parsePrefix(const std::string& prefix);
644 
645 private:
646 
650  virtual isc::asiolink::IOAddress default_pool() const {
651  return (isc::asiolink::IOAddress("0.0.0.0"));
652  }
653 
660  virtual void checkType(Lease::Type type) const;
661 
663  Cfg4o6 dhcp4o6_;
664 };
665 
666 class Subnet6;
667 
669 typedef boost::shared_ptr<const Subnet6> ConstSubnet6Ptr;
670 
672 typedef boost::shared_ptr<Subnet6> Subnet6Ptr;
673 
679 class Subnet6 : public Subnet, public Network6 {
680 public:
681 
694  Subnet6(const isc::asiolink::IOAddress& prefix, uint8_t length,
695  const util::Triplet<uint32_t>& t1,
696  const util::Triplet<uint32_t>& t2,
697  const util::Triplet<uint32_t>& preferred_lifetime,
698  const util::Triplet<uint32_t>& valid_lifetime,
699  const SubnetID id = 0);
700 
718  static Subnet6Ptr
719  create(const isc::asiolink::IOAddress& prefix, uint8_t length,
720  const util::Triplet<uint32_t>& t1,
721  const util::Triplet<uint32_t>& t2,
722  const util::Triplet<uint32_t>& preferred_lifetime,
723  const util::Triplet<uint32_t>& valid_lifetime,
724  const SubnetID id = 0);
725 
738  Subnet6Ptr getNextSubnet(const Subnet6Ptr& first_subnet) const;
739 
752  Subnet6Ptr getNextSubnet(const Subnet6Ptr& first_subnet,
753  const ClientClasses& client_classes) const;
754 
766  virtual bool
767  clientSupported(const isc::dhcp::ClientClasses& client_classes) const;
768 
772  virtual data::ElementPtr toElement() const;
773 
778  static std::pair<asiolink::IOAddress, uint8_t>
779  parsePrefix(const std::string& prefix);
780 
781 private:
782 
785  virtual isc::asiolink::IOAddress default_pool() const {
786  return (isc::asiolink::IOAddress("::"));
787  }
788 
795  virtual void checkType(Lease::Type type) const;
796 
797 };
798 
801 
802 
805 
808 
811 
814 
821 typedef boost::multi_index_container<
822  // Multi index container holds pointers to the subnets.
823  Subnet4Ptr,
824  // The following holds all indexes.
825  boost::multi_index::indexed_by<
826  // First index allows for searching using subnet identifier.
827  boost::multi_index::ordered_unique<
828  boost::multi_index::tag<SubnetSubnetIdIndexTag>,
829  boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
830  >,
831  // Second index allows for searching using an output from toText function.
832  boost::multi_index::ordered_unique<
833  boost::multi_index::tag<SubnetPrefixIndexTag>,
834  boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
835  >
836  >
838 
862 typedef boost::multi_index_container<
863  // Multi index container holds pointers to the subnets.
864  Subnet4Ptr,
865  // The following holds all indexes.
866  boost::multi_index::indexed_by<
867  // First index allows for searching using subnet identifier.
868  boost::multi_index::ordered_unique<
869  boost::multi_index::tag<SubnetSubnetIdIndexTag>,
870  boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
871  >,
872  // Second index allows for searching using an output from toText function.
873  boost::multi_index::ordered_unique<
874  boost::multi_index::tag<SubnetPrefixIndexTag>,
875  boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
876  >,
877 
878  // Third index allows for searching using an output from getServerId.
879  boost::multi_index::ordered_non_unique<
880  boost::multi_index::tag<SubnetServerIdIndexTag>,
881  boost::multi_index::const_mem_fun<Network4, asiolink::IOAddress,
883  >,
884 
885  // Forth index allows for searching using subnet modification time.
886  boost::multi_index::ordered_non_unique<
887  boost::multi_index::tag<SubnetModificationTimeIndexTag>,
888  boost::multi_index::const_mem_fun<data::BaseStampedElement,
889  boost::posix_time::ptime,
891  >
892  >
894 
901 typedef boost::multi_index_container<
902  // Multi index container holds pointers to the subnets.
903  Subnet6Ptr,
904  // The following holds all indexes.
905  boost::multi_index::indexed_by<
906  // First index allows for searching using subnet identifier.
907  boost::multi_index::ordered_unique<
908  boost::multi_index::tag<SubnetSubnetIdIndexTag>,
909  boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
910  >,
911  // Second index allows for searching using an output from toText function.
912  boost::multi_index::ordered_unique<
913  boost::multi_index::tag<SubnetPrefixIndexTag>,
914  boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
915  >
916  >
918 
941 typedef boost::multi_index_container<
942  // Multi index container holds pointers to the subnets.
943  Subnet6Ptr,
944  // The following holds all indexes.
945  boost::multi_index::indexed_by<
946  // First index allows for searching using subnet identifier.
947  boost::multi_index::ordered_unique<
948  boost::multi_index::tag<SubnetSubnetIdIndexTag>,
949  boost::multi_index::const_mem_fun<Subnet, SubnetID, &Subnet::getID>
950  >,
951  // Second index allows for searching using an output from toText function.
952  boost::multi_index::ordered_unique<
953  boost::multi_index::tag<SubnetPrefixIndexTag>,
954  boost::multi_index::const_mem_fun<Subnet, std::string, &Subnet::toText>
955  >,
956  // Third index allows for searching using subnet modification time.
957  boost::multi_index::ordered_non_unique<
958  boost::multi_index::tag<SubnetModificationTimeIndexTag>,
959  boost::multi_index::const_mem_fun<data::BaseStampedElement,
960  boost::posix_time::ptime,
962  >
963  >
965 
973 template<typename ReturnPtrType, typename CollectionType>
975 public:
976 
984  static ReturnPtrType get(const CollectionType& collection,
985  const SubnetID& subnet_id) {
986  auto& index = collection.template get<SubnetSubnetIdIndexTag>();
987  auto s = index.find(subnet_id);
988  if (s != index.end()) {
989  return (*s);
990  }
991  // No subnet found. Return null pointer.
992  return (ReturnPtrType());
993  }
994 };
995 
998 
1002 
1005 namespace {
1006 
1007 template <isc::util::DhcpSpace D>
1008 struct adapter_Subnet {};
1009 
1010 template <>
1011 struct adapter_Subnet<isc::util::DHCPv4> {
1012  using type = Subnet4;
1013 };
1014 
1015 template <>
1016 struct adapter_Subnet<isc::util::DHCPv6> {
1017  using type = Subnet6;
1018 };
1019 
1020 } // namespace
1021 
1022 template <isc::util::DhcpSpace D>
1023 using SubnetT = typename adapter_Subnet<D>::type;
1024 
1025 template <isc::util::DhcpSpace D>
1026 using SubnetTPtr = boost::shared_ptr<SubnetT<D>>;
1028 
1029 } // end of isc::dhcp namespace
1030 } // end of isc namespace
1031 
1032 #endif // SUBNET_H
WeakNetworkPtr parent_network_
Pointer to another network that this network belongs to.
Definition: network.h:1143
isc::asiolink::IOAddress getLastAllocated(Lease::Type type) const
returns the last address that was tried from this subnet.
Definition: subnet.cc:90
boost::shared_ptr< Network > NetworkPtr
Pointer to the Network object.
Definition: network.h:41
Tag for the index for searching by subnet identifier.
Definition: subnet.h:804
Cfg4o6 & get4o6()
Returns DHCP4o6 configuration parameters.
Definition: subnet.h:621
bool inRange(const isc::asiolink::IOAddress &addr) const
checks if specified address is in range.
Definition: subnet.cc:83
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:457
SubnetID id_
subnet-id
Definition: subnet.h:415
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
Definition: subnet.h:524
void addPool(const PoolPtr &pool)
Adds a new pool for the subnet.
Definition: subnet.cc:461
boost::shared_ptr< Element > ElementPtr
Definition: data.h:24
std::vector< PoolPtr > PoolCollection
a container for either IPv4 or IPv6 Pools
Definition: pool.h:508
isc::asiolink::IOAddress last_allocated_pd_
last allocated IPv6 prefix.
Definition: subnet.h:451
Tag for the index for searching by subnet prefix.
Definition: subnet.h:807
A configuration holder for IPv4 subnet.
Definition: subnet.h:531
boost::posix_time::ptime getLastAllocatedTime(const Lease::Type &lease_type) const
Returns the timestamp when the setLastAllocated function was called.
Definition: subnet.cc:117
boost::shared_ptr< Pool > PoolPtr
a pointer to either IPv4 or IPv6 Pool
Definition: pool.h:505
bool inPool(Lease::Type type, const isc::asiolink::IOAddress &addr) const
checks if the specified address is in pools.
Definition: subnet.cc:521
uint8_t prefix_len_
a prefix length of the subnet.
Definition: subnet.h:430
A class containing static convenience methods to fetch the subnets from the containers.
Definition: subnet.h:974
Specialization of the Network object for DHCPv6 case.
Definition: network.h:1283
boost::shared_ptr< SubnetT< D > > SubnetTPtr
Definition: subnet.h:1026
SubnetID getID() const
Returns unique ID for that subnet.
Definition: subnet.h:125
Tag for the index for searching by server identifier.
Definition: subnet.h:810
std::string shared_network_name_
Shared network name.
Definition: subnet.h:460
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:893
This structure contains information about DHCP4o6 (RFC7341)
Definition: cfg_4o6.h:22
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:837
void getSharedNetwork(SharedNetworkPtrType &shared_network) const
Retrieves pointer to a shared network associated with a subnet.
Definition: subnet.h:264
boost::posix_time::ptime getModificationTime() const
Returns timestamp.
Common interface representing a network to which the DHCP clients are connected.
Definition: network.h:123
boost::shared_ptr< const Subnet6 > ConstSubnet6Ptr
A const pointer to a Subnet6 object.
Definition: subnet.h:666
const PoolCollection & getPools(Lease::Type type) const
Returns all pools (const variant).
Definition: subnet.cc:357
static SubnetID static_id_
keeps the subnet-id value.
Definition: subnet.h:334
void setSharedNetworkName(const std::string &shared_network_name)
Sets new shared network name.
Definition: subnet.h:299
isc::asiolink::IOAddress last_allocated_ia_
last allocated address.
Definition: subnet.h:441
static void resetSubnetID()
Resets subnet-id counter to its initial value (1).
Definition: subnet.h:243
const Cfg4o6 & get4o6() const
Returns const DHCP4o6 configuration parameters.
Definition: subnet.h:629
std::string getSharedNetworkName() const
Returns shared network name.
Definition: subnet.h:283
uint64_t sumPoolCapacity(const PoolCollection &pools) const
Returns a sum of possible leases in all pools.
Definition: subnet.cc:214
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:254
uint64_t getPoolCapacity(Lease::Type type) const
Returns the number of possible leases for specified lease type.
Definition: subnet.cc:181
isc::asiolink::IOAddress prefix_
a prefix of the subnet.
Definition: subnet.h:427
PoolCollection pools_
collection of IPv4 or non-temporary IPv6 pools in that subnet.
Definition: subnet.h:418
virtual bool clientSupported(const isc::dhcp::ClientClasses &client_classes) const
Checks whether this network supports client that belongs to specified classes.
Definition: network.cc:75
bool poolOverlaps(const Lease::Type &pool_type, const PoolPtr &pool) const
Checks if the specified pool overlaps with an existing pool.
Definition: subnet.cc:566
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:917
virtual data::ElementPtr toElement() const
Unparse a subnet object.
Definition: subnet.cc:721
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:964
Defines the logger used by the top-level component of kea-lfc.
PoolPtr getAnyPool(Lease::Type type)
Returns a pool without any address specified.
Definition: subnet.h:200
boost::shared_ptr< const Subnet4 > ConstSubnet4Ptr
A const pointer to a Subnet4 object.
Definition: subnet.h:518
void setSharedNetwork(const NetworkPtr &shared_network)
Assigns shared network to a subnet.
Definition: subnet.h:276
typename adapter_Subnet< D >::type SubnetT
Definition: subnet.h:1023
void setLastAllocated(Lease::Type type, const isc::asiolink::IOAddress &addr)
sets the last address that was tried from this subnet.
Definition: subnet.cc:138
A configuration holder for IPv6 subnet.
Definition: subnet.h:679
PoolCollection & getPoolsWritable(Lease::Type type)
Returns all pools (non-const variant).
Definition: subnet.cc:375
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:393
Type
Type of lease or pool.
Definition: lease.h:45
This class represents configuration element which is associated with database identifier and the modi...
virtual asiolink::IOAddress getServerId() const
Returns binary representation of the dhcp-server-identifier option (54).
Definition: network.cc:329
virtual void checkType(Lease::Type type) const =0
Checks if used pool type is valid.
Specialization of the Network object for DHCPv4 case.
Definition: network.h:1151
void delPools(Lease::Type type)
Deletes all pools of specified type.
Definition: subnet.cc:516
Subnet(const isc::asiolink::IOAddress &prefix, uint8_t len, const SubnetID id)
Protected constructor.
Definition: subnet.cc:59
isc::asiolink::IOAddress last_allocated_ta_
last allocated temporary address.
Definition: subnet.h:446
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
Definition: subnet.h:672
PoolCollection pools_ta_
collection of IPv6 temporary address pools in that subnet.
Definition: subnet.h:421
Tag for the index for searching by subnet modification time.
Definition: subnet.h:813
PoolCollection pools_pd_
collection of IPv6 prefix pools in that subnet.
Definition: subnet.h:424
virtual isc::asiolink::IOAddress default_pool() const =0
Returns the default address that will be used for pool selection.
Container for storing client class names.
Definition: classify.h:68
virtual std::string toText() const
Returns textual representation of the subnet (e.g.
Definition: subnet.cc:174
static SubnetID generateNextID()
returns the next unique Subnet-ID.
Definition: subnet.h:353
boost::shared_ptr< Subnet > SubnetPtr
A generic pointer to either Subnet4 or Subnet6 object.
Definition: subnet.h:515
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition: subnet_id.h:24
virtual ~Subnet()
virtual destructor.
Definition: subnet.h:334