![]() |
Kea 3.1.1
|
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. | |
a single rate-limiting entry configured as "rate-limit": "<n> packet[s] per <time-unit>"
Definition at line 44 of file configuration.h.
|
inline |
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_.
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().
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().
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().