OpenVPN
Data Fields
frame Struct Reference

Packet geometry parameters. More...

#include <mtu.h>

Data Fields

struct {
   int   payload_size
 the maximum size that a payload that our buffers can hold from either tun device or network link. More...
 
   int   headroom
 the headroom in the buffer, this is choosen to allow all potential header to be added before the packet More...
 
   int   tailroom
 the tailroom in the buffer. More...
 
buf
 
uint16_t mss_fix
 The actual MSS value that should be written to the payload packets. More...
 
int max_fragment_size
 The maximum size of a fragment. More...
 
int tun_mtu
 the (user) configured tun-mtu. More...
 
int tun_max_mtu
 the maximum tun-mtu size the buffers are are sized for. More...
 
int extra_tun
 Maximum number of bytes in excess of the tun/tap MTU that might be read from or written to the virtual tun/tap network interface. More...
 

Detailed Description

Packet geometry parameters.

Definition at line 98 of file mtu.h.

Field Documentation

◆ buf

struct { ... } frame::buf

◆ extra_tun

int frame::extra_tun

Maximum number of bytes in excess of the tun/tap MTU that might be read from or written to the virtual tun/tap network interface.

Only set with the option –tun-mtu-extra which defaults to 0 for tun and 32 (TAP_MTU_EXTRA_DEFAULT) for tap.

Definition at line 145 of file mtu.h.

Referenced by do_init_frame(), frame_calculate_mssfix(), frame_calculate_payload_size(), and frame_print().

◆ headroom

int frame::headroom

◆ max_fragment_size

int frame::max_fragment_size

The maximum size of a fragment.

Fragmentation is done on the unencrypted payload after (potential) compression. So this value specifies the maximum payload size that can be send in a single fragment

Definition at line 124 of file mtu.h.

Referenced by fragment_outgoing(), frame_calculate_fragment(), and frame_print().

◆ mss_fix

uint16_t frame::mss_fix

The actual MSS value that should be written to the payload packets.

This is the value for IPv4 TCP packets. For IPv6 packets another 20 bytes must be subtracted

Definition at line 118 of file mtu.h.

Referenced by frame_calculate_mssfix(), frame_print(), multi_client_setup_dco_initial(), p2p_set_dco_keepalive(), and process_ip_header().

◆ payload_size

int frame::payload_size

◆ tailroom

int frame::tailroom

the tailroom in the buffer.

Chosen large enough to also accompany any extrea header or work space required by decryption/encryption or compression.

Definition at line 112 of file mtu.h.

Referenced by frame_finalize_options(), frame_print(), init_frame_parameters(), and tls_init_control_channel_frame_parameters().

◆ tun_max_mtu

int frame::tun_max_mtu

the maximum tun-mtu size the buffers are are sized for.

This is the upper bound that a server can push as MTU

Definition at line 141 of file mtu.h.

Referenced by do_deferred_options(), do_init_frame_tls(), frame_finalize_options(), and frame_print().

◆ tun_mtu

int frame::tun_mtu

the (user) configured tun-mtu.

This is used in configuring the tun interface or in calculations that use the desired size of the payload in the buffer.

This variable is also used in control frame context to set the desired maximum control frame payload (although most of code ignores it)

Definition at line 131 of file mtu.h.

Referenced by do_close_tun(), do_deferred_options(), do_open_tun(), frame_finalize_options(), frame_print(), init_frame_parameters(), ipv6_send_icmp_unreachable(), options_string(), and tls_init_control_channel_frame_parameters().


The documentation for this struct was generated from the following file: