OpenVPN
Functions
clinat.c File Reference
#include "syshead.h"
#include "clinat.h"
#include "proto.h"
#include "socket_util.h"
#include "memdbg.h"
Include dependency graph for clinat.c:

Go to the source code of this file.

Functions

static bool add_entry (struct client_nat_option_list *dest, const struct client_nat_entry *e)
 
void print_client_nat_list (const struct client_nat_option_list *list, msglvl_t msglevel)
 
struct client_nat_option_list * new_client_nat_list (struct gc_arena *gc)
 
struct client_nat_option_list * clone_client_nat_option_list (const struct client_nat_option_list *src, struct gc_arena *gc)
 
void copy_client_nat_option_list (struct client_nat_option_list *dest, const struct client_nat_option_list *src)
 
void add_client_nat_to_option_list (struct client_nat_option_list *dest, const char *type, const char *network, const char *netmask, const char *foreign_network, msglvl_t msglevel)
 
static void print_pkt (struct openvpn_iphdr *iph, const char *prefix, const int direction, const msglvl_t msglevel)
 
void client_nat_transform (const struct client_nat_option_list *list, struct buffer *ipbuf, const int direction)
 

Function Documentation

◆ add_client_nat_to_option_list()

void add_client_nat_to_option_list ( struct client_nat_option_list *  dest,
const char *  type,
const char *  network,
const char *  netmask,
const char *  foreign_network,
msglvl_t  msglevel 
)

◆ add_entry()

static bool add_entry ( struct client_nat_option_list *  dest,
const struct client_nat_entry *  e 
)
static

◆ client_nat_transform()

void client_nat_transform ( const struct client_nat_option_list *  list,
struct buffer *  ipbuf,
const int  direction 
)

◆ clone_client_nat_option_list()

struct client_nat_option_list * clone_client_nat_option_list ( const struct client_nat_option_list *  src,
struct gc_arena *  gc 
)

Definition at line 79 of file clinat.c.

References ALLOC_OBJ_GC, and gc.

Referenced by pre_connect_save().

◆ copy_client_nat_option_list()

void copy_client_nat_option_list ( struct client_nat_option_list *  dest,
const struct client_nat_option_list *  src 
)

Definition at line 88 of file clinat.c.

References add_entry(), client_nat_option_list::entries, and client_nat_option_list::n.

Referenced by pre_connect_restore().

◆ new_client_nat_list()

struct client_nat_option_list * new_client_nat_list ( struct gc_arena *  gc)

Definition at line 71 of file clinat.c.

References ALLOC_OBJ_CLEAR_GC, and gc.

Referenced by cnol_check_alloc().

◆ print_client_nat_list()

void print_client_nat_list ( const struct client_nat_option_list *  list,
msglvl_t  msglevel 
)

◆ print_pkt()

static void print_pkt ( struct openvpn_iphdr *  iph,
const char *  prefix,
const int  direction,
const msglvl_t  msglevel 
)
static