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

Go to the source code of this file.

Data Structures

struct  client_nat_entry
 
struct  client_nat_option_list
 

Macros

#define MAX_CLIENT_NAT   64
 
#define CN_OUTGOING   0
 
#define CN_INCOMING   1
 
#define CN_SNAT   0
 
#define CN_DNAT   1
 

Functions

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 print_client_nat_list (const struct client_nat_option_list *list, int msglevel)
 
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)
 
void client_nat_transform (const struct client_nat_option_list *list, struct buffer *ipbuf, const int direction)
 

Macro Definition Documentation

◆ CN_DNAT

#define CN_DNAT   1

Definition at line 36 of file clinat.h.

Referenced by add_client_nat_to_option_list().

◆ CN_INCOMING

#define CN_INCOMING   1

Definition at line 32 of file clinat.h.

Referenced by print_pkt(), and process_ip_header().

◆ CN_OUTGOING

#define CN_OUTGOING   0

Definition at line 31 of file clinat.h.

Referenced by print_pkt(), and process_ip_header().

◆ CN_SNAT

#define CN_SNAT   0

Definition at line 35 of file clinat.h.

Referenced by add_client_nat_to_option_list().

◆ MAX_CLIENT_NAT

#define MAX_CLIENT_NAT   64

Definition at line 29 of file clinat.h.

Referenced by add_entry().

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 
)

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

References ALLOC_OBJ_GC.

Referenced by pre_pull_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 94 of file clinat.c.

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

Referenced by pre_pull_restore().

◆ new_client_nat_list()

struct client_nat_option_list* new_client_nat_list ( struct gc_arena gc)

Definition at line 77 of file clinat.c.

References ALLOC_OBJ_CLEAR_GC.

Referenced by cnol_check_alloc().

◆ print_client_nat_list()

void print_client_nat_list ( const struct client_nat_option_list list,
int  msglevel 
)