 |
Kea
1.5.0
|
Go to the documentation of this file.
7 #ifndef BASE_HOST_DATA_SOURCE_H
8 #define BASE_HOST_DATA_SOURCE_H
13 #include <boost/shared_ptr.hpp>
92 const uint8_t* identifier_begin,
93 const size_t identifier_len)
const = 0;
119 const uint8_t* identifier_begin,
120 const size_t identifier_len)
const = 0;
155 const uint8_t* identifier_begin,
156 const size_t identifier_len)
const = 0;
213 const uint8_t* identifier_begin,
const size_t identifier_len) = 0;
228 const uint8_t* identifier_begin,
const size_t identifier_len) = 0;
259 #endif // BASE_HOST_DATA_SOURCE_H
virtual ConstHostPtr get6(const SubnetID &subnet_id, const asiolink::IOAddress &address) const =0
Returns a host connected to the IPv6 subnet and having a reservation for a specified IPv6 address or ...
virtual std::string getType() const =0
Return backend type.
IdentifierType
Type of the host identifier.
virtual ConstHostPtr get6(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const =0
Returns a host connected to the IPv6 subnet.
Exception thrown when the duplicate Host object is detected.
The IOAddress class represents an IP addresses (version agnostic)
virtual void add(const HostPtr &host)=0
Adds a new host to the collection.
virtual ~BaseHostDataSource()
Default destructor implementation.
virtual ConstHostPtr get4(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const =0
Returns a host connected to the IPv4 subnet.
IdType
Specifies the type of an identifier.
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
ReservedAddress(const char *file, size_t line, const char *what)
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
Exception thrown when invalid IP address has been specified for Host.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
virtual ConstHostCollection getAll(const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const =0
Return all hosts connected to any subnet for which reservations have been made using a specified iden...
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
std::vector< HostDataSourcePtr > HostDataSourceList
HostDataSource list.
Base interface for the classes implementing simple data source for host reservations.
DuplicateHost(const char *file, size_t line, const char *what)
Exception thrown when an address is already reserved by a Host object (DuplicateHost is same identity...
virtual ConstHostPtr get4(const SubnetID &subnet_id, const asiolink::IOAddress &address) const =0
Returns a host connected to the IPv4 subnet and having a reservation for a specified IPv4 address.
virtual bool del4(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)=0
Attempts to delete a host by (subnet-id4, identifier, identifier-type)
@ ID_HWADDR
Hardware address.
virtual ConstHostPtr get6(const asiolink::IOAddress &prefix, const uint8_t prefix_len) const =0
Returns a host using the specified IPv6 prefix.
virtual ConstHostCollection getAll4(const asiolink::IOAddress &address) const =0
Returns a collection of hosts using the specified IPv4 address.
virtual void rollback()
Rollback Transactions.
boost::shared_ptr< BaseHostDataSource > HostDataSourcePtr
HostDataSource pointer.
std::vector< ConstHostPtr > ConstHostCollection
Collection of the const Host objects.
boost::shared_ptr< const Host > ConstHostPtr
Const pointer to the Host object.
virtual void commit()
Commit Transactions.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
BadHostAddress(const char *file, size_t line, const char *what)
virtual bool del(const SubnetID &subnet_id, const asiolink::IOAddress &addr)=0
Attempts to delete a host by (subnet-id, address)
virtual bool del6(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)=0
Attempts to delete a host by (subnet-id6, identifier, identifier-type)