OpenVPN
Data Fields
fragment_master Struct Reference

Fragmentation and reassembly state for one VPN tunnel instance. More...

#include <fragment.h>

Collaboration diagram for fragment_master:
Collaboration graph
[legend]

Data Fields

struct event_timeout wakeup
 Timeout structure used by the main event loop to know when to do fragmentation housekeeping. More...
 
bool received_os_mtu_hint
 Whether the operating system has explicitly recommended an MTU value. More...
 
int outgoing_seq_id
 Fragment sequence ID of the current fragmented packet waiting to be sent. More...
 
int outgoing_frag_size
 Size in bytes of each part to be sent, except for the last part which may be smaller. More...
 
int outgoing_frag_id
 The fragment ID of the next part to be sent. More...
 
struct buffer outgoing
 Buffer containing the remaining parts of the fragmented packet being sent. More...
 
struct buffer outgoing_return
 Buffer used by fragment_ready_to_send() to return a part to send. More...
 
struct fragment_list incoming
 List of structures for reassembling incoming packets. More...
 

Detailed Description

Fragmentation and reassembly state for one VPN tunnel instance.

This structure contains all the state necessary for sending and receiving fragmented data channel packets associated with one VPN tunnel.

The fragmented packet currently being sent to a remote OpenVPN peer is stored in fragment_master.outgoing. It is copied into that buffer by the fragment_outgoing() function and the remaining parts to be sent can be retrieved by successive calls to fragment_ready_to_send().

The received packets currently being reassembled are stored in the fragment_master.incoming array of fragment structures. The fragment_incoming() function adds newly received parts into this array and returns the whole packets once reassembly is complete.

Definition at line 136 of file fragment.h.

Field Documentation

◆ incoming

struct fragment_list fragment_master::incoming

List of structures for reassembling incoming packets.

Definition at line 179 of file fragment.h.

◆ outgoing

struct buffer fragment_master::outgoing

Buffer containing the remaining parts of the fragmented packet being sent.

Definition at line 172 of file fragment.h.

Referenced by multi_process_post().

◆ outgoing_frag_id

int fragment_master::outgoing_frag_id

The fragment ID of the next part to be sent.

Must have a value between 0 and MAX_FRAGS-1.

Definition at line 169 of file fragment.h.

◆ outgoing_frag_size

int fragment_master::outgoing_frag_size

Size in bytes of each part to be sent, except for the last part which may be smaller.

This value is computed by the optimal_fragment_size() function. Its value is sent to the remote peer in the fragmentation header of the last part (i.e. with fragment type FRAG_YES_LAST) using the FRAG_SIZE_MASK and FRAG_SIZE_SHIFT bits.

Definition at line 157 of file fragment.h.

◆ outgoing_return

struct buffer fragment_master::outgoing_return

Buffer used by fragment_ready_to_send() to return a part to send.

Definition at line 174 of file fragment.h.

◆ outgoing_seq_id

int fragment_master::outgoing_seq_id

Fragment sequence ID of the current fragmented packet waiting to be sent.

All parts of a fragmented packet share the same sequence ID, so that the remote OpenVPN peer can determine which parts belong to which original packet.

Definition at line 146 of file fragment.h.

Referenced by fragment_init().

◆ received_os_mtu_hint

bool fragment_master::received_os_mtu_hint

Whether the operating system has explicitly recommended an MTU value.

Definition at line 140 of file fragment.h.

◆ wakeup

struct event_timeout fragment_master::wakeup

Timeout structure used by the main event loop to know when to do fragmentation housekeeping.

Definition at line 137 of file fragment.h.

Referenced by fragment_init().


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