]>
git.proxmox.com Git - mirror_frr.git/blob - vrrpd/vrrp_packet.h
2 * VRRPD packet crafting
3 * Copyright (C) 2018 Cumulus Networks, Inc.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #define VRRP_VERSION 3
27 #define VRRP_TYPE_ADVERTISEMENT 1
30 * Shared header for VRRPv2/v3 packets.
45 /* advertisement interval (in sec) */
50 * advertisement interval (in centiseconds)
67 } __attribute((packed
, aligned(1)));
70 * Builds a VRRP packet.
73 * Pointer to store pointer to result buffer in
76 * Virtual Router Identifier
79 * Virtual Router Priority
82 * time between ADVERTISEMENTs
85 * whether 'ips' is an array of v4 or v6 addresses
88 * number of IPvX addresses in 'ips'
91 * array of pointer to either struct in_addr (v6 = false) or struct in6_addr
94 ssize_t
vrrp_pkt_build(struct vrrp_pkt
**pkt
, uint8_t vrid
, uint8_t prio
,
95 uint16_t max_adver_int
, uint8_t numip
,