FD.io VPP
v19.08.3-2-gbabecb413
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_init (vlib_main_t *vm, nat_ha_sadd_cb_t sadd_cb, nat_ha_sdel_cb_t sdel_cb, nat_ha_sref_cb_t sref_cb) |
Initialize NAT HA. More... | |
int | nat_ha_set_listener (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 (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 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 nat_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) |
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) |
void nat_ha_flush | ( | u8 | is_resync | ) |
void nat_ha_get_failover | ( | ip4_address_t * | addr, |
u16 * | port, | ||
u32 * | session_refresh_interval | ||
) |
void nat_ha_get_listener | ( | ip4_address_t * | addr, |
u16 * | port, | ||
u32 * | path_mtu | ||
) |
void nat_ha_init | ( | vlib_main_t * | vm, |
nat_ha_sadd_cb_t | sadd_cb, | ||
nat_ha_sdel_cb_t | sdel_cb, | ||
nat_ha_sref_cb_t | sref_cb | ||
) |
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)
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 689 of file nat_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 | 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 |
thread_index | thread index |
Definition at line 715 of file nat_ha.c.
int nat_ha_set_failover | ( | 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 395 of file nat_ha.c.
int nat_ha_set_listener | ( | 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 352 of file nat_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 734 of file nat_ha.c.