1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Virtual Router Redundancy Protocol (VRRPv3 RFC 5798 / VRRPv2 RFC 3768) AST definitions.
//!
//! Defines the standards-based First Hop Redundancy Protocol (FHRP) advertisement packet specified
//! in RFC 5798 (VRRPv3 for IPv4 and IPv6) and RFC 3768 (VRRPv2) transmitted directly over IP protocol
//! `112` (`0x70`) with `TTL = 255` to multicast `224.0.0.18` (IPv4) or `ff02::12` (IPv6). The VRRPv3
//! wire header packs a 4-bit `Version` (`3`), a 4-bit `Type` (`1` Advertisement), an 8-bit Virtual
//! Router Identifier (`VRID`, `1..=255`), an 8-bit election `Priority` (`PRIORITY`, `1..=254`, `255`
//! for IP address owner), an 8-bit `Count IPvX Addr` (`1`), a 12-bit `Max Adver Int` in centiseconds
//! (`ADV_INT`, default `100` = 1.0s), a 16-bit Checksum, and the Virtual IP address (`VIP`).
//!
//! Canonical `.fasm` syntax:
//! `a -> b VRRP [VRID <1..255>] [PRIORITY <0..255>] [ADV_INT <u16>] [VIP <ip>] [VERSION <2|3>]`
use PhantomData;
use IpAddr;
/// Virtual Router Redundancy Protocol (RFC 5798 VRRPv3 / RFC 3768 VRRPv2) specification over IP protocol `112`.
///
/// Syntax mapping: `VRRP [VRID <1..255>] [PRIORITY <0..255>] [ADV_INT <u16>] [VIP <ip>] [VERSION <2|3>]`