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 265 vrrp4_arp_key_t key4;
271 key6.addr = ((ip6_address_t *) addr)[0];
292 if (sw_if_index == ~0)
351 return vr - vmp->
vrs;
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
struct vrrp_vr_timer vrrp_vr_timer_t
u8 * format_vrrp_vr_state(u8 *s, va_list *args)
static u8 vrrp_vr_is_unicast(vrrp_vr_t *vr)
static u32 vrrp_vr_index(vrrp_vr_t *vr)
vlib_node_registration_t vrrp_node
vrrp_vr_tracking_t tracking
vrrp_vr_timer_t * vr_timers
void vrrp_vr_transition(vrrp_vr_t *vr, vrrp_vr_state_t new_state, void *data)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
struct vrrp_vr_key vrrp_vr_key_t
vlib_node_registration_t vrrp_periodic_node
(constructor) VLIB_REGISTER_NODE (vrrp_periodic_node)
static vrrp_vr_t * vrrp_vr_lookup_index(u32 vr_index)
struct vrrp_vr_config vrrp_vr_config_t
struct vrrp_vr_tracking_if vrrp_vr_tracking_if_t
int vrrp_vr_start_stop(u8 is_start, vrrp_vr_key_t *vr_key)
u8 * format_vrrp_vr(u8 *s, va_list *args)
#define foreach_vrrp_vr_state
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static u8 vrrp_vr_is_owner(vrrp_vr_t *vr)
int vrrp_vr_tracking_ifs_add_del(vrrp_vr_t *vr, vrrp_vr_tracking_if_t *track_ifs, u8 is_add)
u16 vrrp_adv_csum(void *l3_hdr, void *payload, u8 is_ipv6, u16 len)
static u8 vrrp_vr_accept_mode_enabled(vrrp_vr_t *vr)
u8 * format_vrrp_packet_hdr(u8 *s, va_list *args)
vl_api_fib_path_type_t type
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u8 * format_vrrp_vr_key(u8 *s, va_list *args)
int vrrp_garp_or_na_send(vrrp_vr_t *vr)
vrrp_vr_runtime_t runtime
static void vrrp_vr_master_down_compute(vrrp_vr_t *vr)
static u8 vrrp_vr_n_vr_addrs(vrrp_vr_t *vr)
static u8 vrrp_vr_is_ipv6(vrrp_vr_t *vr)
int vrrp_vr_multicast_group_join(vrrp_vr_t *vr)
enum vrrp_vr_timer_type vrrp_vr_timer_type_t
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
u32 adj_index_t
An index for adjacencies.
static u8 vrrp_vr_priority(vrrp_vr_t *vr)
struct vrrp_vr_tracking vrrp_vr_tracking_t
static uword * mhash_get(mhash_t *h, const void *key)
int vrrp_vr_tracking_if_add_del(vrrp_vr_t *vr, u32 sw_if_index, u8 priority, u8 is_add)
int vrrp_vr_add_del(u8 is_add, vrrp_vr_config_t *conf)
int vrrp_adv_send(vrrp_vr_t *vr, int shutdown)
int vrrp_vr_set_peers(vrrp_vr_key_t *key, ip46_address_t *peers)
vrrp_vr_tracking_if_t * interfaces
void vrrp_vr_timer_set(vrrp_vr_t *vr, vrrp_vr_timer_type_t type)
enum vrrp_vr_flags vrrp_vr_flags_t
enum vrrp_vr_state vrrp_vr_state_t
struct _vlib_node_registration vlib_node_registration_t
ethernet_main_t * ethernet_main
static vrrp_intf_t * vrrp_intf_get(u32 sw_if_index)
void vrrp_vr_timer_cancel(vrrp_vr_t *vr)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
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 int vrrp_intf_num_vrs(u32 sw_if_index, u8 is_ipv6)
clib_error_t * vrrp_plugin_api_hookup(vlib_main_t *vm)
static vrrp_vr_t * vrrp_vr_lookup(u32 sw_if_index, u8 vr_id, u8 is_ipv6)
#define hash_get_mem(h, key)
ip46_address_t * vr_addrs
struct vrrp_vr_runtime vrrp_vr_runtime_t
ip46_address_t * peer_addrs
vrrp_vr_timer_type_t type
static void vrrp_vr_skew_compute(vrrp_vr_t *vr)
static u8 vrrp_vr_n_peer_addrs(vrrp_vr_t *vr)
static u32 vrrp_vr_lookup_address(u32 sw_if_index, u8 is_ipv6, void *addr)