FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
vrrp_packet.c File Reference
+ Include dependency graph for vrrp_packet.c:

Go to the source code of this file.

Macros

#define VRRP4_MCAST_ADDR_AS_U8   { 224, 0, 0, 18 }
 
#define VRRP6_MCAST_ADDR_AS_U8   { 0xff, 0x2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x12 }
 
#define IGMP4_MCAST_ADDR_AS_U8   { 224, 0, 0, 22 }
 

Functions

static int vrrp_adv_l2_build_multicast (vrrp_vr_t *vr, vlib_buffer_t *b)
 
static u16 vrrp_adv_payload_len (vrrp_vr_t *vr)
 
static int vrrp_adv_l3_build (vrrp_vr_t *vr, vlib_buffer_t *b, const ip46_address_t *dst)
 
u16 vrrp_adv_csum (void *l3_hdr, void *payload, u8 is_ipv6, u16 len)
 
static int vrrp_adv_payload_build (vrrp_vr_t *vr, vlib_buffer_t *b, int shutdown)
 
static_always_inline u32 vrrp_adv_next_node (vrrp_vr_t *vr)
 
const static_always_inline ip46_address_t * vrrp_adv_mcast_addr (vrrp_vr_t *vr)
 
int vrrp_adv_send (vrrp_vr_t *vr, int shutdown)
 
static void vrrp6_na_pkt_build (vrrp_vr_t *vr, vlib_buffer_t *b, ip6_address_t *addr6)
 
static void vrrp4_garp_pkt_build (vrrp_vr_t *vr, vlib_buffer_t *b, ip4_address_t *ip4)
 
int vrrp_garp_or_na_send (vrrp_vr_t *vr)
 
static void vrrp_igmp_pkt_build (vrrp_vr_t *vr, vlib_buffer_t *b)
 
typedef CLIB_PACKED (struct { ip6_hop_by_hop_ext_t ext_hdr;ip6_router_alert_option_t alert;ip6_padN_option_t pad;icmp46_header_t icmp;u16 rsvd;u16 num_addr_records;icmp6_multicast_address_record_t records[0];})
 
int vrrp_vr_multicast_group_join (vrrp_vr_t *vr)
 

Variables

static const u8 vrrp4_dst_mac [6] = { 0x1, 0x0, 0x5e, 0x0, 0x0, 0x12 }
 
static const u8 vrrp6_dst_mac [6] = { 0x33, 0x33, 0x0, 0x0, 0x0, 0x12 }
 
static const u8 vrrp_src_mac_prefix [4] = { 0x0, 0x0, 0x5e, 0x0 }
 
static const ip46_address_t vrrp4_mcast_addr
 
static const ip46_address_t vrrp6_mcast_addr
 
const mac_address_t broadcast_mac
 
static const ip4_header_t igmp_ip4_mcast
 

Macro Definition Documentation

◆ IGMP4_MCAST_ADDR_AS_U8

#define IGMP4_MCAST_ADDR_AS_U8   { 224, 0, 0, 22 }

Definition at line 529 of file vrrp_packet.c.

◆ VRRP4_MCAST_ADDR_AS_U8

#define VRRP4_MCAST_ADDR_AS_U8   { 224, 0, 0, 18 }

Definition at line 77 of file vrrp_packet.c.

◆ VRRP6_MCAST_ADDR_AS_U8

#define VRRP6_MCAST_ADDR_AS_U8   { 0xff, 0x2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x12 }

Definition at line 78 of file vrrp_packet.c.

Function Documentation

◆ CLIB_PACKED()

typedef CLIB_PACKED ( struct { ip6_hop_by_hop_ext_t ext_hdr;ip6_router_alert_option_t alert;ip6_padN_option_t pad;icmp46_header_t icmp;u16 rsvd;u16 num_addr_records;icmp6_multicast_address_record_t records[0];}  )

Definition at line 598 of file vrrp_packet.c.

◆ vrrp4_garp_pkt_build()

static void vrrp4_garp_pkt_build ( vrrp_vr_t vr,
vlib_buffer_t b,
ip4_address_t ip4 
)
static

Definition at line 428 of file vrrp_packet.c.

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

◆ vrrp6_na_pkt_build()

static void vrrp6_na_pkt_build ( vrrp_vr_t vr,
vlib_buffer_t b,
ip6_address_t *  addr6 
)
static

Definition at line 353 of file vrrp_packet.c.

+ Here is the call graph for this function:
+ 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 150 of file vrrp_packet.c.

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

◆ vrrp_adv_l2_build_multicast()

static int vrrp_adv_l2_build_multicast ( vrrp_vr_t vr,
vlib_buffer_t b 
)
static

Definition at line 32 of file vrrp_packet.c.

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

◆ vrrp_adv_l3_build()

static int vrrp_adv_l3_build ( vrrp_vr_t vr,
vlib_buffer_t b,
const ip46_address_t *  dst 
)
static

Definition at line 99 of file vrrp_packet.c.

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

◆ vrrp_adv_mcast_addr()

const static_always_inline ip46_address_t* vrrp_adv_mcast_addr ( vrrp_vr_t vr)

Definition at line 270 of file vrrp_packet.c.

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

◆ vrrp_adv_next_node()

static_always_inline u32 vrrp_adv_next_node ( vrrp_vr_t vr)

Definition at line 252 of file vrrp_packet.c.

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

◆ vrrp_adv_payload_build()

static int vrrp_adv_payload_build ( vrrp_vr_t vr,
vlib_buffer_t b,
int  shutdown 
)
static

Definition at line 192 of file vrrp_packet.c.

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

◆ vrrp_adv_payload_len()

static u16 vrrp_adv_payload_len ( vrrp_vr_t vr)
inlinestatic

Definition at line 91 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 279 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 465 of file vrrp_packet.c.

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

◆ vrrp_igmp_pkt_build()

static void vrrp_igmp_pkt_build ( vrrp_vr_t vr,
vlib_buffer_t b 
)
static

Definition at line 540 of file vrrp_packet.c.

+ Here is the call graph for this function:
+ 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 690 of file vrrp_packet.c.

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

Variable Documentation

◆ broadcast_mac

const mac_address_t broadcast_mac
Initial value:
= {
.bytes = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff,},
}

Definition at line 423 of file vrrp_packet.c.

◆ igmp_ip4_mcast

const ip4_header_t igmp_ip4_mcast
static
Initial value:
= {
.ip_version_and_header_length = 0x46,
.ttl = 1,
.protocol = IP_PROTOCOL_IGMP,
.tos = 0xc0,
.dst_address = {.as_u8 = IGMP4_MCAST_ADDR_AS_U8,},
}

Definition at line 531 of file vrrp_packet.c.

◆ vrrp4_dst_mac

const u8 vrrp4_dst_mac[6] = { 0x1, 0x0, 0x5e, 0x0, 0x0, 0x12 }
static

Definition at line 27 of file vrrp_packet.c.

◆ vrrp4_mcast_addr

const ip46_address_t vrrp4_mcast_addr
static
Initial value:
= {
.ip4 = {.as_u8 = VRRP4_MCAST_ADDR_AS_U8,},
}

Definition at line 81 of file vrrp_packet.c.

◆ vrrp6_dst_mac

const u8 vrrp6_dst_mac[6] = { 0x33, 0x33, 0x0, 0x0, 0x0, 0x12 }
static

Definition at line 28 of file vrrp_packet.c.

◆ vrrp6_mcast_addr

const ip46_address_t vrrp6_mcast_addr
static
Initial value:
= {
.ip6 = {.as_u8 = VRRP6_MCAST_ADDR_AS_U8,},
}

Definition at line 85 of file vrrp_packet.c.

◆ vrrp_src_mac_prefix

const u8 vrrp_src_mac_prefix[4] = { 0x0, 0x0, 0x5e, 0x0 }
static

Definition at line 29 of file vrrp_packet.c.

IGMP4_MCAST_ADDR_AS_U8
#define IGMP4_MCAST_ADDR_AS_U8
Definition: vrrp_packet.c:529
VRRP6_MCAST_ADDR_AS_U8
#define VRRP6_MCAST_ADDR_AS_U8
Definition: vrrp_packet.c:78
VRRP4_MCAST_ADDR_AS_U8
#define VRRP4_MCAST_ADDR_AS_U8
Definition: vrrp_packet.c:77