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
//! Generic Routing Encapsulation (GRE, RFC 2784 / RFC 2890) AST definitions.
//!
//! Defines the multiprotocol IP-in-IP and Layer 2 overlay tunneling header specified in RFC 2784 and
//! extended with Key and Sequence Number fields in RFC 2890 over IP protocol `47` (`0x2F`). The GRE
//! header begins with a 16-bit Flags and Version word (`C` Checksum bit `0x8000`, `K` Key bit `0x2000`,
//! `S` Sequence bit `0x1000`, Version `0`) followed by a 16-bit IEEE EtherType `Protocol Type`
//! (`GRE_PROTO`, default `0x0800` IPv4, `0x6558` NVGRE TEB, `0x88BE` ERSPAN, `0x8847` MPLS) and
//! optional 32-bit Checksum/Reserved (`CHECKSUM`), Key (`GRE_KEY`), and Sequence (`GRE_SEQ`) words.
//!
//! Canonical `.fasm` syntax:
//! `a -> b GRE [GRE_KEY <u32>] [GRE_SEQ <u32>] [GRE_PROTO <u16>] [CHECKSUM] [PAYLOAD "<str>" | HEXPAYLOAD "<hex>"]`
use PhantomData;
/// Generic Routing Encapsulation (RFC 2784 / RFC 2890) specification over IP protocol `47`.
///
/// Syntax mapping: `GRE [GRE_KEY <u32>] [GRE_SEQ <u32>] [GRE_PROTO <u16>] [CHECKSUM]`