FD.io VPP  v18.07.1-19-g511ce25
Vector Packet Processing
nat_inlines.h File Reference
+ Include dependency graph for nat_inlines.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static u32 ip_proto_to_snat_proto (u8 ip_proto)
 The NAT inline functions. More...
 
static u8 snat_proto_to_ip_proto (snat_protocol_t snat_proto)
 
static_always_inline u8 icmp_is_error_message (icmp46_header_t *icmp)
 
static u8 is_interface_addr (snat_main_t *sm, vlib_node_runtime_t *node, u32 sw_if_index0, u32 ip4_addr)
 
static u8 maximum_sessions_exceeded (snat_main_t *sm, u32 thread_index)
 
static void nat_send_all_to_node (vlib_main_t *vm, u32 *bi_vector, vlib_node_runtime_t *node, vlib_error_t *error, u32 next)
 
static void user_session_increment (snat_main_t *sm, snat_user_t *u, u8 is_static)
 
static void nat44_delete_session (snat_main_t *sm, snat_session_t *ses, u32 thread_index)
 
static int nat44_set_tcp_session_state_i2o (snat_main_t *sm, snat_session_t *ses, tcp_header_t *tcp, u32 thread_index)
 Set TCP session state. More...
 
static int nat44_set_tcp_session_state_o2i (snat_main_t *sm, snat_session_t *ses, tcp_header_t *tcp, u32 thread_index)
 
static void nat44_session_update_counters (snat_session_t *s, f64 now, uword bytes)
 
static void nat44_session_update_lru (snat_main_t *sm, snat_session_t *s, u32 thread_index)
 Per-user LRU list maintenance. More...
 
static void make_ed_kv (clib_bihash_kv_16_8_t *kv, ip4_address_t *l_addr, ip4_address_t *r_addr, u8 proto, u32 fib_index, u16 l_port, u16 r_port)
 
static void make_sm_kv (clib_bihash_kv_8_8_t *kv, ip4_address_t *addr, u8 proto, u32 fib_index, u16 port)
 

Function Documentation

static_always_inline u8 icmp_is_error_message ( icmp46_header_t *  icmp)

Definition at line 52 of file nat_inlines.h.

+ Here is the caller graph for this function:

static u32 ip_proto_to_snat_proto ( u8  ip_proto)
inlinestatic

The NAT inline functions.

Definition at line 25 of file nat_inlines.h.

static u8 is_interface_addr ( snat_main_t sm,
vlib_node_runtime_t node,
u32  sw_if_index0,
u32  ip4_addr 
)
inlinestatic

Definition at line 68 of file nat_inlines.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void make_ed_kv ( clib_bihash_kv_16_8_t kv,
ip4_address_t l_addr,
ip4_address_t r_addr,
u8  proto,
u32  fib_index,
u16  l_port,
u16  r_port 
)
inlinestatic

Definition at line 243 of file nat_inlines.h.

+ Here is the caller graph for this function:

static void make_sm_kv ( clib_bihash_kv_8_8_t kv,
ip4_address_t addr,
u8  proto,
u32  fib_index,
u16  port 
)
inlinestatic

Definition at line 260 of file nat_inlines.h.

+ Here is the caller graph for this function:

static u8 maximum_sessions_exceeded ( snat_main_t sm,
u32  thread_index 
)
inlinestatic

Definition at line 93 of file nat_inlines.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat44_delete_session ( snat_main_t sm,
snat_session_t *  ses,
u32  thread_index 
)
inlinestatic

Definition at line 144 of file nat_inlines.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat44_session_update_counters ( snat_session_t *  s,
f64  now,
uword  bytes 
)
inlinestatic

Definition at line 224 of file nat_inlines.h.

+ Here is the caller graph for this function:

static void nat44_session_update_lru ( snat_main_t sm,
snat_session_t *  s,
u32  thread_index 
)
inlinestatic

Per-user LRU list maintenance.

Definition at line 233 of file nat_inlines.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int nat44_set_tcp_session_state_i2o ( snat_main_t sm,
snat_session_t *  ses,
tcp_header_t tcp,
u32  thread_index 
)
inlinestatic

Set TCP session state.

Returns
1 if session was closed, otherwise 0

Definition at line 174 of file nat_inlines.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int nat44_set_tcp_session_state_o2i ( snat_main_t sm,
snat_session_t *  ses,
tcp_header_t tcp,
u32  thread_index 
)
inlinestatic

Definition at line 199 of file nat_inlines.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_send_all_to_node ( vlib_main_t vm,
u32 bi_vector,
vlib_node_runtime_t node,
vlib_error_t error,
u32  next 
)
inlinestatic

Definition at line 103 of file nat_inlines.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8 snat_proto_to_ip_proto ( snat_protocol_t  snat_proto)
inlinestatic

Definition at line 40 of file nat_inlines.h.

+ Here is the caller graph for this function:

static void user_session_increment ( snat_main_t sm,
snat_user_t u,
u8  is_static 
)
inlinestatic

Definition at line 132 of file nat_inlines.h.

+ Here is the caller graph for this function: