Kea: writable_host_data_source.h Source File

| Kea 3.2.0-git

writable_host_data_source.h
Go to the documentation of this file.
1// Copyright (C) 2014-2020 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef WRITABLE_HOST_DATA_SOURCE_H
8#define WRITABLE_HOST_DATA_SOURCE_H
9
10namespace isc {
11namespace dhcp {
12
21 class WritableHostDataSource {
22public:
23
25 virtual ~WritableHostDataSource() { }
26
39 virtual HostCollection
40 getAll(const Host::IdentifierType& identifier_type,
41 const uint8_t* identifier_begin,
42 const size_t identifier_len) = 0;
43
49 virtual HostCollection
50 getAll4(const SubnetID& subnet_id) = 0;
51
57 virtual HostCollection
58 getAll6(const SubnetID& subnet_id) = 0;
59
68 virtual HostCollection
69 getAllbyHostname(const std::string& hostname) = 0;
70
80 virtual HostCollection
81 getAllbyHostname4(const std::string& hostname, const SubnetID& subnet_id) = 0;
82
92 virtual HostCollection
93 getAllbyHostname6(const std::string& hostname, const SubnetID& subnet_id) = 0;
94
112 virtual HostCollection
113 getPage4(const SubnetID& subnet_id,
114 size_t& source_index,
115 uint64_t lower_host_id,
116 const HostPageSize& page_size) = 0;
117
135 virtual HostCollection
136 getPage6(const SubnetID& subnet_id,
137 size_t& source_index,
138 uint64_t lower_host_id,
139 const HostPageSize& page_size) = 0;
140
157 virtual HostCollection
158 getPage4(size_t& source_index,
159 uint64_t lower_host_id,
160 const HostPageSize& page_size) = 0;
161
178 virtual HostCollection
179 getPage6(size_t& source_index,
180 uint64_t lower_host_id,
181 const HostPageSize& page_size) = 0;
182
191 virtual HostCollection
192 getAll4(const asiolink::IOAddress& address) = 0;
193
204 virtual HostPtr
205 get4(const SubnetID& subnet_id, const Host::IdentifierType& identifier_type,
206 const uint8_t* identifier_begin, const size_t identifier_len) = 0;
207
218 virtual HostPtr
219 get6(const SubnetID& subnet_id, const Host::IdentifierType& identifier_type,
220 const uint8_t* identifier_begin, const size_t identifier_len) = 0;
221
228 virtual HostPtr
229 get6(const asiolink::IOAddress& prefix, const uint8_t prefix_len) = 0;
230
238 virtual HostPtr
239 get6(const SubnetID& subnet_id, const asiolink::IOAddress& address) = 0;
240};
241
242}
243}
244
245#endif // WRITABLE_HOST_DATA_SOURCE_H
isc::asiolink::IOAddress
The IOAddress class represents an IP addresses (version agnostic).
Definition io_address.h:53
isc::dhcp::HostPageSize
Wraps value holding size of the page with host reservations.
Definition base_host_data_source.h:53
isc::dhcp::Host::IdentifierType
IdentifierType
Type of the host identifier.
Definition host.h:337
isc::dhcp::WritableHostDataSource
Interface for retrieving writable host reservations.
Definition writable_host_data_source.h:21
isc::dhcp::WritableHostDataSource::getPage4
virtual HostCollection getPage4(size_t &source_index, uint64_t lower_host_id, const HostPageSize &page_size)=0
Returns range of hosts.
isc::dhcp::WritableHostDataSource::getPage4
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.
isc::dhcp::WritableHostDataSource::getAll
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.
isc::dhcp::WritableHostDataSource::~WritableHostDataSource
virtual ~WritableHostDataSource()
Default destructor implementation.
Definition writable_host_data_source.h:25
isc::dhcp::WritableHostDataSource::get6
virtual HostPtr get6(const asiolink::IOAddress &prefix, const uint8_t prefix_len)=0
Returns a host using the specified IPv6 prefix.
isc::dhcp::WritableHostDataSource::getPage6
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.
isc::dhcp::WritableHostDataSource::getAllbyHostname4
virtual HostCollection getAllbyHostname4(const std::string &hostname, const SubnetID &subnet_id)=0
Return all hosts with a hostname in a DHCPv4 subnet.
isc::dhcp::WritableHostDataSource::getAll4
virtual HostCollection getAll4(const asiolink::IOAddress &address)=0
Returns a collection of hosts using the specified IPv4 address.
isc::dhcp::WritableHostDataSource::getPage6
virtual HostCollection getPage6(size_t &source_index, uint64_t lower_host_id, const HostPageSize &page_size)=0
Returns range of hosts.
isc::dhcp::WritableHostDataSource::getAll6
virtual HostCollection getAll6(const SubnetID &subnet_id)=0
Returns a collection of hosts in the specified DHCPv6 subnet.
isc::dhcp::WritableHostDataSource::get6
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.
isc::dhcp::WritableHostDataSource::get4
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.
isc::dhcp::WritableHostDataSource::getAllbyHostname
virtual HostCollection getAllbyHostname(const std::string &hostname)=0
Return all hosts with a hostname.
isc::dhcp::WritableHostDataSource::getAllbyHostname6
virtual HostCollection getAllbyHostname6(const std::string &hostname, const SubnetID &subnet_id)=0
Return all hosts with a hostname in a DHCPv6 subnet.
isc::dhcp::WritableHostDataSource::getAll4
virtual HostCollection getAll4(const SubnetID &subnet_id)=0
Returns a collection of hosts in the specified DHCPv4 subnet.
isc::dhcp::WritableHostDataSource::get6
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 ...
isc::dhcp
Definition dhcp4/client_handler.cc:20
isc::dhcp::HostPtr
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
Definition host.h:837
isc::dhcp::HostCollection
std::vector< HostPtr > HostCollection
Collection of the Host objects.
Definition host.h:846
isc::dhcp::SubnetID
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition subnet_id.h:25
isc
Defines the logger used by the top-level component of kea-lfc.
Definition check_exists_add.cc:18