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

Go to the source code of this file.

Typedefs

typedef uword(* cnat_node_sub_t) (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, cnat_node_ctx_t *ctx, int rv, cnat_session_t *session)
 

Functions

static_always_inline u8 has_ip6_address (ip6_address_t *a)
 Inline translation functions. More...
 
static_always_inline void cnat_ip4_translate_l4 (ip4_header_t *ip4, udp_header_t *udp, u16 *checksum, ip4_address_t new_addr[VLIB_N_DIR], u16 new_port[VLIB_N_DIR])
 
static_always_inline void cnat_ip4_translate_l3 (ip4_header_t *ip4, ip4_address_t new_addr[VLIB_N_DIR])
 
static_always_inline void cnat_tcp_update_session_lifetime (tcp_header_t *tcp, u32 index)
 
static_always_inline void cnat_translation_ip4 (const cnat_session_t *session, ip4_header_t *ip4, udp_header_t *udp)
 
static_always_inline void cnat_ip6_translate_l3 (ip6_header_t *ip6, ip6_address_t new_addr[VLIB_N_DIR])
 
static_always_inline void cnat_ip6_translate_l4 (ip6_header_t *ip6, udp_header_t *udp, u16 *checksum, ip6_address_t new_addr[VLIB_N_DIR], u16 new_port[VLIB_N_DIR])
 
static_always_inline void cnat_translation_ip6 (const cnat_session_t *session, ip6_header_t *ip6, udp_header_t *udp)
 
static_always_inline void cnat_session_make_key (vlib_buffer_t *b, ip_address_family_t af, clib_bihash_kv_40_48_t *bkey)
 
static_always_inline void cnat_session_create (cnat_session_t *session, cnat_node_ctx_t *ctx, u8 rsession_flags)
 Create NAT sessions. More...
 
static uword cnat_node_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, cnat_node_sub_t cnat_sub, ip_address_family_t af, u8 do_trace)
 

Typedef Documentation

◆ cnat_node_sub_t

typedef uword(* cnat_node_sub_t) (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, cnat_node_ctx_t *ctx, int rv, cnat_session_t *session)

Definition at line 23 of file cnat_node.h.

Function Documentation

◆ cnat_ip4_translate_l3()

static_always_inline void cnat_ip4_translate_l3 ( ip4_header_t ip4,
ip4_address_t  new_addr[VLIB_N_DIR] 
)

Definition at line 82 of file cnat_node.h.

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

◆ cnat_ip4_translate_l4()

static_always_inline void cnat_ip4_translate_l4 ( ip4_header_t ip4,
udp_header_t udp,
u16 checksum,
ip4_address_t  new_addr[VLIB_N_DIR],
u16  new_port[VLIB_N_DIR] 
)

Definition at line 40 of file cnat_node.h.

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

◆ cnat_ip6_translate_l3()

static_always_inline void cnat_ip6_translate_l3 ( ip6_header_t ip6,
ip6_address_t  new_addr[VLIB_N_DIR] 
)

Definition at line 167 of file cnat_node.h.

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

◆ cnat_ip6_translate_l4()

static_always_inline void cnat_ip6_translate_l4 ( ip6_header_t ip6,
udp_header_t udp,
u16 checksum,
ip6_address_t  new_addr[VLIB_N_DIR],
u16  new_port[VLIB_N_DIR] 
)

Definition at line 176 of file cnat_node.h.

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

◆ cnat_node_inline()

static uword cnat_node_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
cnat_node_sub_t  cnat_sub,
ip_address_family_t  af,
u8  do_trace 
)
inlinestatic

Definition at line 404 of file cnat_node.h.

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

◆ cnat_session_create()

static_always_inline void cnat_session_create ( cnat_session_t session,
cnat_node_ctx_t ctx,
u8  rsession_flags 
)

Create NAT sessions.

Definition at line 305 of file cnat_node.h.

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

◆ cnat_session_make_key()

static_always_inline void cnat_session_make_key ( vlib_buffer_t b,
ip_address_family_t  af,
clib_bihash_kv_40_48_t bkey 
)

Definition at line 263 of file cnat_node.h.

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

◆ cnat_tcp_update_session_lifetime()

static_always_inline void cnat_tcp_update_session_lifetime ( tcp_header_t tcp,
u32  index 
)

Definition at line 109 of file cnat_node.h.

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

◆ cnat_translation_ip4()

static_always_inline void cnat_translation_ip4 ( const cnat_session_t session,
ip4_header_t ip4,
udp_header_t udp 
)

Definition at line 129 of file cnat_node.h.

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

◆ cnat_translation_ip6()

static_always_inline void cnat_translation_ip6 ( const cnat_session_t session,
ip6_header_t ip6,
udp_header_t udp 
)

Definition at line 225 of file cnat_node.h.

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

◆ has_ip6_address()

static_always_inline u8 has_ip6_address ( ip6_address_t *  a)

Inline translation functions.

Definition at line 34 of file cnat_node.h.

+ Here is the caller graph for this function: