FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
vrrp.h File Reference
+ Include dependency graph for vrrp.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vrrp_vr_key
 
struct  vrrp_vr_tracking_if
 
struct  vrrp_vr_tracking
 
struct  vrrp_vr_config
 
struct  vrrp_vr_runtime
 
struct  vrrp_vr
 
struct  vrrp_vr_timer
 
struct  vrrp_intf_t
 
struct  vrrp_main_t
 

Macros

#define foreach_vrrp_vr_state
 
#define VRRP_EVENT_VR_TIMER_UPDATE   1
 
#define VRRP_EVENT_VR_STOP   2
 
#define VRRP_EVENT_PERIODIC_ENABLE_DISABLE   3
 

Typedefs

typedef enum vrrp_vr_flags vrrp_vr_flags_t
 
typedef struct vrrp_vr_key vrrp_vr_key_t
 
typedef struct vrrp_vr_tracking_if vrrp_vr_tracking_if_t
 
typedef struct vrrp_vr_tracking vrrp_vr_tracking_t
 
typedef struct vrrp_vr_config vrrp_vr_config_t
 
typedef enum vrrp_vr_state vrrp_vr_state_t
 
typedef struct vrrp_vr_runtime vrrp_vr_runtime_t
 
typedef struct vrrp_vr vrrp_vr_t
 
typedef enum vrrp_vr_timer_type vrrp_vr_timer_type_t
 
typedef struct vrrp_vr_timer vrrp_vr_timer_t
 

Enumerations

enum  vrrp_vr_flags {
  VRRP_API_VR_PREEMPT = 0x1, VRRP_API_VR_ACCEPT = 0x2, VRRP_API_VR_UNICAST = 0x4, VRRP_API_VR_IPV6 = 0x8,
  VRRP_VR_PREEMPT = 0x1, VRRP_VR_ACCEPT = 0x2, VRRP_VR_UNICAST = 0x4, VRRP_VR_IPV6 = 0x8
}
 
enum  vrrp_vr_state {
  VRRP_API_VR_STATE_INIT = 0, VRRP_API_VR_STATE_BACKUP, VRRP_API_VR_STATE_MASTER, VRRP_API_VR_STATE_INTF_DOWN,
  foreach_vrrp_vr_state
}
 
enum  vrrp_vr_timer_type { VRRP_VR_TIMER_ADV, VRRP_VR_TIMER_MASTER_DOWN }
 

Functions

typedef CLIB_PACKED (struct vrrp4_arp_key { union { struct { u32 sw_if_index;ip4_address_t addr;};u64 as_u64;};}) vrrp4_arp_key_t
 
typedef CLIB_PACKED (struct vrrp6_nd_key { u32 sw_if_index;ip6_address_t addr;}) vrrp6_nd_key_t
 
clib_error_tvrrp_plugin_api_hookup (vlib_main_t *vm)
 
int vrrp_vr_add_del (u8 is_add, vrrp_vr_config_t *conf)
 
int vrrp_vr_start_stop (u8 is_start, vrrp_vr_key_t *vr_key)
 
u8format_vrrp_vr (u8 *s, va_list *args)
 
u8format_vrrp_vr_key (u8 *s, va_list *args)
 
u8format_vrrp_vr_state (u8 *s, va_list *args)
 
u8format_vrrp_packet_hdr (u8 *s, va_list *args)
 
void vrrp_vr_timer_set (vrrp_vr_t *vr, vrrp_vr_timer_type_t type)
 
void vrrp_vr_timer_cancel (vrrp_vr_t *vr)
 
void vrrp_vr_transition (vrrp_vr_t *vr, vrrp_vr_state_t new_state, void *data)
 
int vrrp_vr_set_peers (vrrp_vr_key_t *key, ip46_address_t *peers)
 
int vrrp_vr_multicast_group_join (vrrp_vr_t *vr)
 
int vrrp_adv_send (vrrp_vr_t *vr, int shutdown)
 
int vrrp_garp_or_na_send (vrrp_vr_t *vr)
 
u16 vrrp_adv_csum (void *l3_hdr, void *payload, u8 is_ipv6, u16 len)
 
int vrrp_vr_tracking_if_add_del (vrrp_vr_t *vr, u32 sw_if_index, u8 priority, u8 is_add)
 
int vrrp_vr_tracking_ifs_add_del (vrrp_vr_t *vr, vrrp_vr_tracking_if_t *track_ifs, u8 is_add)
 
void vrrp_vr_event (vrrp_vr_t *vr, vrrp_vr_state_t new_state)
 
static void vrrp_vr_skew_compute (vrrp_vr_t *vr)
 
static void vrrp_vr_master_down_compute (vrrp_vr_t *vr)
 
static vrrp_vr_tvrrp_vr_lookup (u32 sw_if_index, u8 vr_id, u8 is_ipv6)
 
static vrrp_vr_tvrrp_vr_lookup_index (u32 vr_index)
 
static u32 vrrp_vr_lookup_address (u32 sw_if_index, u8 is_ipv6, void *addr)
 
static vrrp_intf_tvrrp_intf_get (u32 sw_if_index)
 
static int vrrp_intf_num_vrs (u32 sw_if_index, u8 is_ipv6)
 
static u8 vrrp_vr_is_ipv6 (vrrp_vr_t *vr)
 
static u8 vrrp_vr_is_unicast (vrrp_vr_t *vr)
 
static u8 vrrp_vr_is_owner (vrrp_vr_t *vr)
 
static u8 vrrp_vr_n_vr_addrs (vrrp_vr_t *vr)
 
static u8 vrrp_vr_n_peer_addrs (vrrp_vr_t *vr)
 
static u8 vrrp_vr_accept_mode_enabled (vrrp_vr_t *vr)
 
static u32 vrrp_vr_index (vrrp_vr_t *vr)
 
static u8 vrrp_vr_priority (vrrp_vr_t *vr)
 

Variables

vrrp_main_t vrrp_main
 
vlib_node_registration_t vrrp_node
 
vlib_node_registration_t vrrp_periodic_node
 (constructor) VLIB_REGISTER_NODE (vrrp_periodic_node) More...
 

Macro Definition Documentation

◆ foreach_vrrp_vr_state

#define foreach_vrrp_vr_state
Value:
_(0, INIT, "Initialize") \
_(1, BACKUP, "Backup") \
_(2, MASTER, "Master") \
_(3, INTF_DOWN, "Interface Down")

Definition at line 80 of file vrrp.h.

◆ VRRP_EVENT_PERIODIC_ENABLE_DISABLE

#define VRRP_EVENT_PERIODIC_ENABLE_DISABLE   3

Definition at line 186 of file vrrp.h.

◆ VRRP_EVENT_VR_STOP

#define VRRP_EVENT_VR_STOP   2

Definition at line 185 of file vrrp.h.

◆ VRRP_EVENT_VR_TIMER_UPDATE

#define VRRP_EVENT_VR_TIMER_UPDATE   1

Definition at line 184 of file vrrp.h.

Typedef Documentation

◆ vrrp_vr_config_t

◆ vrrp_vr_flags_t

◆ vrrp_vr_key_t

typedef struct vrrp_vr_key vrrp_vr_key_t

◆ vrrp_vr_runtime_t

◆ vrrp_vr_state_t

◆ vrrp_vr_t

typedef struct vrrp_vr vrrp_vr_t

◆ vrrp_vr_timer_t

◆ vrrp_vr_timer_type_t

◆ vrrp_vr_tracking_if_t

◆ vrrp_vr_tracking_t

Enumeration Type Documentation

◆ vrrp_vr_flags

Enumerator
VRRP_API_VR_PREEMPT 
VRRP_API_VR_ACCEPT 
VRRP_API_VR_UNICAST 
VRRP_API_VR_IPV6 
VRRP_VR_PREEMPT 
VRRP_VR_ACCEPT 
VRRP_VR_UNICAST 
VRRP_VR_IPV6 

Definition at line 21 of file vrrp.h.

◆ vrrp_vr_state

Enumerator
VRRP_API_VR_STATE_INIT 
VRRP_API_VR_STATE_BACKUP 
VRRP_API_VR_STATE_MASTER 
VRRP_API_VR_STATE_INTF_DOWN 
foreach_vrrp_vr_state 

Definition at line 87 of file vrrp.h.

◆ vrrp_vr_timer_type

Enumerator
VRRP_VR_TIMER_ADV 
VRRP_VR_TIMER_MASTER_DOWN 

Definition at line 114 of file vrrp.h.

Function Documentation

◆ CLIB_PACKED() [1/2]

typedef CLIB_PACKED ( struct vrrp4_arp_key { union { struct { u32 sw_if_index;ip4_address_t addr;};u64 as_u64;};}  )

◆ CLIB_PACKED() [2/2]

typedef CLIB_PACKED ( struct vrrp6_nd_key { u32 sw_if_index;ip6_address_t addr;}  )

◆ format_vrrp_packet_hdr()

u8* format_vrrp_packet_hdr ( u8 s,
va_list *  args 
)

Definition at line 124 of file vrrp_format.c.

+ Here is the caller graph for this function:

◆ format_vrrp_vr()

u8* format_vrrp_vr ( u8 s,
va_list *  args 
)

Definition at line 92 of file vrrp_format.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_vrrp_vr_key()

u8* format_vrrp_vr_key ( u8 s,
va_list *  args 
)

Definition at line 65 of file vrrp_format.c.

+ Here is the caller graph for this function:

◆ format_vrrp_vr_state()

u8* format_vrrp_vr_state ( u8 s,
va_list *  args 
)

Definition at line 47 of file vrrp_format.c.

+ Here is the caller graph for this function:

◆ vrrp_adv_csum()

u16 vrrp_adv_csum ( void *  l3_hdr,
void *  payload,
u8  is_ipv6,
u16  len 
)

Definition at line 143 of file vrrp_packet.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_adv_send()

int vrrp_adv_send ( vrrp_vr_t vr,
int  shutdown 
)

Definition at line 272 of file vrrp_packet.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_garp_or_na_send()

int vrrp_garp_or_na_send ( vrrp_vr_t vr)

Definition at line 458 of file vrrp_packet.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_intf_get()

static vrrp_intf_t* vrrp_intf_get ( u32  sw_if_index)
inlinestatic

Definition at line 289 of file vrrp.h.

+ Here is the caller graph for this function:

◆ vrrp_intf_num_vrs()

static int vrrp_intf_num_vrs ( u32  sw_if_index,
u8  is_ipv6 
)
inlinestatic

Definition at line 301 of file vrrp.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_plugin_api_hookup()

clib_error_t* vrrp_plugin_api_hookup ( vlib_main_t vm)

Definition at line 528 of file vrrp_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_vr_accept_mode_enabled()

static u8 vrrp_vr_accept_mode_enabled ( vrrp_vr_t vr)
inlinestatic

Definition at line 342 of file vrrp.h.

+ Here is the caller graph for this function:

◆ vrrp_vr_add_del()

int vrrp_vr_add_del ( u8  is_add,
vrrp_vr_config_t conf 
)

Definition at line 622 of file vrrp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_vr_event()

void vrrp_vr_event ( vrrp_vr_t vr,
vrrp_vr_state_t  new_state 
)

Definition at line 507 of file vrrp_api.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_vr_index()

static u32 vrrp_vr_index ( vrrp_vr_t vr)
inlinestatic

Definition at line 348 of file vrrp.h.

+ Here is the caller graph for this function:

◆ vrrp_vr_is_ipv6()

static u8 vrrp_vr_is_ipv6 ( vrrp_vr_t vr)
inlinestatic

Definition at line 312 of file vrrp.h.

+ Here is the caller graph for this function:

◆ vrrp_vr_is_owner()

static u8 vrrp_vr_is_owner ( vrrp_vr_t vr)
inlinestatic

Definition at line 324 of file vrrp.h.

+ Here is the caller graph for this function:

◆ vrrp_vr_is_unicast()

static u8 vrrp_vr_is_unicast ( vrrp_vr_t vr)
inlinestatic

Definition at line 318 of file vrrp.h.

+ Here is the caller graph for this function:

◆ vrrp_vr_lookup()

static vrrp_vr_t* vrrp_vr_lookup ( u32  sw_if_index,
u8  vr_id,
u8  is_ipv6 
)
inlinestatic

Definition at line 231 of file vrrp.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_vr_lookup_address()

static u32 vrrp_vr_lookup_address ( u32  sw_if_index,
u8  is_ipv6,
void *  addr 
)
inlinestatic

Definition at line 262 of file vrrp.h.

+ Here is the caller graph for this function:

◆ vrrp_vr_lookup_index()

static vrrp_vr_t* vrrp_vr_lookup_index ( u32  vr_index)
inlinestatic

Definition at line 251 of file vrrp.h.

+ Here is the caller graph for this function:

◆ vrrp_vr_master_down_compute()

static void vrrp_vr_master_down_compute ( vrrp_vr_t vr)
inlinestatic

Definition at line 223 of file vrrp.h.

+ Here is the caller graph for this function:

◆ vrrp_vr_multicast_group_join()

int vrrp_vr_multicast_group_join ( vrrp_vr_t vr)

Definition at line 679 of file vrrp_packet.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_vr_n_peer_addrs()

static u8 vrrp_vr_n_peer_addrs ( vrrp_vr_t vr)
inlinestatic

Definition at line 336 of file vrrp.h.

◆ vrrp_vr_n_vr_addrs()

static u8 vrrp_vr_n_vr_addrs ( vrrp_vr_t vr)
inlinestatic

Definition at line 330 of file vrrp.h.

◆ vrrp_vr_priority()

static u8 vrrp_vr_priority ( vrrp_vr_t vr)
inlinestatic

Definition at line 356 of file vrrp.h.

+ Here is the caller graph for this function:

◆ vrrp_vr_set_peers()

int vrrp_vr_set_peers ( vrrp_vr_key_t key,
ip46_address_t *  peers 
)

Definition at line 803 of file vrrp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_vr_skew_compute()

static void vrrp_vr_skew_compute ( vrrp_vr_t vr)
inlinestatic

Definition at line 214 of file vrrp.h.

+ Here is the caller graph for this function:

◆ vrrp_vr_start_stop()

int vrrp_vr_start_stop ( u8  is_start,
vrrp_vr_key_t vr_key 
)

Definition at line 710 of file vrrp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_vr_timer_cancel()

void vrrp_vr_timer_cancel ( vrrp_vr_t vr)

Definition at line 58 of file vrrp_periodic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_vr_timer_set()

void vrrp_vr_timer_set ( vrrp_vr_t vr,
vrrp_vr_timer_type_t  type 
)

Definition at line 89 of file vrrp_periodic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_vr_tracking_if_add_del()

int vrrp_vr_tracking_if_add_del ( vrrp_vr_t vr,
u32  sw_if_index,
u8  priority,
u8  is_add 
)

Definition at line 955 of file vrrp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_vr_tracking_ifs_add_del()

int vrrp_vr_tracking_ifs_add_del ( vrrp_vr_t vr,
vrrp_vr_tracking_if_t track_ifs,
u8  is_add 
)

Definition at line 998 of file vrrp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vrrp_vr_transition()

void vrrp_vr_transition ( vrrp_vr_t vr,
vrrp_vr_state_t  new_state,
void *  data 
)

Definition at line 282 of file vrrp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ vrrp_main

vrrp_main_t vrrp_main

Definition at line 25 of file vrrp.c.

◆ vrrp_node

◆ vrrp_periodic_node

vlib_node_registration_t vrrp_periodic_node

(constructor) VLIB_REGISTER_NODE (vrrp_periodic_node)

Definition at line 214 of file vrrp_periodic.c.