|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
10 #ifndef __included_vrrp_h__
11 #define __included_vrrp_h__
38 (
struct vrrp4_arp_key {
51 (
struct vrrp6_nd_key {
80 #define foreach_vrrp_vr_state \
81 _(0, INIT, "Initialize") \
82 _(1, BACKUP, "Backup") \
83 _(2, MASTER, "Master") \
84 _(3, INTF_DOWN, "Interface Down")
89 #define _(v,f,n) VRRP_VR_STATE_##f = v,
184 #define VRRP_EVENT_VR_TIMER_UPDATE 1
185 #define VRRP_EVENT_VR_STOP 2
186 #define VRRP_EVENT_PERIODIC_ENABLE_DISABLE 3
266 vrrp4_arp_key_t key4;
272 key6.addr = ((ip6_address_t *)
addr)[0];
352 return vr - vmp->
vrs;
struct vrrp_vr_runtime vrrp_vr_runtime_t
int vrrp_vr_start_stop(u8 is_start, vrrp_vr_key_t *vr_key)
ip46_address_t * vr_addrs
int vrrp_adv_send(vrrp_vr_t *vr, int shutdown)
u8 * format_vrrp_packet_hdr(u8 *s, va_list *args)
static u8 vrrp_vr_n_vr_addrs(vrrp_vr_t *vr)
ip46_address_t * peer_addrs
void vrrp_vr_event(vrrp_vr_t *vr, vrrp_vr_state_t new_state)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u8 * format_vrrp_vr_key(u8 *s, va_list *args)
static u8 vrrp_vr_is_owner(vrrp_vr_t *vr)
struct vrrp_vr_timer vrrp_vr_timer_t
int vrrp_vr_tracking_ifs_add_del(vrrp_vr_t *vr, vrrp_vr_tracking_if_t *track_ifs, u8 is_add)
static void vrrp_vr_skew_compute(vrrp_vr_t *vr)
typedef CLIB_PACKED(struct vrrp4_arp_key { union { struct { u32 sw_if_index;ip4_address_t addr;};u64 as_u64;};}) vrrp4_arp_key_t
static uword * mhash_get(mhash_t *h, const void *key)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vrrp_vr_timer_t * vr_timers
vrrp_vr_runtime_t runtime
static u8 vrrp_vr_is_ipv6(vrrp_vr_t *vr)
static void vrrp_vr_master_down_compute(vrrp_vr_t *vr)
static u8 vrrp_vr_is_unicast(vrrp_vr_t *vr)
struct vrrp_vr_tracking vrrp_vr_tracking_t
void vrrp_vr_timer_set(vrrp_vr_t *vr, vrrp_vr_timer_type_t type)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
static u8 vrrp_vr_n_peer_addrs(vrrp_vr_t *vr)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
struct vrrp_vr_key vrrp_vr_key_t
void vrrp_vr_transition(vrrp_vr_t *vr, vrrp_vr_state_t new_state, void *data)
int vrrp_vr_tracking_if_add_del(vrrp_vr_t *vr, u32 sw_if_index, u8 priority, u8 is_add)
struct vrrp_vr_config vrrp_vr_config_t
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
vlib_node_registration_t vrrp_periodic_node
(constructor) VLIB_REGISTER_NODE (vrrp_periodic_node)
struct vrrp_vr_tracking_if vrrp_vr_tracking_if_t
void vrrp_vr_timer_cancel(vrrp_vr_t *vr)
enum vrrp_vr_timer_type vrrp_vr_timer_type_t
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
static vrrp_vr_t * vrrp_vr_lookup_index(u32 vr_index)
vrrp_vr_tracking_t tracking
static int vrrp_intf_num_vrs(u32 sw_if_index, u8 is_ipv6)
static u8 vrrp_vr_accept_mode_enabled(vrrp_vr_t *vr)
clib_error_t * vrrp_plugin_api_hookup(vlib_main_t *vm)
enum vrrp_vr_state vrrp_vr_state_t
u8 * format_vrrp_vr(u8 *s, va_list *args)
struct _vlib_node_registration vlib_node_registration_t
static vrrp_vr_t * vrrp_vr_lookup(u32 sw_if_index, u8 vr_id, u8 is_ipv6)
static u32 vrrp_vr_lookup_address(u32 sw_if_index, u8 is_ipv6, void *addr)
#define hash_get_mem(h, key)
static u32 vrrp_vr_index(vrrp_vr_t *vr)
u16 vrrp_adv_csum(void *l3_hdr, void *payload, u8 is_ipv6, u16 len)
u8 * format_vrrp_vr_state(u8 *s, va_list *args)
vlib_node_registration_t vrrp_node
u32 adj_index_t
An index for adjacencies.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
int vrrp_vr_multicast_group_join(vrrp_vr_t *vr)
@ VRRP_VR_TIMER_MASTER_DOWN
enum vrrp_vr_flags vrrp_vr_flags_t
int vrrp_garp_or_na_send(vrrp_vr_t *vr)
int vrrp_vr_set_peers(vrrp_vr_key_t *key, ip46_address_t *peers)
ethernet_main_t * ethernet_main
vrrp_vr_tracking_if_t * interfaces
vrrp_vr_timer_type_t type
#define foreach_vrrp_vr_state
vl_api_interface_index_t sw_if_index
static u8 vrrp_vr_priority(vrrp_vr_t *vr)
int vrrp_vr_add_del(u8 is_add, vrrp_vr_config_t *conf)
static vrrp_intf_t * vrrp_intf_get(u32 sw_if_index)
vl_api_fib_path_type_t type