FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
nat44_ed.h File Reference
+ Include dependency graph for nat44_ed.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  nat44_config_t
 
struct  nat_pre_trace_t
 
union  nat_6t_t
 
struct  nat_6t_flow_t
 
struct  snat_address_t
 
struct  nat_fib_t
 
struct  nat_outside_fib_t
 
struct  nat44_lb_addr_port_t
 
struct  snat_static_mapping_t
 
struct  snat_interface_t
 
struct  snat_static_map_resolve_t
 
struct  snat_main_per_thread_data_t
 
struct  snat_main_s
 
struct  nat44_is_idle_session_ctx_t
 
struct  snat_runtime_t
 
struct  icmp_echo_header_t
 
struct  tcp_udp_header_t
 

Macros

#define NAT_FQ_NELTS_DEFAULT   64
 
#define SNAT_FLAG_HAIRPINNING   (1 << 0)
 
#define foreach_nat44_config_flag
 
#define foreach_nat_addr_and_port_alloc_alg
 
#define foreach_snat_session_state
 
#define foreach_nat_in2out_ed_error
 
#define foreach_nat_out2in_ed_error
 
#define NAT44_SES_I2O_FIN   1
 
#define NAT44_SES_O2I_FIN   2
 
#define NAT44_SES_I2O_FIN_ACK   4
 
#define NAT44_SES_O2I_FIN_ACK   8
 
#define NAT44_SES_I2O_SYN   16
 
#define NAT44_SES_O2I_SYN   32
 
#define NAT44_SES_RST   64
 
#define SNAT_SESSION_FLAG_STATIC_MAPPING   (1 << 0)
 
#define SNAT_SESSION_FLAG_UNKNOWN_PROTO   (1 << 1)
 
#define SNAT_SESSION_FLAG_LOAD_BALANCING   (1 << 2)
 
#define SNAT_SESSION_FLAG_TWICE_NAT   (1 << 3)
 
#define SNAT_SESSION_FLAG_ENDPOINT_DEPENDENT   (1 << 4)
 
#define SNAT_SESSION_FLAG_FWD_BYPASS   (1 << 5)
 
#define SNAT_SESSION_FLAG_AFFINITY   (1 << 6)
 
#define SNAT_SESSION_FLAG_EXACT_ADDRESS   (1 << 7)
 
#define SNAT_SESSION_FLAG_HAIRPINNING   (1 << 8)
 
#define NAT_INTERFACE_FLAG_IS_INSIDE   1
 
#define NAT_INTERFACE_FLAG_IS_OUTSIDE   2
 
#define NAT_SM_FLAG_SELF_TWICE_NAT   (1 << 1)
 
#define NAT_SM_FLAG_TWICE_NAT   (1 << 2)
 
#define NAT_SM_FLAG_IDENTITY_NAT   (1 << 3)
 
#define NAT_SM_FLAG_ADDR_ONLY   (1 << 4)
 
#define NAT_SM_FLAG_EXACT_ADDRESS   (1 << 5)
 
#define NAT_SM_FLAG_OUT2IN_ONLY   (1 << 6)
 
#define NAT_SM_FLAG_LB   (1 << 7)
 
#define NAT_SM_FLAG_SWITCH_ADDRESS   (1 << 8)
 
#define NAT_FLOW_OP_SADDR_REWRITE   (1 << 1)
 
#define NAT_FLOW_OP_SPORT_REWRITE   (1 << 2)
 
#define NAT_FLOW_OP_DADDR_REWRITE   (1 << 3)
 
#define NAT_FLOW_OP_DPORT_REWRITE   (1 << 4)
 
#define NAT_FLOW_OP_ICMP_ID_REWRITE   (1 << 5)
 
#define NAT_FLOW_OP_TXFIB_REWRITE   (1 << 6)
 
#define nat_log_err(...)   vlib_log(VLIB_LOG_LEVEL_ERR, snat_main.log_class, __VA_ARGS__)
 
#define nat_log_warn(...)   vlib_log(VLIB_LOG_LEVEL_WARNING, snat_main.log_class, __VA_ARGS__)
 
#define nat_log_notice(...)   vlib_log(VLIB_LOG_LEVEL_NOTICE, snat_main.log_class, __VA_ARGS__)
 
#define nat_log_info(...)   vlib_log(VLIB_LOG_LEVEL_INFO, snat_main.log_class, __VA_ARGS__)
 
#define nat_log_debug(...)   vlib_log(VLIB_LOG_LEVEL_DEBUG, snat_main.log_class, __VA_ARGS__)
 

Typedefs

typedef enum nat44_config_flags_t_ nat44_config_flags_t
 
typedef int() nat_alloc_out_addr_and_port_function_t(snat_address_t *addresses, u32 fib_index, u32 thread_index, nat_protocol_t proto, ip4_address_t *addr, u16 *port, u16 port_per_thread, u32 snat_thread_index)
 
typedef struct snat_main_s snat_main_t
 

Enumerations

enum  nat44_config_flags_t_ { foreach_nat44_config_flag }
 
enum  nat_next_t {
  NAT_NEXT_DROP, NAT_NEXT_ICMP_ERROR, NAT_NEXT_IN2OUT_ED_FAST_PATH, NAT_NEXT_IN2OUT_ED_SLOW_PATH,
  NAT_NEXT_IN2OUT_ED_OUTPUT_FAST_PATH, NAT_NEXT_IN2OUT_ED_OUTPUT_SLOW_PATH, NAT_NEXT_OUT2IN_ED_FAST_PATH, NAT_NEXT_OUT2IN_ED_SLOW_PATH,
  NAT_NEXT_IN2OUT_CLASSIFY, NAT_NEXT_OUT2IN_CLASSIFY, NAT_N_NEXT
}
 
enum  nat_addr_and_port_alloc_alg_t { foreach_nat_addr_and_port_alloc_alg }
 
enum  snat_session_state_t { foreach_snat_session_state }
 
enum  nat_in2out_ed_error_t { NAT_IN2OUT_ED_N_ERROR }
 
enum  nat_out2in_ed_error_t { NAT_OUT2IN_ED_N_ERROR }
 
enum  twice_nat_type_t { TWICE_NAT_DISABLED, TWICE_NAT, TWICE_NAT_SELF }
 
enum  lb_nat_type_t { NO_LB_NAT, LB_NAT, AFFINITY_LB_NAT }
 
enum  nat_translation_error_e {
  NAT_ED_TRNSL_ERR_SUCCESS = 0, NAT_ED_TRNSL_ERR_TRANSLATION_FAILED = 1, NAT_ED_TRNSL_ERR_FLOW_MISMATCH = 2, NAT_ED_TRNSL_ERR_PACKET_TRUNCATED = 3,
  NAT_ED_TRNSL_ERR_INNER_IP_CORRUPT = 4, NAT_ED_TRNSL_ERR_INVALID_CSUM = 5
}
 

Functions

typedef CLIB_PACKED (struct { u32 ses_count;u32 rx_fib_index;u32 tx_fib_index;u8 expired;}) per_vrf_sessions_t
 
 STATIC_ASSERT_SIZEOF (nat_6t_t, 2 *sizeof(u64))
 
void nat44_ed_forwarding_enable_disable (u8 is_enable)
 
static void nat_6t_flow_saddr_rewrite_set (nat_6t_flow_t *f, u32 saddr)
 
static void nat_6t_flow_daddr_rewrite_set (nat_6t_flow_t *f, u32 daddr)
 
static void nat_6t_flow_sport_rewrite_set (nat_6t_flow_t *f, u32 sport)
 
static void nat_6t_flow_dport_rewrite_set (nat_6t_flow_t *f, u32 dport)
 
static void nat_6t_flow_txfib_rewrite_set (nat_6t_flow_t *f, u32 tx_fib_index)
 
static void nat_6t_flow_icmp_id_rewrite_set (nat_6t_flow_t *f, u16 id)
 
typedef CLIB_PACKED (struct { struct { ip4_address_t addr;u32 fib_index;u16 port;} out2in;struct { ip4_address_t addr;u32 fib_index;u16 port;} in2out;nat_protocol_t nat_proto;nat_6t_flow_t i2o;nat_6t_flow_t o2i;u32 flags;u32 lru_head_index;u32 lru_index;f64 last_lru_update;f64 last_heard;f64 ha_last_refreshed;u64 total_bytes;u32 total_pkts;ip4_address_t ext_host_addr;u16 ext_host_port;ip4_address_t ext_host_nat_addr;u16 ext_host_nat_port;u8 state;u32 i2o_fin_seq;u32 o2i_fin_seq;u64 tcp_closed_timestamp;u32 per_vrf_sessions_index;u32 thread_index;}) snat_session_t
 
u32 nat44_ed_get_in2out_worker_index (vlib_buffer_t *b, ip4_header_t *ip, u32 rx_fib_index, u8 is_output)
 
u32 nat44_ed_get_out2in_worker_index (vlib_buffer_t *b, ip4_header_t *ip, u32 rx_fib_index, u8 is_output)
 
static bool nat44_ed_is_session_static (snat_session_t *s)
 Check if SNAT session is created from static mapping. More...
 
static bool snat_is_unk_proto_session (snat_session_t *s)
 Check if SNAT session for unknown protocol. More...
 
static bool nat44_ed_is_twice_nat_session (snat_session_t *s)
 Check if NAT session is twice NAT. More...
 
static bool nat44_ed_is_lb_session (snat_session_t *s)
 Check if NAT session is load-balancing. More...
 
static bool na44_ed_is_fwd_bypass_session (snat_session_t *s)
 Check if NAT session is forwarding bypass. More...
 
static bool nat44_ed_is_affinity_session (snat_session_t *s)
 Check if NAT session has affinity record. More...
 
static bool nat44_ed_is_exact_address_session (snat_session_t *s)
 Check if exact pool address should be used. More...
 
static bool nat44_ed_is_interface_inside (snat_interface_t *i)
 Check if NAT interface is inside. More...
 
static bool nat44_ed_is_interface_outside (snat_interface_t *i)
 Check if NAT interface is outside. More...
 
static bool nat44_is_ses_closed (snat_session_t *s)
 Check if NAT44 endpoint-dependent TCP session is closed. More...
 
static bool tcp_flags_is_init (u8 f)
 Check if client initiating TCP connection (received SYN from client) More...
 
static bool is_sm_addr_only (u32 f)
 
static bool is_sm_out2in_only (u32 f)
 
static bool is_sm_identity_nat (u32 f)
 
static bool is_sm_lb (u32 f)
 
static bool is_sm_exact_address (u32 f)
 
static bool is_sm_self_twice_nat (u32 f)
 
static bool is_sm_twice_nat (u32 f)
 
static bool is_sm_switch_address (u32 f)
 
clib_error_tnat44_api_hookup (vlib_main_t *vm)
 
int snat_set_workers (uword *bitmap)
 
int nat44_plugin_enable (nat44_config_t c)
 
int nat44_plugin_disable ()
 
int nat44_ed_add_interface (u32 sw_if_index, u8 is_inside)
 
int nat44_ed_del_interface (u32 sw_if_index, u8 is_inside)
 
int nat44_ed_add_output_interface (u32 sw_if_index)
 
int nat44_ed_del_output_interface (u32 sw_if_index)
 
int nat44_ed_add_address (ip4_address_t *addr, u32 vrf_id, u8 twice_nat)
 
int nat44_ed_del_address (ip4_address_t addr, u8 delete_sm, u8 twice_nat)
 
int nat44_ed_add_interface_address (u32 sw_if_index, u8 twice_nat)
 
int nat44_ed_del_interface_address (u32 sw_if_index, u8 twice_nat)
 
int nat44_ed_add_static_mapping (ip4_address_t l_addr, ip4_address_t e_addr, u16 l_port, u16 e_port, nat_protocol_t proto, u32 vrf_id, u32 sw_if_index, u32 flags, ip4_address_t pool_addr, u8 *tag)
 
int nat44_ed_del_static_mapping (ip4_address_t l_addr, ip4_address_t e_addr, u16 l_port, u16 e_port, nat_protocol_t proto, u32 vrf_id, u32 sw_if_index, u32 flags)
 
int nat44_ed_add_lb_static_mapping (ip4_address_t e_addr, u16 e_port, nat_protocol_t proto, nat44_lb_addr_port_t *locals, u32 flags, u8 *tag, u32 affinity)
 
int nat44_ed_del_lb_static_mapping (ip4_address_t e_addr, u16 e_port, nat_protocol_t proto, u32 flags)
 
int nat44_ed_add_del_lb_static_mapping_local (ip4_address_t e_addr, u16 e_port, ip4_address_t l_addr, u16 l_port, nat_protocol_t proto, u32 vrf_id, u8 probability, u8 is_add)
 
int nat44_ed_del_session (snat_main_t *sm, ip4_address_t *addr, u16 port, ip4_address_t *eh_addr, u16 eh_port, u8 proto, u32 vrf_id, int is_in)
 Delete NAT44 endpoint-dependent session. More...
 
void nat_free_session_data (snat_main_t *sm, snat_session_t *s, u32 thread_index, u8 is_ha)
 Free NAT44 session data (lookup keys, external address port) More...
 
int nat44_set_session_limit (u32 session_limit, u32 vrf_id)
 Set NAT44 session limit (session limit, vrf id) More...
 
int nat44_update_session_limit (u32 session_limit, u32 vrf_id)
 Update NAT44 session limit flushing all data (session limit, vrf id) More...
 
void snat_free_outside_address_and_port (snat_address_t *addresses, u32 thread_index, ip4_address_t *addr, u16 port, nat_protocol_t protocol)
 Free outside address and port pair. More...
 
void expire_per_vrf_sessions (u32 fib_index)
 
int snat_static_mapping_match (vlib_main_t *vm, snat_main_t *sm, ip4_address_t match_addr, u16 match_port, u32 match_fib_index, nat_protocol_t match_protocol, ip4_address_t *mapping_addr, u16 *mapping_port, u32 *mapping_fib_index, u8 by_external, u8 *is_addr_only, twice_nat_type_t *twice_nat, lb_nat_type_t *lb, ip4_address_t *ext_host_addr, u8 *is_identity_nat, snat_static_mapping_t **out)
 Match NAT44 static mapping. More...
 
u32 get_thread_idx_by_port (u16 e_port)
 
u8format_static_mapping_kvp (u8 *s, va_list *args)
 
u8format_session_kvp (u8 *s, va_list *args)
 
u32 nat_calc_bihash_buckets (u32 n_elts)
 
void nat44_addresses_free (snat_address_t **addresses)
 
void nat44_ed_sessions_clear ()
 
int nat44_ed_set_frame_queue_nelts (u32 frame_queue_nelts)
 
nat_translation_error_e nat_6t_flow_buf_translate_i2o (vlib_main_t *vm, snat_main_t *sm, vlib_buffer_t *b, ip4_header_t *ip, nat_6t_flow_t *f, nat_protocol_t proto, int is_output_feature)
 
nat_translation_error_e nat_6t_flow_buf_translate_o2i (vlib_main_t *vm, snat_main_t *sm, vlib_buffer_t *b, ip4_header_t *ip, nat_6t_flow_t *f, nat_protocol_t proto, int is_output_feature)
 
void nat_6t_l3_l4_csum_calc (nat_6t_flow_t *f)
 

Variables

snat_main_t snat_main
 
vlib_node_registration_t nat_default_node
 (constructor) VLIB_REGISTER_NODE (nat_default_node) More...
 
vlib_node_registration_t nat_pre_in2out_node
 (constructor) VLIB_REGISTER_NODE (nat_pre_in2out_node) More...
 
vlib_node_registration_t nat_pre_out2in_node
 (constructor) VLIB_REGISTER_NODE (nat_pre_out2in_node) More...
 
vlib_node_registration_t snat_in2out_node
 
vlib_node_registration_t snat_in2out_output_node
 
vlib_node_registration_t snat_out2in_node
 
vlib_node_registration_t snat_in2out_worker_handoff_node
 (constructor) VLIB_REGISTER_NODE (snat_in2out_worker_handoff_node) More...
 
vlib_node_registration_t snat_in2out_output_worker_handoff_node
 (constructor) VLIB_REGISTER_NODE (snat_in2out_output_worker_handoff_node) More...
 
vlib_node_registration_t snat_out2in_worker_handoff_node
 (constructor) VLIB_REGISTER_NODE (snat_out2in_worker_handoff_node) More...
 
vlib_node_registration_t nat44_ed_in2out_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_node) More...
 
vlib_node_registration_t nat44_ed_in2out_output_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_output_node) More...
 
vlib_node_registration_t nat44_ed_out2in_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_out2in_node) More...
 
fib_source_t nat_fib_src_hi
 
fib_source_t nat_fib_src_low
 
format_function_t format_snat_static_mapping
 
format_function_t format_snat_static_map_to_resolve
 
format_function_t format_snat_session
 
format_function_t format_snat_key
 
format_function_t format_static_mapping_key
 
format_function_t format_nat_protocol
 
format_function_t format_nat_addr_and_port_alloc_alg
 
unformat_function_t unformat_nat_protocol
 
format_function_t format_nat_ed_translation_error
 
format_function_t format_nat_6t_flow
 
format_function_t format_ed_session_kvp
 

Macro Definition Documentation

◆ foreach_nat44_config_flag

#define foreach_nat44_config_flag
Value:
_ (0x00, IS_ENDPOINT_INDEPENDENT) \
_ (0x01, IS_ENDPOINT_DEPENDENT) \
_ (0x02, IS_STATIC_MAPPING_ONLY) \
_ (0x04, IS_CONNECTION_TRACKING)

Definition at line 46 of file nat44_ed.h.

◆ foreach_nat_addr_and_port_alloc_alg

#define foreach_nat_addr_and_port_alloc_alg
Value:
_(0, DEFAULT, "default") \
_(1, MAPE, "map-e") \
_(2, RANGE, "port-range")

Definition at line 95 of file nat44_ed.h.

◆ foreach_nat_in2out_ed_error

#define foreach_nat_in2out_ed_error
Value:
_ (UNSUPPORTED_PROTOCOL, "unsupported protocol") \
_ (OUT_OF_PORTS, "out of ports") \
_ (BAD_ICMP_TYPE, "unsupported ICMP type") \
_ (MAX_SESSIONS_EXCEEDED, "maximum sessions exceeded") \
_ (NON_SYN, "non-SYN packet try to create session") \
_ (TCP_CLOSED, "drops due to TCP in transitory timeout") \
_ (TRNSL_FAILED, "couldn't translate packet")

Definition at line 127 of file nat44_ed.h.

◆ foreach_nat_out2in_ed_error

#define foreach_nat_out2in_ed_error
Value:
_ (UNSUPPORTED_PROTOCOL, "unsupported protocol") \
_ (OUT_OF_PORTS, "out of ports") \
_ (BAD_ICMP_TYPE, "unsupported ICMP type") \
_ (NO_TRANSLATION, "no translation") \
_ (MAX_SESSIONS_EXCEEDED, "maximum sessions exceeded") \
_ (NON_SYN, "non-SYN packet try to create session") \
_ (TCP_CLOSED, "drops due to TCP in transitory timeout") \
_ (HASH_ADD_FAILED, "hash table add failed") \
_ (TRNSL_FAILED, "couldn't translate packet")

Definition at line 144 of file nat44_ed.h.

◆ foreach_snat_session_state

#define foreach_snat_session_state
Value:
_(0, UNKNOWN, "unknown") \
_(1, UDP_ACTIVE, "udp-active") \
_(2, TCP_SYN_SENT, "tcp-syn-sent") \
_(3, TCP_ESTABLISHED, "tcp-established") \
_(4, TCP_FIN_WAIT, "tcp-fin-wait") \
_(5, TCP_CLOSE_WAIT, "tcp-close-wait") \
_(6, TCP_CLOSING, "tcp-closing") \
_(7, TCP_LAST_ACK, "tcp-last-ack") \
_(8, TCP_CLOSED, "tcp-closed") \
_(9, ICMP_ACTIVE, "icmp-active")

Definition at line 108 of file nat44_ed.h.

◆ NAT44_SES_I2O_FIN

#define NAT44_SES_I2O_FIN   1

Definition at line 165 of file nat44_ed.h.

◆ NAT44_SES_I2O_FIN_ACK

#define NAT44_SES_I2O_FIN_ACK   4

Definition at line 167 of file nat44_ed.h.

◆ NAT44_SES_I2O_SYN

#define NAT44_SES_I2O_SYN   16

Definition at line 169 of file nat44_ed.h.

◆ NAT44_SES_O2I_FIN

#define NAT44_SES_O2I_FIN   2

Definition at line 166 of file nat44_ed.h.

◆ NAT44_SES_O2I_FIN_ACK

#define NAT44_SES_O2I_FIN_ACK   8

Definition at line 168 of file nat44_ed.h.

◆ NAT44_SES_O2I_SYN

#define NAT44_SES_O2I_SYN   32

Definition at line 170 of file nat44_ed.h.

◆ NAT44_SES_RST

#define NAT44_SES_RST   64

Definition at line 171 of file nat44_ed.h.

◆ NAT_FLOW_OP_DADDR_REWRITE

#define NAT_FLOW_OP_DADDR_REWRITE   (1 << 3)

Definition at line 230 of file nat44_ed.h.

◆ NAT_FLOW_OP_DPORT_REWRITE

#define NAT_FLOW_OP_DPORT_REWRITE   (1 << 4)

Definition at line 231 of file nat44_ed.h.

◆ NAT_FLOW_OP_ICMP_ID_REWRITE

#define NAT_FLOW_OP_ICMP_ID_REWRITE   (1 << 5)

Definition at line 232 of file nat44_ed.h.

◆ NAT_FLOW_OP_SADDR_REWRITE

#define NAT_FLOW_OP_SADDR_REWRITE   (1 << 1)

Definition at line 228 of file nat44_ed.h.

◆ NAT_FLOW_OP_SPORT_REWRITE

#define NAT_FLOW_OP_SPORT_REWRITE   (1 << 2)

Definition at line 229 of file nat44_ed.h.

◆ NAT_FLOW_OP_TXFIB_REWRITE

#define NAT_FLOW_OP_TXFIB_REWRITE   (1 << 6)

Definition at line 233 of file nat44_ed.h.

◆ NAT_FQ_NELTS_DEFAULT

#define NAT_FQ_NELTS_DEFAULT   64

Definition at line 40 of file nat44_ed.h.

◆ NAT_INTERFACE_FLAG_IS_INSIDE

#define NAT_INTERFACE_FLAG_IS_INSIDE   1

Definition at line 185 of file nat44_ed.h.

◆ NAT_INTERFACE_FLAG_IS_OUTSIDE

#define NAT_INTERFACE_FLAG_IS_OUTSIDE   2

Definition at line 186 of file nat44_ed.h.

◆ nat_log_debug

#define nat_log_debug (   ...)    vlib_log(VLIB_LOG_LEVEL_DEBUG, snat_main.log_class, __VA_ARGS__)

Definition at line 890 of file nat44_ed.h.

◆ nat_log_err

#define nat_log_err (   ...)    vlib_log(VLIB_LOG_LEVEL_ERR, snat_main.log_class, __VA_ARGS__)

Definition at line 882 of file nat44_ed.h.

◆ nat_log_info

#define nat_log_info (   ...)    vlib_log(VLIB_LOG_LEVEL_INFO, snat_main.log_class, __VA_ARGS__)

Definition at line 888 of file nat44_ed.h.

◆ nat_log_notice

#define nat_log_notice (   ...)    vlib_log(VLIB_LOG_LEVEL_NOTICE, snat_main.log_class, __VA_ARGS__)

Definition at line 886 of file nat44_ed.h.

◆ nat_log_warn

#define nat_log_warn (   ...)    vlib_log(VLIB_LOG_LEVEL_WARNING, snat_main.log_class, __VA_ARGS__)

Definition at line 884 of file nat44_ed.h.

◆ NAT_SM_FLAG_ADDR_ONLY

#define NAT_SM_FLAG_ADDR_ONLY   (1 << 4)

Definition at line 192 of file nat44_ed.h.

◆ NAT_SM_FLAG_EXACT_ADDRESS

#define NAT_SM_FLAG_EXACT_ADDRESS   (1 << 5)

Definition at line 193 of file nat44_ed.h.

◆ NAT_SM_FLAG_IDENTITY_NAT

#define NAT_SM_FLAG_IDENTITY_NAT   (1 << 3)

Definition at line 191 of file nat44_ed.h.

◆ NAT_SM_FLAG_LB

#define NAT_SM_FLAG_LB   (1 << 7)

Definition at line 195 of file nat44_ed.h.

◆ NAT_SM_FLAG_OUT2IN_ONLY

#define NAT_SM_FLAG_OUT2IN_ONLY   (1 << 6)

Definition at line 194 of file nat44_ed.h.

◆ NAT_SM_FLAG_SELF_TWICE_NAT

#define NAT_SM_FLAG_SELF_TWICE_NAT   (1 << 1)

Definition at line 189 of file nat44_ed.h.

◆ NAT_SM_FLAG_SWITCH_ADDRESS

#define NAT_SM_FLAG_SWITCH_ADDRESS   (1 << 8)

Definition at line 196 of file nat44_ed.h.

◆ NAT_SM_FLAG_TWICE_NAT

#define NAT_SM_FLAG_TWICE_NAT   (1 << 2)

Definition at line 190 of file nat44_ed.h.

◆ SNAT_FLAG_HAIRPINNING

#define SNAT_FLAG_HAIRPINNING   (1 << 0)

Definition at line 43 of file nat44_ed.h.

◆ SNAT_SESSION_FLAG_AFFINITY

#define SNAT_SESSION_FLAG_AFFINITY   (1 << 6)

Definition at line 180 of file nat44_ed.h.

◆ SNAT_SESSION_FLAG_ENDPOINT_DEPENDENT

#define SNAT_SESSION_FLAG_ENDPOINT_DEPENDENT   (1 << 4)

Definition at line 178 of file nat44_ed.h.

◆ SNAT_SESSION_FLAG_EXACT_ADDRESS

#define SNAT_SESSION_FLAG_EXACT_ADDRESS   (1 << 7)

Definition at line 181 of file nat44_ed.h.

◆ SNAT_SESSION_FLAG_FWD_BYPASS

#define SNAT_SESSION_FLAG_FWD_BYPASS   (1 << 5)

Definition at line 179 of file nat44_ed.h.

◆ SNAT_SESSION_FLAG_HAIRPINNING

#define SNAT_SESSION_FLAG_HAIRPINNING   (1 << 8)

Definition at line 182 of file nat44_ed.h.

◆ SNAT_SESSION_FLAG_LOAD_BALANCING

#define SNAT_SESSION_FLAG_LOAD_BALANCING   (1 << 2)

Definition at line 176 of file nat44_ed.h.

◆ SNAT_SESSION_FLAG_STATIC_MAPPING

#define SNAT_SESSION_FLAG_STATIC_MAPPING   (1 << 0)

Definition at line 174 of file nat44_ed.h.

◆ SNAT_SESSION_FLAG_TWICE_NAT

#define SNAT_SESSION_FLAG_TWICE_NAT   (1 << 3)

Definition at line 177 of file nat44_ed.h.

◆ SNAT_SESSION_FLAG_UNKNOWN_PROTO

#define SNAT_SESSION_FLAG_UNKNOWN_PROTO   (1 << 1)

Definition at line 175 of file nat44_ed.h.

Typedef Documentation

◆ nat44_config_flags_t

◆ nat_alloc_out_addr_and_port_function_t

typedef int() nat_alloc_out_addr_and_port_function_t(snat_address_t *addresses, u32 fib_index, u32 thread_index, nat_protocol_t proto, ip4_address_t *addr, u16 *port, u16 port_per_thread, u32 snat_thread_index)

Definition at line 503 of file nat44_ed.h.

◆ snat_main_t

typedef struct snat_main_s snat_main_t

Enumeration Type Documentation

◆ lb_nat_type_t

Enumerator
NO_LB_NAT 
LB_NAT 
AFFINITY_LB_NAT 

Definition at line 403 of file nat44_ed.h.

◆ nat44_config_flags_t_

Enumerator
foreach_nat44_config_flag 

Definition at line 52 of file nat44_ed.h.

◆ nat_addr_and_port_alloc_alg_t

Enumerator
foreach_nat_addr_and_port_alloc_alg 

Definition at line 100 of file nat44_ed.h.

◆ nat_in2out_ed_error_t

Enumerator
NAT_IN2OUT_ED_N_ERROR 

Definition at line 136 of file nat44_ed.h.

◆ nat_next_t

enum nat_next_t
Enumerator
NAT_NEXT_DROP 
NAT_NEXT_ICMP_ERROR 
NAT_NEXT_IN2OUT_ED_FAST_PATH 
NAT_NEXT_IN2OUT_ED_SLOW_PATH 
NAT_NEXT_IN2OUT_ED_OUTPUT_FAST_PATH 
NAT_NEXT_IN2OUT_ED_OUTPUT_SLOW_PATH 
NAT_NEXT_OUT2IN_ED_FAST_PATH 
NAT_NEXT_OUT2IN_ED_SLOW_PATH 
NAT_NEXT_IN2OUT_CLASSIFY 
NAT_NEXT_OUT2IN_CLASSIFY 
NAT_N_NEXT 

Definition at line 73 of file nat44_ed.h.

◆ nat_out2in_ed_error_t

Enumerator
NAT_OUT2IN_ED_N_ERROR 

Definition at line 155 of file nat44_ed.h.

◆ nat_translation_error_e

Enumerator
NAT_ED_TRNSL_ERR_SUCCESS 
NAT_ED_TRNSL_ERR_TRANSLATION_FAILED 
NAT_ED_TRNSL_ERR_FLOW_MISMATCH 
NAT_ED_TRNSL_ERR_PACKET_TRUNCATED 
NAT_ED_TRNSL_ERR_INNER_IP_CORRUPT 
NAT_ED_TRNSL_ERR_INVALID_CSUM 

Definition at line 1049 of file nat44_ed.h.

◆ snat_session_state_t

Enumerator
foreach_snat_session_state 

Definition at line 120 of file nat44_ed.h.

◆ twice_nat_type_t

Enumerator
TWICE_NAT_DISABLED 
TWICE_NAT 
TWICE_NAT_SELF 

Definition at line 393 of file nat44_ed.h.

Function Documentation

◆ CLIB_PACKED() [1/2]

typedef CLIB_PACKED ( struct { struct { ip4_address_t addr;u32 fib_index;u16 port;} out2in;struct { ip4_address_t addr;u32 fib_index;u16 port;} in2out;nat_protocol_t nat_proto;nat_6t_flow_t i2o;nat_6t_flow_t o2i;u32 flags;u32 lru_head_index;u32 lru_index;f64 last_lru_update;f64 last_heard;f64 ha_last_refreshed;u64 total_bytes;u32 total_pkts;ip4_address_t ext_host_addr;u16 ext_host_port;ip4_address_t ext_host_nat_addr;u16 ext_host_nat_port;u8 state;u32 i2o_fin_seq;u32 o2i_fin_seq;u64 tcp_closed_timestamp;u32 per_vrf_sessions_index;u32 thread_index;}  )

◆ CLIB_PACKED() [2/2]

typedef CLIB_PACKED ( struct { u32 ses_count;u32 rx_fib_index;u32 tx_fib_index;u8 expired;}  )

◆ expire_per_vrf_sessions()

void expire_per_vrf_sessions ( u32  fib_index)

Definition at line 1550 of file nat44_ed.c.

+ Here is the caller graph for this function:

◆ format_session_kvp()

u8* format_session_kvp ( u8 s,
va_list *  args 
)

Definition at line 186 of file nat44_ed.c.

+ Here is the call graph for this function:

◆ format_static_mapping_kvp()

u8* format_static_mapping_kvp ( u8 s,
va_list *  args 
)

Definition at line 198 of file nat44_ed.c.

+ Here is the caller graph for this function:

◆ get_thread_idx_by_port()

u32 get_thread_idx_by_port ( u16  e_port)

Definition at line 540 of file nat44_ed.c.

+ Here is the caller graph for this function:

◆ is_sm_addr_only()

static bool is_sm_addr_only ( u32  f)
inlinestatic

Definition at line 834 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ is_sm_exact_address()

static bool is_sm_exact_address ( u32  f)
inlinestatic

Definition at line 858 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ is_sm_identity_nat()

static bool is_sm_identity_nat ( u32  f)
inlinestatic

Definition at line 846 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ is_sm_lb()

static bool is_sm_lb ( u32  f)
inlinestatic

Definition at line 852 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ is_sm_out2in_only()

static bool is_sm_out2in_only ( u32  f)
inlinestatic

Definition at line 840 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ is_sm_self_twice_nat()

static bool is_sm_self_twice_nat ( u32  f)
inlinestatic

Definition at line 864 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ is_sm_switch_address()

static bool is_sm_switch_address ( u32  f)
inlinestatic

Definition at line 876 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ is_sm_twice_nat()

static bool is_sm_twice_nat ( u32  f)
inlinestatic

Definition at line 870 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ na44_ed_is_fwd_bypass_session()

static bool na44_ed_is_fwd_bypass_session ( snat_session_t *  s)
inlinestatic

Check if NAT session is forwarding bypass.

Parameters
sNAT session
Returns
true if NAT session is load-balancing

Definition at line 768 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat44_addresses_free()

void nat44_addresses_free ( snat_address_t **  addresses)

Definition at line 2442 of file nat44_ed.c.

+ Here is the caller graph for this function:

◆ nat44_api_hookup()

clib_error_t* nat44_api_hookup ( vlib_main_t vm)

Definition at line 1685 of file nat44_ed_api.c.

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

◆ nat44_ed_add_address()

int nat44_ed_add_address ( ip4_address_t addr,
u32  vrf_id,
u8  twice_nat 
)

Definition at line 388 of file nat44_ed.c.

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

◆ nat44_ed_add_del_lb_static_mapping_local()

int nat44_ed_add_del_lb_static_mapping_local ( ip4_address_t  e_addr,
u16  e_port,
ip4_address_t  l_addr,
u16  l_port,
nat_protocol_t  proto,
u32  vrf_id,
u8  probability,
u8  is_add 
)

Definition at line 1399 of file nat44_ed.c.

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

◆ nat44_ed_add_interface()

int nat44_ed_add_interface ( u32  sw_if_index,
u8  is_inside 
)

Definition at line 1635 of file nat44_ed.c.

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

◆ nat44_ed_add_interface_address()

int nat44_ed_add_interface_address ( u32  sw_if_index,
u8  twice_nat 
)

Definition at line 3362 of file nat44_ed.c.

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

◆ nat44_ed_add_lb_static_mapping()

int nat44_ed_add_lb_static_mapping ( ip4_address_t  e_addr,
u16  e_port,
nat_protocol_t  proto,
nat44_lb_addr_port_t locals,
u32  flags,
u8 tag,
u32  affinity 
)

Definition at line 1136 of file nat44_ed.c.

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

◆ nat44_ed_add_output_interface()

int nat44_ed_add_output_interface ( u32  sw_if_index)

Definition at line 1848 of file nat44_ed.c.

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

◆ nat44_ed_add_static_mapping()

int nat44_ed_add_static_mapping ( ip4_address_t  l_addr,
ip4_address_t  e_addr,
u16  l_port,
u16  e_port,
nat_protocol_t  proto,
u32  vrf_id,
u32  sw_if_index,
u32  flags,
ip4_address_t  pool_addr,
u8 tag 
)

Definition at line 783 of file nat44_ed.c.

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

◆ nat44_ed_del_address()

int nat44_ed_del_address ( ip4_address_t  addr,
u8  delete_sm,
u8  twice_nat 
)

Definition at line 449 of file nat44_ed.c.

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

◆ nat44_ed_del_interface()

int nat44_ed_del_interface ( u32  sw_if_index,
u8  is_inside 
)

Definition at line 1743 of file nat44_ed.c.

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

◆ nat44_ed_del_interface_address()

int nat44_ed_del_interface_address ( u32  sw_if_index,
u8  twice_nat 
)

Definition at line 3401 of file nat44_ed.c.

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

◆ nat44_ed_del_lb_static_mapping()

int nat44_ed_del_lb_static_mapping ( ip4_address_t  e_addr,
u16  e_port,
nat_protocol_t  proto,
u32  flags 
)

Definition at line 1279 of file nat44_ed.c.

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

◆ nat44_ed_del_output_interface()

int nat44_ed_del_output_interface ( u32  sw_if_index)

Definition at line 1946 of file nat44_ed.c.

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

◆ nat44_ed_del_session()

int nat44_ed_del_session ( snat_main_t sm,
ip4_address_t addr,
u16  port,
ip4_address_t eh_addr,
u16  eh_port,
u8  proto,
u32  vrf_id,
int  is_in 
)

Delete NAT44 endpoint-dependent session.

Parameters
smsnat global configuration data
addrIPv4 address
portL4 port number
protoL4 protocol
vrf_idVRF ID
is_in1 = inside network address and port pair, 0 = outside
Returns
0 on success, non-zero value otherwise

Definition at line 3465 of file nat44_ed.c.

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

◆ nat44_ed_del_static_mapping()

int nat44_ed_del_static_mapping ( ip4_address_t  l_addr,
ip4_address_t  e_addr,
u16  l_port,
u16  e_port,
nat_protocol_t  proto,
u32  vrf_id,
u32  sw_if_index,
u32  flags 
)

Definition at line 983 of file nat44_ed.c.

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

◆ nat44_ed_forwarding_enable_disable()

void nat44_ed_forwarding_enable_disable ( u8  is_enable)

Definition at line 2524 of file nat44_ed.c.

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

◆ nat44_ed_get_in2out_worker_index()

u32 nat44_ed_get_in2out_worker_index ( vlib_buffer_t b,
ip4_header_t ip,
u32  rx_fib_index,
u8  is_output 
)

Definition at line 2757 of file nat44_ed.c.

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

◆ nat44_ed_get_out2in_worker_index()

u32 nat44_ed_get_out2in_worker_index ( vlib_buffer_t b,
ip4_header_t ip,
u32  rx_fib_index,
u8  is_output 
)

Definition at line 2882 of file nat44_ed.c.

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

◆ nat44_ed_is_affinity_session()

static bool nat44_ed_is_affinity_session ( snat_session_t *  s)
inlinestatic

Check if NAT session has affinity record.

Parameters
sNAT session
Returns
true if NAT session has affinity record

Definition at line 778 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat44_ed_is_exact_address_session()

static bool nat44_ed_is_exact_address_session ( snat_session_t *  s)
inlinestatic

Check if exact pool address should be used.

Parameters
sSNAT session
Returns
true if exact pool address

Definition at line 788 of file nat44_ed.h.

◆ nat44_ed_is_interface_inside()

static bool nat44_ed_is_interface_inside ( snat_interface_t i)
inlinestatic

Check if NAT interface is inside.

Parameters
iNAT interface
Returns
true if inside interface

Definition at line 798 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat44_ed_is_interface_outside()

static bool nat44_ed_is_interface_outside ( snat_interface_t i)
inlinestatic

Check if NAT interface is outside.

Parameters
iNAT interface
Returns
true if outside interface

Definition at line 808 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat44_ed_is_lb_session()

static bool nat44_ed_is_lb_session ( snat_session_t *  s)
inlinestatic

Check if NAT session is load-balancing.

Parameters
sNAT session
Returns
true if NAT session is load-balancing

Definition at line 758 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat44_ed_is_session_static()

static bool nat44_ed_is_session_static ( snat_session_t *  s)
inlinestatic

Check if SNAT session is created from static mapping.

Parameters
sSNAT session
Returns
true if SNAT session is created from static mapping otherwise 0

Definition at line 728 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat44_ed_is_twice_nat_session()

static bool nat44_ed_is_twice_nat_session ( snat_session_t *  s)
inlinestatic

Check if NAT session is twice NAT.

Parameters
sNAT session
Returns
true if NAT session is twice NAT

Definition at line 748 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat44_ed_sessions_clear()

void nat44_ed_sessions_clear ( )

Definition at line 3185 of file nat44_ed.c.

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

◆ nat44_ed_set_frame_queue_nelts()

int nat44_ed_set_frame_queue_nelts ( u32  frame_queue_nelts)

Definition at line 2058 of file nat44_ed.c.

+ Here is the caller graph for this function:

◆ nat44_is_ses_closed()

static bool nat44_is_ses_closed ( snat_session_t *  s)
inlinestatic

Check if NAT44 endpoint-dependent TCP session is closed.

Parameters
sNAT session
Returns
true if session is closed

Definition at line 818 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat44_plugin_disable()

int nat44_plugin_disable ( )

Definition at line 2457 of file nat44_ed.c.

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

◆ nat44_plugin_enable()

int nat44_plugin_enable ( nat44_config_t  c)

Definition at line 2364 of file nat44_ed.c.

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

◆ nat44_set_session_limit()

int nat44_set_session_limit ( u32  session_limit,
u32  vrf_id 
)

Set NAT44 session limit (session limit, vrf id)

Parameters
session_limitSession limit
vrf_idVRF id
Returns
0 on success, non-zero value otherwise

Definition at line 3046 of file nat44_ed.c.

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

◆ nat44_update_session_limit()

int nat44_update_session_limit ( u32  session_limit,
u32  vrf_id 
)

Update NAT44 session limit flushing all data (session limit, vrf id)

Parameters
session_limitSession limit
vrf_idVRF id
Returns
0 on success, non-zero value otherwise

Definition at line 3065 of file nat44_ed.c.

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

◆ nat_6t_flow_buf_translate_i2o()

nat_translation_error_e nat_6t_flow_buf_translate_i2o ( vlib_main_t vm,
snat_main_t sm,
vlib_buffer_t b,
ip4_header_t ip,
nat_6t_flow_t f,
nat_protocol_t  proto,
int  is_output_feature 
)

Definition at line 3862 of file nat44_ed.c.

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

◆ nat_6t_flow_buf_translate_o2i()

nat_translation_error_e nat_6t_flow_buf_translate_o2i ( vlib_main_t vm,
snat_main_t sm,
vlib_buffer_t b,
ip4_header_t ip,
nat_6t_flow_t f,
nat_protocol_t  proto,
int  is_output_feature 
)

Definition at line 3872 of file nat44_ed.c.

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

◆ nat_6t_flow_daddr_rewrite_set()

static void nat_6t_flow_daddr_rewrite_set ( nat_6t_flow_t f,
u32  daddr 
)
inlinestatic

Definition at line 259 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat_6t_flow_dport_rewrite_set()

static void nat_6t_flow_dport_rewrite_set ( nat_6t_flow_t f,
u32  dport 
)
inlinestatic

Definition at line 273 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat_6t_flow_icmp_id_rewrite_set()

static void nat_6t_flow_icmp_id_rewrite_set ( nat_6t_flow_t f,
u16  id 
)
inlinestatic

Definition at line 287 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat_6t_flow_saddr_rewrite_set()

static void nat_6t_flow_saddr_rewrite_set ( nat_6t_flow_t f,
u32  saddr 
)
inlinestatic

Definition at line 252 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat_6t_flow_sport_rewrite_set()

static void nat_6t_flow_sport_rewrite_set ( nat_6t_flow_t f,
u32  sport 
)
inlinestatic

Definition at line 266 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat_6t_flow_txfib_rewrite_set()

static void nat_6t_flow_txfib_rewrite_set ( nat_6t_flow_t f,
u32  tx_fib_index 
)
inlinestatic

Definition at line 280 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ nat_6t_l3_l4_csum_calc()

void nat_6t_l3_l4_csum_calc ( nat_6t_flow_t f)

Definition at line 3532 of file nat44_ed.c.

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

◆ nat_calc_bihash_buckets()

u32 nat_calc_bihash_buckets ( u32  n_elts)

Definition at line 122 of file lib.h.

+ Here is the caller graph for this function:

◆ nat_free_session_data()

void nat_free_session_data ( snat_main_t sm,
snat_session_t *  s,
u32  thread_index,
u8  is_ha 
)

Free NAT44 session data (lookup keys, external address port)

Parameters
smsnat global configuration data
sNAT session
thread_indexthread index
is_hais HA event

Definition at line 231 of file nat44_ed.c.

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

◆ snat_free_outside_address_and_port()

void snat_free_outside_address_and_port ( snat_address_t addresses,
u32  thread_index,
ip4_address_t addr,
u16  port,
nat_protocol_t  protocol 
)

Free outside address and port pair.

Parameters
addressesvector of outside addresses
thread_indexthread index
keyaddress, port and protocol

Definition at line 2560 of file nat44_ed.c.

+ Here is the caller graph for this function:

◆ snat_is_unk_proto_session()

static bool snat_is_unk_proto_session ( snat_session_t *  s)
inlinestatic

Check if SNAT session for unknown protocol.

Parameters
sSNAT session
Returns
true if SNAT session for unknown protocol otherwise 0

Definition at line 738 of file nat44_ed.h.

+ Here is the caller graph for this function:

◆ snat_set_workers()

int snat_set_workers ( uword bitmap)

Definition at line 2032 of file nat44_ed.c.

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

◆ snat_static_mapping_match()

int snat_static_mapping_match ( vlib_main_t vm,
snat_main_t sm,
ip4_address_t  match_addr,
u16  match_port,
u32  match_fib_index,
nat_protocol_t  match_protocol,
ip4_address_t mapping_addr,
u16 mapping_port,
u32 mapping_fib_index,
u8  by_external,
u8 is_addr_only,
twice_nat_type_t twice_nat,
lb_nat_type_t lb,
ip4_address_t ext_host_addr,
u8 is_identity_nat,
snat_static_mapping_t **  out 
)

Match NAT44 static mapping.

Parameters
keyaddress and port to match
addrexternal/local address of the matched mapping
portport of the matched mapping
fib_indexfib index of the matched mapping
by_externalif 0 match by local address otherwise match by external address
is_addr_only1 if matched mapping is address only
twice_natmatched mapping is twice NAT type
lb1 if matched mapping is load-balanced
ext_host_addrexternal host address
is_identity_nat1 if indentity mapping
outif !=0 set to pointer of the mapping structure
Returns
0 if match found otherwise 1.

Definition at line 2597 of file nat44_ed.c.

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

◆ STATIC_ASSERT_SIZEOF()

STATIC_ASSERT_SIZEOF ( nat_6t_t  ,
2 *  sizeofu64 
)

◆ tcp_flags_is_init()

static bool tcp_flags_is_init ( u8  f)
inlinestatic

Check if client initiating TCP connection (received SYN from client)

Parameters
tTCP header
Returns
true if client initiating TCP connection

Definition at line 828 of file nat44_ed.h.

+ Here is the caller graph for this function:

Variable Documentation

◆ format_ed_session_kvp

format_function_t format_ed_session_kvp

Definition at line 1071 of file nat44_ed.h.

◆ format_nat_6t_flow

format_function_t format_nat_6t_flow

Definition at line 1070 of file nat44_ed.h.

◆ format_nat_addr_and_port_alloc_alg

format_function_t format_nat_addr_and_port_alloc_alg

Definition at line 719 of file nat44_ed.h.

◆ format_nat_ed_translation_error

format_function_t format_nat_ed_translation_error

Definition at line 1069 of file nat44_ed.h.

◆ format_nat_protocol

format_function_t format_nat_protocol

Definition at line 718 of file nat44_ed.h.

◆ format_snat_key

format_function_t format_snat_key

Definition at line 716 of file nat44_ed.h.

◆ format_snat_session

format_function_t format_snat_session

Definition at line 715 of file nat44_ed.h.

◆ format_snat_static_map_to_resolve

format_function_t format_snat_static_map_to_resolve

Definition at line 714 of file nat44_ed.h.

◆ format_snat_static_mapping

format_function_t format_snat_static_mapping

Definition at line 713 of file nat44_ed.h.

◆ format_static_mapping_key

format_function_t format_static_mapping_key

Definition at line 717 of file nat44_ed.h.

◆ nat44_ed_in2out_node

vlib_node_registration_t nat44_ed_in2out_node

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_node)

Definition at line 1528 of file nat44_ed_in2out.c.

◆ nat44_ed_in2out_output_node

vlib_node_registration_t nat44_ed_in2out_output_node

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_output_node)

Definition at line 1553 of file nat44_ed_in2out.c.

◆ nat44_ed_out2in_node

vlib_node_registration_t nat44_ed_out2in_node

(constructor) VLIB_REGISTER_NODE (nat44_ed_out2in_node)

Definition at line 1406 of file nat44_ed_out2in.c.

◆ nat_default_node

vlib_node_registration_t nat_default_node

(constructor) VLIB_REGISTER_NODE (nat_default_node)

Definition at line 3510 of file nat44_ed.c.

◆ nat_fib_src_hi

fib_source_t nat_fib_src_hi

Definition at line 22 of file dslite.c.

◆ nat_fib_src_low

fib_source_t nat_fib_src_low

◆ nat_pre_in2out_node

vlib_node_registration_t nat_pre_in2out_node

(constructor) VLIB_REGISTER_NODE (nat_pre_in2out_node)

Definition at line 1639 of file nat44_ed_in2out.c.

◆ nat_pre_out2in_node

vlib_node_registration_t nat_pre_out2in_node

(constructor) VLIB_REGISTER_NODE (nat_pre_out2in_node)

Definition at line 1453 of file nat44_ed_out2in.c.

◆ snat_in2out_node

vlib_node_registration_t snat_in2out_node

◆ snat_in2out_output_node

vlib_node_registration_t snat_in2out_output_node

◆ snat_in2out_output_worker_handoff_node

vlib_node_registration_t snat_in2out_output_worker_handoff_node

(constructor) VLIB_REGISTER_NODE (snat_in2out_output_worker_handoff_node)

Definition at line 315 of file nat44_ed_handoff.c.

◆ snat_in2out_worker_handoff_node

vlib_node_registration_t snat_in2out_worker_handoff_node

(constructor) VLIB_REGISTER_NODE (snat_in2out_worker_handoff_node)

Definition at line 297 of file nat44_ed_handoff.c.

◆ snat_main

snat_main_t snat_main

Definition at line 41 of file nat44_ed.c.

◆ snat_out2in_node

vlib_node_registration_t snat_out2in_node

◆ snat_out2in_worker_handoff_node

vlib_node_registration_t snat_out2in_worker_handoff_node

(constructor) VLIB_REGISTER_NODE (snat_out2in_worker_handoff_node)

Definition at line 332 of file nat44_ed_handoff.c.

◆ unformat_nat_protocol

unformat_function_t unformat_nat_protocol

Definition at line 721 of file nat44_ed.h.