FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
NAT44 EI outside to inside network translation. More...
Go to the source code of this file.
Data Structures | |
struct | nat44_ei_out2in_trace_t |
Macros | |
#define | foreach_nat44_ei_out2in_error |
Variables | |
static char * | nat44_ei_out2in_error_strings [] |
vlib_main_t * | vm |
vlib_main_t vlib_node_runtime_t * | node |
vlib_main_t vlib_node_runtime_t vlib_frame_t * | frame |
nat44_ei_main_t * | nm = &nat44_ei_main |
f64 | now = vlib_time_now (vm) |
u32 | thread_index = vm->thread_index |
nat44_ei_main_per_thread_data_t * | tnm = &nm->per_thread_data[thread_index] |
from = vlib_frame_vector_args (frame) | |
n_left_from = frame->n_vectors | |
vlib_buffer_t * | bufs [VLIB_FRAME_SIZE] |
vlib_buffer_t ** | b = bufs |
u16 | nexts [VLIB_FRAME_SIZE] |
u16 * | next = nexts |
return frame | n_vectors |
vlib_node_registration_t | nat44_ei_out2in_node |
(constructor) VLIB_REGISTER_NODE (nat44_ei_out2in_node) More... | |
vlib_node_registration_t | nat44_ei_out2in_fast_node |
(constructor) VLIB_REGISTER_NODE (nat44_ei_out2in_fast_node) More... | |
NAT44 EI outside to inside network translation.
Definition in file nat44_ei_out2in.c.
#define foreach_nat44_ei_out2in_error |
Definition at line 71 of file nat44_ei_out2in.c.
Enumerator | |
---|---|
NAT44_EI_OUT2IN_N_ERROR |
Definition at line 79 of file nat44_ei_out2in.c.
Enumerator | |
---|---|
NAT44_EI_OUT2IN_NEXT_DROP | |
NAT44_EI_OUT2IN_NEXT_LOOKUP | |
NAT44_EI_OUT2IN_NEXT_ICMP_ERROR | |
NAT44_EI_OUT2IN_N_NEXT |
Definition at line 93 of file nat44_ei_out2in.c.
|
inlinestatic |
Create session for static mapping.
Create NAT session initiated by host from external network with static mapping.
nm | NAT main. |
b0 | Vlib buffer. |
in2out | In2out NAT44 session key. |
out2in | Out2in NAT44 session key. |
node | Vlib node. |
Definition at line 171 of file nat44_ei_out2in.c.
Definition at line 60 of file nat44_ei_out2in.c.
Definition at line 46 of file nat44_ei_out2in.c.
static_always_inline nat44_ei_out2in_error_t icmp_get_key | ( | vlib_buffer_t * | b, |
ip4_header_t * | ip0, | ||
ip4_address_t * | addr, | ||
u16 * | port, | ||
nat_protocol_t * | nat_proto | ||
) |
Definition at line 257 of file nat44_ei_out2in.c.
u32 nat44_ei_icmp_match_out2in_fast | ( | vlib_node_runtime_t * | node, |
u32 | thread_index, | ||
vlib_buffer_t * | b0, | ||
ip4_header_t * | ip0, | ||
ip4_address_t * | mapping_addr, | ||
u16 * | mapping_port, | ||
u32 * | mapping_fib_index, | ||
nat_protocol_t * | proto, | ||
nat44_ei_session_t ** | p_s0, | ||
u8 * | dont_translate | ||
) |
Definition at line 442 of file nat44_ei_out2in.c.
u32 nat44_ei_icmp_match_out2in_slow | ( | vlib_node_runtime_t * | node, |
u32 | thread_index, | ||
vlib_buffer_t * | b0, | ||
ip4_header_t * | ip0, | ||
ip4_address_t * | addr, | ||
u16 * | port, | ||
u32 * | fib_index, | ||
nat_protocol_t * | proto, | ||
nat44_ei_session_t ** | p_s0, | ||
u8 * | dont_translate | ||
) |
Get address and port values to be used for ICMP packet translation and create session if needed.
[in,out] | nm | NAT main |
[in,out] | node | NAT node runtime |
[in] | thread_index | thread index |
[in,out] | b0 | buffer containing packet to be translated |
[in,out] | ip0 | ip header |
[out] | p_proto | protocol used for matching |
[out] | p_value | address and port after NAT translation |
[out] | p_dont_translate | if packet should not be translated |
d | optional parameter | |
e | optional parameter |
Definition at line 316 of file nat44_ei_out2in.c.
u32 nat44_ei_icmp_out2in | ( | vlib_buffer_t * | b0, |
ip4_header_t * | ip0, | ||
icmp46_header_t * | icmp0, | ||
u32 | sw_if_index0, | ||
u32 | rx_fib_index0, | ||
vlib_node_runtime_t * | node, | ||
u32 | next0, | ||
u32 | thread_index, | ||
nat44_ei_session_t ** | p_s0 | ||
) |
Definition at line 510 of file nat44_ei_out2in.c.
|
inlinestatic |
Definition at line 658 of file nat44_ei_out2in.c.
int nat44_o2i_is_idle_session_cb | ( | clib_bihash_kv_8_8_t * | kv, |
void * | arg | ||
) |
Definition at line 103 of file nat44_ei_out2in.c.
|
static |
Definition at line 681 of file nat44_ei_out2in.c.
vlib_get_buffers | ( | vm | , |
from | , | ||
b | , | ||
n_left_from | |||
) |
while | ( | n_left_from | , |
0 | |||
) |
while | ( | n_left_from >= | 2 | ) |
vlib_buffer_t ** b = bufs |
Definition at line 717 of file nat44_ei_out2in.c.
vlib_buffer_t * bufs |
Definition at line 717 of file nat44_ei_out2in.c.
Definition at line 707 of file nat44_ei_out2in.c.
from = vlib_frame_vector_args (frame) |
Definition at line 714 of file nat44_ei_out2in.c.
Definition at line 715 of file nat44_ei_out2in.c.
return frame n_vectors |
Definition at line 1341 of file nat44_ei_out2in.c.
|
static |
Definition at line 87 of file nat44_ei_out2in.c.
vlib_node_registration_t nat44_ei_out2in_fast_node |
(constructor) VLIB_REGISTER_NODE (nat44_ei_out2in_fast_node)
Definition at line 1528 of file nat44_ei_out2in.c.
vlib_node_registration_t nat44_ei_out2in_node |
(constructor) VLIB_REGISTER_NODE (nat44_ei_out2in_node)
Definition at line 1345 of file nat44_ei_out2in.c.
Definition at line 718 of file nat44_ei_out2in.c.
u16 nexts |
Definition at line 718 of file nat44_ei_out2in.c.
nat44_ei_main_t* nm = &nat44_ei_main |
Definition at line 709 of file nat44_ei_out2in.c.
Definition at line 706 of file nat44_ei_out2in.c.
f64 now = vlib_time_now (vm) |
Definition at line 710 of file nat44_ei_out2in.c.
Definition at line 711 of file nat44_ei_out2in.c.
Definition at line 712 of file nat44_ei_out2in.c.
vlib_main_t* vm |
Definition at line 706 of file nat44_ei_out2in.c.