OpenVPN
|
#include "syshead.h"
#include "common.h"
#include "buffer.h"
#include "error.h"
#include "integer.h"
#include "mtu.h"
#include "options.h"
#include "memdbg.h"
Go to the source code of this file.
Macros | |
#define | MTUDISC_NOT_SUPPORTED_MSG "--mtu-disc is not supported on this OS" |
Functions | |
void | alloc_buf_sock_tun (struct buffer *buf, const struct frame *frame, const bool tuntap_buffer, const unsigned int align_mask) |
void | frame_finalize (struct frame *frame, bool link_mtu_defined, int link_mtu, bool tun_mtu_defined, int tun_mtu) |
void | frame_set_mtu_dynamic (struct frame *frame, int mtu, unsigned int flags) |
void | frame_subtract_extra (struct frame *frame, const struct frame *src) |
void | frame_init_mssfix (struct frame *frame, const struct options *options) |
Set the –mssfix option. More... | |
void | frame_print (const struct frame *frame, int level, const char *prefix) |
void | set_mtu_discover_type (int sd, int mtu_type, sa_family_t proto_af) |
int | translate_mtu_discover_type_name (const char *name) |
#define MTUDISC_NOT_SUPPORTED_MSG "--mtu-disc is not supported on this OS" |
Definition at line 166 of file mtu.c.
Referenced by set_mtu_discover_type(), and translate_mtu_discover_type_name().
void alloc_buf_sock_tun | ( | struct buffer * | buf, |
const struct frame * | frame, | ||
const bool | tuntap_buffer, | ||
const unsigned int | align_mask | ||
) |
Definition at line 43 of file mtu.c.
References alloc_buf(), ASSERT, buf_init, buf_safe(), BUF_SIZE, FRAME_HEADROOM_ADJ, buffer::len, MAX_RW_SIZE_LINK, and MAX_RW_SIZE_TUN.
Referenced by overlapped_io_init(), and socket_frame_init().
void frame_finalize | ( | struct frame * | frame, |
bool | link_mtu_defined, | ||
int | link_mtu, | ||
bool | tun_mtu_defined, | ||
int | tun_mtu | ||
) |
Definition at line 56 of file mtu.c.
References ASSERT, frame_print(), frame::link_mtu, frame::link_mtu_dynamic, M_FATAL, M_WARN, msg, TUN_LINK_DELTA, TUN_MTU_MIN, and TUN_MTU_SIZE.
Referenced by calc_options_string_link_mtu(), frame_finalize_options(), and tls_session_update_crypto_params().
Set the –mssfix option.
Definition at line 130 of file mtu.c.
References options::ce, frame_set_mtu_dynamic(), connection_entry::mssfix, and SET_MTU_UPPER_BOUND.
Referenced by init_instance(), and tls_session_update_crypto_params().
void frame_print | ( | const struct frame * | frame, |
int | level, | ||
const char * | prefix | ||
) |
Definition at line 139 of file mtu.c.
References frame::align_adjust, frame::align_flags, alloc_buf_gc(), buf_printf(), buffer::data, frame::extra_buffer, frame::extra_frame, frame::extra_link, frame::extra_tun, gc_free(), gc_new(), frame::link_mtu, frame::link_mtu_dynamic, and msg.
Referenced by do_init_finalize_tls_frame(), do_print_data_channel_mtu_parms(), frame_finalize(), and tls_session_update_crypto_params().
void frame_set_mtu_dynamic | ( | struct frame * | frame, |
int | mtu, | ||
unsigned int | flags | ||
) |
Definition at line 87 of file mtu.c.
References ASSERT, constrain_int(), D_MTU_DEBUG, dmsg, EXPANDED_SIZE, EXPANDED_SIZE_MIN, frame::link_mtu_dynamic, SET_MTU_TUN, SET_MTU_UPPER_BOUND, and TUN_LINK_DELTA.
Referenced by do_init_fragment(), do_open_tun(), frame_adjust_path_mtu(), and frame_init_mssfix().
Definition at line 123 of file mtu.c.
References frame::extra_frame, and frame::extra_tun.
Referenced by do_init_frame().
void set_mtu_discover_type | ( | int | sd, |
int | mtu_type, | ||
sa_family_t | proto_af | ||
) |
Definition at line 169 of file mtu.c.
References M_ERR, M_FATAL, msg, and MTUDISC_NOT_SUPPORTED_MSG.
Referenced by phase2_set_socket_flags().
int translate_mtu_discover_type_name | ( | const char * | name | ) |
Definition at line 205 of file mtu.c.
References alloc_buf_gc(), BSTR, buf_printf(), buf_rmtail(), gc_malloc(), M_ERRNO, M_FATAL, M_WARN, msg, MTUDISC_NOT_SUPPORTED_MSG, and SOL_IP.
Referenced by add_option().