FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
NAT active-passive HA. More...
Go to the source code of this file.
Typedefs | |
typedef void(* | nat_ha_sadd_cb_t) (ip4_address_t *in_addr, u16 in_port, ip4_address_t *out_addr, u16 out_port, ip4_address_t *eh_addr, u16 eh_port, ip4_address_t *ehn_addr, u16 ehn_port, u8 proto, u32 fib_index, u16 flags, u32 thread_index) |
typedef void(* | nat_ha_sdel_cb_t) (ip4_address_t *out_addr, u16 out_port, ip4_address_t *eh_addr, u16 eh_port, u8 proto, u32 fib_index, u32 thread_index) |
typedef void(* | nat_ha_sref_cb_t) (ip4_address_t *out_addr, u16 out_port, ip4_address_t *eh_addr, u16 eh_port, u8 proto, u32 fib_index, u32 total_pkts, u64 total_bytes, u32 thread_index) |
typedef void(* | nat_ha_resync_event_cb_t) (u32 client_index, u32 pid, u32 missed_count) |
Functions | |
void | nat_ha_enable () |
Enable NAT HA. More... | |
void | nat_ha_disable () |
Disable NAT HA. More... | |
void | nat_ha_init (vlib_main_t *vm, u32 num_workers, u32 num_threads) |
Initialize NAT HA. More... | |
int | nat_ha_set_listener (vlib_main_t *vm, ip4_address_t *addr, u16 port, u32 path_mtu) |
Set HA listener (local settings) More... | |
void | nat_ha_get_listener (ip4_address_t *addr, u16 *port, u32 *path_mtu) |
Get HA listener/local configuration. More... | |
int | nat_ha_set_failover (vlib_main_t *vm, ip4_address_t *addr, u16 port, u32 session_refresh_interval) |
Set HA failover (remote settings) More... | |
void | nat_ha_get_failover (ip4_address_t *addr, u16 *port, u32 *session_refresh_interval) |
Get HA failover/remote settings. More... | |
void | nat_ha_sadd (ip4_address_t *in_addr, u16 in_port, ip4_address_t *out_addr, u16 out_port, ip4_address_t *eh_addr, u16 eh_port, ip4_address_t *ehn_addr, u16 ehn_port, u8 proto, u32 fib_index, u16 flags, u32 thread_index, u8 is_resync) |
Create session add HA event. More... | |
void | nat_ha_sdel (ip4_address_t *out_addr, u16 out_port, ip4_address_t *eh_addr, u16 eh_port, u8 proto, u32 fib_index, u32 session_thread_index) |
Create session delete HA event. More... | |
void | nat_ha_sref (ip4_address_t *out_addr, u16 out_port, ip4_address_t *eh_addr, u16 eh_port, u8 proto, u32 fib_index, u32 total_pkts, u64 total_bytes, u32 thread_index, f64 *last_refreshed, f64 now) |
Create session refresh HA event. More... | |
void | nat_ha_flush (u8 is_resync) |
Flush the current HA data (for testing) More... | |
int | nat_ha_resync (u32 client_index, u32 pid, nat_ha_resync_event_cb_t event_callback) |
Resync HA (resend existing sessions to new failover) More... | |
void | nat_ha_get_resync_status (u8 *in_resync, u32 *resync_ack_missed) |
Get resync status. More... | |
NAT active-passive HA.
Definition in file nat44_ei_ha.h.
Definition at line 155 of file nat44_ei_ha.h.
typedef void(* nat_ha_sadd_cb_t) (ip4_address_t *in_addr, u16 in_port, ip4_address_t *out_addr, u16 out_port, ip4_address_t *eh_addr, u16 eh_port, ip4_address_t *ehn_addr, u16 ehn_port, u8 proto, u32 fib_index, u16 flags, u32 thread_index) |
Definition at line 27 of file nat44_ei_ha.h.
typedef void(* nat_ha_sdel_cb_t) (ip4_address_t *out_addr, u16 out_port, ip4_address_t *eh_addr, u16 eh_port, u8 proto, u32 fib_index, u32 thread_index) |
Definition at line 33 of file nat44_ei_ha.h.
typedef void(* nat_ha_sref_cb_t) (ip4_address_t *out_addr, u16 out_port, ip4_address_t *eh_addr, u16 eh_port, u8 proto, u32 fib_index, u32 total_pkts, u64 total_bytes, u32 thread_index) |
Definition at line 36 of file nat44_ei_ha.h.
void nat_ha_disable | ( | ) |
Disable NAT HA.
Definition at line 450 of file nat44_ei_ha.c.
void nat_ha_enable | ( | ) |
Enable NAT HA.
Definition at line 443 of file nat44_ei_ha.c.
void nat_ha_flush | ( | u8 | is_resync | ) |
Flush the current HA data (for testing)
Definition at line 827 of file nat44_ei_ha.c.
void nat_ha_get_failover | ( | ip4_address_t * | addr, |
u16 * | port, | ||
u32 * | session_refresh_interval | ||
) |
Get HA failover/remote settings.
Definition at line 555 of file nat44_ei_ha.c.
void nat_ha_get_listener | ( | ip4_address_t * | addr, |
u16 * | port, | ||
u32 * | path_mtu | ||
) |
Get HA listener/local configuration.
Definition at line 530 of file nat44_ei_ha.c.
Get resync status.
in_resync | 1 if resync in progress |
resync_ack_missed | number of missed (not ACKed) messages |
Definition at line 981 of file nat44_ei_ha.c.
void nat_ha_init | ( | vlib_main_t * | vm, |
u32 | num_workers, | ||
u32 | num_threads | ||
) |
Initialize NAT HA.
Definition at line 473 of file nat44_ei_ha.c.
int nat_ha_resync | ( | u32 | client_index, |
u32 | pid, | ||
nat_ha_resync_event_cb_t | event_callback | ||
) |
Resync HA (resend existing sessions to new failover)
Definition at line 1283 of file nat44_ei_ha.c.
void nat_ha_sadd | ( | ip4_address_t * | in_addr, |
u16 | in_port, | ||
ip4_address_t * | out_addr, | ||
u16 | out_port, | ||
ip4_address_t * | eh_addr, | ||
u16 | eh_port, | ||
ip4_address_t * | ehn_addr, | ||
u16 | ehn_port, | ||
u8 | proto, | ||
u32 | fib_index, | ||
u16 | flags, | ||
u32 | thread_index, | ||
u8 | is_resync | ||
) |
Create session add HA event.
in_addr | inside IPv4 address |
in_port | inside L4 port number |
out_addr | outside IPv4 address |
out_port | outside L4 port number |
eh_addr | external host IPv4 address |
eh_port | external host L4 port number |
ehn_addr | external host IPv4 address after translation |
ehn_port | external host L4 port number after translation |
proto | L4 protocol |
fib_index | fib index |
flags | session flags |
thread_index | thread index |
is_resync | 1 if HA resync |
Definition at line 834 of file nat44_ei_ha.c.
void nat_ha_sdel | ( | ip4_address_t * | out_addr, |
u16 | out_port, | ||
ip4_address_t * | eh_addr, | ||
u16 | eh_port, | ||
u8 | proto, | ||
u32 | fib_index, | ||
u32 | session_thread_index | ||
) |
Create session delete HA event.
out_addr | outside IPv4 address |
out_port | outside L4 port number |
eh_addr | external host IPv4 address |
eh_port | external host L4 port number |
proto | L4 protocol |
fib_index | fib index |
session_thread_index | index of thread where this session was stored |
Definition at line 860 of file nat44_ei_ha.c.
int nat_ha_set_failover | ( | vlib_main_t * | vm, |
ip4_address_t * | addr, | ||
u16 | port, | ||
u32 | session_refresh_interval | ||
) |
Set HA failover (remote settings)
addr | failover IP4 address |
port | failvoer UDP port number |
session_refresh_interval | number of seconds after which to send session counters refresh |
Definition at line 540 of file nat44_ei_ha.c.
int nat_ha_set_listener | ( | vlib_main_t * | vm, |
ip4_address_t * | addr, | ||
u16 | port, | ||
u32 | path_mtu | ||
) |
Set HA listener (local settings)
addr | local IP4 address |
port | local UDP port number |
path_mtu | path MTU between local and failover |
Definition at line 495 of file nat44_ei_ha.c.
void nat_ha_sref | ( | ip4_address_t * | out_addr, |
u16 | out_port, | ||
ip4_address_t * | eh_addr, | ||
u16 | eh_port, | ||
u8 | proto, | ||
u32 | fib_index, | ||
u32 | total_pkts, | ||
u64 | total_bytes, | ||
u32 | thread_index, | ||
f64 * | last_refreshed, | ||
f64 | now | ||
) |
Create session refresh HA event.
out_addr | outside IPv4 address |
out_port | outside L4 port number |
eh_addr | external host IPv4 address |
eh_port | external host L4 port number |
proto | L4 protocol |
fib_index | fib index |
total_pkts | total packets processed |
total_bytes | total bytes processed |
thread_index | thread index |
last_refreshed | last session refresh time |
now | current time |
Definition at line 879 of file nat44_ei_ha.c.