|
| OPENVPN_UNTAGGED_EXCEPTION_INHERIT (option_error, proto_error) |
|
| OPENVPN_UNTAGGED_EXCEPTION_INHERIT (option_error, process_server_push_error) |
|
| OPENVPN_UNTAGGED_EXCEPTION_INHERIT (option_error, proto_option_error) |
|
std::string | dump_packet (const Buffer &buf) |
|
template<typename S > |
void | write_control_string (const S &str) |
|
| OPENVPN_SIMPLE_EXCEPTION (select_key_context_error) |
|
| ProtoContext (ProtoContextCallbackInterface *cb_arg, const ProtoConfig::Ptr &config_arg, const SessionStats::Ptr &stats_arg) |
|
void | reset_tls_wrap_mode (const ProtoConfig &c) |
|
uint32_t | get_tls_warnings () const |
|
bool | uses_bs64_cipher () const |
|
void | reset_tls_crypt (const ProtoConfig &c, const OpenVPNStaticKey &key) |
|
void | set_dynamic_tls_crypt (const ProtoConfig &c, const KeyContext::Ptr &key_ctx) |
|
void | reset_tls_crypt_server (const ProtoConfig &c) |
|
void | reset (const ProtoSessionID cookie_psid=ProtoSessionID()) |
| Resets ProtoContext *this to it's initial state.
|
|
void | set_protocol (const Protocol &p) |
|
void | pre_destroy () |
|
bool | primary_defined () |
|
virtual | ~ProtoContext ()=default |
|
PacketType | packet_type (const Buffer &buf) |
|
void | start (const ProtoSessionID cookie_psid=ProtoSessionID()) |
| Initialize the state machine and start protocol negotiation.
|
|
void | renegotiate () |
|
void | flush (const bool control_channel) |
|
void | housekeeping () |
|
Time | next_housekeeping () const |
|
void | control_send (BufferPtr &&app_bp) |
|
void | control_send (BufferAllocated &&app_buf) |
|
bool | control_net_validate (const PacketType &type, const Buffer &net_buf) |
|
bool | control_net_recv (const PacketType &type, BufferAllocated &&net_buf) |
|
bool | control_net_recv (const PacketType &type, BufferPtr &&net_bp) |
|
void | data_encrypt (BufferAllocated &in_out) |
|
bool | data_decrypt (const PacketType &type, BufferAllocated &in_out) |
|
void | disconnect (const Error::Type reason) |
|
void | send_explicit_exit_notify () |
|
void | update_last_sent () |
|
bool | data_channel_ready () const |
|
unsigned int | negotiations () const |
|
const Time::Duration & | slowest_handshake () |
|
bool | invalidated () const |
|
Error::Type | invalidation_reason () const |
|
void | init_data_channel () |
|
void | process_push (const OptionList &opt, const ProtoContextCompressionOptions &pco) |
|
size_t | align_adjust_hint () const |
|
bool | is_keepalive_enabled () const |
|
void | disable_keepalive (unsigned int &keepalive_ping, unsigned int &keepalive_timeout) |
|
void | data_limit_notify (const unsigned int key_id, const DataLimit::Mode cdl_mode, const DataLimit::State cdl_status) |
|
CryptoDCSettings & | dc_settings () |
|
void | reset_dc_factory () |
|
void | set_local_peer_id (const int local_peer_id) |
|
const Time & | now () const |
|
void | update_now () |
|
const Frame & | frame () const |
|
const Frame::Ptr & | frameptr () const |
|
const Mode & | mode () const |
|
bool | is_server () const |
|
bool | is_client () const |
|
bool | is_tcp () |
|
bool | is_udp () |
|
const ProtoConfig & | conf () const |
|
ProtoConfig & | conf () |
|
ProtoConfig::Ptr | conf_ptr () const |
|
SessionStats & | stat () const |
|
bool | is_state_client_wait_reset_ack () const |
|
|
enum | {
KEY_ID_MASK = 0x07
, OPCODE_SHIFT = 3
, CONTROL_SOFT_RESET_V1 = 3
, CONTROL_V1 = 4
,
CONTROL_WKC_V1 = 11
, ACK_V1 = 5
, DATA_V1 = 6
, DATA_V2 = 9
,
CONTROL_HARD_RESET_CLIENT_V2 = 7
, CONTROL_HARD_RESET_CLIENT_V3 = 10
, CONTROL_HARD_RESET_SERVER_V2 = 8
, INVALID_OPCODE = 0
,
OP_SIZE_V2 = 4
, OP_PEER_ID_UNDEF = 0x00FFFFFF
, STATE_UNDEF = -1
, C_WAIT_RESET_ACK = 0
,
C_WAIT_AUTH_ACK = 1
, S_WAIT_RESET_ACK = 2
, S_WAIT_AUTH_ACK = 3
, LAST_ACK_STATE = 3
,
C_INITIAL = 4
, C_WAIT_RESET = 5
, C_WAIT_AUTH = 6
, S_INITIAL = 7
,
S_WAIT_RESET = 8
, S_WAIT_AUTH = 9
, ACTIVE = 10
} |
|
enum | iv_proto_flag : unsigned int {
IV_PROTO_DATA_V2 = (1 << 1)
, IV_PROTO_REQUEST_PUSH = (1 << 2)
, IV_PROTO_TLS_KEY_EXPORT = (1 << 3)
, IV_PROTO_AUTH_PENDING_KW = (1 << 4)
,
IV_PROTO_NCP_P2P = (1 << 5)
, IV_PROTO_DNS_OPTION = (1 << 6)
, IV_PROTO_CC_EXIT_NOTIFY = (1 << 7)
, IV_PROTO_AUTH_FAIL_TEMP = (1 << 8)
,
IV_PROTO_DYN_TLS_CRYPT = (1 << 9)
, IV_PROTO_DATA_EPOCH = (1 << 10)
, IV_PROTO_DNS_OPTION_V2 = (1 << 11)
, IV_PROTO_PUSH_UPDATE = (1 << 12)
} |
|
enum | tlv_types : uint16_t { EARLY_NEG_FLAGS = 0x0001
} |
|
enum | early_neg_flags : uint16_t { EARLY_NEG_FLAG_RESEND_WKC = 0x0001
} |
|
Definition at line 205 of file proto.hpp.
Resets ProtoContext *this to it's initial state.
- Parameters
-
cookie_psid | the ProtoSessionID parameter that allows a server implementation using the psid cookie mechanism to pass in the verified hmac server session cookie. In the client implementation, the parameter is meaningless and defaults to an empty ProtoSessionID which is created at compile time since the default ProtoSessionID ctor is constexpr. For the default cookie_psid, defined() returns false (vs true for the verified session cookie) so the absence of a parameter selects the correct code path. |
tls-auth/tls-crypt packet id. We start with a different id here to indicate EARLY_NEG_START/CONTROL_WKC_V1 support
Initialize tls_auth packet ID for the send case
The second argument sets the expected packet id. If the server implementation is using the psid cookie mechanism, the state creation is deferred until the client's second packet, id 1, is received; otherwise we expect to handle the 1st packet, id 0.
Definition at line 3993 of file proto.hpp.