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) |
Variables | |
const uint8_t | occ_magic [] |
#define OCC_EXIT 6 |
Definition at line 67 of file occ.h.
Referenced by check_send_occ_msg_dowork(), process_explicit_exit_notification_timer_wakeup(), and process_received_occ_msg().
#define OCC_INTERVAL_SECONDS 10 |
Definition at line 46 of file occ.h.
Referenced by do_init_timers().
#define OCC_MTU_LOAD 3 /* Send a big packet to peer */ |
Definition at line 53 of file occ.h.
Referenced by check_send_occ_msg_dowork(), and process_received_occ_msg().
#define OCC_MTU_LOAD_INTERVAL_SECONDS 3 |
Definition at line 62 of file occ.h.
Referenced by do_init_timers().
#define OCC_MTU_LOAD_REQUEST 2 /* Ask peer to send a big packet to us */ |
Definition at line 52 of file occ.h.
Referenced by check_send_occ_msg_dowork(), and process_received_occ_msg().
#define OCC_MTU_REPLY 5 /* Send largest packet size to peer */ |
Definition at line 56 of file occ.h.
Referenced by check_send_occ_msg_dowork(), and process_received_occ_msg().
#define OCC_MTU_REQUEST |
Definition at line 54 of file occ.h.
Referenced by check_send_occ_msg_dowork(), and process_received_occ_msg().
#define OCC_N_TRIES 12 |
Definition at line 47 of file occ.h.
Referenced by check_send_occ_req_dowork().
#define OCC_REPLY 1 /* deliver options string to peer */ |
Definition at line 37 of file occ.h.
Referenced by check_send_occ_msg_dowork(), and process_received_occ_msg().
#define OCC_REQUEST 0 /* request options string from peer */ |
Definition at line 36 of file occ.h.
Referenced by check_send_occ_msg_dowork(), check_send_occ_req_dowork(), and process_received_occ_msg().
#define OCC_STRING_SIZE 16 |
Definition at line 30 of file occ.h.
Referenced by check_send_occ_msg_dowork(), is_occ_msg(), and process_received_occ_msg().
|
inlinestatic |
Definition at line 126 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 186 of file occ.c.
References context::c2, connection_established(), mtu_load_test::delta, event_timeout_clear(), EXPANDED_SIZE, context_2::frame, M_INFO, msg, 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, and PACKAGE_NAME.
Referenced by check_send_occ_load_test(), and is_occ_msg().
|
inlinestatic |
Definition at line 141 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 216 of file occ.c.
References ASSERT, context_buffers::aux_buf, BLEN, context_2::buf, buf_init, buf_safe(), buf_write(), buf_write_u16(), buf_write_u8(), context_2::buffers, context::c2, D_PACKET_CONTENT, dmsg, encrypt_sign(), EXPANDED_SIZE, EXTRA_FRAME, context_2::frame, FRAME_HEADROOM, get_random(), context_2::max_recv_size_local, MAX_RW_SIZE_TUN, 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, and context_2::options_string_local.
Referenced by check_send_occ_msg(), and is_occ_msg().
|
inlinestatic |
Definition at line 111 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 149 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(), and is_occ_msg().
|
inlinestatic |
Definition at line 84 of file occ.h.
References buf_string_match_head(), check_send_occ_load_test_dowork(), check_send_occ_msg_dowork(), check_send_occ_req_dowork(), occ_magic, OCC_STRING_SIZE, and process_received_occ_msg().
Referenced by process_incoming_link_part2().
|
inlinestatic |
Definition at line 102 of file occ.h.
Referenced by init_instance().
void process_received_occ_msg | ( | struct context * | c | ) |
Definition at line 351 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, 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(), context::sig, signal_info::signal_received, signal_info::signal_text, SIGTERM, TLS_MODE, and TUN_MTU_MIN.
Referenced by is_occ_msg(), and process_incoming_link_part2().
const uint8_t occ_magic[] |
Definition at line 57 of file occ.c.
Referenced by check_send_occ_msg_dowork(), and is_occ_msg().