Kea 3.1.1
dhcpv4_callouts.cc
Go to the documentation of this file.
1// Copyright (C) 2022-2025 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#include <config.h>
8
10#include <dhcpsrv/srv_config.h>
13#include <util/dhcp_space.h>
14
15using namespace isc::dhcp;
16using namespace isc::hooks;
17
20
21namespace isc {
22namespace limits {
23
24// Functions accessed by the hooks framework use C linkage to avoid the name
25// mangling that accompanies use of the C++ compiler as well as to avoid
26// issues related to namespaces
27extern "C" {
28
34int
36 return (LimitManager::instance().cb_updated<DHCPv4>(handle));
37}
38
44int
46 return (LimitManager::instance().dhcp_srv_configured<DHCPv4>(handle));
47}
48
54int
56 return (LimitManager::instance().pkt_receive<DHCPv4>(handle));
57}
58
64int
66 return (LimitManager::instance().subnet_select<DHCPv4>(handle));
67}
68
74int
76 return (LimitManager::instance().lease_callout<DHCPv4>(handle));
77}
78
84int
86 return (LimitManager::instance().lease_callout<DHCPv4>(handle, /* lease_update = */ true));
87}
88
89} // extern "C"
90
91} // namespace limits
92} // namespace isc
Per-packet callout handle.
int cb4_updated(CalloutHandle &handle)
Callout at the cb4_updated hook point.
int dhcp4_srv_configured(CalloutHandle &handle)
dhcp4_srv_configured callout implementation
int pkt4_receive(CalloutHandle &handle)
Callout at the pkt4_receive hook point.
int subnet4_select(CalloutHandle &handle)
Callout at the subnet4_select hook point.
int lease4_renew(CalloutHandle &handle)
Callout at the leases4_renew hook point.
int lease4_select(CalloutHandle &handle)
Callout at the leases4_select hook point.
Defines the logger used by the top-level component of kea-lfc.
static LimitManager & instance()
singleton access function