| Kea 3.0.2-git

isc::limits::RateLimit Struct Reference

a single rate-limiting entry configured as "rate-limit": "<n> packet[s] per <time-unit>" More...

`#include <configuration.h>`

## Public Member Functions
| RateLimit ()
| Constructor.
| RateLimit (std::string const &text)
| Constructs a pragmatic rate limit data structure from text of "<n> packet[s] per <time-unit>" format.

## Public Attributes
uint32_t | allowed_packets_
| the configured limit
std::string | text_
| a string representation of the rate limit as specified in the configuration used for logging purposes
std::chrono::seconds | time_unit_
| Seconds of one time unit's worth.

## Detailed Description

a single rate-limiting entry configured as "rate-limit": "<n> packet[s] per <time-unit>"

Definition at line 44 of file configuration.h.

## Constructor & Destructor Documentation

## ◆ RateLimit() [1/2]

isc::limits::RateLimit::RateLimit | ( |  | ) |
| inline

Constructor.

Definition at line 46 of file configuration.h.

References allowed_packets_.

## ◆ RateLimit() [2/2]

isc::limits::RateLimit::RateLimit | ( | std::string const & | text | ) |

Constructs a pragmatic rate limit data structure from text of "<n> packet[s] per <time-unit>" format.

Definition at line 27 of file configuration.cc.

References allowed_packets_, isc_throw, text_, and time_unit_.

## Member Data Documentation

## ◆ allowed_packets_

uint32_t isc::limits::RateLimit::allowed_packets_

the configured limit

Definition at line 54 of file configuration.h.

Referenced by RateLimit(), RateLimit(), isc::limits::LimitManager::pkt_receive(), and isc::limits::LimitManager::subnet_select().

## ◆ text_

std::string isc::limits::RateLimit::text_

a string representation of the rate limit as specified in the configuration used for logging purposes

Definition at line 62 of file configuration.h.

Referenced by RateLimit(), isc::limits::LimitManager::pkt_receive(), and isc::limits::LimitManager::subnet_select().

## ◆ time_unit_

std::chrono::seconds isc::limits::RateLimit::time_unit_

Seconds of one time unit's worth.

For simplicity, one month is always 30 days and one year is always 365 days.

Definition at line 58 of file configuration.h.

Referenced by RateLimit(), isc::limits::LimitManager::pkt_receive(), and isc::limits::LimitManager::subnet_select().

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

- configuration.h
- configuration.cc