Kea 2.5.8
isc::dhcp::WritableHostDataSource Class Referenceabstract

Interface for retrieving writable host reservations. More...

#include <writable_host_data_source.h>

+ Inheritance diagram for isc::dhcp::WritableHostDataSource:

Public Member Functions

virtual ~WritableHostDataSource ()
 Default destructor implementation.
 
virtual HostPtr get4 (const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)=0
 Returns a host connected to the IPv4 subnet.
 
virtual HostPtr get6 (const asiolink::IOAddress &prefix, const uint8_t prefix_len)=0
 Returns a host using the specified IPv6 prefix.
 
virtual HostPtr get6 (const SubnetID &subnet_id, const asiolink::IOAddress &address)=0
 Returns a host connected to the IPv6 subnet and having a reservation for a specified IPv6 address or prefix.
 
virtual HostPtr get6 (const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)=0
 Returns a host connected to the IPv6 subnet.
 
virtual HostCollection getAll (const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)=0
 Non-const version of the getAll const method.
 
virtual HostCollection getAll4 (const asiolink::IOAddress &address)=0
 Returns a collection of hosts using the specified IPv4 address.
 
virtual HostCollection getAll4 (const SubnetID &subnet_id)=0
 Returns a collection of hosts in the specified DHCPv4 subnet.
 
virtual HostCollection getAll6 (const SubnetID &subnet_id)=0
 Returns a collection of hosts in the specified DHCPv6 subnet.
 
virtual HostCollection getAllbyHostname (const std::string &hostname)=0
 Return all hosts with a hostname.
 
virtual HostCollection getAllbyHostname4 (const std::string &hostname, const SubnetID &subnet_id)=0
 Return all hosts with a hostname in a DHCPv4 subnet.
 
virtual HostCollection getAllbyHostname6 (const std::string &hostname, const SubnetID &subnet_id)=0
 Return all hosts with a hostname in a DHCPv6 subnet.
 
virtual HostCollection getPage4 (const SubnetID &subnet_id, size_t &source_index, uint64_t lower_host_id, const HostPageSize &page_size)=0
 Returns range of hosts in a DHCPv4 subnet.
 
virtual HostCollection getPage4 (size_t &source_index, uint64_t lower_host_id, const HostPageSize &page_size)=0
 Returns range of hosts.
 
virtual HostCollection getPage6 (const SubnetID &subnet_id, size_t &source_index, uint64_t lower_host_id, const HostPageSize &page_size)=0
 Returns range of hosts in a DHCPv6 subnet.
 
virtual HostCollection getPage6 (size_t &source_index, uint64_t lower_host_id, const HostPageSize &page_size)=0
 Returns range of hosts.
 

Detailed Description

Interface for retrieving writable host reservations.

This interface specifies the methods which return pointers to the Host objects, which can be modified. Deriving from this interface is needed if the class implementation must return the pointers to the objects which may be modified by the caller. Such classes usually also derive from the BaseHostDataSource to implement methods which return the const objects.

Definition at line 21 of file writable_host_data_source.h.

Constructor & Destructor Documentation

◆ ~WritableHostDataSource()

virtual isc::dhcp::WritableHostDataSource::~WritableHostDataSource ( )
inlinevirtual

Default destructor implementation.

Definition at line 25 of file writable_host_data_source.h.

Member Function Documentation

◆ get4()

virtual HostPtr isc::dhcp::WritableHostDataSource::get4 ( const SubnetID subnet_id,
const Host::IdentifierType identifier_type,
const uint8_t *  identifier_begin,
const size_t  identifier_len 
)
pure virtual

Returns a host connected to the IPv4 subnet.

Parameters
subnet_idSubnet identifier.
identifier_typeIdentifier type.
identifier_beginPointer to a beginning of a buffer containing an identifier.
identifier_lenIdentifier length.
Returns
Non-const Host object for which reservation has been made using the specified identifier.

Implemented in isc::dhcp::CfgHosts.

◆ get6() [1/3]

virtual HostPtr isc::dhcp::WritableHostDataSource::get6 ( const asiolink::IOAddress prefix,
const uint8_t  prefix_len 
)
pure virtual

Returns a host using the specified IPv6 prefix.

Parameters
prefixIPv6 prefix for which the Host object is searched.
prefix_lenIPv6 prefix length.
Returns
Non-const Host object using a specified IPv6 prefix.

Implemented in isc::dhcp::CfgHosts.

◆ get6() [2/3]

virtual HostPtr isc::dhcp::WritableHostDataSource::get6 ( const SubnetID subnet_id,
const asiolink::IOAddress address 
)
pure virtual

Returns a host connected to the IPv6 subnet and having a reservation for a specified IPv6 address or prefix.

Parameters
subnet_idSubnet identifier.
addressreserved IPv6 address/prefix.
Returns
Host object using a specified IPv6 address/prefix.

Implemented in isc::dhcp::CfgHosts.

◆ get6() [3/3]

virtual HostPtr isc::dhcp::WritableHostDataSource::get6 ( const SubnetID subnet_id,
const Host::IdentifierType identifier_type,
const uint8_t *  identifier_begin,
const size_t  identifier_len 
)
pure virtual

Returns a host connected to the IPv6 subnet.

Parameters
subnet_idSubnet identifier.
identifier_typeIdentifier type.
identifier_beginPointer to a beginning of a buffer containing an identifier.
identifier_lenIdentifier length.
Returns
Non-const Host object for which reservation has been made using the specified identifier.

Implemented in isc::dhcp::CfgHosts.

◆ getAll()

virtual HostCollection isc::dhcp::WritableHostDataSource::getAll ( const Host::IdentifierType identifier_type,
const uint8_t *  identifier_begin,
const size_t  identifier_len 
)
pure virtual

Non-const version of the getAll const method.

This method returns all Host objects which represent reservations for a specified identifier. This method may return multiple hosts because a particular client may have reservations in multiple subnets.

Parameters
identifier_typeIdentifier type.
identifier_beginPointer to a beginning of a buffer containing an identifier.
identifier_lenIdentifier length.
Returns
Collection of non-const Host objects.

Implemented in isc::dhcp::CfgHosts.

◆ getAll4() [1/2]

virtual HostCollection isc::dhcp::WritableHostDataSource::getAll4 ( const asiolink::IOAddress address)
pure virtual

Returns a collection of hosts using the specified IPv4 address.

This method may return multiple Host objects if they are connected to different subnets.

Parameters
addressIPv4 address for which the Host object is searched.
Returns
Collection of Host objects.

Implemented in isc::dhcp::CfgHosts.

◆ getAll4() [2/2]

virtual HostCollection isc::dhcp::WritableHostDataSource::getAll4 ( const SubnetID subnet_id)
pure virtual

Returns a collection of hosts in the specified DHCPv4 subnet.

Parameters
subnet_idSubnet identifier.
Returns
Collection of non-const Host objects.

Implemented in isc::dhcp::CfgHosts.

◆ getAll6()

virtual HostCollection isc::dhcp::WritableHostDataSource::getAll6 ( const SubnetID subnet_id)
pure virtual

Returns a collection of hosts in the specified DHCPv6 subnet.

Parameters
subnet_idSubnet identifier.
Returns
Collection of non-const Host objects.

Implemented in isc::dhcp::CfgHosts.

◆ getAllbyHostname()

virtual HostCollection isc::dhcp::WritableHostDataSource::getAllbyHostname ( const std::string &  hostname)
pure virtual

Return all hosts with a hostname.

This method returns all Host objects which represent reservations using a specified hostname.

Parameters
hostnameThe lower case hostname.
Returns
Collection of Host objects.

Implemented in isc::dhcp::CfgHosts.

◆ getAllbyHostname4()

virtual HostCollection isc::dhcp::WritableHostDataSource::getAllbyHostname4 ( const std::string &  hostname,
const SubnetID subnet_id 
)
pure virtual

Return all hosts with a hostname in a DHCPv4 subnet.

This method returns all Host objects which represent reservations using a specified hostname in a specified subnet.

Parameters
hostnameThe lower case hostname.
subnet_idSubnet identifier.
Returns
Collection of Host objects.

Implemented in isc::dhcp::CfgHosts.

◆ getAllbyHostname6()

virtual HostCollection isc::dhcp::WritableHostDataSource::getAllbyHostname6 ( const std::string &  hostname,
const SubnetID subnet_id 
)
pure virtual

Return all hosts with a hostname in a DHCPv6 subnet.

This method returns all Host objects which represent reservations using a specified hostname in a specified subnet.

Parameters
hostnameThe lower case hostname.
subnet_idSubnet identifier.
Returns
Collection of Host objects.

Implemented in isc::dhcp::CfgHosts.

◆ getPage4() [1/2]

virtual HostCollection isc::dhcp::WritableHostDataSource::getPage4 ( const SubnetID subnet_id,
size_t &  source_index,
uint64_t  lower_host_id,
const HostPageSize page_size 
)
pure virtual

Returns range of hosts in a DHCPv4 subnet.

This method implements paged browsing of host databases. The parameters specify a page size, an index in sources and the starting host id of the range. If not zero this host id is excluded from the returned range. When a source is exhausted the index is updated. There is no guarantee about the order of returned host reservations, only the sources and reservations from the same source are ordered.

Parameters
subnet_idSubnet identifier.
source_indexIndex of the source.
lower_host_idHost identifier used as lower bound for the returned range.
page_sizemaximum size of the page returned.
Returns
Collection of non-const Host objects.

Implemented in isc::dhcp::CfgHosts.

◆ getPage4() [2/2]

virtual HostCollection isc::dhcp::WritableHostDataSource::getPage4 ( size_t &  source_index,
uint64_t  lower_host_id,
const HostPageSize page_size 
)
pure virtual

Returns range of hosts.

This method implements paged browsing of host databases. The parameters specify a page size, an index in sources and the starting host id of the range. If not zero this host id is excluded from the returned range. When a source is exhausted the index is updated. There is no guarantee about the order of returned host reservations, only the sources and reservations from the same source are ordered.

Parameters
source_indexIndex of the source.
lower_host_idHost identifier used as lower bound for the returned range.
page_sizemaximum size of the page returned.
Returns
Collection of non-const Host objects.

Implemented in isc::dhcp::CfgHosts.

◆ getPage6() [1/2]

virtual HostCollection isc::dhcp::WritableHostDataSource::getPage6 ( const SubnetID subnet_id,
size_t &  source_index,
uint64_t  lower_host_id,
const HostPageSize page_size 
)
pure virtual

Returns range of hosts in a DHCPv6 subnet.

This method implements paged browsing of host databases. The parameters specify a page size, an index in sources and the starting host id of the range. If not zero this host id is excluded from the returned range. When a source is exhausted the index is updated. There is no guarantee about the order of returned host reservations, only the sources and reservations from the same source are ordered.

Parameters
subnet_idSubnet identifier.
source_indexIndex of the source.
lower_host_idHost identifier used as lower bound for the returned range.
page_sizemaximum size of the page returned.
Returns
Collection of non-const Host objects.

Implemented in isc::dhcp::CfgHosts.

◆ getPage6() [2/2]

virtual HostCollection isc::dhcp::WritableHostDataSource::getPage6 ( size_t &  source_index,
uint64_t  lower_host_id,
const HostPageSize page_size 
)
pure virtual

Returns range of hosts.

This method implements paged browsing of host databases. The parameters specify a page size, an index in sources and the starting host id of the range. If not zero this host id is excluded from the returned range. When a source is exhausted the index is updated. There is no guarantee about the order of returned host reservations, only the sources and reservations from the same source are ordered.

Parameters
source_indexIndex of the source.
lower_host_idHost identifier used as lower bound for the returned range.
page_sizemaximum size of the page returned.
Returns
Collection of non-const Host objects.

Implemented in isc::dhcp::CfgHosts.


The documentation for this class was generated from the following file: