FD.io VPP
v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
|
NAT44 endpoint-dependent outside to inside network translation. More...
Go to the source code of this file.
Data Structures | |
struct | snat_out2in_trace_t |
Macros | |
#define | foreach_snat_out2in_error |
Enumerations | |
enum | snat_out2in_error_t { SNAT_OUT2IN_N_ERROR } |
enum | snat_out2in_next_t { SNAT_OUT2IN_NEXT_DROP, SNAT_OUT2IN_NEXT_LOOKUP, SNAT_OUT2IN_NEXT_ICMP_ERROR, SNAT_OUT2IN_NEXT_REASS, SNAT_OUT2IN_N_NEXT } |
Functions | |
static u8 * | format_snat_out2in_trace (u8 *s, va_list *args) |
static u8 * | format_snat_out2in_fast_trace (u8 *s, va_list *args) |
int | nat44_o2i_is_idle_session_cb (clib_bihash_kv_8_8_t *kv, void *arg) |
static snat_session_t * | create_session_for_static_mapping (snat_main_t *sm, vlib_buffer_t *b0, snat_session_key_t in2out, snat_session_key_t out2in, vlib_node_runtime_t *node, u32 thread_index, f64 now) |
Create session for static mapping. More... | |
static_always_inline snat_out2in_error_t | icmp_get_key (ip4_header_t *ip0, snat_session_key_t *p_key0) |
u32 | icmp_match_out2in_slow (snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, ip4_header_t *ip0, u8 *p_proto, snat_session_key_t *p_value, u8 *p_dont_translate, void *d, void *e) |
Get address and port values to be used for ICMP packet translation and create session if needed. More... | |
u32 | icmp_match_out2in_fast (snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, ip4_header_t *ip0, u8 *p_proto, snat_session_key_t *p_value, u8 *p_dont_translate, void *d, void *e) |
Get address and port values to be used for ICMP packet translation. More... | |
u32 | icmp_out2in (snat_main_t *sm, 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, void *d, void *e) |
static u32 | icmp_out2in_slow_path (snat_main_t *sm, 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, f64 now, u32 thread_index, snat_session_t **p_s0) |
static int | nat_out2in_sm_unknown_proto (snat_main_t *sm, vlib_buffer_t *b, ip4_header_t *ip, u32 rx_fib_index) |
VLIB_NODE_FN() | snat_out2in_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame) |
VLIB_NODE_FN() | nat44_out2in_reass_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame) |
VLIB_NODE_FN() | snat_out2in_fast_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame) |
Variables | |
static char * | snat_out2in_error_strings [] |
vlib_node_registration_t | snat_out2in_node |
(constructor) VLIB_REGISTER_NODE (snat_out2in_node) More... | |
vlib_node_registration_t | nat44_out2in_reass_node |
(constructor) VLIB_REGISTER_NODE (nat44_out2in_reass_node) More... | |
vlib_node_registration_t | snat_out2in_fast_node |
(constructor) VLIB_REGISTER_NODE (snat_out2in_fast_node) More... | |
NAT44 endpoint-dependent outside to inside network translation.
Definition in file out2in.c.
#define foreach_snat_out2in_error |
enum snat_out2in_error_t |
enum snat_out2in_next_t |
|
inlinestatic |
Create session for static mapping.
Create NAT session initiated by host from external network with static mapping.
sm | NAT main. |
b0 | Vlib buffer. |
in2out | In2out NAT44 session key. |
out2in | Out2in NAT44 session key. |
node | Vlib node. |
Definition at line 178 of file out2in.c.
static_always_inline snat_out2in_error_t icmp_get_key | ( | ip4_header_t * | ip0, |
snat_session_key_t * | p_key0 | ||
) |
u32 icmp_match_out2in_fast | ( | snat_main_t * | sm, |
vlib_node_runtime_t * | node, | ||
u32 | thread_index, | ||
vlib_buffer_t * | b0, | ||
ip4_header_t * | ip0, | ||
u8 * | p_proto, | ||
snat_session_key_t * | p_value, | ||
u8 * | p_dont_translate, | ||
void * | d, | ||
void * | e | ||
) |
Get address and port values to be used for ICMP packet translation.
[in] | sm | NAT main |
[in,out] | node | NAT node runtime |
[in] | thread_index | thread index |
[in,out] | b0 | buffer containing packet to be translated |
[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 455 of file out2in.c.
u32 icmp_match_out2in_slow | ( | snat_main_t * | sm, |
vlib_node_runtime_t * | node, | ||
u32 | thread_index, | ||
vlib_buffer_t * | b0, | ||
ip4_header_t * | ip0, | ||
u8 * | p_proto, | ||
snat_session_key_t * | p_value, | ||
u8 * | p_dont_translate, | ||
void * | d, | ||
void * | e | ||
) |
Get address and port values to be used for ICMP packet translation and create session if needed.
[in,out] | sm | NAT main |
[in,out] | node | NAT node runtime |
[in] | thread_index | thread index |
[in,out] | b0 | buffer containing packet to be translated |
[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 325 of file out2in.c.
u32 icmp_out2in | ( | snat_main_t * | sm, |
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, | ||
void * | d, | ||
void * | e | ||
) |
|
inlinestatic |
int nat44_o2i_is_idle_session_cb | ( | clib_bihash_kv_8_8_t * | kv, |
void * | arg | ||
) |
VLIB_NODE_FN() nat44_out2in_reass_node | ( | vlib_main_t * | vm, |
vlib_node_runtime_t * | node, | ||
vlib_frame_t * | frame | ||
) |
|
static |
VLIB_NODE_FN() snat_out2in_fast_node | ( | vlib_main_t * | vm, |
vlib_node_runtime_t * | node, | ||
vlib_frame_t * | frame | ||
) |
VLIB_NODE_FN() snat_out2in_node | ( | vlib_main_t * | vm, |
vlib_node_runtime_t * | node, | ||
vlib_frame_t * | frame | ||
) |
vlib_node_registration_t nat44_out2in_reass_node |
(constructor) VLIB_REGISTER_NODE (nat44_out2in_reass_node)
|
static |
vlib_node_registration_t snat_out2in_fast_node |
(constructor) VLIB_REGISTER_NODE (snat_out2in_fast_node)
vlib_node_registration_t snat_out2in_node |
(constructor) VLIB_REGISTER_NODE (snat_out2in_node)