diff options
author | Andrei Pavel <andrei.pavel@qualitance.com> | 2017-08-17 20:04:29 +0200 |
---|---|---|
committer | Andrei Pavel <andrei.pavel@qualitance.com> | 2017-08-17 20:04:29 +0200 |
commit | 529d15326887b3513413567e497118b3db2c24f3 (patch) | |
tree | 8b66b262349433802bd52e920bb4783baac57cb3 /src/lib/dhcpsrv/base_host_data_source.h | |
parent | Added mysql_execute_script (diff) | |
parent | [master] Added ChangeLog 1288 for trac 5315. (diff) | |
download | kea-529d15326887b3513413567e497118b3db2c24f3.tar.xz kea-529d15326887b3513413567e497118b3db2c24f3.zip |
Merge branch 'isc-master' into minor-changes
Diffstat (limited to 'src/lib/dhcpsrv/base_host_data_source.h')
-rw-r--r-- | src/lib/dhcpsrv/base_host_data_source.h | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/src/lib/dhcpsrv/base_host_data_source.h b/src/lib/dhcpsrv/base_host_data_source.h index 5decdb3c1e..e4d153ea6d 100644 --- a/src/lib/dhcpsrv/base_host_data_source.h +++ b/src/lib/dhcpsrv/base_host_data_source.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -67,7 +67,7 @@ public: /// in the future. Also, this list will grow over time. It is likely /// that we'll implement other identifiers in the future, e.g. remote-id. /// - /// Those value correspond direclty to dhcp_identifier_type in hosts + /// Those value correspond directly to dhcp_identifier_type in hosts /// table in MySQL schema. enum IdType { ID_HWADDR = 0, ///< Hardware address @@ -244,6 +244,46 @@ public: /// @param host Pointer to the new @c Host object being added. virtual void add(const HostPtr& host) = 0; + /// @brief Attempts to delete a host by (subnet-id, address) + /// + /// This method supports both v4 and v6. + /// + /// @param subnet_id subnet identifier. + /// @param addr specified address. + /// @return true if deletion was successful, false if the host was not there. + /// @throw various exceptions in case of errors + virtual bool del(const SubnetID& subnet_id, const asiolink::IOAddress& addr) = 0; + + /// @brief Attempts to delete a host by (subnet-id4, identifier, identifier-type) + /// + /// This method supports both v4 hosts only. + /// + /// @param subnet_id IPv4 Subnet identifier. + /// @param identifier_type Identifier type. + /// @param identifier_begin Pointer to a beginning of a buffer containing + /// an identifier. + /// @param identifier_len Identifier length. + /// @return true if deletion was successful, false if the host was not there. + /// @throw various exceptions in case of errors + virtual bool del4(const SubnetID& subnet_id, + const Host::IdentifierType& identifier_type, + const uint8_t* identifier_begin, const size_t identifier_len) = 0; + + /// @brief Attempts to delete a host by (subnet-id6, identifier, identifier-type) + /// + /// This method supports both v6 hosts only. + /// + /// @param subnet_id IPv6 Subnet identifier. + /// @param identifier_type Identifier type. + /// @param identifier_begin Pointer to a beginning of a buffer containing + /// an identifier. + /// @param identifier_len Identifier length. + /// @return true if deletion was successful, false if the host was not there. + /// @throw various exceptions in case of errors + virtual bool del6(const SubnetID& subnet_id, + const Host::IdentifierType& identifier_type, + const uint8_t* identifier_begin, const size_t identifier_len) = 0; + /// @brief Return backend type /// /// Returns the type of the backend (e.g. "mysql", "memfile" etc.) |