Go to the documentation of this file.
23 #ifndef REFLECT_FILTER_H
24 #define REFLECT_FILTER_H
struct that handles all the rate limiting logic for initial responses
int period_length
period length in seconds
struct initial_packet_rate_limit * initial_rate_limit_init(int max_per_period, int period_length)
allocate and initialize the initial-packet rate limiter structure
int64_t curr_period_counter
Number of packets in the current period.
void reflect_filter_rate_limit_decrease(struct initial_packet_rate_limit *irl)
decreases the counter of initial packets seen, so connections that successfully completed the three-w...
bool reflect_filter_rate_limit_check(struct initial_packet_rate_limit *irl)
checks if the connection is still allowed to connect under the rate limit.
void initial_rate_limit_free(struct initial_packet_rate_limit *irl)
free the initial-packet rate limiter structure
int64_t max_per_period
This is a hard limit for packets per seconds.