Kea  1.5.0
writable_host_data_source.h
Go to the documentation of this file.
1 // Copyright (C) 2014-2018 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 
10 namespace isc {
11 namespace dhcp {
12 
22 public:
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 
52  virtual HostCollection
53  getAll4(const asiolink::IOAddress& address) = 0;
54 
65  virtual HostPtr
66  get4(const SubnetID& subnet_id, const Host::IdentifierType& identifier_type,
67  const uint8_t* identifier_begin, const size_t identifier_len) = 0;
68 
79  virtual HostPtr
80  get6(const SubnetID& subnet_id, const Host::IdentifierType& identifier_type,
81  const uint8_t* identifier_begin, const size_t identifier_len) = 0;
82 
89  virtual HostPtr
90  get6(const asiolink::IOAddress& prefix, const uint8_t prefix_len) = 0;
91 
99  virtual HostPtr
100  get6(const SubnetID& subnet_id, const asiolink::IOAddress& address) = 0;
101 };
102 
103 }
104 }
105 
106 #endif // WRITABLE_HOST_DATA_SOURCE_H
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.
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
Definition: host.h:725
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.
Interface for retrieving writable host reservations.
std::vector< HostPtr > HostCollection
Collection of the Host objects.
Definition: host.h:734
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.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual ~WritableHostDataSource()
Default destructor implementation.
IdentifierType
Type of the host identifier.
Definition: host.h:252
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
Definition: lease.h:24