Go to the documentation of this file.
56 0x28, 0x7f, 0x34, 0x6b, 0xd4, 0xef, 0x7a, 0x81,
57 0x2d, 0x56, 0xb8, 0xd3, 0xaf, 0xc5, 0x45, 0x9c
158 "NOTE: failed to obtain options consistency info from peer -- "
159 "this could occur if the remote peer is running a version of "
161 " before 1.5-beta8 or if there is a network connectivity problem, and will not necessarily prevent "
164 " bytes authenticated data channel traffic) -- you can disable the options consistency "
165 "check with --disable-occ.",
193 "NOTE: Beginning empirical MTU test -- results should be available in 3 to 4 minutes.");
209 "NOTE: failed to empirically measure MTU (requires " PACKAGE_NAME " 1.5 or higher at other end of connection).");
302 size_t proto_hdr, payload_hdr;
317 while (need_to_add > 0)
332 (
int)
sizeof(uint8_t),
411 msg(
M_INFO,
"NOTE: Empirical MTU test completed [Tried,Actual] local->remote=[%d,%d] remote->local=[%d,%d]",
422 msg(
M_INFO,
"NOTE: This connection is unable to accommodate a UDP packet size of %d. Consider using --fragment or --mssfix options as a workaround.",
static bool buf_safe(const struct buffer *buf, size_t len)
int len
Length in bytes of the actual content within the allocated memory.
bool options_cmp_equal_safe(char *actual, const char *expected, size_t actual_n)
size_t frame_calculate_payload_size(const struct frame *frame, const struct options *options, const struct key_type *kt)
Calculates the size of the payload according to tun-mtu and tap overhead.
#define buf_init(buf, offset)
Contains all state information for one tunnel.
size_t frame_calculate_payload_overhead(size_t extra_tun, const struct options *options, const struct key_type *kt)
Calculates the size of the payload overhead according to tun-mtu and tap overhead.
long int get_random(void)
static const struct mtu_load_test mtu_load_test_sequence[]
void options_warning_safe(char *actual, const char *expected, size_t actual_n)
struct connection_entry ce
struct context_buffers * buffers
size_t frame_calculate_protocol_header_size(const struct key_type *kt, const struct options *options, bool occ)
Calculates the size of the OpenVPN protocol header.
static bool proto_is_dgram(int proto)
Return if the protocol is datagram (UDP)
counter_type link_read_bytes
struct event_timeout occ_interval
void check_send_occ_req_dowork(struct context *c)
struct context_2 c2
Level 2 context.
static bool buf_advance(struct buffer *buf, int size)
static bool buf_write_u16(struct buffer *dest, uint16_t data)
void encrypt_sign(struct context *c, bool comp_frag)
Process a data channel packet that will be sent through a VPN tunnel.
static bool buf_write_u8(struct buffer *dest, uint8_t data)
int payload_size
the maximum size that a payload that our buffers can hold from either tun device or network link.
void process_received_occ_msg(struct context *c)
struct options options
Options loaded from command line or configuration file.
static int buf_read_u16(struct buffer *buf)
const uint8_t occ_magic[]
char * options_string_remote
static bool buf_write(struct buffer *dest, const void *src, size_t size)
#define OCC_MTU_LOAD_REQUEST
void check_send_occ_load_test_dowork(struct context *c)
struct signal_info * sig
Internal error signaling object.
struct event_timeout occ_mtu_load_test_interval
static int min_int(int x, int y)
counter_type link_read_bytes_auth
static int buf_read_u8(struct buffer *buf)
char * options_string_local
static void event_timeout_clear(struct event_timeout *et)
Clears the timeout and reset all values to 0.
void check_send_occ_msg_dowork(struct context *c)
void register_signal(struct signal_info *si, int signum, const char *signal_text)
Register a soft signal in the signal_info struct si respecting priority.
static void event_timeout_reset(struct event_timeout *et)
Resets a timer.
int headroom
the headroom in the buffer, this is choosen to allow all potential header to be added before the pack...
struct context_1 c1
Level 1 context.
static bool connection_established(struct context *c)