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
//! Generic Network Virtualization Encapsulation (GENEVE, RFC 8926) AST definitions.
//!
//! Defines the extensible network virtualization overlay tunnel header specified in RFC 8926 and
//! encapsulated inside UDP datagrams addressed to destination port `6081`. The fixed 8-byte GENEVE
//! header contains a 2-bit `Ver` field (`0`), a 6-bit `Opt Len` count of 4-byte TLV option words,
//! control flags (`O` OAM bit, `C` Critical bit), a 16-bit IEEE EtherType `Protocol Type`
//! (`PROTOCOL_TYPE`, default `0x6558` Transparent Ethernet Bridging), a 24-bit Virtual Network
//! Identifier (`VNI`, default `4096`), and an 8-bit `Reserved` byte, optionally followed by variable
//! Type-Length-Value metadata options (`OPT_CLASS` and `OPT_TYPE`) used by OVN, Cilium, and NSX.
//!
//! Canonical `.fasm` syntax:
//! `a -> b GENEVE [VNI <u24>] [OPT_CLASS <u16>] [OPT_TYPE <u8>] [PROTOCOL_TYPE <u16>] [PAYLOAD "<str>" | HEXPAYLOAD "<hex>"]`
use PhantomData;
/// Generic Network Virtualization Encapsulation (RFC 8926) specification over UDP port `6081`.
///
/// Syntax mapping: `GENEVE [VNI <u24>] [OPT_CLASS <u16>] [OPT_TYPE <u8>] [PROTOCOL_TYPE <u16>]`