OpenVPN
Data Structures | Macros | Functions | Variables
occ.h File Reference
#include "forward.h"
Include dependency graph for occ.h:
This graph shows which files directly or indirectly include this file:

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)
 
static bool cc_exit_notify_enabled (struct context *c)
 Small helper function to determine if we should send the exit notification via control channel. More...
 

Variables

const uint8_t occ_magic []
 

Macro Definition Documentation

◆ OCC_EXIT

#define OCC_EXIT   6

Definition at line 66 of file occ.h.

◆ OCC_INTERVAL_SECONDS

#define OCC_INTERVAL_SECONDS   10

Definition at line 46 of file occ.h.

◆ OCC_MTU_LOAD

#define OCC_MTU_LOAD   3 /* Send a big packet to peer */

Definition at line 53 of file occ.h.

◆ OCC_MTU_LOAD_INTERVAL_SECONDS

#define OCC_MTU_LOAD_INTERVAL_SECONDS   3

Definition at line 61 of file occ.h.

◆ OCC_MTU_LOAD_REQUEST

#define OCC_MTU_LOAD_REQUEST   2 /* Ask peer to send a big packet to us */

Definition at line 52 of file occ.h.

◆ OCC_MTU_REPLY

#define OCC_MTU_REPLY   5 /* Send largest packet size to peer */

Definition at line 55 of file occ.h.

◆ OCC_MTU_REQUEST

#define OCC_MTU_REQUEST
Value:
4 /* Ask peer to tell us the largest
* packet it has received from us so far */

Definition at line 54 of file occ.h.

◆ OCC_N_TRIES

#define OCC_N_TRIES   12

Definition at line 47 of file occ.h.

◆ OCC_REPLY

#define OCC_REPLY   1 /* deliver options string to peer */

Definition at line 37 of file occ.h.

◆ OCC_REQUEST

#define OCC_REQUEST   0 /* request options string from peer */

Definition at line 36 of file occ.h.

◆ OCC_STRING_SIZE

#define OCC_STRING_SIZE   16

Definition at line 30 of file occ.h.

Function Documentation

◆ cc_exit_notify_enabled()

static bool cc_exit_notify_enabled ( struct context c)
inlinestatic

Small helper function to determine if we should send the exit notification via control channel.

Returns
control channel exit message should be used

Definition at line 160 of file occ.h.

References context::c2, CO_USE_CC_EXIT_NOTIFY, key_state::crypto_options, crypto_options::flags, get_primary_key(), and context_2::tls_multi.

Referenced by process_explicit_exit_notification_init(), and process_explicit_exit_notification_timer_wakeup().

◆ check_send_occ_load_test()

static void check_send_occ_load_test ( struct context c)
inlinestatic

◆ check_send_occ_load_test_dowork()

void check_send_occ_load_test_dowork ( struct context c)

◆ check_send_occ_msg()

static void check_send_occ_msg ( struct context c)
inlinestatic

◆ check_send_occ_msg_dowork()

void check_send_occ_msg_dowork ( struct context c)

◆ check_send_occ_req()

static void check_send_occ_req ( struct context c)
inlinestatic

◆ check_send_occ_req_dowork()

void check_send_occ_req_dowork ( struct context c)

◆ is_occ_msg()

static bool is_occ_msg ( const struct buffer buf)
inlinestatic

Definition at line 83 of file occ.h.

References buf_string_match_head(), occ_magic, and OCC_STRING_SIZE.

Referenced by process_incoming_link_part2().

◆ occ_reset_op()

static int occ_reset_op ( void  )
inlinestatic

Definition at line 101 of file occ.h.

Referenced by init_instance().

◆ process_received_occ_msg()

void process_received_occ_msg ( struct context c)

Variable Documentation

◆ occ_magic

const uint8_t occ_magic[]

Definition at line 55 of file occ.c.

Referenced by check_send_occ_msg_dowork(), and is_occ_msg().