Kea 2.7.5
isc::dhcp::CfgHostOperations Class Reference

Represents global configuration for host reservations. More...

#include <cfg_host_operations.h>

+ Inheritance diagram for isc::dhcp::CfgHostOperations:

Public Types

typedef std::list< Host::IdentifierTypeIdentifierTypes
 Type of the container holding ordered list of identifiers.
 

Public Member Functions

 CfgHostOperations ()
 Constructor.
 
- Public Member Functions inherited from isc::data::CfgToElement
virtual ~CfgToElement ()
 Destructor.
 

Factory functions for creating default configurations.

void addIdentifierType (const std::string &identifier_name)
 Adds new identifier type to a collection of identifiers to be used by the server to search for host reservations.
 
const IdentifierTypesgetIdentifierTypes () const
 Returns const reference to ordered collection of identifiers to be used by the server to search for host reservations.
 
void clearIdentifierTypes ()
 Removes existing identifier types.
 
virtual isc::data::ElementPtr toElement () const
 Unparse a configuration object.
 
static CfgHostOperationsPtr createConfig4 ()
 Factory function for DHCPv4.
 
static CfgHostOperationsPtr createConfig6 ()
 Factory function for DHCPv6.
 

Detailed Description

Represents global configuration for host reservations.

This class represents server configuration pertaining to host reservations.

Currently it only holds the ordered list of host identifiers to be used to search for reservations for a particular host. An administrator selects which identifiers the server should use and in which order to search for host reservations to optimize performance of the server.

Definition at line 43 of file cfg_host_operations.h.

Member Typedef Documentation

◆ IdentifierTypes

Type of the container holding ordered list of identifiers.

Definition at line 47 of file cfg_host_operations.h.

Constructor & Destructor Documentation

◆ CfgHostOperations()

isc::dhcp::CfgHostOperations::CfgHostOperations ( )

Constructor.

The default configuration:

  • no identifiers selected for host reservations searches.

Definition at line 19 of file cfg_host_operations.cc.

Referenced by createConfig4(), and createConfig6().

Member Function Documentation

◆ addIdentifierType()

void isc::dhcp::CfgHostOperations::addIdentifierType ( const std::string & identifier_name)

Adds new identifier type to a collection of identifiers to be used by the server to search for host reservations.

Parameters
identifier_nameName of the identifier to be added. It must be one of the names supported by the Host::getIdentifierType function.

Definition at line 46 of file cfg_host_operations.cc.

References isc::dhcp::Host::getIdentifierType(), and isc_throw.

+ Here is the call graph for this function:

◆ clearIdentifierTypes()

void isc::dhcp::CfgHostOperations::clearIdentifierTypes ( )

Removes existing identifier types.

Definition at line 57 of file cfg_host_operations.cc.

◆ createConfig4()

CfgHostOperationsPtr isc::dhcp::CfgHostOperations::createConfig4 ( )
static

Factory function for DHCPv4.

Definition at line 24 of file cfg_host_operations.cc.

References CfgHostOperations().

+ Here is the call graph for this function:

◆ createConfig6()

CfgHostOperationsPtr isc::dhcp::CfgHostOperations::createConfig6 ( )
static

Factory function for DHCPv6.

Definition at line 36 of file cfg_host_operations.cc.

References CfgHostOperations().

+ Here is the call graph for this function:

◆ getIdentifierTypes()

const IdentifierTypes & isc::dhcp::CfgHostOperations::getIdentifierTypes ( ) const
inline

Returns const reference to ordered collection of identifiers to be used by the server to search for host reservations.

Definition at line 74 of file cfg_host_operations.h.

◆ toElement()

ElementPtr isc::dhcp::CfgHostOperations::toElement ( ) const
virtual

Unparse a configuration object.

Returns
a pointer to unparsed configuration

Implements isc::data::CfgToElement.

Definition at line 62 of file cfg_host_operations.cc.

References isc::data::Element::create(), isc::data::Element::createList(), and isc::dhcp::Host::getIdentifierName().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: