18#include <boost/scoped_ptr.hpp> 
   19#include <boost/shared_ptr.hpp> 
   82           const uint8_t* identifier_begin,
 
   83           const size_t identifier_len) 
const;
 
  158             size_t& source_index,
 
  159             uint64_t lower_host_id,
 
  176             size_t& source_index,
 
  177             uint64_t lower_host_id,
 
  193             uint64_t lower_host_id,
 
  209             uint64_t lower_host_id,
 
  237         const uint8_t* identifier_begin,
 
  238         const size_t identifier_len) 
const;
 
  284         const uint8_t* identifier_begin,
 
  285         const size_t identifier_len) 
const;
 
  363                      const uint8_t* identifier_begin,
 
  364                      const size_t identifier_len);
 
  378                      const uint8_t* identifier_begin,
 
  379                      const size_t identifier_len);
 
  446    virtual void flush(
size_t count);
 
  451    virtual size_t size() 
const;
 
  474        const uint8_t* identifier_begin,
 
  475        const size_t identifier_len) 
const;
 
  674    boost::shared_ptr<HostCacheImpl> 
impl_;
 
 
The IOAddress class represents an IP addresses (version agnostic)
Base class that command handler implementers may use for common tasks.
Abstract interface extending base simple data source for host reservations to host cache.
Wraps value holding size of the page with host reservations.
IdentifierType
Type of the host identifier.
Per-packet callout handle.
Host Cache hooks library implementation.
virtual size_t size() const
Return the number of entries.
virtual void configure(const data::ConstElementPtr &config)
Parses configuration.
virtual bool setIPReservationsUnique(const bool unique)
Controls whether IP reservations are unique or non-unique.
boost::shared_ptr< HostCacheImpl > impl_
Implementation.
virtual size_t getMaximum() const
Get maximum number of cached hosts.
virtual void flush(size_t count)
Flush entries.
int cacheLoadHandler(hooks::CalloutHandle &handle)
cache-load command handler.
virtual dhcp::ConstHostCollection getAll(const dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
BaseHostDataSource methods.
virtual bool del6(const dhcp::SubnetID &subnet_id, const dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)
Attempts to delete a host by (subnet-id6, identifier, identifier-type)
virtual bool del4(const dhcp::SubnetID &subnet_id, const dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)
Attempts to delete a host by (subnet-id4, identifier, identifier-type)
virtual dhcp::ConstHostCollection getAllbyHostname4(const std::string &hostname, const dhcp::SubnetID &subnet_id) const
Return all hosts with a hostname in a DHCPv4 subnet.
virtual ~HostCache()
Destructor.
void update(isc::dhcp::HostPtr const &host)
Implements isc::dhcp::BaseHostDataSource::update() for HostCache.
virtual dhcp::ConstHostPtr get6(const dhcp::SubnetID &subnet_id, const dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
Returns a host connected to the IPv6 subnet.
int cacheRemoveHandler(hooks::CalloutHandle &handle)
cache-remove command handler.
virtual size_t capacity() const
Return the maximum number of entries.
virtual void setMaximum(size_t maximum)
Set maximum number of cached hosts (0 means unbound).
virtual void add(const dhcp::HostPtr &host)
Adds a new host to the collection.
int cacheInsertHandler(hooks::CalloutHandle &handle)
cache-insert command handler.
boost::scoped_ptr< std::mutex > mutex_
mutex
virtual bool del(const dhcp::SubnetID &subnet_id, const asiolink::IOAddress &addr)
Attempts to delete a host by (subnet-id, address)
virtual size_t insert(const dhcp::ConstHostPtr &host, bool overwrite)
Insert a host into the cache.
int cacheGetByIdHandler(hooks::CalloutHandle &handle)
cache-get-by-id command handler.
int cacheWriteHandler(hooks::CalloutHandle &handle)
cache-write command handler.
virtual dhcp::ConstHostCollection getPage4(const dhcp::SubnetID &subnet_id, size_t &source_index, uint64_t lower_host_id, const dhcp::HostPageSize &page_size) const
Return range of hosts in a DHCPv4 subnet.
virtual dhcp::ConstHostCollection getAll6(const dhcp::SubnetID &subnet_id) const
Return all hosts in a DHCPv6 subnet.
virtual dhcp::ConstHostCollection getAll4(const dhcp::SubnetID &subnet_id) const
Return all hosts in a DHCPv4 subnet.
int cacheFlushHandler(hooks::CalloutHandle &handle)
cache-flush command handler.
virtual dhcp::ConstHostCollection getAllbyHostname6(const std::string &hostname, const dhcp::SubnetID &subnet_id) const
Return all hosts with a hostname in a DHCPv6 subnet.
virtual dhcp::ConstHostCollection getAllbyHostname(const std::string &hostname) const
Return all hosts with a hostname.
virtual std::string getType() const
Return backend type.
virtual dhcp::ConstHostCollection get(const dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
Return all hosts connected to any subnet for which reservations have been made using a specified iden...
int cacheSizeHandler(hooks::CalloutHandle &handle)
Command handlers.
virtual bool remove(const dhcp::HostPtr &host)
Remove a host from the cache.
virtual data::ElementPtr toElement() const
Returns the whole content of the cache as Element tree.
virtual dhcp::ConstHostCollection getPage6(const dhcp::SubnetID &subnet_id, size_t &source_index, uint64_t lower_host_id, const dhcp::HostPageSize &page_size) const
Return range of hosts in a DHCPv6 subnet.
virtual dhcp::ConstHostPtr get4(const dhcp::SubnetID &subnet_id, const dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
Returns a host connected to the IPv4 subnet.
int cacheGetHandler(hooks::CalloutHandle &handle)
cache-get command handler.
int cacheClearHandler(hooks::CalloutHandle &handle)
cache-clear command handler.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
std::vector< ConstHostPtr > ConstHostCollection
Collection of the const Host objects.
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
boost::shared_ptr< const Host > ConstHostPtr
Const pointer to the Host object.
boost::shared_ptr< HostCache > HostCachePtr
Pointer to the Host Cache hooks library implementation.
ElementPtr toElement(const ConstHostPtr &host)
Unparse a host cache entry.
Defines the logger used by the top-level component of kea-lfc.