7#ifndef HOST_CONTAINER_H 
    8#define HOST_CONTAINER_H 
   12#include <boost/multi_index_container.hpp> 
   13#include <boost/multi_index/composite_key.hpp> 
   14#include <boost/multi_index/mem_fun.hpp> 
   15#include <boost/multi_index/member.hpp> 
   16#include <boost/multi_index/ordered_index.hpp> 
   17#include <boost/multi_index/hashed_index.hpp> 
   33typedef boost::multi_index_container<
 
   37    boost::multi_index::indexed_by<
 
   42        boost::multi_index::ordered_non_unique<
 
   46            boost::multi_index::composite_key<
 
   51                boost::multi_index::const_mem_fun<
 
   52                    Host, 
const std::vector<uint8_t>&,
 
   57                boost::multi_index::const_mem_fun<
 
   66        boost::multi_index::ordered_non_unique<
 
   68            boost::multi_index::const_mem_fun<
Host, 
const asiolink::IOAddress&,
 
   73        boost::multi_index::ordered_non_unique<
 
   80        boost::multi_index::ordered_non_unique<
 
   87        boost::multi_index::ordered_unique<
 
   89            boost::multi_index::const_mem_fun<
Host, uint64_t,
 
   95        boost::multi_index::ordered_non_unique<
 
   97            boost::multi_index::const_mem_fun<
Host, std::string,
 
  110typedef std::pair<HostContainerIndex0::iterator,
 
  120typedef std::pair<HostContainerIndex1::iterator,
 
  130typedef std::pair<HostContainerIndex2::iterator,
 
  140typedef std::pair<HostContainerIndex3::iterator,
 
  149typedef std::pair<HostContainerIndex4::iterator,
 
  184        return (
resrv_.getPrefix());
 
 
  189        return (
host_->getHostId());
 
 
 
  198typedef boost::multi_index_container<
 
  204    boost::multi_index::indexed_by<
 
  207        boost::multi_index::ordered_non_unique<
 
  211            boost::multi_index::const_mem_fun<
 
  217        boost::multi_index::ordered_non_unique<
 
  221            boost::multi_index::composite_key<
 
  228                boost::multi_index::member<HostResrv6Tuple, 
const SubnetID,
 
  233                boost::multi_index::const_mem_fun<
 
  241        boost::multi_index::ordered_non_unique<
 
  243            boost::multi_index::member<HostResrv6Tuple, 
const SubnetID,
 
  248        boost::multi_index::ordered_non_unique<
 
  250            boost::multi_index::const_mem_fun<HostResrv6Tuple, uint64_t,
 
  255        boost::multi_index::ordered_non_unique<
 
  256            boost::multi_index::const_mem_fun<
 
  271typedef std::pair<HostContainer6Index0::iterator,
 
  281typedef std::pair<HostContainer6Index1::iterator,
 
  291typedef std::pair<HostContainer6Index2::iterator,
 
  300typedef std::pair<HostContainer6Index3::iterator,
 
  309typedef std::pair<HostContainer6Index4::iterator,
 
The IOAddress class represents an IP addresses (version agnostic)
Represents a device with IPv4 and/or IPv6 reservations.
SubnetID getIPv4SubnetID() const
Returns subnet identifier for IPv4 reservation.
IdentifierType
Type of the host identifier.
IdentifierType getIdentifierType() const
Returns the identifier type.
std::string getLowerHostname() const
Returns reserved hostname in lower case.
SubnetID getIPv6SubnetID() const
Returns subnet identifier for IPv6 reservations.
const asiolink::IOAddress & getIPv4Reservation() const
Returns reserved IPv4 address.
const std::vector< uint8_t > & getIdentifier() const
Returns the identifier in a binary form.
HostID getHostId() const
Returns Host ID (primary key in MySQL and PostgreSQL backends)
IPv6 reservation for a host.
HostContainer6::nth_index< 4 >::type HostContainer6Index4
Fifth index type in the HostContainer6.
HostContainer::nth_index< 4 >::type HostContainerIndex4
Fifth index type in the HostContainer.
std::pair< HostContainerIndex1::iterator, HostContainerIndex1::iterator > HostContainerIndex1Range
Results range returned using the HostContainerIndex1.
boost::multi_index_container< HostPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::composite_key< Host, boost::multi_index::const_mem_fun< Host, const std::vector< uint8_t > &, &Host::getIdentifier >, boost::multi_index::const_mem_fun< Host, Host::IdentifierType, &Host::getIdentifierType > > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< Host, const asiolink::IOAddress &, &Host::getIPv4Reservation > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< Host, SubnetID, &Host::getIPv4SubnetID > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< Host, SubnetID, &Host::getIPv6SubnetID > >, boost::multi_index::ordered_unique< boost::multi_index::const_mem_fun< Host, uint64_t, &Host::getHostId > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< Host, std::string, &Host::getLowerHostname > > > > HostContainer
Multi-index container holding host reservations.
std::pair< HostContainer6Index1::iterator, HostContainer6Index1::iterator > HostContainer6Index1Range
Results range returned using the HostContainer6Index1.
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
HostContainer6::nth_index< 3 >::type HostContainer6Index3
Fourth index type in the HostContainer6.
std::pair< HostContainerIndex0::iterator, HostContainerIndex0::iterator > HostContainerIndex0Range
Results range returned using the HostContainerIndex0.
HostContainer6::nth_index< 0 >::type HostContainer6Index0
First index type in the HostContainer6.
std::pair< HostContainer6Index4::iterator, HostContainer6Index4::iterator > HostContainer6Index4Range
Results range returned using the HostContainer6Index4.
boost::multi_index_container< HostResrv6Tuple, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< HostResrv6Tuple, const asiolink::IOAddress &, &HostResrv6Tuple::getPrefix > >, boost::multi_index::ordered_non_unique< boost::multi_index::composite_key< HostResrv6Tuple, boost::multi_index::member< HostResrv6Tuple, const SubnetID, &HostResrv6Tuple::subnet_id_ >, boost::multi_index::const_mem_fun< HostResrv6Tuple, const asiolink::IOAddress &, &HostResrv6Tuple::getPrefix > > >, boost::multi_index::ordered_non_unique< boost::multi_index::member< HostResrv6Tuple, const SubnetID, &HostResrv6Tuple::subnet_id_ > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< HostResrv6Tuple, uint64_t, &HostResrv6Tuple::getHostId > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< HostResrv6Tuple, const asiolink::IOAddress &, &HostResrv6Tuple::getPrefix > > > > HostContainer6
Multi-index container holding IPv6 reservations.
HostContainer6::nth_index< 1 >::type HostContainer6Index1
Second index type in the HostContainer6.
std::pair< HostContainerIndex2::iterator, HostContainerIndex2::iterator > HostContainerIndex2Range
Results range returned using the HostContainerIndex2.
HostContainer::nth_index< 1 >::type HostContainerIndex1
Second index type in the HostContainer.
HostContainer6::nth_index< 2 >::type HostContainer6Index2
Third index type in the HostContainer6.
HostContainer::nth_index< 3 >::type HostContainerIndex3
Forth index type in the HostContainer.
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
std::pair< HostContainerIndex3::iterator, HostContainerIndex3::iterator > HostContainerIndex3Range
Results range returned using the HostContainerIndex3.
uint64_t HostID
HostID (used only when storing in MySQL or PostgreSQL backends)
std::pair< HostContainerIndex4::iterator, HostContainerIndex4::iterator > HostContainerIndex4Range
Results range returned using the HostContainerIndex4.
std::pair< HostContainer6Index0::iterator, HostContainer6Index0::iterator > HostContainer6Index0Range
Results range returned using the HostContainer6Index0.
HostContainer::nth_index< 0 >::type HostContainerIndex0
First index type in the HostContainer.
std::pair< HostContainer6Index3::iterator, HostContainer6Index3::iterator > HostContainer6Index3Range
Results range returned using the HostContainer6Index3.
HostContainer::nth_index< 5 >::type HostContainerIndex5
Sixth index type in the HostContainer.
HostContainer::nth_index< 2 >::type HostContainerIndex2
Third index type in the HostContainer.
std::pair< HostContainer6Index2::iterator, HostContainer6Index2::iterator > HostContainer6Index2Range
Results range returned using the HostContainer6Index2.
Defines the logger used by the top-level component of kea-lfc.
const IPv6Resrv resrv_
Address or prefix reservation.
const asiolink::IOAddress & getPrefix() const
Key extractor used in the second composite key.
HostID getHostId() const
Key extractor used in the fourth composite key.
HostResrv6Tuple(const IPv6Resrv &resrv, const HostPtr &host)
Default constructor.
HostPtr host_
Pointer to the host object.
const SubnetID subnet_id_
Value of the IPv6 Subnet-id.