FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
cnat_snat_policy.h File Reference
+ Include dependency graph for cnat_snat_policy.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cnat_snat_pfx_table_meta_t_
 
struct  cnat_snat_exclude_pfx_table_t_
 
struct  cnat_snat_policy_main_t_
 

Typedefs

typedef int(* cnat_snat_policy_t) (vlib_buffer_t *b, cnat_session_t *session)
 
typedef struct cnat_snat_pfx_table_meta_t_ cnat_snat_pfx_table_meta_t
 
typedef struct cnat_snat_exclude_pfx_table_t_ cnat_snat_exclude_pfx_table_t
 
typedef enum cnat_snat_interface_map_type_t_ cnat_snat_interface_map_type_t
 
typedef enum cnat_snat_policy_type_t_ cnat_snat_policy_type_t
 
typedef struct cnat_snat_policy_main_t_ cnat_snat_policy_main_t
 

Enumerations

enum  cnat_snat_interface_map_type_t_ { CNAT_SNAT_IF_MAP_INCLUDE_V4 = AF_IP4, CNAT_SNAT_IF_MAP_INCLUDE_V6 = AF_IP6, CNAT_SNAT_IF_MAP_INCLUDE_POD, CNAT_N_SNAT_IF_MAP }
 
enum  cnat_snat_policy_type_t_ { CNAT_SNAT_POLICY_NONE = 0, CNAT_SNAT_POLICY_IF_PFX = 1, CNAT_SNAT_POLICY_K8S = 2 }
 

Functions

void cnat_set_snat (ip4_address_t *ip4, ip6_address_t *ip6, u32 sw_if_index)
 
int cnat_snat_policy_add_pfx (ip_prefix_t *pfx)
 
int cnat_snat_policy_del_pfx (ip_prefix_t *pfx)
 
int cnat_set_snat_policy (cnat_snat_policy_type_t policy)
 
int cnat_snat_policy_add_del_if (u32 sw_if_index, u8 is_add, cnat_snat_interface_map_type_t table)
 
int cnat_search_snat_prefix (ip46_address_t *addr, ip_address_family_t af)
 

Variables

cnat_snat_policy_main_t cnat_snat_policy_main
 

Typedef Documentation

◆ cnat_snat_exclude_pfx_table_t

◆ cnat_snat_interface_map_type_t

◆ cnat_snat_pfx_table_meta_t

◆ cnat_snat_policy_main_t

◆ cnat_snat_policy_t

typedef int(* cnat_snat_policy_t) (vlib_buffer_t *b, cnat_session_t *session)

Definition at line 24 of file cnat_snat_policy.h.

◆ cnat_snat_policy_type_t

Enumeration Type Documentation

◆ cnat_snat_interface_map_type_t_

Enumerator
CNAT_SNAT_IF_MAP_INCLUDE_V4 
CNAT_SNAT_IF_MAP_INCLUDE_V6 
CNAT_SNAT_IF_MAP_INCLUDE_POD 
CNAT_N_SNAT_IF_MAP 

Definition at line 43 of file cnat_snat_policy.h.

◆ cnat_snat_policy_type_t_

Enumerator
CNAT_SNAT_POLICY_NONE 
CNAT_SNAT_POLICY_IF_PFX 
CNAT_SNAT_POLICY_K8S 

Definition at line 51 of file cnat_snat_policy.h.

Function Documentation

◆ cnat_search_snat_prefix()

int cnat_search_snat_prefix ( ip46_address_t *  addr,
ip_address_family_t  af 
)

Definition at line 218 of file cnat_snat_policy.c.

+ Here is the caller graph for this function:

◆ cnat_set_snat()

void cnat_set_snat ( ip4_address_t ip4,
ip6_address_t *  ip6,
u32  sw_if_index 
)

Definition at line 331 of file cnat_snat_policy.c.

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

◆ cnat_set_snat_policy()

int cnat_set_snat_policy ( cnat_snat_policy_type_t  policy)

Definition at line 473 of file cnat_snat_policy.c.

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

◆ cnat_snat_policy_add_del_if()

int cnat_snat_policy_add_del_if ( u32  sw_if_index,
u8  is_add,
cnat_snat_interface_map_type_t  table 
)

Definition at line 89 of file cnat_snat_policy.c.

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

◆ cnat_snat_policy_add_pfx()

int cnat_snat_policy_add_pfx ( ip_prefix_t pfx)

Definition at line 148 of file cnat_snat_policy.c.

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

◆ cnat_snat_policy_del_pfx()

int cnat_snat_policy_del_pfx ( ip_prefix_t pfx)

Definition at line 179 of file cnat_snat_policy.c.

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

Variable Documentation

◆ cnat_snat_policy_main

cnat_snat_policy_main_t cnat_snat_policy_main

Definition at line 20 of file cnat_snat_policy.c.