17#include <boost/shared_ptr.hpp>
59 const uint8_t* identifier_begin,
const size_t identifier_len)
const;
75 const uint8_t* identifier_begin,
76 const size_t identifier_len);
134 const uint8_t* identifier_begin,
const size_t identifier_len)
const;
148 const uint8_t* identifier_begin,
const size_t identifier_len);
172 const uint8_t* identifier_begin,
const size_t identifier_len)
const;
186 const uint8_t* identifier_begin,
const size_t identifier_len);
264 const uint8_t* identifier_begin,
const size_t identifier_len);
286 const uint8_t* identifier_begin,
const size_t identifier_len);
294 return (std::string(
"configuration file"));
329 template<
typename Storage>
331 const uint8_t* identifier,
332 const size_t identifier_len,
333 Storage& storage)
const;
346 template<
typename Storage>
348 Storage& storage)
const;
361 template<
typename Storage>
363 Storage& storage)
const;
378 template<
typename Storage>
380 getAllInternal6(
const SubnetID& subnet_id,
382 Storage& storage)
const;
401 getHostInternal(
const SubnetID& subnet_id,
const bool subnet6,
403 const uint8_t* identifier,
404 const size_t identifier_len)
const;
419 template<
typename ReturnType,
typename Storage>
420 ReturnType getHostInternal6(
const SubnetID& subnet_id,
423 template<
typename ReturnType>
425 const uint8_t prefix_len)
const;
438 virtual void add4(
const HostPtr& host);
451 virtual void add6(
const HostPtr& host);
The IOAddress class represents an IP addresses (version agnostic)
Base interface for the classes implementing simple data source for host reservations.
Represents the host reservations specified in the configuration file.
virtual ~CfgHosts()
Destructor.
virtual size_t delAll4(const SubnetID &subnet_id)
Attempts to delete all hosts for a given IPv4 subnet.
virtual void add(const HostPtr &host)
Adds a new host to the collection.
virtual bool del4(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)
Attempts to delete a host by (subnet4-id, identifier, identifier-type)
virtual ConstHostCollection getAll6(const asiolink::IOAddress &address) const
Returns a collection of hosts using the specified IPv6 address.
virtual bool del(const SubnetID &subnet_id, const asiolink::IOAddress &addr)
Attempts to delete a host by address.
virtual ConstHostCollection getAll4(const asiolink::IOAddress &address) const
Returns a collection of hosts using the specified IPv4 address.
virtual size_t delAll6(const SubnetID &subnet_id)
Attempts to delete all hosts for a given IPv6 subnet.
virtual ConstHostPtr get6(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
Returns a host connected to the IPv6 subnet.
virtual bool del6(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)
Attempts to delete a host by (subnet6-id, identifier, identifier-type)
virtual ConstHostPtr get4(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
Returns a host connected to the IPv4 subnet.
virtual std::string getType() const
Return backend type.
isc::data::ElementPtr toElement() const
Unparse a configuration object.
virtual ConstHostCollection getAll(const 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...
IdentifierType
Type of the host identifier.
Interface for retrieving writable host reservations.
boost::shared_ptr< Element > ElementPtr
boost::shared_ptr< const CfgHosts > ConstCfgHostsPtr
Const pointer.
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
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 > > > > HostContainer
Multi-index container holding host reservations.
std::vector< ConstHostPtr > ConstHostCollection
Collection of the const Host objects.
std::vector< HostPtr > HostCollection
Collection of the Host objects.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
boost::shared_ptr< CfgHosts > CfgHostsPtr
Non-const pointer.
boost::shared_ptr< const Host > ConstHostPtr
Const pointer to the Host object.
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::getKey > >, boost::multi_index::ordered_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::getKey > > >, boost::multi_index::ordered_non_unique< boost::multi_index::member< HostResrv6Tuple, const SubnetID, &HostResrv6Tuple::subnet_id_ > > > > HostContainer6
Multi-index container holding IPv6 reservations.
Defines the logger used by the top-level component of kea-dhcp-ddns.
Abstract class for configuration Cfg_* classes.