FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
pnat.h File Reference
+ Include dependency graph for pnat.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pnat_mask_fast_t
 
struct  pnat_translation_t
 
struct  pnat_interface_t
 
struct  pnat_main_t
 
struct  pnat_trace_t
 

Macros

#define PNAT_FLOW_HASH_BUCKETS   256
 

Typedefs

typedef vl_api_pnat_match_tuple_t pnat_match_tuple_t
 
typedef vl_api_pnat_rewrite_tuple_t pnat_rewrite_tuple_t
 
typedef vl_api_pnat_mask_t pnat_mask_t
 
typedef vl_api_pnat_attachment_point_t pnat_attachment_point_t
 

Enumerations

enum  pnat_instructions_t {
  PNAT_INSTR_NONE = 1 << 0, PNAT_INSTR_SOURCE_ADDRESS = 1 << 1, PNAT_INSTR_SOURCE_PORT = 1 << 2, PNAT_INSTR_DESTINATION_ADDRESS = 1 << 3,
  PNAT_INSTR_DESTINATION_PORT = 1 << 4, PNAT_INSTR_COPY_BYTE = 1 << 5, PNAT_INSTR_CLEAR_BYTE = 1 << 6
}
 

Functions

pnat_interface_tpnat_interface_by_sw_if_index (u32 sw_if_index)
 
int pnat_binding_add (pnat_match_tuple_t *match, pnat_rewrite_tuple_t *rewrite, u32 *binding_index)
 
int pnat_binding_del (u32 binding_index)
 
int pnat_binding_attach (u32 sw_if_index, pnat_attachment_point_t attachment, u32 binding_index)
 
int pnat_binding_detach (u32 sw_if_index, pnat_attachment_point_t attachment, u32 binding_index)
 
u32 pnat_flow_lookup (u32 sw_if_index, pnat_attachment_point_t attachment, pnat_match_tuple_t *match)
 
static void pnat_calc_key (u32 sw_if_index, pnat_attachment_point_t attachment, ip4_address_t src, ip4_address_t dst, u8 protocol, u16 sport, u16 dport, pnat_mask_fast_t mask, clib_bihash_kv_16_8_t *kv)
 

Variables

pnat_main_t pnat_main
 

Macro Definition Documentation

◆ PNAT_FLOW_HASH_BUCKETS

#define PNAT_FLOW_HASH_BUCKETS   256

Definition at line 23 of file pnat.h.

Typedef Documentation

◆ pnat_attachment_point_t

typedef vl_api_pnat_attachment_point_t pnat_attachment_point_t

Definition at line 30 of file pnat.h.

◆ pnat_mask_t

typedef vl_api_pnat_mask_t pnat_mask_t

Definition at line 29 of file pnat.h.

◆ pnat_match_tuple_t

typedef vl_api_pnat_match_tuple_t pnat_match_tuple_t

Definition at line 27 of file pnat.h.

◆ pnat_rewrite_tuple_t

typedef vl_api_pnat_rewrite_tuple_t pnat_rewrite_tuple_t

Definition at line 28 of file pnat.h.

Enumeration Type Documentation

◆ pnat_instructions_t

Enumerator
PNAT_INSTR_NONE 
PNAT_INSTR_SOURCE_ADDRESS 
PNAT_INSTR_SOURCE_PORT 
PNAT_INSTR_DESTINATION_ADDRESS 
PNAT_INSTR_DESTINATION_PORT 
PNAT_INSTR_COPY_BYTE 
PNAT_INSTR_CLEAR_BYTE 

Definition at line 33 of file pnat.h.

Function Documentation

◆ pnat_binding_add()

int pnat_binding_add ( pnat_match_tuple_t match,
pnat_rewrite_tuple_t rewrite,
u32 binding_index 
)

Definition at line 271 of file pnat.c.

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

◆ pnat_binding_attach()

int pnat_binding_attach ( u32  sw_if_index,
pnat_attachment_point_t  attachment,
u32  binding_index 
)

Definition at line 329 of file pnat.c.

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

◆ pnat_binding_del()

int pnat_binding_del ( u32  binding_index)

Definition at line 392 of file pnat.c.

+ Here is the caller graph for this function:

◆ pnat_binding_detach()

int pnat_binding_detach ( u32  sw_if_index,
pnat_attachment_point_t  attachment,
u32  binding_index 
)

Definition at line 364 of file pnat.c.

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

◆ pnat_calc_key()

static void pnat_calc_key ( u32  sw_if_index,
pnat_attachment_point_t  attachment,
ip4_address_t  src,
ip4_address_t  dst,
u8  protocol,
u16  sport,
u16  dport,
pnat_mask_fast_t  mask,
clib_bihash_kv_16_8_t kv 
)
inlinestatic

Definition at line 118 of file pnat.h.

+ Here is the caller graph for this function:

◆ pnat_flow_lookup()

u32 pnat_flow_lookup ( u32  sw_if_index,
pnat_attachment_point_t  attachment,
pnat_match_tuple_t match 
)

Definition at line 310 of file pnat.c.

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

◆ pnat_interface_by_sw_if_index()

pnat_interface_t* pnat_interface_by_sw_if_index ( u32  sw_if_index)

Definition at line 38 of file pnat.c.

Variable Documentation

◆ pnat_main

pnat_main_t pnat_main

Definition at line 32 of file pnat.c.