![]() |
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Deterministic NAT (CGN) definitions. More...
Include dependency graph for det44.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | icmp_echo_header_t |
| struct | tcp_udp_header_t |
| struct | det44_runtime_t |
| struct | snat_det_out_key_t |
| struct | snat_det_session_t |
| struct | snat_det_map_t |
| struct | det44_interface_t |
| struct | det44_config_t |
| struct | det44_fib_t |
| struct | det44_main_s |
Macros | |
| #define | foreach_det44_session_state |
| #define | DET44_SES_PER_USER 1000 |
| #define | det44_log_err(...) vlib_log(VLIB_LOG_LEVEL_ERR, det44_main.log_class, __VA_ARGS__) |
| #define | det44_log_warn(...) vlib_log(VLIB_LOG_LEVEL_WARNING, det44_main.log_class, __VA_ARGS__) |
| #define | det44_log_notice(...) vlib_log(VLIB_LOG_LEVEL_NOTICE, det44_main.log_class, __VA_ARGS__) |
| #define | det44_log_info(...) vlib_log(VLIB_LOG_LEVEL_INFO, det44_main.log_class, __VA_ARGS__) |
| #define | det44_log_debug(...) vlib_log(VLIB_LOG_LEVEL_DEBUG, det44_main.log_class, __VA_ARGS__) |
| #define | DET44_INTERFACE_FLAG_IS_INSIDE 1 |
| #define | DET44_INTERFACE_FLAG_IS_OUTSIDE 2 |
| #define | det44_interface_is_inside(i) i->flags & DET44_INTERFACE_FLAG_IS_INSIDE |
| Check if Deterministic NAT interface is inside. More... | |
| #define | det44_interface_is_outside(i) i->flags & DET44_INTERFACE_FLAG_IS_OUTSIDE |
| Check if Deterministic NAT interface is outside. More... | |
Typedefs | |
| typedef struct det44_main_s | det44_main_t |
Enumerations | |
| enum | det44_session_state_t { foreach_det44_session_state } |
Variables | |
| det44_main_t | det44_main |
| vlib_node_registration_t | det44_in2out_node |
| (constructor) VLIB_REGISTER_NODE (det44_in2out_node) More... | |
| vlib_node_registration_t | det44_out2in_node |
| (constructor) VLIB_REGISTER_NODE (det44_out2in_node) More... | |
| format_function_t | format_det_map_ses |
Deterministic NAT (CGN) definitions.
Definition in file det44.h.
| #define det44_interface_is_inside | ( | i | ) | i->flags & DET44_INTERFACE_FLAG_IS_INSIDE |
| #define det44_interface_is_outside | ( | i | ) | i->flags & DET44_INTERFACE_FLAG_IS_OUTSIDE |
| #define det44_log_debug | ( | ... | ) | vlib_log(VLIB_LOG_LEVEL_DEBUG, det44_main.log_class, __VA_ARGS__) |
| #define det44_log_err | ( | ... | ) | vlib_log(VLIB_LOG_LEVEL_ERR, det44_main.log_class, __VA_ARGS__) |
| #define det44_log_info | ( | ... | ) | vlib_log(VLIB_LOG_LEVEL_INFO, det44_main.log_class, __VA_ARGS__) |
| #define det44_log_notice | ( | ... | ) | vlib_log(VLIB_LOG_LEVEL_NOTICE, det44_main.log_class, __VA_ARGS__) |
| #define det44_log_warn | ( | ... | ) | vlib_log(VLIB_LOG_LEVEL_WARNING, det44_main.log_class, __VA_ARGS__) |
| #define foreach_det44_session_state |
| typedef struct det44_main_s det44_main_t |
| clib_error_t* det44_api_hookup | ( | vlib_main_t * | vm | ) |
Definition at line 620 of file det44_api.c.
Here is the call graph for this function:
Here is the caller graph for this function:| nat_timeouts_t det44_get_timeouts | ( | ) |
| u32 det44_icmp_in2out | ( | 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 | ||
| ) |
Definition at line 255 of file det44_in2out.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u32 det44_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, | ||
| void * | d, | ||
| void * | e | ||
| ) |
Definition at line 233 of file det44_out2in.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int det44_plugin_disable | ( | ) |
| int det44_plugin_enable | ( | ) |
| void det44_reset_timeouts | ( | ) |
| int det44_set_timeouts | ( | nat_timeouts_t * | timeouts | ) |
| u32 icmp_match_in2out_det | ( | 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, | ||
| void * | d, | ||
| void * | e, | ||
| u8 * | dont_translate | ||
| ) |
Get address and port values to be used for ICMP packet translation and create session if needed.
| [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 100 of file det44_in2out.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u32 icmp_match_out2in_det | ( | 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, | ||
| void * | d, | ||
| void * | e, | ||
| u8 * | dont_translate | ||
| ) |
Get address and port values to be used for ICMP packet translation and create session if needed.
| [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 100 of file det44_out2in.c.
Here is the call graph for this function:
Here is the caller graph for this function:| static_always_inline int is_addr_in_net | ( | ip4_address_t * | addr, |
| ip4_address_t * | net, | ||
| u8 | plen | ||
| ) |
| static_always_inline u8 plugin_enabled | ( | ) |
| int snat_det_add_map | ( | ip4_address_t * | in_addr, |
| u8 | in_plen, | ||
| ip4_address_t * | out_addr, | ||
| u8 | out_plen, | ||
| int | is_add | ||
| ) |
Add/delete deterministic NAT mapping.
Create bijective mapping of inside address to outside address and port range pairs, with the purpose of enabling deterministic NAT to reduce logging in CGN deployments.
| in_addr | Inside network address. |
| in_plen | Inside network prefix length. |
| out_addr | Outside network address. |
| out_plen | Outside network prefix length. |
| is_add | If 0 delete, otherwise add. |
Definition at line 99 of file det44.c.
Here is the call graph for this function:
Here is the caller graph for this function:| static_always_inline snat_det_session_t* snat_det_find_ses_by_in | ( | snat_det_map_t * | dm, |
| ip4_address_t * | in_addr, | ||
| u16 | in_port, | ||
| snat_det_out_key_t | out_key | ||
| ) |
| static_always_inline void snat_det_forward | ( | snat_det_map_t * | dm, |
| ip4_address_t * | in_addr, | ||
| ip4_address_t * | out_addr, | ||
| u16 * | lo_port | ||
| ) |
| static_always_inline snat_det_session_t* snat_det_get_ses_by_out | ( | snat_det_map_t * | dm, |
| ip4_address_t * | in_addr, | ||
| u64 | out_key | ||
| ) |
| static_always_inline snat_det_map_t* snat_det_map_by_out | ( | ip4_address_t * | out_addr | ) |
| static_always_inline snat_det_map_t* snat_det_map_by_user | ( | ip4_address_t * | user_addr | ) |
| static_always_inline void snat_det_reverse | ( | snat_det_map_t * | dm, |
| ip4_address_t * | out_addr, | ||
| u16 | out_port, | ||
| ip4_address_t * | in_addr | ||
| ) |
| static_always_inline void snat_det_ses_close | ( | snat_det_map_t * | dm, |
| snat_det_session_t * | ses | ||
| ) |
| static_always_inline snat_det_session_t* snat_det_ses_create | ( | u32 | thread_index, |
| snat_det_map_t * | dm, | ||
| ip4_address_t * | in_addr, | ||
| u16 | in_port, | ||
| snat_det_out_key_t * | out | ||
| ) |
| static_always_inline u32 snat_det_user_ses_offset | ( | ip4_address_t * | addr, |
| u8 | plen | ||
| ) |
| vlib_node_registration_t det44_in2out_node |
(constructor) VLIB_REGISTER_NODE (det44_in2out_node)
Definition at line 1015 of file det44_in2out.c.
| det44_main_t det44_main |
| vlib_node_registration_t det44_out2in_node |
(constructor) VLIB_REGISTER_NODE (det44_out2in_node)
Definition at line 819 of file det44_out2in.c.
| format_function_t format_det_map_ses |