FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
cnat_types.h File Reference
+ Include dependency graph for cnat_types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cnat_endpoint_t_
 
struct  cnat_endpoint_tuple_t_
 
struct  cnat_snat_pfx_table_meta_t
 
struct  cnat_snat_pfx_table_t
 
struct  cnat_main_
 
struct  cnat_timestamp_t_
 
struct  cnat_node_ctx_t_
 

Macros

#define CNAT_FIB_TABLE   0
 
#define CNAT_DEFAULT_SESSION_MAX_AGE   30
 
#define CNAT_DEFAULT_TCP_MAX_AGE   3600
 
#define CNAT_DEFAULT_TCP_RST_TIMEOUT   5
 
#define CNAT_DEFAULT_SCANNER_TIMEOUT   (1.0)
 
#define CNAT_DEFAULT_SESSION_BUCKETS   1024
 
#define CNAT_DEFAULT_TRANSLATION_BUCKETS   1024
 
#define CNAT_DEFAULT_SNAT_BUCKETS   1024
 
#define CNAT_DEFAULT_SESSION_MEMORY   (1 << 20)
 
#define CNAT_DEFAULT_TRANSLATION_MEMORY   (256 << 10)
 
#define CNAT_DEFAULT_SNAT_MEMORY   (64 << 20)
 
#define CNAT_FIB_SOURCE_PRIORITY   0x02
 
#define CNAT_TIMESTAMP_INIT_REFCNT   2
 
#define MIN_SRC_PORT   ((u16) 0xC000)
 
#define cnat_error(n, s)   CNAT_ERROR_##n,
 

Typedefs

typedef struct cnat_endpoint_t_ cnat_endpoint_t
 
typedef struct cnat_endpoint_tuple_t_ cnat_endpoint_tuple_t
 
typedef struct cnat_main_ cnat_main_t
 
typedef struct cnat_timestamp_t_ cnat_timestamp_t
 
typedef struct cnat_node_ctx_t_ cnat_node_ctx_t
 

Enumerations

enum  cnat_error_t { CNAT_N_ERROR }
 

Functions

u8format_cnat_endpoint (u8 *s, va_list *args)
 
uword unformat_cnat_ep_tuple (unformat_input_t *input, va_list *args)
 
uword unformat_cnat_ep (unformat_input_t *input, va_list *args)
 
static u32 cnat_timestamp_new (f64 t)
 
static void cnat_timestamp_inc_refcnt (u32 index)
 
static void cnat_timestamp_update (u32 index, f64 t)
 
static void cnat_timestamp_set_lifetime (u32 index, u16 lifetime)
 
static f64 cnat_timestamp_exp (u32 index)
 
static void cnat_timestamp_free (u32 index)
 
static void cnat_free_port (u16 port)
 
static int cnat_allocate_port (cnat_main_t *cm, u16 *port)
 

Variables

cnat_timestamp_tcnat_timestamps
 
fib_source_t cnat_fib_source
 
cnat_main_t cnat_main
 
throttle_t cnat_throttle
 
char * cnat_error_strings []
 

Macro Definition Documentation

◆ CNAT_DEFAULT_SCANNER_TIMEOUT

#define CNAT_DEFAULT_SCANNER_TIMEOUT   (1.0)

Definition at line 33 of file cnat_types.h.

◆ CNAT_DEFAULT_SESSION_BUCKETS

#define CNAT_DEFAULT_SESSION_BUCKETS   1024

Definition at line 35 of file cnat_types.h.

◆ CNAT_DEFAULT_SESSION_MAX_AGE

#define CNAT_DEFAULT_SESSION_MAX_AGE   30

Definition at line 28 of file cnat_types.h.

◆ CNAT_DEFAULT_SESSION_MEMORY

#define CNAT_DEFAULT_SESSION_MEMORY   (1 << 20)

Definition at line 39 of file cnat_types.h.

◆ CNAT_DEFAULT_SNAT_BUCKETS

#define CNAT_DEFAULT_SNAT_BUCKETS   1024

Definition at line 37 of file cnat_types.h.

◆ CNAT_DEFAULT_SNAT_MEMORY

#define CNAT_DEFAULT_SNAT_MEMORY   (64 << 20)

Definition at line 41 of file cnat_types.h.

◆ CNAT_DEFAULT_TCP_MAX_AGE

#define CNAT_DEFAULT_TCP_MAX_AGE   3600

Definition at line 30 of file cnat_types.h.

◆ CNAT_DEFAULT_TCP_RST_TIMEOUT

#define CNAT_DEFAULT_TCP_RST_TIMEOUT   5

Definition at line 32 of file cnat_types.h.

◆ CNAT_DEFAULT_TRANSLATION_BUCKETS

#define CNAT_DEFAULT_TRANSLATION_BUCKETS   1024

Definition at line 36 of file cnat_types.h.

◆ CNAT_DEFAULT_TRANSLATION_MEMORY

#define CNAT_DEFAULT_TRANSLATION_MEMORY   (256 << 10)

Definition at line 40 of file cnat_types.h.

◆ cnat_error

#define cnat_error (   n,
 
)    CNAT_ERROR_##n,

Definition at line 164 of file cnat_types.h.

◆ CNAT_FIB_SOURCE_PRIORITY

#define CNAT_FIB_SOURCE_PRIORITY   0x02

Definition at line 45 of file cnat_types.h.

◆ CNAT_FIB_TABLE

#define CNAT_FIB_TABLE   0

Definition at line 25 of file cnat_types.h.

◆ CNAT_TIMESTAMP_INIT_REFCNT

#define CNAT_TIMESTAMP_INIT_REFCNT   2

Definition at line 48 of file cnat_types.h.

◆ MIN_SRC_PORT

#define MIN_SRC_PORT   ((u16) 0xC000)

Definition at line 50 of file cnat_types.h.

Typedef Documentation

◆ cnat_endpoint_t

◆ cnat_endpoint_tuple_t

◆ cnat_main_t

typedef struct cnat_main_ cnat_main_t

◆ cnat_node_ctx_t

◆ cnat_timestamp_t

Enumeration Type Documentation

◆ cnat_error_t

Enumerator
CNAT_N_ERROR 

Definition at line 162 of file cnat_types.h.

Function Documentation

◆ cnat_allocate_port()

static int cnat_allocate_port ( cnat_main_t cm,
u16 port 
)
inlinestatic

Definition at line 252 of file cnat_types.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cnat_free_port()

static void cnat_free_port ( u16  port)
inlinestatic

Definition at line 243 of file cnat_types.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cnat_timestamp_exp()

static f64 cnat_timestamp_exp ( u32  index)
inlinestatic

Definition at line 217 of file cnat_types.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cnat_timestamp_free()

static void cnat_timestamp_free ( u32  index)
inlinestatic

Definition at line 230 of file cnat_types.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cnat_timestamp_inc_refcnt()

static void cnat_timestamp_inc_refcnt ( u32  index)
inlinestatic

Definition at line 190 of file cnat_types.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cnat_timestamp_new()

static u32 cnat_timestamp_new ( f64  t)
inlinestatic

Definition at line 175 of file cnat_types.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cnat_timestamp_set_lifetime()

static void cnat_timestamp_set_lifetime ( u32  index,
u16  lifetime 
)
inlinestatic

Definition at line 208 of file cnat_types.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cnat_timestamp_update()

static void cnat_timestamp_update ( u32  index,
f64  t 
)
inlinestatic

Definition at line 199 of file cnat_types.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_cnat_endpoint()

u8* format_cnat_endpoint ( u8 s,
va_list *  args 
)

Definition at line 65 of file cnat_types.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unformat_cnat_ep()

uword unformat_cnat_ep ( unformat_input_t input,
va_list *  args 
)

Definition at line 30 of file cnat_types.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unformat_cnat_ep_tuple()

uword unformat_cnat_ep_tuple ( unformat_input_t input,
va_list *  args 
)

Definition at line 49 of file cnat_types.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ cnat_error_strings

char* cnat_error_strings[]

Definition at line 23 of file cnat_types.c.

◆ cnat_fib_source

fib_source_t cnat_fib_source

Definition at line 19 of file cnat_types.c.

◆ cnat_main

cnat_main_t cnat_main

Definition at line 18 of file cnat_types.c.

◆ cnat_throttle

throttle_t cnat_throttle

Definition at line 21 of file cnat_types.c.

◆ cnat_timestamps

cnat_timestamp_t* cnat_timestamps

Definition at line 20 of file cnat_types.c.