7 #ifndef MYSQL_HOST_DATA_SOURCE_H
8 #define MYSQL_HOST_DATA_SOURCE_H
117 const uint8_t* identifier_begin,
118 const size_t identifier_len);
134 const uint8_t* identifier_begin,
135 const size_t identifier_len);
151 const uint8_t* identifier_begin,
152 const size_t identifier_len)
const;
223 size_t& source_index,
224 uint64_t lower_host_id,
240 size_t& source_index,
241 uint64_t lower_host_id,
256 uint64_t lower_host_id,
271 uint64_t lower_host_id,
296 const uint8_t* identifier_begin,
297 const size_t identifier_len)
const;
357 const uint8_t* identifier_begin,
358 const size_t identifier_len)
const;
367 const uint8_t prefix_len)
const;
412 return (std::string(
"mysql"));
420 virtual std::string
getName()
const;
437 virtual std::pair<uint32_t, uint32_t>
getVersion()
const;
500 MySqlHostDataSourceImplPtr impl_;
506 #endif // MYSQL_HOST_DATA_SOURCE_H
boost::shared_ptr< MySqlHostDataSourceImpl > MySqlHostDataSourceImplPtr
Type of pointers to MySqlHostDataSourceImpl.
Wraps value holding size of the page with host reservations.
virtual void rollback()
Rollback Transactions.
virtual bool del4(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)
Attempts to delete a host by (subnet4-id, identifier type, identifier)
virtual bool setIPReservationsUnique(const bool unique)
Controls whether IP reservations are unique or non-unique.
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
virtual ConstHostCollection getAllbyHostname(const std::string &hostname) const
Return all hosts with a hostname.
virtual ConstHostCollection getAll6(const SubnetID &subnet_id) const
Return all hosts in a DHCPv6 subnet.
virtual bool del6(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)
Attempts to delete a host by (subnet6-id, identifier type, identifier)
virtual bool isUnusable()
Flag which indicates if the host manager has at least one unusable connection.
std::vector< ConstHostPtr > ConstHostCollection
Collection of the const Host objects.
virtual void commit()
Commit Transactions.
virtual ~MySqlHostDataSource()
Virtual destructor.
boost::shared_ptr< const Host > ConstHostPtr
Const pointer to the Host object.
virtual ConstHostCollection getAllbyHostname4(const std::string &hostname, const SubnetID &subnet_id) const
Return all hosts with a hostname in a DHCPv4 subnet.
virtual std::pair< uint32_t, uint32_t > getVersion() const
Returns backend version.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual ConstHostCollection getPage6(const SubnetID &subnet_id, size_t &source_index, uint64_t lower_host_id, const HostPageSize &page_size) const
Returns range of hosts in a DHCPv6 subnet.
MySqlHostContextPtr ctx_
The context.
virtual ConstHostCollection getPage4(const SubnetID &subnet_id, size_t &source_index, uint64_t lower_host_id, const HostPageSize &page_size) const
Returns range of hosts in a DHCPv4 subnet.
virtual ConstHostCollection getAllbyHostname6(const std::string &hostname, const SubnetID &subnet_id) const
Return all hosts with a hostname in a DHCPv6 subnet.
virtual ConstHostPtr get6(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
Returns a host connected to the IPv6 subnet.
virtual ConstHostCollection getAll(const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
Return all hosts connected to any subnet for which reservations have been made using a specified iden...
Implementation of the MySqlHostDataSource.
MySqlHostContextAlloc(MySqlHostDataSourceImpl &mgr)
Constructor.
Base interface for the classes implementing simple data source for host reservations.
boost::shared_ptr< MySqlHostContext > MySqlHostContextPtr
Type of pointers to contexts.
~MySqlHostContextAlloc()
Destructor.
virtual std::string getType() const
Return backend type.
IdentifierType
Type of the host identifier.
std::map< std::string, std::string > ParameterMap
Database configuration parameter map.
virtual std::string getDescription() const
Returns description of the backend.
The IOAddress class represents an IP addresses (version agnostic)
virtual std::string getName() const
Returns backend name.
virtual ConstHostCollection getAll4(const SubnetID &subnet_id) const
Return all hosts in a DHCPv4 subnet.
virtual bool del(const SubnetID &subnet_id, const asiolink::IOAddress &addr)
Attempts to delete hosts by (subnet-id, address)
MySqlHostDataSource(const db::DatabaseConnection::ParameterMap ¶meters)
Constructor.
virtual isc::db::DatabaseConnection::ParameterMap getParameters() const
Return backend parameters.
virtual void add(const HostPtr &host)
Adds a new host to the collection.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
virtual ConstHostPtr get4(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
Returns a host connected to the IPv4 subnet.