FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
nat44_ei.h File Reference
+ Include dependency graph for nat44_ei.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  nat44_ei_address_t
 
struct  icmp_echo_header_t
 
struct  tcp_udp_header_t
 
struct  nat44_ei_user_key_t
 
struct  nat44_ei_config_t
 
struct  nat44_ei_static_map_resolve_t
 
struct  nat44_ei_lb_addr_port_t
 
struct  nat44_ei_static_mapping_t
 
struct  nat44_ei_interface_t
 
struct  nat44_ei_fib_t
 
struct  nat44_ei_outside_fib_t
 
struct  nat44_ei_main_per_thread_data_t
 
struct  nat44_ei_runtime_t
 
struct  nat44_ei_is_idle_session_ctx_t
 
struct  nat44_ei_main_s
 

Macros

#define NAT_FQ_NELTS_DEFAULT   64
 
#define foreach_nat44_ei_addr_and_port_alloc_alg
 
#define NAT44_EI_INTERFACE_FLAG_IS_INSIDE   (1 << 0)
 
#define NAT44_EI_INTERFACE_FLAG_IS_OUTSIDE   (1 << 1)
 
#define NAT44_EI_SESSION_FLAG_STATIC_MAPPING   (1 << 0)
 
#define NAT44_EI_SESSION_FLAG_UNKNOWN_PROTO   (1 << 1)
 
#define NAT44_EI_STATIC_MAPPING_FLAG_ADDR_ONLY   (1 << 0)
 
#define NAT44_EI_STATIC_MAPPING_FLAG_IDENTITY_NAT   (1 << 1)
 
#define nat44_ei_is_session_static(sp)   (sp->flags & NAT44_EI_SESSION_FLAG_STATIC_MAPPING)
 
#define nat44_ei_is_unk_proto_session(sp)   (sp->flags & NAT44_EI_SESSION_FLAG_UNKNOWN_PROTO)
 
#define nat44_ei_interface_is_inside(ip)   (ip->flags & NAT44_EI_INTERFACE_FLAG_IS_INSIDE)
 
#define nat44_ei_interface_is_outside(ip)   (ip->flags & NAT44_EI_INTERFACE_FLAG_IS_OUTSIDE)
 
#define nat44_ei_is_addr_only_static_mapping(mp)   (mp->flags & NAT44_EI_STATIC_MAPPING_FLAG_ADDR_ONLY)
 
#define nat44_ei_is_identity_static_mapping(mp)   (mp->flags & NAT44_EI_STATIC_MAPPING_FLAG_IDENTITY_NAT)
 
#define nat44_ei_log_err(...)   vlib_log (VLIB_LOG_LEVEL_ERR, nat44_ei_main.log_class, __VA_ARGS__)
 
#define nat44_ei_log_warn(...)   vlib_log (VLIB_LOG_LEVEL_WARNING, nat44_ei_main.log_class, __VA_ARGS__)
 
#define nat44_ei_log_notice(...)   vlib_log (VLIB_LOG_LEVEL_NOTICE, nat44_ei_main.log_class, __VA_ARGS__)
 
#define nat44_ei_log_info(...)   vlib_log (VLIB_LOG_LEVEL_INFO, nat44_ei_main.log_class, __VA_ARGS__)
 
#define nat44_ei_log_debug(...)   vlib_log (VLIB_LOG_LEVEL_DEBUG, nat44_ei_main.log_class, __VA_ARGS__)
 

Typedefs

typedef int() nat44_ei_alloc_out_addr_and_port_function_t(nat44_ei_address_t *addresses, u32 fib_index, u32 thread_index, nat_protocol_t proto, ip4_address_t s_addr, ip4_address_t *addr, u16 *port, u16 port_per_thread, u32 snat_thread_index)
 
typedef struct nat44_ei_main_s nat44_ei_main_t
 

Enumerations

enum  nat44_ei_addr_and_port_alloc_alg_t { foreach_nat44_ei_addr_and_port_alloc_alg }
 

Functions

clib_error_tnat44_ei_api_hookup (vlib_main_t *vm)
 
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;u32 flags;u32 per_user_index;u32 per_user_list_head_index;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 user_index;}) nat44_ei_session_t
 
typedef CLIB_PACKED (struct { ip4_address_t addr;u32 fib_index;u32 sessions_per_user_list_head_index;u32 nsessions;u32 nstaticsessions;}) nat44_ei_user_t
 
int nat44_ei_plugin_enable (nat44_ei_config_t c)
 
int nat44_ei_plugin_disable ()
 
int nat44_ei_user_del (ip4_address_t *addr, u32 fib_index)
 Delete specific NAT44 EI user and his sessions. More...
 
void nat44_ei_static_mapping_del_sessions (nat44_ei_main_t *nm, nat44_ei_main_per_thread_data_t *tnm, nat44_ei_user_key_t u_key, int addr_only, ip4_address_t e_addr, u16 e_port)
 Delete session for static mapping. More...
 
u32 nat44_ei_get_in2out_worker_index (ip4_header_t *ip0, u32 rx_fib_index0, u8 is_output)
 
u32 nat44_ei_get_out2in_worker_index (vlib_buffer_t *b, ip4_header_t *ip0, u32 rx_fib_index0, u8 is_output)
 
void nat44_ei_set_alloc_default (void)
 Set address and port assignment algorithm to default/standard. More...
 
void nat44_ei_set_alloc_mape (u16 psid, u16 psid_offset, u16 psid_length)
 Set address and port assignment algorithm for MAP-E CE. More...
 
void nat44_ei_set_alloc_range (u16 start_port, u16 end_port)
 Set address and port assignment algorithm for port range. More...
 
int nat44_ei_add_del_static_mapping (ip4_address_t l_addr, ip4_address_t e_addr, u16 l_port, u16 e_port, nat_protocol_t proto, u32 sw_if_index, u32 vrf_id, u8 addr_only, u8 identity_nat, u8 *tag, u8 is_add)
 Add/delete NAT44-EI static mapping. More...
 
int nat44_ei_del_session (nat44_ei_main_t *nm, ip4_address_t *addr, u16 port, nat_protocol_t proto, u32 vrf_id, int is_in)
 Delete NAT44-EI session. More...
 
int nat44_ei_static_mapping_match (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, u8 *is_identity_nat)
 Match NAT44-EI static mapping. More...
 
void nat44_ei_sessions_clear ()
 Clear all active NAT44-EI sessions. More...
 
nat44_ei_user_t * nat44_ei_user_get_or_create (nat44_ei_main_t *nm, ip4_address_t *addr, u32 fib_index, u32 thread_index)
 
nat44_ei_session_t * nat44_ei_session_alloc_or_recycle (nat44_ei_main_t *nm, nat44_ei_user_t *u, u32 thread_index, f64 now)
 
void nat44_ei_free_session_data_v2 (nat44_ei_main_t *nm, nat44_ei_session_t *s, u32 thread_index, u8 is_ha)
 
void nat44_ei_free_outside_address_and_port (nat44_ei_address_t *addresses, u32 thread_index, ip4_address_t *addr, u16 port, nat_protocol_t protocol)
 
int nat44_ei_set_outside_address_and_port (nat44_ei_address_t *addresses, u32 thread_index, ip4_address_t addr, u16 port, nat_protocol_t protocol)
 
int nat44_ei_del_address (nat44_ei_main_t *nm, ip4_address_t addr, u8 delete_sm)
 
void nat44_ei_free_session_data (nat44_ei_main_t *nm, nat44_ei_session_t *s, u32 thread_index, u8 is_ha)
 
int nat44_ei_set_workers (uword *bitmap)
 
void nat44_ei_add_del_address_dpo (ip4_address_t addr, u8 is_add)
 
int nat44_ei_add_address (nat44_ei_main_t *nm, ip4_address_t *addr, u32 vrf_id)
 
void nat44_ei_delete_session (nat44_ei_main_t *nm, nat44_ei_session_t *ses, u32 thread_index)
 
int nat44_ei_interface_add_del (u32 sw_if_index, u8 is_inside, int is_del)
 
int nat44_ei_interface_add_del_output_feature (u32 sw_if_index, u8 is_inside, int is_del)
 
int nat44_ei_add_interface_address (nat44_ei_main_t *nm, u32 sw_if_index, int is_del)
 
int nat44_i2o_is_idle_session_cb (clib_bihash_kv_8_8_t *kv, void *arg)
 
int nat44_o2i_is_idle_session_cb (clib_bihash_kv_8_8_t *kv, void *arg)
 
int nat44_ei_hairpinning (vlib_main_t *vm, vlib_node_runtime_t *node, nat44_ei_main_t *nm, u32 thread_index, vlib_buffer_t *b0, ip4_header_t *ip0, udp_header_t *udp0, tcp_header_t *tcp0, u32 proto0, int do_trace, u32 *required_thread_index)
 
void nat44_ei_hairpinning_sm_unknown_proto (nat44_ei_main_t *nm, vlib_buffer_t *b, ip4_header_t *ip)
 
u32 nat44_ei_icmp_hairpinning (nat44_ei_main_t *nm, vlib_buffer_t *b0, u32 thread_index, ip4_header_t *ip0, icmp46_header_t *icmp0, u32 *required_thread_index)
 
int nat44_ei_set_frame_queue_nelts (u32 frame_queue_nelts)
 

Variables

nat44_ei_main_t nat44_ei_main
 

Detailed Description

NAT44 endpoint independent plugin declarations

Definition in file nat44_ei.h.

Macro Definition Documentation

◆ foreach_nat44_ei_addr_and_port_alloc_alg

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

Definition at line 43 of file nat44_ei.h.

◆ NAT44_EI_INTERFACE_FLAG_IS_INSIDE

#define NAT44_EI_INTERFACE_FLAG_IS_INSIDE   (1 << 0)

Definition at line 56 of file nat44_ei.h.

◆ NAT44_EI_INTERFACE_FLAG_IS_OUTSIDE

#define NAT44_EI_INTERFACE_FLAG_IS_OUTSIDE   (1 << 1)

Definition at line 57 of file nat44_ei.h.

◆ nat44_ei_interface_is_inside

#define nat44_ei_interface_is_inside (   ip)    (ip->flags & NAT44_EI_INTERFACE_FLAG_IS_INSIDE)

Definition at line 671 of file nat44_ei.h.

◆ nat44_ei_interface_is_outside

#define nat44_ei_interface_is_outside (   ip)    (ip->flags & NAT44_EI_INTERFACE_FLAG_IS_OUTSIDE)

Definition at line 673 of file nat44_ei.h.

◆ nat44_ei_is_addr_only_static_mapping

#define nat44_ei_is_addr_only_static_mapping (   mp)    (mp->flags & NAT44_EI_STATIC_MAPPING_FLAG_ADDR_ONLY)

Definition at line 676 of file nat44_ei.h.

◆ nat44_ei_is_identity_static_mapping

#define nat44_ei_is_identity_static_mapping (   mp)    (mp->flags & NAT44_EI_STATIC_MAPPING_FLAG_IDENTITY_NAT)

Definition at line 678 of file nat44_ei.h.

◆ nat44_ei_is_session_static

#define nat44_ei_is_session_static (   sp)    (sp->flags & NAT44_EI_SESSION_FLAG_STATIC_MAPPING)

Definition at line 666 of file nat44_ei.h.

◆ nat44_ei_is_unk_proto_session

#define nat44_ei_is_unk_proto_session (   sp)    (sp->flags & NAT44_EI_SESSION_FLAG_UNKNOWN_PROTO)

Definition at line 668 of file nat44_ei.h.

◆ nat44_ei_log_debug

#define nat44_ei_log_debug (   ...)    vlib_log (VLIB_LOG_LEVEL_DEBUG, nat44_ei_main.log_class, __VA_ARGS__)

Definition at line 690 of file nat44_ei.h.

◆ nat44_ei_log_err

#define nat44_ei_log_err (   ...)    vlib_log (VLIB_LOG_LEVEL_ERR, nat44_ei_main.log_class, __VA_ARGS__)

Definition at line 682 of file nat44_ei.h.

◆ nat44_ei_log_info

#define nat44_ei_log_info (   ...)    vlib_log (VLIB_LOG_LEVEL_INFO, nat44_ei_main.log_class, __VA_ARGS__)

Definition at line 688 of file nat44_ei.h.

◆ nat44_ei_log_notice

#define nat44_ei_log_notice (   ...)    vlib_log (VLIB_LOG_LEVEL_NOTICE, nat44_ei_main.log_class, __VA_ARGS__)

Definition at line 686 of file nat44_ei.h.

◆ nat44_ei_log_warn

#define nat44_ei_log_warn (   ...)    vlib_log (VLIB_LOG_LEVEL_WARNING, nat44_ei_main.log_class, __VA_ARGS__)

Definition at line 684 of file nat44_ei.h.

◆ NAT44_EI_SESSION_FLAG_STATIC_MAPPING

#define NAT44_EI_SESSION_FLAG_STATIC_MAPPING   (1 << 0)

Definition at line 60 of file nat44_ei.h.

◆ NAT44_EI_SESSION_FLAG_UNKNOWN_PROTO

#define NAT44_EI_SESSION_FLAG_UNKNOWN_PROTO   (1 << 1)

Definition at line 61 of file nat44_ei.h.

◆ NAT44_EI_STATIC_MAPPING_FLAG_ADDR_ONLY

#define NAT44_EI_STATIC_MAPPING_FLAG_ADDR_ONLY   (1 << 0)

Definition at line 64 of file nat44_ei.h.

◆ NAT44_EI_STATIC_MAPPING_FLAG_IDENTITY_NAT

#define NAT44_EI_STATIC_MAPPING_FLAG_IDENTITY_NAT   (1 << 1)

Definition at line 65 of file nat44_ei.h.

◆ NAT_FQ_NELTS_DEFAULT

#define NAT_FQ_NELTS_DEFAULT   64

Definition at line 40 of file nat44_ei.h.

Typedef Documentation

◆ nat44_ei_alloc_out_addr_and_port_function_t

typedef int() nat44_ei_alloc_out_addr_and_port_function_t(nat44_ei_address_t *addresses, u32 fib_index, u32 thread_index, nat_protocol_t proto, ip4_address_t s_addr, ip4_address_t *addr, u16 *port, u16 port_per_thread, u32 snat_thread_index)

Definition at line 82 of file nat44_ei.h.

◆ nat44_ei_main_t

Enumeration Type Documentation

◆ nat44_ei_addr_and_port_alloc_alg_t

Enumerator
foreach_nat44_ei_addr_and_port_alloc_alg 

Definition at line 48 of file nat44_ei.h.

Function Documentation

◆ CLIB_PACKED() [1/2]

typedef CLIB_PACKED ( struct { ip4_address_t addr;u32 fib_index;u32 sessions_per_user_list_head_index;u32 nsessions;u32 nstaticsessions;}  )

◆ CLIB_PACKED() [2/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;u32 flags;u32 per_user_index;u32 per_user_list_head_index;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 user_index;}  )

◆ nat44_ei_add_address()

int nat44_ei_add_address ( nat44_ei_main_t nm,
ip4_address_t addr,
u32  vrf_id 
)

Definition at line 2575 of file nat44_ei.c.

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

◆ nat44_ei_add_del_address_dpo()

void nat44_ei_add_del_address_dpo ( ip4_address_t  addr,
u8  is_add 
)

Definition at line 1019 of file nat44_ei.c.

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

◆ nat44_ei_add_del_static_mapping()

int nat44_ei_add_del_static_mapping ( ip4_address_t  l_addr,
ip4_address_t  e_addr,
u16  l_port,
u16  e_port,
nat_protocol_t  proto,
u32  sw_if_index,
u32  vrf_id,
u8  addr_only,
u8  identity_nat,
u8 tag,
u8  is_add 
)

Add/delete NAT44-EI static mapping.

Parameters
l_addrlocal IPv4 address
e_addrexternal IPv4 address
l_portlocal port number
e_portexternal port number
protoL4 protocol
sw_if_indexuse interface address as external IPv4 address
vrf_idlocal VRF ID
addr_only1 = 1:1NAT, 0 = 1:1NAPT
identity_natidentity NAT
tagopaque string tag
is_add1 = add, 0 = delete
Returns
0 on success, non-zero value otherwise

Definition at line 1853 of file nat44_ei.c.

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

◆ nat44_ei_add_interface_address()

int nat44_ei_add_interface_address ( nat44_ei_main_t nm,
u32  sw_if_index,
int  is_del 
)

Definition at line 2632 of file nat44_ei.c.

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

◆ nat44_ei_api_hookup()

clib_error_t* nat44_ei_api_hookup ( vlib_main_t vm)

Definition at line 1188 of file nat44_ei_api.c.

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

◆ nat44_ei_del_address()

int nat44_ei_del_address ( nat44_ei_main_t nm,
ip4_address_t  addr,
u8  delete_sm 
)

Definition at line 2708 of file nat44_ei.c.

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

◆ nat44_ei_del_session()

int nat44_ei_del_session ( nat44_ei_main_t nm,
ip4_address_t addr,
u16  port,
nat_protocol_t  proto,
u32  vrf_id,
int  is_in 
)

Delete NAT44-EI session.

Parameters
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 1785 of file nat44_ei.c.

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

◆ nat44_ei_delete_session()

void nat44_ei_delete_session ( nat44_ei_main_t nm,
nat44_ei_session_t *  ses,
u32  thread_index 
)

Definition at line 1753 of file nat44_ei.c.

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

◆ nat44_ei_free_outside_address_and_port()

void nat44_ei_free_outside_address_and_port ( nat44_ei_address_t addresses,
u32  thread_index,
ip4_address_t addr,
u16  port,
nat_protocol_t  protocol 
)

Definition at line 1043 of file nat44_ei.c.

+ Here is the caller graph for this function:

◆ nat44_ei_free_session_data()

void nat44_ei_free_session_data ( nat44_ei_main_t nm,
nat44_ei_session_t *  s,
u32  thread_index,
u8  is_ha 
)

Definition at line 1252 of file nat44_ei.c.

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

◆ nat44_ei_free_session_data_v2()

void nat44_ei_free_session_data_v2 ( nat44_ei_main_t nm,
nat44_ei_session_t *  s,
u32  thread_index,
u8  is_ha 
)

Definition at line 1079 of file nat44_ei.c.

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

◆ nat44_ei_get_in2out_worker_index()

u32 nat44_ei_get_in2out_worker_index ( ip4_header_t ip0,
u32  rx_fib_index0,
u8  is_output 
)

Definition at line 1408 of file nat44_ei.c.

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

◆ nat44_ei_get_out2in_worker_index()

u32 nat44_ei_get_out2in_worker_index ( vlib_buffer_t b,
ip4_header_t ip0,
u32  rx_fib_index0,
u8  is_output 
)

Definition at line 1428 of file nat44_ei.c.

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

◆ nat44_ei_hairpinning()

int nat44_ei_hairpinning ( vlib_main_t vm,
vlib_node_runtime_t node,
nat44_ei_main_t nm,
u32  thread_index,
vlib_buffer_t b0,
ip4_header_t ip0,
udp_header_t udp0,
tcp_header_t tcp0,
u32  proto0,
int  do_trace,
u32 required_thread_index 
)

Definition at line 124 of file nat44_ei_hairpinning.c.

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

◆ nat44_ei_hairpinning_sm_unknown_proto()

void nat44_ei_hairpinning_sm_unknown_proto ( nat44_ei_main_t nm,
vlib_buffer_t b,
ip4_header_t ip 
)

Definition at line 97 of file nat44_ei_hairpinning.c.

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

◆ nat44_ei_icmp_hairpinning()

u32 nat44_ei_icmp_hairpinning ( nat44_ei_main_t nm,
vlib_buffer_t b0,
u32  thread_index,
ip4_header_t ip0,
icmp46_header_t *  icmp0,
u32 required_thread_index 
)

Definition at line 251 of file nat44_ei_hairpinning.c.

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

◆ nat44_ei_interface_add_del()

int nat44_ei_interface_add_del ( u32  sw_if_index,
u8  is_inside,
int  is_del 
)

Definition at line 496 of file nat44_ei.c.

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

◆ nat44_ei_interface_add_del_output_feature()

int nat44_ei_interface_add_del_output_feature ( u32  sw_if_index,
u8  is_inside,
int  is_del 
)

Definition at line 747 of file nat44_ei.c.

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

◆ nat44_ei_plugin_disable()

int nat44_ei_plugin_disable ( )

Definition at line 920 of file nat44_ei.c.

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

◆ nat44_ei_plugin_enable()

int nat44_ei_plugin_enable ( nat44_ei_config_t  c)

Definition at line 419 of file nat44_ei.c.

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

◆ nat44_ei_session_alloc_or_recycle()

nat44_ei_session_t* nat44_ei_session_alloc_or_recycle ( nat44_ei_main_t nm,
nat44_ei_user_t *  u,
u32  thread_index,
f64  now 
)

Definition at line 1180 of file nat44_ei.c.

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

◆ nat44_ei_sessions_clear()

void nat44_ei_sessions_clear ( )

Clear all active NAT44-EI sessions.

Definition at line 2478 of file nat44_ei.c.

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

◆ nat44_ei_set_alloc_default()

void nat44_ei_set_alloc_default ( void  )

Set address and port assignment algorithm to default/standard.

Definition at line 1697 of file nat44_ei.c.

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

◆ nat44_ei_set_alloc_mape()

void nat44_ei_set_alloc_mape ( u16  psid,
u16  psid_offset,
u16  psid_length 
)

Set address and port assignment algorithm for MAP-E CE.

Parameters
psidPort Set Identifier value
psid_offsetnumber of offset bits
psid_lengthlength of PSID

Definition at line 1717 of file nat44_ei.c.

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

◆ nat44_ei_set_alloc_range()

void nat44_ei_set_alloc_range ( u16  start_port,
u16  end_port 
)

Set address and port assignment algorithm for port range.

Parameters
start_portbeginning of the port range
end_portend of the port range

Definition at line 1706 of file nat44_ei.c.

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

◆ nat44_ei_set_frame_queue_nelts()

int nat44_ei_set_frame_queue_nelts ( u32  frame_queue_nelts)

Definition at line 2874 of file nat44_ei.c.

+ Here is the caller graph for this function:

◆ nat44_ei_set_outside_address_and_port()

int nat44_ei_set_outside_address_and_port ( nat44_ei_address_t addresses,
u32  thread_index,
ip4_address_t  addr,
u16  port,
nat_protocol_t  protocol 
)

Definition at line 983 of file nat44_ei.c.

+ Here is the caller graph for this function:

◆ nat44_ei_set_workers()

int nat44_ei_set_workers ( uword bitmap)

Definition at line 252 of file nat44_ei.c.

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

◆ nat44_ei_static_mapping_del_sessions()

void nat44_ei_static_mapping_del_sessions ( nat44_ei_main_t nm,
nat44_ei_main_per_thread_data_t tnm,
nat44_ei_user_key_t  u_key,
int  addr_only,
ip4_address_t  e_addr,
u16  e_port 
)

Delete session for static mapping.

Parameters
addrIPv4 address
fib_indexFIB table index

Definition at line 1356 of file nat44_ei.c.

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

◆ nat44_ei_static_mapping_match()

int nat44_ei_static_mapping_match ( 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,
u8 is_identity_nat 
)

Match NAT44-EI 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
is_identity_nat1 if indentity mapping
Returns
0 if match found otherwise 1.

Definition at line 2253 of file nat44_ei.c.

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

◆ nat44_ei_user_del()

int nat44_ei_user_del ( ip4_address_t addr,
u32  fib_index 
)

Delete specific NAT44 EI user and his sessions.

Parameters
addrIPv4 address
fib_indexFIB table index

Definition at line 1314 of file nat44_ei.c.

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

◆ nat44_ei_user_get_or_create()

nat44_ei_user_t* nat44_ei_user_get_or_create ( nat44_ei_main_t nm,
ip4_address_t addr,
u32  fib_index,
u32  thread_index 
)

Definition at line 1121 of file nat44_ei.c.

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

◆ nat44_i2o_is_idle_session_cb()

int nat44_i2o_is_idle_session_cb ( clib_bihash_kv_8_8_t kv,
void *  arg 
)

Definition at line 250 of file nat44_ei_in2out.c.

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

◆ nat44_o2i_is_idle_session_cb()

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.

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

Variable Documentation

◆ nat44_ei_main

nat44_ei_main_t nat44_ei_main

Definition at line 40 of file nat44_ei.c.