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

Go to the source code of this file.


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, int msglevel)
struct client_nat_option_listnew_client_nat_list (struct gc_arena *gc)
struct client_nat_option_listclone_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, int msglevel)
static void print_pkt (struct openvpn_iphdr *iph, const char *prefix, const int direction, const int 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,
int  msglevel 

◆ add_entry()

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

◆ 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 83 of file clinat.c.

References ALLOC_OBJ_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 92 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 75 of file clinat.c.


Referenced by cnol_check_alloc().

◆ print_client_nat_list()

void print_client_nat_list ( const struct client_nat_option_list list,
int  msglevel 

◆ print_pkt()

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