OpenVPN
|
#include "forward.h"
Go to the source code of this file.
Data Structures | |
struct | mtu_load_test |
Macros | |
#define | OCC_STRING_SIZE 16 |
#define | OCC_REQUEST 0 /* request options string from peer */ |
#define | OCC_REPLY 1 /* deliver options string to peer */ |
#define | OCC_INTERVAL_SECONDS 10 |
#define | OCC_N_TRIES 12 |
#define | OCC_MTU_LOAD_REQUEST 2 /* Ask peer to send a big packet to us */ |
#define | OCC_MTU_LOAD 3 /* Send a big packet to peer */ |
#define | OCC_MTU_REQUEST |
#define | OCC_MTU_REPLY 5 /* Send largest packet size to peer */ |
#define | OCC_MTU_LOAD_INTERVAL_SECONDS 3 |
#define | OCC_EXIT 6 |
Functions | |
static bool | is_occ_msg (const struct buffer *buf) |
void | process_received_occ_msg (struct context *c) |
void | check_send_occ_req_dowork (struct context *c) |
void | check_send_occ_load_test_dowork (struct context *c) |
void | check_send_occ_msg_dowork (struct context *c) |
static int | occ_reset_op (void) |
static void | check_send_occ_req (struct context *c) |
static void | check_send_occ_load_test (struct context *c) |
static void | check_send_occ_msg (struct context *c) |
static bool | cc_exit_notify_enabled (struct context *c) |
Small helper function to determine if we should send the exit notification via control channel. More... | |
Variables | |
const uint8_t | occ_magic [] |
#define OCC_MTU_LOAD_REQUEST 2 /* Ask peer to send a big packet to us */ |
#define OCC_MTU_REQUEST |
|
inlinestatic |
Small helper function to determine if we should send the exit notification via control channel.
Definition at line 160 of file occ.h.
References context::c2, CO_USE_CC_EXIT_NOTIFY, key_state::crypto_options, crypto_options::flags, get_primary_key(), and context_2::tls_multi.
Referenced by process_explicit_exit_notification_init(), and process_explicit_exit_notification_timer_wakeup().
|
inlinestatic |
Definition at line 125 of file occ.h.
References context::c2, check_send_occ_load_test_dowork(), ETT_DEFAULT, event_timeout_defined(), event_timeout_trigger(), context_2::occ_mtu_load_test_interval, context_2::occ_op, context_2::timeval, and TO_LINK_DEF.
Referenced by process_coarse_timers().
void check_send_occ_load_test_dowork | ( | struct context * | c | ) |
Definition at line 184 of file occ.c.
References context::c1, context::c2, connection_established(), event_timeout_clear(), context_2::frame, frame_calculate_payload_size(), frame_calculate_protocol_header_size(), key_schedule::key_type, context_1::ks, M_INFO, msg, mtu_load_test_sequence, context_2::occ_mtu_load_n_tries, context_2::occ_mtu_load_size, context_2::occ_mtu_load_test_interval, context_2::occ_op, mtu_load_test::op, context::options, and PACKAGE_NAME.
Referenced by check_send_occ_load_test().
|
inlinestatic |
Definition at line 140 of file occ.h.
References context::c2, check_send_occ_msg_dowork(), context_2::occ_op, context_2::timeval, TO_LINK_DEF, and tv_clear().
Referenced by pre_select().
void check_send_occ_msg_dowork | ( | struct context * | c | ) |
Definition at line 217 of file occ.c.
References ASSERT, context_buffers::aux_buf, BLEN, frame::buf, context_2::buf, buf_init, buf_safe(), buf_write(), buf_write_u16(), buf_write_u8(), context_2::buffers, context::c1, context::c2, D_PACKET_CONTENT, dmsg, encrypt_sign(), context_2::frame, frame_calculate_payload_overhead(), frame_calculate_protocol_header_size(), get_random(), frame::headroom, key_schedule::key_type, context_1::ks, context_2::max_recv_size_local, context_2::max_send_size_local, min_int(), OCC_EXIT, occ_magic, OCC_MTU_LOAD, OCC_MTU_LOAD_REQUEST, context_2::occ_mtu_load_size, OCC_MTU_REPLY, OCC_MTU_REQUEST, context_2::occ_op, OCC_REPLY, OCC_REQUEST, OCC_STRING_SIZE, context::options, context_2::options_string_local, and frame::payload_size.
Referenced by check_send_occ_msg().
|
inlinestatic |
Definition at line 110 of file occ.h.
References context::c2, check_send_occ_req_dowork(), ETT_DEFAULT, event_timeout_defined(), event_timeout_trigger(), context_2::occ_interval, context_2::occ_op, context_2::timeval, and TO_LINK_DEF.
Referenced by process_coarse_timers().
void check_send_occ_req_dowork | ( | struct context * | c | ) |
Definition at line 147 of file occ.c.
References context::c2, options::ce, counter_format, D_SHOW_OCC, event_timeout_clear(), event_timeout_reset(), context_2::link_read_bytes, context_2::link_read_bytes_auth, msg, context_2::occ_interval, OCC_N_TRIES, context_2::occ_n_tries, context_2::occ_op, OCC_REQUEST, context::options, PACKAGE_NAME, and connection_entry::remote.
Referenced by check_send_occ_req().
|
inlinestatic |
Definition at line 83 of file occ.h.
References buf_string_match_head(), occ_magic, and OCC_STRING_SIZE.
Referenced by process_incoming_link_part2().
|
inlinestatic |
Definition at line 101 of file occ.h.
Referenced by init_instance().
void process_received_occ_msg | ( | struct context * | c | ) |
Definition at line 363 of file occ.c.
References ASSERT, BPTR, context_2::buf, buf_advance(), buf_read_u16(), buf_read_u8(), context::c2, options::ce, D_PACKET_CONTENT, D_STREAM_ERRORS, dmsg, event_timeout_clear(), connection_entry::fragment, buffer::len, M_INFO, context_2::max_recv_size_local, context_2::max_recv_size_remote, context_2::max_send_size_local, context_2::max_send_size_remote, msg, options::mtu_test, options::occ, OCC_EXIT, context_2::occ_interval, OCC_MTU_LOAD, OCC_MTU_LOAD_REQUEST, context_2::occ_mtu_load_size, context_2::occ_mtu_load_test_interval, OCC_MTU_REPLY, OCC_MTU_REQUEST, context_2::occ_op, OCC_REPLY, OCC_REQUEST, OCC_STRING_SIZE, context::options, options_cmp_equal_safe(), context_2::options_string_remote, options_warning_safe(), connection_entry::proto, proto_is_dgram(), register_signal(), context::sig, TLS_MODE, and TUN_MTU_MIN.
Referenced by process_incoming_link_part2().
const uint8_t occ_magic[] |
Definition at line 55 of file occ.c.
Referenced by check_send_occ_msg_dowork(), and is_occ_msg().