FD.io VPP
v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
|
NAT64 global declarations. More...
Go to the source code of this file.
Data Structures | |
struct | nat64_prefix_t |
struct | nat64_static_bib_to_update_t |
struct | nat64_main_t |
Macros | |
#define | foreach_nat64_tcp_ses_state |
Typedefs | |
typedef int(* | nat64_pool_addr_walk_fn_t) (snat_address_t *addr, void *ctx) |
Call back function when walking addresses in NAT64 pool, non-zero return value stop walk. More... | |
typedef int(* | nat64_interface_walk_fn_t) (snat_interface_t *i, void *ctx) |
Call back function when walking interfaces with NAT64 feature, non-zero return value stop walk. More... | |
typedef int(* | nat64_prefix_walk_fn_t) (nat64_prefix_t *pref64, void *ctx) |
Call back function when walking addresses in NAT64 prefixes, non-zero return value stop walk. More... | |
Enumerations | |
enum | nat64_tcp_ses_state_t { foreach_nat64_tcp_ses_state } |
enum | nat64_cleaner_process_event_e { NAT64_CLEANER_RESCHEDULE = 1 } |
Functions | |
int | nat64_add_del_pool_addr (u32 thread_index, ip4_address_t *addr, u32 vrf_id, u8 is_add) |
Add/delete address to NAT64 pool. More... | |
void | nat64_pool_addr_walk (nat64_pool_addr_walk_fn_t fn, void *ctx) |
Walk NAT64 pool. More... | |
int | nat64_add_interface_address (u32 sw_if_index, int is_add) |
NAT64 pool address from specific (DHCP addressed) interface. More... | |
int | nat64_add_del_interface (u32 sw_if_index, u8 is_inside, u8 is_add) |
Enable/disable NAT64 feature on the interface. More... | |
void | nat64_interfaces_walk (nat64_interface_walk_fn_t fn, void *ctx) |
Walk NAT64 interfaces. More... | |
clib_error_t * | nat64_init (vlib_main_t *vm) |
Initialize NAT64. More... | |
int | nat64_add_del_static_bib_entry (ip6_address_t *in_addr, ip4_address_t *out_addr, u16 in_port, u16 out_port, u8 proto, u32 vrf_id, u8 is_add) |
Add/delete static NAT64 BIB entry. More... | |
int | nat64_alloc_out_addr_and_port (u32 fib_index, snat_protocol_t proto, ip4_address_t *addr, u16 *port, u32 thread_index) |
Alloce IPv4 address and port pair from NAT64 pool. More... | |
int | nat64_set_udp_timeout (u32 timeout) |
Set UDP session timeout. More... | |
u32 | nat64_get_udp_timeout (void) |
Get UDP session timeout. More... | |
int | nat64_set_icmp_timeout (u32 timeout) |
Set ICMP session timeout. More... | |
u32 | nat64_get_icmp_timeout (void) |
Get ICMP session timeout. More... | |
int | nat64_set_tcp_timeouts (u32 trans, u32 est) |
Set TCP session timeouts. More... | |
u32 | nat64_get_tcp_trans_timeout (void) |
Get TCP transitory timeout. More... | |
u32 | nat64_get_tcp_est_timeout (void) |
Get TCP established timeout. More... | |
void | nat64_session_reset_timeout (nat64_db_st_entry_t *ste, vlib_main_t *vm) |
Reset NAT64 session timeout. More... | |
void | nat64_tcp_session_set_state (nat64_db_st_entry_t *ste, tcp_header_t *tcp, u8 is_ip6) |
Set NAT64 TCP session state. More... | |
int | nat64_add_del_prefix (ip6_address_t *prefix, u8 plen, u32 vrf_id, u8 is_add) |
Add/delete NAT64 prefix. More... | |
void | nat64_prefix_walk (nat64_prefix_walk_fn_t fn, void *ctx) |
Walk NAT64 prefixes. More... | |
void | nat64_compose_ip6 (ip6_address_t *ip6, ip4_address_t *ip4, u32 fib_index) |
Compose IPv4-embedded IPv6 addresses. More... | |
void | nat64_extract_ip4 (ip6_address_t *ip6, ip4_address_t *ip4, u32 fib_index) |
Extract IPv4 address from the IPv4-embedded IPv6 addresses. More... | |
void | nat64_set_hash (u32 bib_buckets, u32 bib_memory_size, u32 st_buckets, u32 st_memory_size) |
Set NAT64 hash tables configuration. More... | |
u32 | nat64_get_worker_in2out (ip6_address_t *addr) |
Get worker thread index for NAT64 in2out. More... | |
u32 | nat64_get_worker_out2in (ip4_header_t *ip) |
Get worker thread index for NAT64 out2in. More... | |
Variables | |
nat64_main_t | nat64_main |
vlib_node_registration_t | nat64_in2out_node |
(constructor) VLIB_REGISTER_NODE (nat64_in2out_node) More... | |
vlib_node_registration_t | nat64_out2in_node |
(constructor) VLIB_REGISTER_NODE (nat64_out2in_node) More... | |
NAT64 global declarations.
Definition in file nat64.h.
#define foreach_nat64_tcp_ses_state |
typedef int(* nat64_interface_walk_fn_t) (snat_interface_t *i, void *ctx) |
typedef int(* nat64_pool_addr_walk_fn_t) (snat_address_t *addr, void *ctx) |
typedef int(* nat64_prefix_walk_fn_t) (nat64_prefix_t *pref64, void *ctx) |
int nat64_add_del_pool_addr | ( | u32 | thread_index, |
ip4_address_t * | addr, | ||
u32 | vrf_id, | ||
u8 | is_add | ||
) |
Add/delete address to NAT64 pool.
thread_index | Thread index used by ipfix nat logging (not address per thread). |
addr | IPv4 address. |
vrf_id | VRF id of tenant, ~0 means independent of VRF. |
is_add | 1 if add, 0 if delete. |
Definition at line 315 of file nat64.c.
int nat64_add_del_prefix | ( | ip6_address_t * | prefix, |
u8 | plen, | ||
u32 | vrf_id, | ||
u8 | is_add | ||
) |
Add/delete NAT64 prefix.
prefix | NAT64 prefix. |
plen | Prefix length. |
vrf_id | VRF id of tenant. |
is_add | 1 if add, 0 if delete. |
Definition at line 1002 of file nat64.c.
int nat64_add_del_static_bib_entry | ( | ip6_address_t * | in_addr, |
ip4_address_t * | out_addr, | ||
u16 | in_port, | ||
u16 | out_port, | ||
u8 | proto, | ||
u32 | vrf_id, | ||
u8 | is_add | ||
) |
Add/delete static NAT64 BIB entry.
in_addr | Inside IPv6 address. |
out_addr | Outside IPv4 address. |
in_port | Inside port number. |
out_port | Outside port number. |
proto | L4 protocol. |
vrf_id | VRF id of tenant. |
is_add | 1 if add, 0 if delete. |
Definition at line 684 of file nat64.c.
int nat64_add_interface_address | ( | u32 | sw_if_index, |
int | is_add | ||
) |
NAT64 pool address from specific (DHCP addressed) interface.
sw_if_index | Index of the interface. |
is_add | 1 if add, 0 if delete. |
Definition at line 411 of file nat64.c.
int nat64_alloc_out_addr_and_port | ( | u32 | fib_index, |
snat_protocol_t | proto, | ||
ip4_address_t * | addr, | ||
u16 * | port, | ||
u32 | thread_index | ||
) |
Alloce IPv4 address and port pair from NAT64 pool.
fib_index | FIB index of tenant. |
proto | L4 protocol. |
addr | Allocated IPv4 address. |
port | Allocated port number. |
thread_index | Thread index. |
Definition at line 552 of file nat64.c.
void nat64_compose_ip6 | ( | ip6_address_t * | ip6, |
ip4_address_t * | ip4, | ||
u32 | fib_index | ||
) |
void nat64_extract_ip4 | ( | ip6_address_t * | ip6, |
ip4_address_t * | ip4, | ||
u32 | fib_index | ||
) |
u32 nat64_get_icmp_timeout | ( | void | ) |
u32 nat64_get_tcp_est_timeout | ( | void | ) |
u32 nat64_get_tcp_trans_timeout | ( | void | ) |
u32 nat64_get_udp_timeout | ( | void | ) |
u32 nat64_get_worker_in2out | ( | ip6_address_t * | addr | ) |
u32 nat64_get_worker_out2in | ( | ip4_header_t * | ip | ) |
clib_error_t* nat64_init | ( | vlib_main_t * | vm | ) |
void nat64_interfaces_walk | ( | nat64_interface_walk_fn_t | fn, |
void * | ctx | ||
) |
void nat64_pool_addr_walk | ( | nat64_pool_addr_walk_fn_t | fn, |
void * | ctx | ||
) |
void nat64_prefix_walk | ( | nat64_prefix_walk_fn_t | fn, |
void * | ctx | ||
) |
void nat64_session_reset_timeout | ( | nat64_db_st_entry_t * | ste, |
vlib_main_t * | vm | ||
) |
Set NAT64 hash tables configuration.
bib_buckets | Number of BIB hash buckets. |
bib_memory_size | Memory size of BIB hash. |
st_buckets | Number of session table hash buckets. |
st_memory_size | Memory size of session table hash. |
Definition at line 293 of file nat64.c.
int nat64_set_icmp_timeout | ( | u32 | timeout | ) |
Set TCP session timeouts.
trans | Transitory timeout in seconds (if 0 reset to default value 240sec). |
est | Established timeout in seconds (if 0 reset to default value 7440sec). |
Definition at line 862 of file nat64.c.
int nat64_set_udp_timeout | ( | u32 | timeout | ) |
void nat64_tcp_session_set_state | ( | nat64_db_st_entry_t * | ste, |
tcp_header_t * | tcp, | ||
u8 | is_ip6 | ||
) |
vlib_node_registration_t nat64_in2out_node |
(constructor) VLIB_REGISTER_NODE (nat64_in2out_node)
Definition at line 1180 of file nat64_in2out.c.
nat64_main_t nat64_main |
vlib_node_registration_t nat64_out2in_node |
(constructor) VLIB_REGISTER_NODE (nat64_out2in_node)
Definition at line 577 of file nat64_out2in.c.