diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:36:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:36:04 +0000 |
commit | 040eee1aa49b49df4698d83a05af57c220127fd1 (patch) | |
tree | f635435954e6ccde5eee9893889e24f30ca68346 /src/lib/dhcpsrv/cb_ctl_dhcp4.h | |
parent | Initial commit. (diff) | |
download | isc-kea-upstream.tar.xz isc-kea-upstream.zip |
Adding upstream version 2.2.0.upstream/2.2.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/lib/dhcpsrv/cb_ctl_dhcp4.h')
-rw-r--r-- | src/lib/dhcpsrv/cb_ctl_dhcp4.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/cb_ctl_dhcp4.h b/src/lib/dhcpsrv/cb_ctl_dhcp4.h new file mode 100644 index 0000000..8e38727 --- /dev/null +++ b/src/lib/dhcpsrv/cb_ctl_dhcp4.h @@ -0,0 +1,50 @@ +// Copyright (C) 2019 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 +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef CB_CTL_DHCP4_H +#define CB_CTL_DHCP4_H + +#include <dhcpsrv/cb_ctl_dhcp.h> +#include <dhcpsrv/config_backend_dhcp4_mgr.h> +#include <dhcpsrv/srv_config.h> + +namespace isc { +namespace dhcp { + +/// @brief Implementation of the mechanisms to control the use of +/// the Configuration Backends by the DHCPv4 server. +/// +/// It implements fetching and merging DHCPv4 server configuration from +/// the database into the staging or current configuration. +/// +/// @tparam ConfigBackendMgrType Type of the Config Backend Manager used +/// by the server implementing this class. For example, for the DHCPv4 +/// server it will be @c ConfigBackendDHCPv4Mgr. +class CBControlDHCPv4 : public CBControlDHCP<ConfigBackendDHCPv4Mgr> { +protected: + + /// @brief DHCPv4 server specific method to fetch and apply back end + /// configuration into the local configuration. + /// + /// @param backend_selector Backend selector. + /// @param server_selector Server selector. + /// @param lb_modification_time Lower bound modification time for the + /// configuration elements to be fetched. + /// @param audit_entries Audit entries fetched from the database since + /// the last configuration update. This collection is empty if there + /// were no updates. + virtual void databaseConfigApply(const db::BackendSelector& backend_selector, + const db::ServerSelector& server_selector, + const boost::posix_time::ptime& lb_modification_time, + const db::AuditEntryCollection& audit_entries); +}; + +typedef boost::shared_ptr<CBControlDHCPv4> CBControlDHCPv4Ptr; + +} // end of namespace isc::dhcp +} // end of namespace isc + +#endif // CB_CTL_DHCP4_H |