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
48
49
50
51
52
53
//! Protocol Independent Multicast - Sparse Mode (PIM-SM, RFC 7761) AST definitions.
//!
//! Defines multicast distribution tree control messages specified in RFC 7761 (obsoleting RFC 4601)
//! and transmitted directly over IP protocol `103` (`0x67`) to the All-PIM-Routers link-local
//! multicast address (`224.0.0.13` for IPv4, `ff02::d` for IPv6) or unicast to a Rendezvous Point
//! (`RP`). The 4-byte PIMv2 header encodes a 4-bit `PIM Ver` (`2`), a 4-bit `Type` (`0` `HELLO`,
//! `1` `REGISTER`, `3` `JOIN_PRUNE`), an 8-bit `Reserved` byte, and a 16-bit ones'-complement
//! `Checksum`, followed by TLV options (`Option 1` `HOLDTIME` default `105`s, `Option 19` `DR_PRIORITY`
//! default `1`) and multicast tree `(S, G)` or `(*, G)` state (`SOURCE`, `GROUP`, `RP`).
//!
//! Canonical `.fasm` syntax:
//! `a -> b PIM [HELLO | JOIN_PRUNE | REGISTER] [HOLDTIME <u16>] [DR_PRIORITY <u32>] [GROUP <ip>] [SOURCE <ip>] [RP <ip>]`
use PhantomData;
use IpAddr;
/// Protocol Independent Multicast Sparse Mode (RFC 7761) specification over IP protocol `103`.
///
/// Syntax mapping: `PIM [HELLO | JOIN_PRUNE | REGISTER] [HOLDTIME <u16>] [DR_PRIORITY <u32>] [GROUP <ip>] [SOURCE <ip>] [RP <ip>]`