Kea 2.7.6
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
22public:
23
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
Wraps value holding size of the page with host reservations.
IdentifierType
Type of the host identifier.
Definition host.h:337
Interface for retrieving writable host reservations.
virtual HostCollection getPage4(size_t &source_index, uint64_t lower_host_id, const HostPageSize &page_size)=0
Returns range of hosts.
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 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 ~WritableHostDataSource()
Default destructor implementation.
virtual HostPtr get6(const asiolink::IOAddress &prefix, const uint8_t prefix_len)=0
Returns a host using the specified IPv6 prefix.
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 getAllbyHostname4(const std::string &hostname, const SubnetID &subnet_id)=0
Return all hosts with a hostname in a DHCPv4 subnet.
virtual HostCollection getAll4(const asiolink::IOAddress &address)=0
Returns a collection of hosts using the specified IPv4 address.
virtual HostCollection getPage6(size_t &source_index, uint64_t lower_host_id, const HostPageSize &page_size)=0
Returns range of hosts.
virtual HostCollection getAll6(const SubnetID &subnet_id)=0
Returns a collection of hosts in the specified DHCPv6 subnet.
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 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 HostCollection getAllbyHostname(const std::string &hostname)=0
Return all hosts with a hostname.
virtual HostCollection getAllbyHostname6(const std::string &hostname, const SubnetID &subnet_id)=0
Return all hosts with a hostname in a DHCPv6 subnet.
virtual HostCollection getAll4(const SubnetID &subnet_id)=0
Returns a collection of hosts in the specified DHCPv4 subnet.
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 ...
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
Definition host.h:837
std::vector< HostPtr > HostCollection
Collection of the Host objects.
Definition host.h:846
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition subnet_id.h:25
Defines the logger used by the top-level component of kea-lfc.