Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TODO: register our own option class with IANA. OptionTypeKeyEpoch = OptionTypeCritical | 0x01 OptionTypeTxCounter = OptionTypeCritical | 0x02 )
View Source
const ( // Reserved for experimental use. ClassExperimental = 0xFF00 // Indicates that the option is critical. OptionTypeCritical = 0x80 // Maximum number of options that can be included in a Geneve header. // This is not part of the RFC but a practical limit for this implementation. MaxOptions = 2 // Maximum length of a Geneve option value in bytes. // This is not part of the RFC but a practical limit for this implementation. MaxValueLength = 12 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct {
Version uint8 // Version (2 bits)
OAM bool // OAM Flag (1 bit) - Set if the packet is OAM (Operations, Administration, Maintenance).
Critical bool // Critical Flag (1 bit) - Indicates if the presence of unknown options must cause the receiver to drop the packet
ProtocolType uint16 // Protocol Type (16 bits) - EtherType of the encapsulated payload.
VNI uint32 // Virtual Network Identifier (VNI) (24 bits) - Identifies the virtual network.
NumOptions int // Number of populated options
Options [MaxOptions]Option // Options (variable length) - A list of options that can be included in the header.
}
Header represents the Geneve header structure as defined in RFC 8926.
type Option ¶
type Option struct {
Class uint16 // Defines the namespace for the option (IANA-assigned).
Type uint8 // Unique within the option class.
Length int // Length of the option value in 4-byte units.
Value [MaxValueLength]byte // The value of the option (4-byte aligned).
}
Option represents a Geneve option as defined in RFC 8926.
Click to show internal directories.
Click to hide internal directories.