![]() |
Kea 3.1.1
|
Classes | |
class | HCConfigParser |
Configuration parser for Host Cache. More... | |
class | HCEntryListParser |
Host cache content parser. More... | |
class | HCEntryParser |
Host cache entry parser. More... | |
struct | HostAddress4IndexTag |
Tag for the index for searching by reserved IPv4 address. More... | |
class | HostCache |
Host Cache implementation. More... | |
class | HostCacheImpl |
Host Cache hooks library implementation. More... | |
struct | HostHashedIndexTag |
Tag for the hashed index. More... | |
struct | HostIdentifierIndexTag |
Tag for the index for searching by identifier. More... | |
struct | HostResrv6Tuple |
Defines one entry for the Host Container for v6 hosts. More... | |
struct | HostSequencedIndexTag |
Tag for the sequenced index. More... | |
struct | Resv6AddressIndexTag |
Tag for the index for searching by address. More... | |
struct | Resv6SubnetAddressIndexTag |
Tag for the index for searching by subnet and address. More... | |
Typedefs | |
typedef boost::shared_ptr< HostCache > | HostCachePtr |
Pointer to the Host Cache hooks library implementation. | |
typedef boost::multi_index_container< dhcp::HostPtr, boost::multi_index::indexed_by< boost::multi_index::sequenced< boost::multi_index::tag< HostSequencedIndexTag > >, boost::multi_index::hashed_unique< boost::multi_index::tag< HostHashedIndexTag >, boost::multi_index::identity< dhcp::HostPtr > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< HostIdentifierIndexTag >, boost::multi_index::composite_key< dhcp::Host, boost::multi_index::const_mem_fun< dhcp::Host, const std::vector< uint8_t > &, &dhcp::Host::getIdentifier >, boost::multi_index::const_mem_fun< dhcp::Host, dhcp::Host::IdentifierType, &dhcp::Host::getIdentifierType > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< HostAddress4IndexTag >, boost::multi_index::const_mem_fun< dhcp::Host, const asiolink::IOAddress &, &dhcp::Host::getIPv4Reservation > > > > | HostContainer |
Multi-index container holding host cache entries. | |
typedef HostContainer::index< HostAddress4IndexTag >::type | HostContainerAddress4Index |
Reserved Ipv4 address index type in the HostContainer . | |
typedef std::pair< HostContainerAddress4Index::iterator, HostContainerAddress4Index::iterator > | HostContainerAddress4IndexRange |
Results range returned using the HostContainerAddress4Index . | |
typedef HostContainer::index< HostHashedIndexTag >::type | HostContainerHashedIndex |
Hashed index type in the HostContainer . | |
typedef HostContainer::index< HostIdentifierIndexTag >::type | HostContainerIdentifierIndex |
Identifier index type in the HostContainer . | |
typedef std::pair< HostContainerIdentifierIndex::iterator, HostContainerIdentifierIndex::iterator > | HostContainerIdentifierIndexRange |
Results range returned using the HostContainerIdentifierIndex . | |
typedef HostContainer::index< HostSequencedIndexTag >::type | HostContainerSequencedIndex |
Sequenced index type in the HostContainer . | |
typedef boost::multi_index_container< HostResrv6Tuple, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::tag< Resv6AddressIndexTag >, boost::multi_index::const_mem_fun< HostResrv6Tuple, const asiolink::IOAddress &, &HostResrv6Tuple::getKey > >, boost::multi_index::ordered_unique< boost::multi_index::tag< Resv6SubnetAddressIndexTag >, boost::multi_index::composite_key< HostResrv6Tuple, boost::multi_index::member< HostResrv6Tuple, const dhcp::SubnetID, &HostResrv6Tuple::subnet_id_ >, boost::multi_index::const_mem_fun< HostResrv6Tuple, const asiolink::IOAddress &, &HostResrv6Tuple::getKey > > > > > | Resv6Container |
Multi-index container holding IPv6 reservations. | |
typedef Resv6Container::index< Resv6AddressIndexTag >::type | Resv6ContainerAddressIndex |
First index type in the Resv6Container . | |
typedef std::pair< Resv6ContainerAddressIndex::iterator, Resv6ContainerAddressIndex::iterator > | Resv6ContainerAddressIndexRange |
Results range returned using the Resv6ContainerAddressIndex . | |
typedef Resv6Container::index< Resv6SubnetAddressIndexTag >::type | Resv6ContainerSubnetAddressIndex |
Second index type in the Resv6Container . | |
typedef std::pair< Resv6ContainerSubnetAddressIndex::iterator, Resv6ContainerSubnetAddressIndex::iterator > | Resv6ContainerSubnetAddressIndexRange |
Results range returned using the Resv6ContainerSubnetAddressIndex . | |
Functions | |
HostDataSourcePtr | factory (const DatabaseConnection::ParameterMap &) |
Host Cache factory. | |
ElementPtr | toElement (const dhcp::ConstHostPtr &host) |
Unparse a host cache entry. | |
typedef boost::shared_ptr<HostCache> isc::host_cache::HostCachePtr |
Pointer to the Host Cache hooks library implementation.
Definition at line 681 of file host_cache.h.
typedef boost::multi_index_container< dhcp::HostPtr, boost::multi_index::indexed_by< boost::multi_index::sequenced< boost::multi_index::tag<HostSequencedIndexTag> >, boost::multi_index::hashed_unique< boost::multi_index::tag<HostHashedIndexTag>, boost::multi_index::identity<dhcp::HostPtr> >, boost::multi_index::ordered_non_unique< boost::multi_index::tag<HostIdentifierIndexTag>, boost::multi_index::composite_key< dhcp::Host, boost::multi_index::const_mem_fun< dhcp::Host, const std::vector<uint8_t>&, &dhcp::Host::getIdentifier >, boost::multi_index::const_mem_fun< dhcp::Host, dhcp::Host::IdentifierType, &dhcp::Host::getIdentifierType > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag<HostAddress4IndexTag>, boost::multi_index::const_mem_fun<dhcp::Host, const asiolink::IOAddress&, &dhcp::Host::getIPv4Reservation> > >> isc::host_cache::HostContainer |
Multi-index container holding host cache entries.
From host_container with least-recently-used support. This container is similar to isc::dhcp::HostContainer, but there are two significant differences: this one manages the order of the entries, so it's possible to find the oldest ones and it's possible to find a host from IPv6 reservation. We could implement those changes in isc::dhcp::HostContainer, but then the code would be slower. Here's a specialized clone of that container here.
Definition at line 96 of file container.h.
typedef HostContainer::index<HostAddress4IndexTag>::type isc::host_cache::HostContainerAddress4Index |
Reserved Ipv4 address index type in the HostContainer
.
This index allows for searching for Host
objects using a reserved IPv4 address.
Definition at line 122 of file container.h.
typedef std::pair<HostContainerAddress4Index::iterator, HostContainerAddress4Index::iterator> isc::host_cache::HostContainerAddress4IndexRange |
Results range returned using the HostContainerAddress4Index
.
Definition at line 126 of file container.h.
typedef HostContainer::index<HostHashedIndexTag>::type isc::host_cache::HostContainerHashedIndex |
Hashed index type in the HostContainer
.
This index allows for searching for Host
objects by itself.
Definition at line 106 of file container.h.
typedef HostContainer::index<HostIdentifierIndexTag>::type isc::host_cache::HostContainerIdentifierIndex |
Identifier index type in the HostContainer
.
This index allows for searching for Host
objects using an identifier + identifier type tuple.
Definition at line 112 of file container.h.
typedef std::pair<HostContainerIdentifierIndex::iterator, HostContainerIdentifierIndex::iterator> isc::host_cache::HostContainerIdentifierIndexRange |
Results range returned using the HostContainerIdentifierIndex
.
Definition at line 116 of file container.h.
typedef HostContainer::index<HostSequencedIndexTag>::type isc::host_cache::HostContainerSequencedIndex |
Sequenced index type in the HostContainer
.
This index allows for searching for Host
objects in sequence.
Definition at line 101 of file container.h.
typedef boost::multi_index_container< HostResrv6Tuple, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::tag<Resv6AddressIndexTag>, boost::multi_index::const_mem_fun< HostResrv6Tuple, const asiolink::IOAddress&, &HostResrv6Tuple::getKey> >, boost::multi_index::ordered_unique< boost::multi_index::tag<Resv6SubnetAddressIndexTag>, boost::multi_index::composite_key< HostResrv6Tuple, boost::multi_index::member<HostResrv6Tuple, const dhcp::SubnetID, &HostResrv6Tuple::subnet_id_>, boost::multi_index::const_mem_fun< HostResrv6Tuple, const asiolink::IOAddress&, &HostResrv6Tuple::getKey > > > >> isc::host_cache::Resv6Container |
Multi-index container holding IPv6 reservations.
This container holds HostResrv6Tuples, i.e. pairs of (IPv6Resrv, HostPtr) pieces of information. This is needed for efficiently finding a host for a given IPv6 address or prefix.
Definition at line 215 of file container.h.
typedef Resv6Container::index<Resv6AddressIndexTag>::type isc::host_cache::Resv6ContainerAddressIndex |
First index type in the Resv6Container
.
This index allows for searching for Host
objects using an address.
Definition at line 222 of file container.h.
typedef std::pair<Resv6ContainerAddressIndex::iterator, Resv6ContainerAddressIndex::iterator> isc::host_cache::Resv6ContainerAddressIndexRange |
Results range returned using the Resv6ContainerAddressIndex
.
Definition at line 226 of file container.h.
typedef Resv6Container::index<Resv6SubnetAddressIndexTag>::type isc::host_cache::Resv6ContainerSubnetAddressIndex |
Second index type in the Resv6Container
.
This index allows for searching for Host
objects using a reserved (SubnetID, IPv6 address) tuple.
Definition at line 233 of file container.h.
typedef std::pair<Resv6ContainerSubnetAddressIndex::iterator, Resv6ContainerSubnetAddressIndex::iterator> isc::host_cache::Resv6ContainerSubnetAddressIndexRange |
Results range returned using the Resv6ContainerSubnetAddressIndex
.
Definition at line 237 of file container.h.
HostDataSourcePtr isc::host_cache::factory | ( | const DatabaseConnection::ParameterMap & | ) |
Host Cache factory.
Definition at line 34 of file host_cache_callout.cc.
References hcptr.
Referenced by load().
data::ElementPtr isc::host_cache::toElement | ( | const ConstHostPtr & | host | ) |
Unparse a host cache entry.
Extension of host toElement method.
host | host cache entry |
Definition at line 25 of file entry.cc.
References Element::create(), Element::createList(), Element::createMap(), isc::util::encode::encodeHex(), isc::dhcp::Host::IDENT_CIRCUIT_ID, isc::dhcp::Host::IDENT_CLIENT_ID, isc::dhcp::Host::IDENT_DUID, isc::dhcp::Host::IDENT_FLEX, isc::dhcp::Host::IDENT_HWADDR, isc_throw, isc::asiolink::IOAddress::isV4Zero(), isc::asiolink::IOAddress::toText(), isc::dhcp::IPv6Resrv::TYPE_NA, and isc::dhcp::IPv6Resrv::TYPE_PD.
Referenced by isc::host_cache::HostCache::cacheGetByIdHandler(), and isc::host_cache::HostCacheImpl::toElement().
HostCachePtr isc::host_cache::hcptr |
Pointer to the Host Cache instance.
Definition at line 30 of file host_cache_callout.cc.
Referenced by cache_clear(), cache_flush(), cache_get(), cache_get_by_id(), cache_insert(), cache_load(), cache_remove(), cache_size(), cache_write(), factory(), load(), and unload().
|
extern |
Definition at line 11 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::add().
|
extern |
Definition at line 12 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::add().
|
extern |
Definition at line 13 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheClearHandler().
|
extern |
Definition at line 14 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheClearHandler().
|
extern |
Definition at line 15 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheFlushHandler().
|
extern |
Definition at line 16 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheFlushHandler().
|
extern |
Definition at line 17 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheGetHandler().
|
extern |
Definition at line 18 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheGetByIdHandler().
|
extern |
Definition at line 19 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheGetByIdHandler().
|
extern |
Definition at line 20 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheGetHandler().
|
extern |
Definition at line 21 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheInsertHandler().
|
extern |
Definition at line 22 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheInsertHandler().
|
extern |
Definition at line 23 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheLoadHandler().
|
extern |
Definition at line 24 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheLoadHandler().
|
extern |
Definition at line 25 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheRemoveHandler().
|
extern |
Definition at line 26 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheRemoveHandler().
|
extern |
Definition at line 27 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheSizeHandler().
|
extern |
Definition at line 28 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheSizeHandler().
|
extern |
Definition at line 29 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheWriteHandler().
|
extern |
Definition at line 30 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheWriteHandler().
|
extern |
Definition at line 31 of file host_cache_messages.h.
Referenced by load().
const int isc::host_cache::HOST_CACHE_DBG_RESULTS = isc::log::DBGLVL_TRACE_BASIC_DATA |
Records the results of the lookups.
Using the example of tracing queries from the backend database, this will just record the summary results.
Definition at line 33 of file host_cache_log.h.
Referenced by isc::host_cache::HostCache::add(), isc::host_cache::HostCache::del(), isc::host_cache::HostCache::del4(), isc::host_cache::HostCache::del6(), isc::host_cache::HostCache::get4(), isc::host_cache::HostCache::get4(), isc::host_cache::HostCache::get6(), isc::host_cache::HostCache::get6(), and isc::host_cache::HostCache::get6().
const int isc::host_cache::HOST_CACHE_DBG_TRACE = isc::log::DBGLVL_TRACE_BASIC |
Host Cache hooks library logging levels.
Defines the levels used to output debug messages in the Host Cache hooks library. Note that higher numbers equate to more verbose (and detailed) output.
Traces normal operations
E.g. sending a query to the database etc.
Definition at line 27 of file host_cache_log.h.
Referenced by isc::host_cache::HostCache::get4(), isc::host_cache::HostCache::get4(), isc::host_cache::HostCache::get6(), isc::host_cache::HostCache::get6(), and isc::host_cache::HostCache::get6().
|
extern |
Definition at line 32 of file host_cache_messages.h.
Referenced by unload().
|
extern |
Definition at line 33 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::del().
|
extern |
Definition at line 34 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::del().
|
extern |
Definition at line 35 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::del4().
|
extern |
Definition at line 36 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::del6().
|
extern |
Definition at line 37 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::get6().
|
extern |
Definition at line 38 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::get6().
|
extern |
Definition at line 39 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::get4().
|
extern |
Definition at line 40 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::get4().
|
extern |
Definition at line 41 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::get6().
|
extern |
Definition at line 42 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::get6().
|
extern |
Definition at line 43 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::get4(), and isc::host_cache::HostCache::get6().
|
extern |
Definition at line 44 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::get4(), and isc::host_cache::HostCache::get6().
|
extern |
Definition at line 45 of file host_cache_messages.h.
Referenced by load().
isc::log::Logger isc::host_cache::host_cache_logger | ( | "host-cache-hooks" | ) |
Host Cache Logger.
Define the logger used to log messages. We could define it in multiple modules, but defining in a single module and linking to it saves time and space.
Definition at line 43 of file host_cache_log.h.
Referenced by isc::host_cache::HostCache::add(), isc::host_cache::HostCache::cacheClearHandler(), isc::host_cache::HostCache::cacheFlushHandler(), isc::host_cache::HostCache::cacheGetByIdHandler(), isc::host_cache::HostCache::cacheGetHandler(), isc::host_cache::HostCache::cacheInsertHandler(), isc::host_cache::HostCache::cacheLoadHandler(), isc::host_cache::HostCache::cacheRemoveHandler(), isc::host_cache::HostCache::cacheSizeHandler(), isc::host_cache::HostCache::cacheWriteHandler(), isc::host_cache::HostCache::del(), isc::host_cache::HostCache::del4(), isc::host_cache::HostCache::del6(), isc::host_cache::HostCache::get4(), isc::host_cache::HostCache::get4(), isc::host_cache::HostCache::get6(), isc::host_cache::HostCache::get6(), isc::host_cache::HostCache::get6(), load(), and unload().
|
extern |
Definition at line 46 of file host_cache_messages.h.
Referenced by isc::host_cache::HostCache::cacheWriteHandler().