 |
Kea
1.5.0
|
Go to the documentation of this file.
7 #ifndef MEMFILE_LEASE_STORAGE_H
8 #define MEMFILE_LEASE_STORAGE_H
14 #include <boost/multi_index/indexed_by.hpp>
15 #include <boost/multi_index/member.hpp>
16 #include <boost/multi_index/mem_fun.hpp>
17 #include <boost/multi_index/ordered_index.hpp>
18 #include <boost/multi_index_container.hpp>
19 #include <boost/multi_index/composite_key.hpp>
65 typedef boost::multi_index_container<
68 boost::multi_index::indexed_by<
72 boost::multi_index::ordered_unique<
73 boost::multi_index::tag<AddressIndexTag>,
74 boost::multi_index::member<Lease, isc::asiolink::IOAddress, &Lease::addr_>
78 boost::multi_index::ordered_non_unique<
79 boost::multi_index::tag<DuidIaidTypeIndexTag>,
82 boost::multi_index::composite_key<
86 boost::multi_index::const_mem_fun<Lease6, const std::vector<uint8_t>&,
90 boost::multi_index::member<Lease6, uint32_t, &Lease6::iaid_>,
91 boost::multi_index::member<Lease6, Lease::Type, &Lease6::type_>
96 boost::multi_index::ordered_non_unique<
97 boost::multi_index::tag<ExpirationIndexTag>,
102 boost::multi_index::composite_key<
105 boost::multi_index::const_mem_fun<
Lease, bool,
108 boost::multi_index::const_mem_fun<
Lease, int64_t,
115 boost::multi_index::ordered_non_unique<
116 boost::multi_index::tag<SubnetIdIndexTag>,
123 boost::multi_index::ordered_non_unique<
124 boost::multi_index::tag<DuidIndexTag>,
125 boost::multi_index::const_mem_fun<
Lease6,
126 const std::vector<uint8_t>&,
145 typedef boost::multi_index_container<
149 boost::multi_index::indexed_by<
153 boost::multi_index::ordered_unique<
154 boost::multi_index::tag<AddressIndexTag>,
157 boost::multi_index::member<Lease, isc::asiolink::IOAddress, &Lease::addr_>
161 boost::multi_index::ordered_non_unique<
162 boost::multi_index::tag<HWAddressSubnetIdIndexTag>,
165 boost::multi_index::composite_key<
171 boost::multi_index::const_mem_fun<Lease, const std::vector<uint8_t>&,
177 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>
182 boost::multi_index::ordered_non_unique<
183 boost::multi_index::tag<ClientIdSubnetIdIndexTag>,
186 boost::multi_index::composite_key<
190 boost::multi_index::const_mem_fun<Lease4, const std::vector<uint8_t>&,
193 boost::multi_index::member<Lease, uint32_t, &Lease::subnet_id_>
198 boost::multi_index::ordered_non_unique<
199 boost::multi_index::tag<ClientIdHWAddressSubnetIdIndexTag>,
202 boost::multi_index::composite_key<
206 boost::multi_index::const_mem_fun<Lease4, const std::vector<uint8_t>&,
212 boost::multi_index::const_mem_fun<Lease, const std::vector<uint8_t>&,
215 boost::multi_index::member<Lease, SubnetID, &Lease::subnet_id_>
220 boost::multi_index::ordered_non_unique<
221 boost::multi_index::tag<ExpirationIndexTag>,
226 boost::multi_index::composite_key<
229 boost::multi_index::const_mem_fun<
Lease, bool,
232 boost::multi_index::const_mem_fun<
Lease, int64_t,
239 boost::multi_index::ordered_non_unique<
240 boost::multi_index::tag<SubnetIdIndexTag>,
241 boost::multi_index::member<Lease, isc::dhcp::SubnetID, &Lease::subnet_id_>
275 typedef Lease4Storage::index<HWAddressSubnetIdIndexTag>::type
279 typedef Lease4Storage::index<ClientIdSubnetIdIndexTag>::type
283 typedef Lease4Storage::index<ClientIdHWAddressSubnetIdIndexTag>::type
293 #endif // MEMFILE_LEASE_STORAGE_H
Tag for indexes by expiration time.
Lease6Storage::index< SubnetIdIndexTag >::type Lease6StorageSubnetIdIndex
DHCPv6 lease storage index by Subnet-id.
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
Lease4Storage::index< ExpirationIndexTag >::type Lease4StorageExpirationIndex
DHCPv4 lease storage index by expiration time.
Tag for index using DUID.
boost::shared_ptr< Lease6 > Lease6Ptr
Pointer to a Lease6 structure.
const std::vector< uint8_t > & getHWAddrVector() const
Returns raw (as vector) hardware address.
const std::vector< uint8_t > & getClientIdVector() const
Returns a client identifier.
Tag for indexes by DUID, IAID, lease type tuple.
boost::multi_index_container< Lease6Ptr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< AddressIndexTag >, boost::multi_index::member< Lease, isc::asiolink::IOAddress, &Lease::addr_ > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< DuidIaidTypeIndexTag >, boost::multi_index::composite_key< Lease6, boost::multi_index::const_mem_fun< Lease6, const std::vector< uint8_t > &, &Lease6::getDuidVector >, boost::multi_index::member< Lease6, uint32_t, &Lease6::iaid_ >, boost::multi_index::member< Lease6, Lease::Type, &Lease6::type_ > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ExpirationIndexTag >, boost::multi_index::composite_key< Lease6, boost::multi_index::const_mem_fun< Lease, bool, &Lease::stateExpiredReclaimed >, boost::multi_index::const_mem_fun< Lease, int64_t, &Lease::getExpirationTime > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetIdIndexTag >, boost::multi_index::member< Lease, isc::dhcp::SubnetID, &Lease::subnet_id_ > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< DuidIndexTag >, boost::multi_index::const_mem_fun< Lease6, const std::vector< uint8_t > &, &Lease6::getDuidVector > > >> Lease6Storage
A multi index container holding DHCPv6 leases.
bool stateExpiredReclaimed() const
Indicates if the lease is in the "expired-reclaimed" state.
Defines the logger used by the top-level component of kea-dhcp-ddns.
boost::multi_index_container< Lease4Ptr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< AddressIndexTag >, boost::multi_index::member< Lease, isc::asiolink::IOAddress, &Lease::addr_ > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< HWAddressSubnetIdIndexTag >, boost::multi_index::composite_key< Lease4, boost::multi_index::const_mem_fun< Lease, const std::vector< uint8_t > &, &Lease::getHWAddrVector >, boost::multi_index::member< Lease, SubnetID, &Lease::subnet_id_ > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ClientIdSubnetIdIndexTag >, boost::multi_index::composite_key< Lease4, boost::multi_index::const_mem_fun< Lease4, const std::vector< uint8_t > &, &Lease4::getClientIdVector >, boost::multi_index::member< Lease, uint32_t, &Lease::subnet_id_ > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ClientIdHWAddressSubnetIdIndexTag >, boost::multi_index::composite_key< Lease4, boost::multi_index::const_mem_fun< Lease4, const std::vector< uint8_t > &, &Lease4::getClientIdVector >, boost::multi_index::const_mem_fun< Lease, const std::vector< uint8_t > &, &Lease::getHWAddrVector >, boost::multi_index::member< Lease, SubnetID, &Lease::subnet_id_ > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ExpirationIndexTag >, boost::multi_index::composite_key< Lease4, boost::multi_index::const_mem_fun< Lease, bool, &Lease::stateExpiredReclaimed >, boost::multi_index::const_mem_fun< Lease, int64_t, &Lease::getExpirationTime > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetIdIndexTag >, boost::multi_index::member< Lease, isc::dhcp::SubnetID, &Lease::subnet_id_ > > >> Lease4Storage
A multi index container holding DHCPv4 leases.
Structure that holds a lease for IPv6 address and/or prefix.
Tag for indexes by HW address, subnet identifier tuple.
Lease6Storage::index< DuidIaidTypeIndexTag >::type Lease6StorageDuidIaidTypeIndex
DHCPv6 lease storage index by DUID, IAID, lease type.
int64_t getExpirationTime() const
Returns lease expiration time.
Lease4Storage::index< ClientIdSubnetIdIndexTag >::type Lease4StorageClientIdSubnetIdIndex
DHCPv4 lease storage index by client and subnet identifier.
Tag for indexes by client and subnet identifiers.
Tag for indexes by address.
Lease6Storage::index< AddressIndexTag >::type Lease6StorageAddressIndex
DHCPv6 lease storage index by address.
Lease4Storage::index< SubnetIdIndexTag >::type Lease4StorageSubnetIdIndex
DHCPv4 lease storage index by client id, HW address and subnet id.
Lease4Storage::index< ClientIdHWAddressSubnetIdIndexTag >::type Lease4StorageClientIdHWAddressSubnetIdIndex
DHCPv4 lease storage index by client id, HW address and subnet id.
Tag for indexs by subnet-id.
Lease6Storage::index< ExpirationIndexTag >::type Lease6StorageExpirationIndex
DHCPv6 lease storage index by expiration time.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
a common structure for IPv4 and IPv6 leases
Tag for indexes by client id, HW address and subnet id.
Lease6Storage::index< DuidIndexTag >::type Lease6StorageDuidIndex
DHCPv6 lease storage index by Subnet-id.
Lease4Storage::index< AddressIndexTag >::type Lease4StorageAddressIndex
DHCPv4 lease storage index by address.
SubnetID subnet_id_
Subnet identifier.
const std::vector< uint8_t > & getDuidVector() const
Returns a reference to a vector representing a DUID.
Structure that holds a lease for IPv4 address.
Lease4Storage::index< HWAddressSubnetIdIndexTag >::type Lease4StorageHWAddressSubnetIdIndex
DHCPv4 lease storage index by HW address and subnet identifier.