|
OpenVPN 3 Core Library
|
Classes | |
| struct | ProbeParameter |
| probe parameter TLV (sent by the client in a SERVER_PROBE). More... | |
| struct | ProbeReply |
| probe reply TLV (sent by the server in a PROBE_REPLY). More... | |
| struct | TlvHeader |
| A decoded TLV header. More... | |
Enumerations | |
| enum | : std::uint16_t { MSG_SERVER_PROBE = 0x100 , MSG_PROBE_REPLY = 0x101 } |
| OOB message types: the 16-bit value at the start of an OOB payload. More... | |
| enum | : std::uint16_t { TLV_OPTIONAL_FLAG = 0x8000 , TLV_TYPE_MASK = 0x7fff , TLV_PROBE_PARAMETER = 0x200 , TLV_PROBE_REPLY = 0x201 } |
| TLV header bit layout of the first 16-bit field, and the TLV type space (0x2xx). More... | |
| enum | : std::uint32_t { REPLY_FLAG_RESEND_WKC = 0x1 } |
Functions | |
| bool | msg_write_header (Buffer &buf, std::uint16_t msg_type) |
| Write an OOB message-type header (the 16-bit type preceding the TLVs). | |
| bool | msg_read_header (Buffer &buf, std::uint16_t expected_msg_type) |
| bool | tlv_write_header (Buffer &buf, std::uint16_t type, bool optional, std::uint16_t value_len) |
Write a TLV header (type + optional flag + value length) to buf. | |
| std::optional< TlvHeader > | tlv_read_header (Buffer &buf) |
| bool | skip_trailing (Buffer &buf, std::uint16_t value_len, std::size_t consumed) |
| std::optional< std::uint16_t > | find_tlv (Buffer &buf, std::uint16_t wanted_type) |
| bool | server_probe_write (Buffer &buf, const ProbeParameter ¶m) |
| Write a complete SERVER_PROBE (message header + probe_parameter TLV). Client. | |
| std::optional< ProbeParameter > | server_probe_read (Buffer &buf) |
| bool | client_reply_write (Buffer &buf, const ProbeReply &reply) |
| Write a complete PROBE_REPLY (message header + probe_reply TLV). Server. | |
| std::optional< ProbeReply > | client_reply_read (Buffer &buf) |
| anonymous enum : std::uint16_t |
OOB message types: the 16-bit value at the start of an OOB payload.
| Enumerator | |
|---|---|
| MSG_SERVER_PROBE | |
| MSG_PROBE_REPLY | |
Definition at line 53 of file oob_probe.hpp.
| anonymous enum : std::uint16_t |
TLV header bit layout of the first 16-bit field, and the TLV type space (0x2xx).
| Enumerator | |
|---|---|
| TLV_OPTIONAL_FLAG | |
| TLV_TYPE_MASK | |
| TLV_PROBE_PARAMETER | |
| TLV_PROBE_REPLY | |
Definition at line 60 of file oob_probe.hpp.
| anonymous enum : std::uint32_t |
probe_reply flags (the reply TLV's 32-bit flags field).
bit 0 (RESEND_WKC): the client must resend the wrapped client key (via CONTROL_WKC_V1) when it completes the handshake using this reply as a shortcut. Set by a tls-crypt-v2 server, which is stateless and discarded the WKc.
| Enumerator | |
|---|---|
| REPLY_FLAG_RESEND_WKC | |
Definition at line 75 of file oob_probe.hpp.
|
inline |
Read a received PROBE_REPLY: the client-side counterpart of server_probe_read().
Definition at line 298 of file oob_probe.hpp.
|
inline |
Write a complete PROBE_REPLY (message header + probe_reply TLV). Server.
Definition at line 288 of file oob_probe.hpp.
|
inline |
Scan for the first TLV of type wanted_type, skipping optional other/future types. On success buf is left positioned at that TLV's value.
| buf | buffer positioned at a TLV header |
| wanted_type | the TLV type to find |
Definition at line 157 of file oob_probe.hpp.
|
inline |
Read and verify an OOB message-type header, advancing past it.
| buf | buffer positioned at the OOB message payload |
| expected_msg_type | the message type the payload must carry |
expected_msg_type Definition at line 94 of file oob_probe.hpp.
|
inline |
Write an OOB message-type header (the 16-bit type preceding the TLVs).
Definition at line 83 of file oob_probe.hpp.
|
inline |
Read a received SERVER_PROBE: verify the message header, then scan for the probe_parameter TLV (tolerating other/future TLVs). Consumes buf as it reads.
Definition at line 277 of file oob_probe.hpp.
|
inline |
Write a complete SERVER_PROBE (message header + probe_parameter TLV). Client.
Definition at line 266 of file oob_probe.hpp.
|
inline |
Consume a TLV value of value_len bytes, of which consumed have already been read, skipping any trailing bytes this version does not understand.
consumed bytes were declared, or the buffer is too short for the remainder Definition at line 137 of file oob_probe.hpp.
Read a TLV header from buf, advancing past it.
Definition at line 121 of file oob_probe.hpp.
|
inline |
Write a TLV header (type + optional flag + value length) to buf.
Definition at line 109 of file oob_probe.hpp.