FD.io VPP  v21.01.1
Vector Packet Processing
det44.c File Reference

deterministic NAT (CGN) More...

+ Include dependency graph for det44.c:

Go to the source code of this file.

Functions

 VNET_FEATURE_INIT (ip4_det44_in2out, static)
 
 VNET_FEATURE_INIT (ip4_det44_out2in, static)
 
 VLIB_PLUGIN_REGISTER ()
 
void det44_add_del_addr_to_fib (ip4_address_t *addr, u8 p_len, u32 sw_if_index, int is_add)
 
int snat_det_add_map (ip4_address_t *in_addr, u8 in_plen, ip4_address_t *out_addr, u8 out_plen, int is_add)
 Add/delete deterministic NAT mapping. More...
 
int det44_set_timeouts (nat_timeouts_t *timeouts)
 
nat_timeouts_t det44_get_timeouts ()
 
void det44_reset_timeouts ()
 
int det44_interface_add_del (u32 sw_if_index, u8 is_inside, int is_del)
 
static uword det44_expire_walk_fn (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 The 'det44-expire-walk' process's main loop. More...
 
void det44_create_expire_walk_process ()
 
int det44_plugin_enable (det44_config_t c)
 
int det44_plugin_disable ()
 
static void det44_update_outside_fib (ip4_main_t *im, uword opaque, u32 sw_if_index, u32 new_fib_index, u32 old_fib_index)
 
static clib_error_tdet44_init (vlib_main_t *vm)
 
u8format_det44_session_state (u8 *s, va_list *args)
 
u8format_det_map_ses (u8 *s, va_list *args)
 

Variables

det44_main_t det44_main
 

Detailed Description

deterministic NAT (CGN)

Definition in file det44.c.

Function Documentation

◆ det44_add_del_addr_to_fib()

void det44_add_del_addr_to_fib ( ip4_address_t addr,
u8  p_len,
u32  sw_if_index,
int  is_add 
)

Definition at line 53 of file det44.c.

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

◆ det44_create_expire_walk_process()

void det44_create_expire_walk_process ( )

Definition at line 344 of file det44.c.

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

◆ det44_expire_walk_fn()

static uword det44_expire_walk_fn ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)
static

The 'det44-expire-walk' process's main loop.

Check expire time for active sessions.

Definition at line 320 of file det44.c.

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

◆ det44_get_timeouts()

nat_timeouts_t det44_get_timeouts ( )

Definition at line 181 of file det44.c.

+ Here is the caller graph for this function:

◆ det44_init()

static clib_error_t* det44_init ( vlib_main_t vm)
static

Definition at line 515 of file det44.c.

+ Here is the call graph for this function:

◆ det44_interface_add_del()

int det44_interface_add_del ( u32  sw_if_index,
u8  is_inside,
int  is_del 
)

Definition at line 195 of file det44.c.

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

◆ det44_plugin_disable()

int det44_plugin_disable ( )

Definition at line 385 of file det44.c.

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

◆ det44_plugin_enable()

int det44_plugin_enable ( det44_config_t  c)

Definition at line 358 of file det44.c.

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

◆ det44_reset_timeouts()

void det44_reset_timeouts ( )

Definition at line 188 of file det44.c.

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

◆ det44_set_timeouts()

int det44_set_timeouts ( nat_timeouts_t timeouts)

Definition at line 166 of file det44.c.

+ Here is the caller graph for this function:

◆ det44_update_outside_fib()

static void det44_update_outside_fib ( ip4_main_t im,
uword  opaque,
u32  sw_if_index,
u32  new_fib_index,
u32  old_fib_index 
)
static

Definition at line 448 of file det44.c.

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

◆ format_det44_session_state()

u8* format_det44_session_state ( u8 s,
va_list *  args 
)

Definition at line 549 of file det44.c.

+ Here is the caller graph for this function:

◆ format_det_map_ses()

u8* format_det_map_ses ( u8 s,
va_list *  args 
)

Definition at line 567 of file det44.c.

+ Here is the call graph for this function:

◆ snat_det_add_map()

int snat_det_add_map ( ip4_address_t in_addr,
u8  in_plen,
ip4_address_t out_addr,
u8  out_plen,
int  is_add 
)

Add/delete deterministic NAT mapping.

Create bijective mapping of inside address to outside address and port range pairs, with the purpose of enabling deterministic NAT to reduce logging in CGN deployments.

Parameters
in_addrInside network address.
in_plenInside network prefix length.
out_addrOutside network address.
out_plenOutside network prefix length.
is_addIf 0 delete, otherwise add.

Definition at line 99 of file det44.c.

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

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

◆ VNET_FEATURE_INIT() [1/2]

VNET_FEATURE_INIT ( ip4_det44_in2out  ,
static   
)

◆ VNET_FEATURE_INIT() [2/2]

VNET_FEATURE_INIT ( ip4_det44_out2in  ,
static   
)

Variable Documentation

◆ det44_main

det44_main_t det44_main

Definition at line 30 of file det44.c.