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


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


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


#define CN_DNAT   1

Definition at line 36 of file clinat.h.


#define CN_INCOMING   1

Definition at line 32 of file clinat.h.


#define CN_OUTGOING   0

Definition at line 31 of file clinat.h.


#define CN_SNAT   0

Definition at line 35 of file clinat.h.


#define MAX_CLIENT_NAT   64

Definition at line 29 of file clinat.h.

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 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