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
46
47
//! Cisco Hot Standby Router Protocol (HSRP, RFC 2281) AST definitions.
//!
//! Defines the first-hop gateway redundancy control protocol specified in RFC 2281 over UDP port
//! `1985` (IPv4 multicast `224.0.0.2`) and HSRPv2 IPv6 adaptation over UDP port `2029` (IPv6
//! link-local multicast `ff02::66`). The 20-byte HSRP v1 packet header encodes an 8-bit `Version`
//! (`0` for IPv4, `2` for IPv6), an 8-bit `Op Code` (`0` Hello), an 8-bit router `State` (`STATE`,
//! default `16` Active), 8-bit `Hellotime` (`HELLOTIME`, default `3`s) and `Holdtime` (`HOLDTIME`,
//! default `10`s), 8-bit `Priority` (`PRIORITY`, default `100`), 8-bit Standby `Group` (`GROUP`,
//! default `1`), 8-byte cleartext `Authentication Data` (`AUTH`, default `"cisco"`), and the Virtual IP (`VIP`).
//!
//! Canonical `.fasm` syntax:
//! `a -> b HSRP [GROUP <u8>] [PRIORITY <u8>] [STATE <u8>] [HELLOTIME <u8>] [HOLDTIME <u8>] [AUTH "<str>"] [VIP <ip>]`
use IpAddr;
/// Cisco Hot Standby Router Protocol (RFC 2281) specification over UDP port `1985` / `2029`.
///
/// Syntax mapping: `HSRP [GROUP <u8>] [PRIORITY <u8>] [STATE <u8>] [HELLOTIME <u8>] [HOLDTIME <u8>] [AUTH "<str>"] [VIP <ip>]`