#include <packet_id_data.hpp>
Definition at line 167 of file packet_id_data.hpp.
◆ PacketIDDataSend() [1/2]
openvpn::PacketIDDataSend::PacketIDDataSend |
( |
bool |
wide_arg, |
|
|
uint16_t |
epoch |
|
) |
| |
|
inlineexplicit |
◆ PacketIDDataSend() [2/2]
openvpn::PacketIDDataSend::PacketIDDataSend |
( |
| ) |
|
|
inlineexplicit |
◆ at_limit()
bool openvpn::PacketIDDataSend::at_limit |
( |
| ) |
|
|
inline |
◆ length()
constexpr std::size_t openvpn::PacketIDDataSend::length |
( |
| ) |
const |
|
inlineconstexpr |
Returns the size of the packet id. This is either 4 or 8 depending on the mode in use
- Returns
- 4 or 8
Definition at line 234 of file packet_id_data.hpp.
◆ next()
Increment the packet ID and return the next packet id to use.
- Exceptions
-
packet_id_wrap | if the packet id space is exhausted |
- Returns
- packet id to use next.
Definition at line 190 of file packet_id_data.hpp.
◆ OPENVPN_SIMPLE_EXCEPTION()
openvpn::PacketIDDataSend::OPENVPN_SIMPLE_EXCEPTION |
( |
packet_id_wrap |
| ) |
|
◆ prepend_next()
void openvpn::PacketIDDataSend::prepend_next |
( |
Buffer & |
buf | ) |
|
|
inline |
increases the packet id and prepends it to a buffer
- Parameters
-
Definition at line 215 of file packet_id_data.hpp.
◆ str()
std::string openvpn::PacketIDDataSend::str |
( |
| ) |
const |
|
inline |
◆ wrap_warning()
bool openvpn::PacketIDDataSend::wrap_warning |
( |
| ) |
const |
|
inline |
When a VPN runs in TLS mode (the only mode that OpenVPN supports, there is no –secret mode anymore), it needs to be warned about wrapping to start thinking about triggering a new SSL/TLS handshake. This method can be called to see if that level has been reached.
For 64bit counters, even with (non-existing) 1 byte packets, we would need to transfer 16 EB (exabytes) and 1,6 ZB (zettabytes) with 100 byte packets. This is not reachable in reasonable amount of time. And we still have the failsafe to throw an exception if we would overflow the ocunter.
Definition at line 250 of file packet_id_data.hpp.
◆ write_next()
void openvpn::PacketIDDataSend::write_next |
( |
Buffer & |
buf | ) |
|
|
inline |
increases the packet id and writes it to a buffer
- Parameters
-
Definition at line 205 of file packet_id_data.hpp.
◆ epoch_packet_id_max
the maximum allowed value for a epoch packet counter (48 bit)
Definition at line 173 of file packet_id_data.hpp.
◆ pid_
The documentation for this class was generated from the following file: