Kea 3.0.0
isc::limits::Configuration< limit_t > Struct Template Referenceabstract

a datastore used for configuring functionally dedicated parts of the limits library More...

#include <configuration.h>

Public Member Functions

virtual ~Configuration ()=default
 Destructor. Declared only to be marked as virtual.
virtual const std::string & key () const =0
 Returns the key required to configure the limit in the user context.
virtual void logClientClassLimit (isc::dhcp::ClientClass const &client_class, isc::data::ConstElementPtr const &user_context)=0
 Abstract method that checks and logs limit which is to be applied to a client class.
virtual void logSubnetLimit (isc::dhcp::SubnetID const subnet_id, isc::data::ConstElementPtr const &user_context)=0
 Abstract method that checks and logs limit which is to be applied to a client class.
void parse (isc::dhcp::SrvConfigPtr const &config)
 Handles all the parsing of the Kea configuration required for limiting functionality.
isc::data::ConstElementPtr const parseUserContext (isc::data::ConstElementPtr const &user_context) const
 Abstract method that takes a user context from any configuration element and returns the value of the element of interest inside it - most often a limit.

Detailed Description

template<typename limit_t>
struct isc::limits::Configuration< limit_t >

a datastore used for configuring functionally dedicated parts of the limits library

Definition at line 67 of file configuration.h.

Constructor & Destructor Documentation

◆ ~Configuration()

template<typename limit_t>
virtual isc::limits::Configuration< limit_t >::~Configuration ( )
virtualdefault

Destructor. Declared only to be marked as virtual.

Member Function Documentation

◆ key()

template<typename limit_t>
virtual const std::string & isc::limits::Configuration< limit_t >::key ( ) const
pure virtual

Returns the key required to configure the limit in the user context.

Returns
the key

Implemented in isc::limits::AddressLimitConfiguration, isc::limits::PrefixLimitConfiguration, and isc::limits::RateLimitConfiguration.

Referenced by parseUserContext().

◆ logClientClassLimit()

template<typename limit_t>
virtual void isc::limits::Configuration< limit_t >::logClientClassLimit ( isc::dhcp::ClientClass const & client_class,
isc::data::ConstElementPtr const & user_context )
pure virtual

Abstract method that checks and logs limit which is to be applied to a client class.

Parameters
client_class
user_context

Implemented in isc::limits::AddressLimitConfiguration, isc::limits::PrefixLimitConfiguration, and isc::limits::RateLimitConfiguration.

Referenced by parse().

◆ logSubnetLimit()

template<typename limit_t>
virtual void isc::limits::Configuration< limit_t >::logSubnetLimit ( isc::dhcp::SubnetID const subnet_id,
isc::data::ConstElementPtr const & user_context )
pure virtual

Abstract method that checks and logs limit which is to be applied to a client class.

Parameters
subnet_id
user_context

Implemented in isc::limits::AddressLimitConfiguration, isc::limits::PrefixLimitConfiguration, and isc::limits::RateLimitConfiguration.

Referenced by parse().

◆ parse()

template<typename limit_t>
void isc::limits::Configuration< limit_t >::parse ( isc::dhcp::SrvConfigPtr const & config)
inline

Handles all the parsing of the Kea configuration required for limiting functionality.

the configuration to be parsed - usually current or staging

Definition at line 74 of file configuration.h.

References logClientClassLimit(), logSubnetLimit(), and parseUserContext().

Here is the call graph for this function:

◆ parseUserContext()

template<typename limit_t>
isc::data::ConstElementPtr const isc::limits::Configuration< limit_t >::parseUserContext ( isc::data::ConstElementPtr const & user_context) const
inline

Abstract method that takes a user context from any configuration element and returns the value of the element of interest inside it - most often a limit.

Parameters
user_contextthe element's user context
Returns
the value of the element of interest

Definition at line 104 of file configuration.h.

References key().

Referenced by parse().

Here is the call graph for this function:

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