DhcpBindingRegistry class final
#include <net/eth/dhcp_binding_registry.hpp>
Generic registry-backed DHCP binding provider for Ethernet-like runtimes.
Scenarios register interface/runtime pairs (for example us0, et1) and DHCP server can then resolve them by interface name through one uniform path.
Base classes
Public types
- using ModeEnabledFn = bool(*)(const void*config)
Public functions
-
auto register_eth(std::string_view iface_name,
const prf::
net:: cfg:: EthConfigSection* config, const IEthBindingSnapshotSource* source) -> bool - Registers or updates an Ethernet runtime binding.
-
template<typename ConfigSectionT>auto register_interface(std::string_view iface_name, const ConfigSectionT* config, const IEthBindingSnapshotSource* source) -> bool
- Registers one typed interface config/runtime pair.
- auto register_interface(std::string_view iface_name, const void* config, ModeEnabledFn mode_enabled_fn, const IEthBindingSnapshotSource* source) -> bool
- Registers one Ethernet-like runtime binding using type-erased mode predicate.
-
auto register_usb(std::string_view iface_name,
const prf::
net:: cfg:: UsbConfigSection* config, const IEthBindingSnapshotSource* source) -> bool - Registers or updates a USB Ethernet-like runtime binding.
-
auto snapshot_bound_interface(std::string_view iface_name,
prf::
net:: dhcps:: BoundDhcpInterface* out) -> bool override - Resolves one interface binding by name for DHCP server runtime.
Function documentation
bool prf:: net:: eth:: DhcpBindingRegistry:: snapshot_bound_interface(std::string_view iface_name,
prf:: net:: dhcps:: BoundDhcpInterface* out) override
Resolves one interface binding by name for DHCP server runtime.
Returns true when lookup itself succeeds, including case where interface is unknown or currently not bindable (out->valid=false).