kea-custom-hooks
FeM custom hooks libraries for Kea DHCP
Public Types | Public Attributes | List of all members
ahri::AdminDBClient::HostUpdate Struct Reference

A single host update. More...

#include <AdminDBClient.hpp>

Public Types

enum class  Type : int { ADD , REMOVE }
 

Public Attributes

Type type {Type::ADD}
 Whether the given host reservation shall be added or removed. More...
 
isc::asiolink::IOAddress ipv4
 
isc::dhcp::HWAddr mac
 
size_t subnet_id {0}
 
size_t incremental_update_id {0}
 An incremental update identifier. More...
 

Detailed Description

A single host update.

This DTO is a tuple describing a change of the state of a host reservation table. Depending on the type, it either adds a missing entry or removes an entry that shouldn't exist anymore. Using a list of updates can be used in various ways:

Definition at line 43 of file AdminDBClient.hpp.

Member Enumeration Documentation

◆ Type

enum class ahri::AdminDBClient::HostUpdate::Type : int
strong
Enumerator
ADD 
REMOVE 

Definition at line 45 of file AdminDBClient.hpp.

Member Data Documentation

◆ incremental_update_id

size_t ahri::AdminDBClient::HostUpdate::incremental_update_id {0}

An incremental update identifier.

Host updates are stored in the backend using an incremental update identifier, which is always incrementing. Using the update identifier of all DHCP servers, a cleanup procedure can determine which host updates can be removed from AdminDB to save space and reduce the table length. The hightest update identifier of each incremental update batch shall be registered somewhere, such a cleanup procedure can read from to determine the lowest common processed update identifier of all DHCP servers.

For host updates retrieved using fetch_all_host_reservations(), the update identifier shall have the default value to indicate that the host information isn't part of an incremental update. All such host updates must have the type set to ADD.

Definition at line 70 of file AdminDBClient.hpp.

◆ ipv4

isc::asiolink::IOAddress ahri::AdminDBClient::HostUpdate::ipv4

Definition at line 53 of file AdminDBClient.hpp.

◆ mac

isc::dhcp::HWAddr ahri::AdminDBClient::HostUpdate::mac

Definition at line 54 of file AdminDBClient.hpp.

◆ subnet_id

size_t ahri::AdminDBClient::HostUpdate::subnet_id {0}

Definition at line 55 of file AdminDBClient.hpp.

◆ type

Type ahri::AdminDBClient::HostUpdate::type {Type::ADD}

Whether the given host reservation shall be added or removed.

Definition at line 52 of file AdminDBClient.hpp.


The documentation for this struct was generated from the following file: