OpenVPN 3 Core Library
|
#include <packet_id_data.hpp>
Public Member Functions | |
void | init (const char *name_arg, const int unit_arg, bool wide_arg) |
bool | test_add (const PacketIDData &pin, const Time::base_type now, const SessionStats::Ptr &stats) |
Error::Type | do_test_add (const PacketIDData &pin, const Time::base_type now) |
PacketIDData | read_next (Buffer &buf) const |
std::string | str () const |
std::size_t constexpr | length () const |
Static Public Attributes | |
static constexpr unsigned int | REPLAY_WINDOW_BYTES = 1u << REPLAY_WINDOW_ORDER |
static constexpr unsigned int | REPLAY_WINDOW_SIZE = REPLAY_WINDOW_BYTES * 8 |
Private Member Functions | |
constexpr std::size_t | replay_index (PacketIDData::data_id_t i) const |
Private Attributes | |
std::size_t | base = 0 |
std::size_t | extent = 0 |
Time::base_type | expire = 0 |
PacketIDData::data_id_t | id_high = 0 |
PacketIDData::data_id_t | id_floor = 0 |
bool | wide = false |
< 32 or 64 bit packet counter | |
int | unit = -1 |
std::string | name {"not initialised"} |
std::uint8_t | history [REPLAY_WINDOW_BYTES] |
"sliding window" bitmask of recent packet IDs received */ | |
Definition at line 286 of file packet_id_data.hpp.
|
inline |
Checks if a packet ID is allowed and modifies the history of seen packets ids.
It returns the verdict of the packet id if it is fine or not
pin | packet ID to check |
now | Current time to check that reordered packets are in the allowed time |
Definition at line 382 of file packet_id_data.hpp.
|
inline |
|
inlineconstexpr |
|
inline |
|
inlineconstexprprivate |
|
inline |
Definition at line 463 of file packet_id_data.hpp.
|
inline |
Checks if a packet ID is allowed and modifies the history of seen packets ids and adds any errors to the internal stats.
It returns the verdict of the packet id if it is fine or not
pin | packet ID to check |
now | Current time to check that reordered packets are in the allowed time |
stats | Stats to update when an error occurs |
Definition at line 359 of file packet_id_data.hpp.
|
private |
Definition at line 481 of file packet_id_data.hpp.
|
private |
Definition at line 483 of file packet_id_data.hpp.
|
private |
Definition at line 482 of file packet_id_data.hpp.
|
private |
"sliding window" bitmask of recent packet IDs received */
Definition at line 493 of file packet_id_data.hpp.
|
private |
Definition at line 485 of file packet_id_data.hpp.
|
private |
Definition at line 484 of file packet_id_data.hpp.
|
private |
Definition at line 490 of file packet_id_data.hpp.
|
staticconstexpr |
Definition at line 289 of file packet_id_data.hpp.
|
staticconstexpr |
Definition at line 290 of file packet_id_data.hpp.
|
private |
Definition at line 489 of file packet_id_data.hpp.
|
private |
< 32 or 64 bit packet counter
Definition at line 488 of file packet_id_data.hpp.