FD.io VPP  v21.06-3-gbb25fbf28
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_echo_header_t
 
struct  cnat_main_
 
struct  cnat_timestamp_t_
 
struct  cnat_node_ctx_
 

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_SNAT_IF_MAP_LEN   4096
 
#define CNAT_DEFAULT_SESSION_MEMORY   (1 << 20)
 
#define CNAT_DEFAULT_TRANSLATION_MEMORY   (256 << 10)
 
#define CNAT_DEFAULT_SNAT_MEMORY   (64 << 20)
 
#define CNAT_DEFAULT_MAGLEV_LEN   1009
 
#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 enum cnat_trk_flag_t_ cnat_trk_flag_t
 
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_ cnat_node_ctx_t
 
typedef enum cnat_scanner_cmd_t_ cnat_scanner_cmd_t
 

Enumerations

enum  cnat_trk_flag_t_ { CNAT_TRK_ACTIVE = (1 << 0), CNAT_TRK_FLAG_NO_NAT = (1 << 1) }
 
enum  cnat_ep_flag_t { CNAT_EP_FLAG_RESOLVED = (1 << 0) }
 
enum  cnat_error_t { CNAT_N_ERROR }
 
enum  cnat_scanner_cmd_t_ { CNAT_SCANNER_OFF, CNAT_SCANNER_ON }
 

Functions

cnat_main_tcnat_get_main ()
 
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)
 
void cnat_lazy_init ()
 Lazy initialization when first adding a translation or using snat. More...
 
void cnat_enable_disable_scanner (cnat_scanner_cmd_t event_type)
 Enable/Disable session cleanup. More...
 
u8 cnat_resolve_ep (cnat_endpoint_t *ep)
 Resolve endpoint address. More...
 
u8 cnat_resolve_addr (u32 sw_if_index, ip_address_family_t af, ip_address_t *addr)
 

Variables

cnat_timestamp_tcnat_timestamps
 
fib_source_t cnat_fib_source
 
cnat_main_t cnat_main
 
char * cnat_error_strings []
 

Macro Definition Documentation

◆ CNAT_DEFAULT_MAGLEV_LEN

#define CNAT_DEFAULT_MAGLEV_LEN   1009

Definition at line 47 of file cnat_types.h.

◆ CNAT_DEFAULT_SCANNER_TIMEOUT

#define CNAT_DEFAULT_SCANNER_TIMEOUT   (1.0)

Definition at line 35 of file cnat_types.h.

◆ CNAT_DEFAULT_SESSION_BUCKETS

#define CNAT_DEFAULT_SESSION_BUCKETS   1024

Definition at line 37 of file cnat_types.h.

◆ CNAT_DEFAULT_SESSION_MAX_AGE

#define CNAT_DEFAULT_SESSION_MAX_AGE   30

Definition at line 30 of file cnat_types.h.

◆ CNAT_DEFAULT_SESSION_MEMORY

#define CNAT_DEFAULT_SESSION_MEMORY   (1 << 20)

Definition at line 42 of file cnat_types.h.

◆ CNAT_DEFAULT_SNAT_BUCKETS

#define CNAT_DEFAULT_SNAT_BUCKETS   1024

Definition at line 39 of file cnat_types.h.

◆ CNAT_DEFAULT_SNAT_IF_MAP_LEN

#define CNAT_DEFAULT_SNAT_IF_MAP_LEN   4096

Definition at line 40 of file cnat_types.h.

◆ CNAT_DEFAULT_SNAT_MEMORY

#define CNAT_DEFAULT_SNAT_MEMORY   (64 << 20)

Definition at line 44 of file cnat_types.h.

◆ CNAT_DEFAULT_TCP_MAX_AGE

#define CNAT_DEFAULT_TCP_MAX_AGE   3600

Definition at line 32 of file cnat_types.h.

◆ CNAT_DEFAULT_TCP_RST_TIMEOUT

#define CNAT_DEFAULT_TCP_RST_TIMEOUT   5

Definition at line 34 of file cnat_types.h.

◆ CNAT_DEFAULT_TRANSLATION_BUCKETS

#define CNAT_DEFAULT_TRANSLATION_BUCKETS   1024

Definition at line 38 of file cnat_types.h.

◆ CNAT_DEFAULT_TRANSLATION_MEMORY

#define CNAT_DEFAULT_TRANSLATION_MEMORY   (256 << 10)

Definition at line 43 of file cnat_types.h.

◆ cnat_error

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

Definition at line 176 of file cnat_types.h.

◆ CNAT_FIB_SOURCE_PRIORITY

#define CNAT_FIB_SOURCE_PRIORITY   0x02

Definition at line 51 of file cnat_types.h.

◆ CNAT_FIB_TABLE

#define CNAT_FIB_TABLE   0

Definition at line 27 of file cnat_types.h.

◆ CNAT_TIMESTAMP_INIT_REFCNT

#define CNAT_TIMESTAMP_INIT_REFCNT   2

Definition at line 54 of file cnat_types.h.

◆ MIN_SRC_PORT

#define MIN_SRC_PORT   ((u16) 0xC000)

Definition at line 56 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_scanner_cmd_t

◆ cnat_timestamp_t

◆ cnat_trk_flag_t

Enumeration Type Documentation

◆ cnat_ep_flag_t

Enumerator
CNAT_EP_FLAG_RESOLVED 

Definition at line 67 of file cnat_types.h.

◆ cnat_error_t

Enumerator
CNAT_N_ERROR 

Definition at line 174 of file cnat_types.h.

◆ cnat_scanner_cmd_t_

Enumerator
CNAT_SCANNER_OFF 
CNAT_SCANNER_ON 

Definition at line 182 of file cnat_types.h.

◆ cnat_trk_flag_t_

Enumerator
CNAT_TRK_ACTIVE 
CNAT_TRK_FLAG_NO_NAT 

Definition at line 58 of file cnat_types.h.

Function Documentation

◆ cnat_enable_disable_scanner()

void cnat_enable_disable_scanner ( cnat_scanner_cmd_t  event_type)

Enable/Disable session cleanup.

Definition at line 169 of file cnat_types.c.

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

◆ cnat_get_main()

cnat_main_t* cnat_get_main ( )

Definition at line 247 of file cnat_types.c.

◆ cnat_lazy_init()

void cnat_lazy_init ( )

Lazy initialization when first adding a translation or using snat.

Definition at line 176 of file cnat_types.c.

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

◆ cnat_resolve_addr()

u8 cnat_resolve_addr ( u32  sw_if_index,
ip_address_family_t  af,
ip_address_t addr 
)

Definition at line 29 of file cnat_types.c.

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

◆ cnat_resolve_ep()

u8 cnat_resolve_ep ( cnat_endpoint_t ep)

Resolve endpoint address.

Definition at line 63 of file cnat_types.c.

+ 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 134 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 73 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 115 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 22 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_timestamps

cnat_timestamp_t* cnat_timestamps

Definition at line 20 of file cnat_types.c.