FD.io VPP
v17.10-9-gd594711
Vector Packet Processing
|
NAT64 implementation. More...
Go to the source code of this file.
Functions | |
VNET_FEATURE_INIT (nat64_in2out, static) | |
VNET_FEATURE_INIT (nat64_out2in, static) | |
clib_error_t * | nat64_init (vlib_main_t *vm) |
Initialize NAT64. More... | |
int | nat64_add_del_pool_addr (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_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... | |
int | nat64_alloc_out_addr_and_port (u32 fib_index, snat_protocol_t proto, ip4_address_t *addr, u16 *port) |
Alloce IPv4 address and port pair from NAT64 pool. More... | |
void | nat64_free_out_addr_and_port (ip4_address_t *addr, u16 port, snat_protocol_t proto) |
Free IPv4 address and port pair from NAT64 pool. 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_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, u32 incoming_syn) |
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... | |
u32 | nat64_get_tcp_incoming_syn_timeout (void) |
Get TCP incoming SYN 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... | |
static uword | nat64_expire_walk_fn (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f) |
The 'nat64-expire-walk' process's main loop. More... | |
Variables | |
nat64_main_t | nat64_main |
static u8 | well_known_prefix [] |
static vlib_node_registration_t | nat64_expire_walk_node |
(constructor) VLIB_REGISTER_NODE (nat64_expire_walk_node) More... | |
NAT64 implementation.
Definition in file nat64.c.
int nat64_add_del_pool_addr | ( | ip4_address_t * | addr, |
u32 | vrf_id, | ||
u8 | is_add | ||
) |
Add/delete address to NAT64 pool.
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 83 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 622 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 352 of file nat64.c.
int nat64_alloc_out_addr_and_port | ( | u32 | fib_index, |
snat_protocol_t | proto, | ||
ip4_address_t * | addr, | ||
u16 * | port | ||
) |
void nat64_compose_ip6 | ( | ip6_address_t * | ip6, |
ip4_address_t * | ip4, | ||
u32 | fib_index | ||
) |
|
static |
void nat64_extract_ip4 | ( | ip6_address_t * | ip6, |
ip4_address_t * | ip4, | ||
u32 | fib_index | ||
) |
void nat64_free_out_addr_and_port | ( | ip4_address_t * | addr, |
u16 | port, | ||
snat_protocol_t | proto | ||
) |
u32 nat64_get_icmp_timeout | ( | void | ) |
u32 nat64_get_tcp_est_timeout | ( | void | ) |
u32 nat64_get_tcp_incoming_syn_timeout | ( | void | ) |
u32 nat64_get_tcp_trans_timeout | ( | void | ) |
u32 nat64_get_udp_timeout | ( | void | ) |
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 | ||
) |
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). |
incoming_syn | Incoming SYN timeout in seconds (if 0 reset to default value 6sec). |
Definition at line 469 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 | ||
) |
VNET_FEATURE_INIT | ( | nat64_in2out | , |
static | |||
) |
VNET_FEATURE_INIT | ( | nat64_out2in | , |
static | |||
) |
|
static |
(constructor) VLIB_REGISTER_NODE (nat64_expire_walk_node)
nat64_main_t nat64_main |