FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
nat66.h File Reference

NAT66 global declarations. More...

+ Include dependency graph for nat66.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  nat66_static_mapping_t
 
struct  nat66_sm_key_t
 
struct  nat66_interface_t
 
struct  nat66_main_t
 

Macros

#define NAT66_INTERFACE_FLAG_IS_INSIDE   1
 
#define NAT66_INTERFACE_FLAG_IS_OUTSIDE   2
 
#define nat66_interface_is_inside(i)   i->flags & NAT66_INTERFACE_FLAG_IS_INSIDE
 
#define nat66_interface_is_outside(i)   i->flags & NAT66_INTERFACE_FLAG_IS_OUTSIDE
 
#define nat66_elog(_level, _str)
 
#define nat66_elog_warn(nat_elog_str)   nat66_elog(0x02, "[warning] " nat_elog_str)
 

Typedefs

typedef int(* nat66_interface_walk_fn_t) (nat66_interface_t *i, void *ctx)
 
typedef int(* nat66_static_mapping_walk_fn_t) (nat66_static_mapping_t *sm, void *ctx)
 

Functions

void nat66_interfaces_walk (nat66_interface_walk_fn_t fn, void *ctx)
 
int nat66_interface_add_del (u32 sw_if_index, u8 is_inside, u8 is_add)
 
void nat66_static_mappings_walk (nat66_static_mapping_walk_fn_t fn, void *ctx)
 
nat66_static_mapping_tnat66_static_mapping_get (ip6_address_t *addr, u32 fib_index, u8 is_local)
 
int nat66_static_mapping_add_del (ip6_address_t *l_addr, ip6_address_t *e_addr, u32 vrf_id, u8 is_add)
 
int nat66_plugin_enable (u32 outside_vrf)
 
int nat66_plugin_disable ()
 

Variables

nat66_main_t nat66_main
 
vlib_node_registration_t nat66_in2out_node
 (constructor) VLIB_REGISTER_NODE (nat66_in2out_node) More...
 
vlib_node_registration_t nat66_out2in_node
 (constructor) VLIB_REGISTER_NODE (nat66_out2in_node) More...
 

Detailed Description

NAT66 global declarations.

Definition in file nat66.h.

Macro Definition Documentation

◆ nat66_elog

#define nat66_elog (   _level,
  _str 
)
Value:
do \
{ \
nat66_main_t *nm = &nat66_main; \
if (PREDICT_FALSE (nm->log_level >= _level)) \
{ \
ELOG_TYPE_DECLARE (e) = \
{ \
.format = "nat66-msg " _str, \
.format_args = "", \
}; \
ELOG_DATA (&vlib_global_main.elog_main, e); \
} \
} while (0);

Definition at line 84 of file nat66.h.

◆ nat66_elog_warn

#define nat66_elog_warn (   nat_elog_str)    nat66_elog(0x02, "[warning] " nat_elog_str)

Definition at line 99 of file nat66.h.

◆ NAT66_INTERFACE_FLAG_IS_INSIDE

#define NAT66_INTERFACE_FLAG_IS_INSIDE   1

Definition at line 53 of file nat66.h.

◆ NAT66_INTERFACE_FLAG_IS_OUTSIDE

#define NAT66_INTERFACE_FLAG_IS_OUTSIDE   2

Definition at line 54 of file nat66.h.

◆ nat66_interface_is_inside

#define nat66_interface_is_inside (   i)    i->flags & NAT66_INTERFACE_FLAG_IS_INSIDE

Definition at line 55 of file nat66.h.

◆ nat66_interface_is_outside

#define nat66_interface_is_outside (   i)    i->flags & NAT66_INTERFACE_FLAG_IS_OUTSIDE

Definition at line 56 of file nat66.h.

Typedef Documentation

◆ nat66_interface_walk_fn_t

typedef int(* nat66_interface_walk_fn_t) (nat66_interface_t *i, void *ctx)

Definition at line 107 of file nat66.h.

◆ nat66_static_mapping_walk_fn_t

typedef int(* nat66_static_mapping_walk_fn_t) (nat66_static_mapping_t *sm, void *ctx)

Definition at line 110 of file nat66.h.

Function Documentation

◆ nat66_interface_add_del()

int nat66_interface_add_del ( u32  sw_if_index,
u8  is_inside,
u8  is_add 
)

Definition at line 156 of file nat66.c.

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

◆ nat66_interfaces_walk()

void nat66_interfaces_walk ( nat66_interface_walk_fn_t  fn,
void *  ctx 
)

Definition at line 202 of file nat66.c.

+ Here is the caller graph for this function:

◆ nat66_plugin_disable()

int nat66_plugin_disable ( )

Definition at line 108 of file nat66.c.

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

◆ nat66_plugin_enable()

int nat66_plugin_enable ( u32  outside_vrf)

Definition at line 86 of file nat66.c.

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

◆ nat66_static_mapping_add_del()

int nat66_static_mapping_add_del ( ip6_address_t *  l_addr,
ip6_address_t *  e_addr,
u32  vrf_id,
u8  is_add 
)

Definition at line 239 of file nat66.c.

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

◆ nat66_static_mapping_get()

nat66_static_mapping_t* nat66_static_mapping_get ( ip6_address_t *  addr,
u32  fib_index,
u8  is_local 
)

Definition at line 215 of file nat66.c.

+ Here is the caller graph for this function:

◆ nat66_static_mappings_walk()

void nat66_static_mappings_walk ( nat66_static_mapping_walk_fn_t  fn,
void *  ctx 
)

Definition at line 320 of file nat66.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ nat66_in2out_node

vlib_node_registration_t nat66_in2out_node

(constructor) VLIB_REGISTER_NODE (nat66_in2out_node)

Definition at line 239 of file nat66_in2out.c.

◆ nat66_main

nat66_main_t nat66_main

Definition at line 25 of file nat66.c.

◆ nat66_out2in_node

vlib_node_registration_t nat66_out2in_node

(constructor) VLIB_REGISTER_NODE (nat66_out2in_node)

Definition at line 197 of file nat66_out2in.c.

PREDICT_FALSE
#define PREDICT_FALSE(x)
Definition: clib.h:124
vlib_global_main
vlib_global_main_t vlib_global_main
Definition: main.c:1786
vlib_global_main_t::elog_main
elog_main_t elog_main
Definition: main.h:300
nm
nat44_ei_main_t * nm
Definition: nat44_ei_hairpinning.c:413
nat44_ei_main_s::log_level
u8 log_level
Definition: nat44_ei.h:452
nat66_main
nat66_main_t nat66_main
Definition: nat66.c:25