Documentation ¶
Overview ¶
Package layers provides decoding layers for many common protocols.
The layers package contains decode implementations for a number of different types of packet layers. Users of gopacket will almost always want to also use layers to actually decode packet data into useful pieces. To see the set of protocols that gopacket/layers is currently able to decode, look at the set of LayerTypes defined in the Variables sections. The layers package also defines endpoints for many of the common packet layers that have source/destination addresses associated with them, for example IPv4/6 (IPs) and TCP/UDP (ports). Finally, layers contains a number of useful enumerations (IPProtocol, EthernetType, LinkType, PPPType, etc...). Many of these implement the gopacket.Decoder interface, so they can be passed into gopacket as decoders.
Most common protocol layers are named using acronyms or other industry-common names (IPv4, TCP, PPP). Some of the less common ones have their names expanded (CiscoDiscoveryProtocol). For certain protocols, sub-parts of the protocol are split out into their own layers (SCTP, for example). This is done mostly in cases where portions of the protocol may fulfill the capabilities of interesting layers (SCTPData implements ApplicationLayer, while base SCTP implements TransportLayer), or possibly because splitting a protocol into a few layers makes decoding easier.
This package is meant to be used with its parent, http://github.com/google/gopacket.
Port Types ¶
Instead of using raw uint16 or uint8 values for ports, we use a different port type for every protocol, for example TCPPort and UDPPort. This allows us to override string behavior for each port, which we do by setting up port name maps (TCPPortNames, UDPPortNames, etc...). Well-known ports are annotated with their protocol names, and their String function displays these names:
p := TCPPort(80) fmt.Printf("Number: %d String: %v", p, p) // Prints: "Number: 80 String: 80(http)"
Modifying Decode Behavior ¶
layers links together decoding through its enumerations. For example, after decoding layer type Ethernet, it uses Ethernet.EthernetType as its next decoder. All enumerations that act as decoders, like EthernetType, can be modified by users depending on their preferences. For example, if you have a spiffy new IPv4 decoder that works way better than the one built into layers, you can do this:
var mySpiffyIPv4Decoder gopacket.Decoder = ... layers.EthernetTypeMetadata[EthernetTypeIPv4].DecodeWith = mySpiffyIPv4Decoder
This will make all future ethernet packets use your new decoder to decode IPv4 packets, instead of the built-in decoder used by gopacket.
Index ¶
- Constants
- Variables
- func FuzzLayer(data []byte) int
- func GetLCMLayerType(fingerprint LCMFingerprint) gopacket.LayerType
- func NewIPEndpoint(a net.IP) gopacket.Endpoint
- func NewMACEndpoint(a net.HardwareAddr) gopacket.Endpoint
- func NewRUDPPortEndpoint(p RUDPPort) gopacket.Endpoint
- func NewSCTPPortEndpoint(p SCTPPort) gopacket.Endpoint
- func NewTCPPortEndpoint(p TCPPort) gopacket.Endpoint
- func NewUDPLitePortEndpoint(p UDPLitePort) gopacket.Endpoint
- func NewUDPPortEndpoint(p UDPPort) gopacket.Endpoint
- func RegisterASFLayerType(a ASFDataIdentifier, l gopacket.LayerType)
- func RegisterLCMLayerType(num int, name string, fingerprint LCMFingerprint, decoder gopacket.Decoder) gopacket.LayerType
- func RegisterRMCPLayerType(c RMCPClass, l gopacket.LayerType)
- func RegisterTCPPortLayerType(port TCPPort, layerType gopacket.LayerType)
- func RegisterUDPPortLayerType(port UDPPort, layerType gopacket.LayerType)
- type ARP
- func (arp *ARP) CanDecode() gopacket.LayerClass
- func (arp *ARP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (arp *ARP) LayerType() gopacket.LayerType
- func (arp *ARP) NextLayerType() gopacket.LayerType
- func (arp *ARP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type ASExternalLSA
- type ASExternalLSAV2
- type ASF
- func (a *ASF) CanDecode() gopacket.LayerClass
- func (a *ASF) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (*ASF) LayerType() gopacket.LayerType
- func (a *ASF) NextLayerType() gopacket.LayerType
- func (a *ASF) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type ASFDataIdentifier
- type ASFEntity
- type ASFInteraction
- type ASFPresencePong
- func (a *ASFPresencePong) CanDecode() gopacket.LayerClass
- func (a *ASFPresencePong) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (*ASFPresencePong) LayerType() gopacket.LayerType
- func (a *ASFPresencePong) NextLayerType() gopacket.LayerType
- func (a *ASFPresencePong) SerializeTo(b gopacket.SerializeBuffer, _ gopacket.SerializeOptions) error
- func (a *ASFPresencePong) SupportsDCMI() bool
- type BFD
- func (d *BFD) CanDecode() gopacket.LayerClass
- func (d *BFD) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (d *BFD) LayerType() gopacket.LayerType
- func (d *BFD) Length() int
- func (d *BFD) NextLayerType() gopacket.LayerType
- func (d *BFD) Payload() []byte
- func (d *BFD) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type BFDAuthData
- type BFDAuthHeader
- type BFDAuthKeyID
- type BFDAuthSequenceNumber
- type BFDAuthType
- type BFDDetectMultiplier
- type BFDDiagnostic
- type BFDDiscriminator
- type BFDState
- type BFDTimeInterval
- type BFDVersion
- type BaseLayer
- type CDPAddressType
- type CDPCapabilities
- type CDPCapability
- type CDPEnergyWise
- type CDPEnergyWiseSubtype
- type CDPHello
- type CDPLocation
- type CDPPowerDialogue
- type CDPSparePairPoE
- type CDPTLVType
- type CDPVLANDialogue
- type CiscoDiscovery
- type CiscoDiscoveryInfo
- type CiscoDiscoveryValue
- type DHCPMsgType
- type DHCPOp
- type DHCPOpt
- type DHCPOption
- type DHCPOptions
- type DHCPv4
- func (d *DHCPv4) CanDecode() gopacket.LayerClass
- func (d *DHCPv4) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (d *DHCPv4) LayerType() gopacket.LayerType
- func (d *DHCPv4) Len() uint16
- func (d *DHCPv4) NextLayerType() gopacket.LayerType
- func (d *DHCPv4) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type DHCPv4Error
- type DHCPv6
- func (d *DHCPv6) CanDecode() gopacket.LayerClass
- func (d *DHCPv6) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (d *DHCPv6) LayerType() gopacket.LayerType
- func (d *DHCPv6) Len() int
- func (d *DHCPv6) NextLayerType() gopacket.LayerType
- func (d *DHCPv6) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type DHCPv6DUID
- type DHCPv6DUIDType
- type DHCPv6MsgType
- type DHCPv6Opt
- type DHCPv6Option
- type DHCPv6Options
- type DHCPv6StatusCode
- type DNS
- func (d *DNS) CanDecode() gopacket.LayerClass
- func (d *DNS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (d *DNS) LayerType() gopacket.LayerType
- func (d *DNS) NextLayerType() gopacket.LayerType
- func (d *DNS) Payload() []byte
- func (d *DNS) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type DNSClass
- type DNSMX
- type DNSOPT
- type DNSOpCode
- type DNSOptionCode
- type DNSQuestion
- type DNSResourceRecord
- type DNSResponseCode
- type DNSSOA
- type DNSSRV
- type DNSType
- type DNSURI
- type DbDescPkg
- type Dot11
- func (m *Dot11) CanDecode() gopacket.LayerClass
- func (m *Dot11) ChecksumValid() bool
- func (m *Dot11) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *Dot11) LayerType() gopacket.LayerType
- func (m *Dot11) NextLayerType() gopacket.LayerType
- func (m Dot11) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type Dot11ASEL
- type Dot11AckPolicy
- type Dot11Algorithm
- type Dot11CodingType
- type Dot11Ctrl
- type Dot11CtrlAck
- type Dot11CtrlBlockAck
- type Dot11CtrlBlockAckReq
- type Dot11CtrlCFEnd
- type Dot11CtrlCFEndAck
- type Dot11CtrlCTS
- type Dot11CtrlPowersavePoll
- type Dot11CtrlRTS
- type Dot11Data
- type Dot11DataCFAck
- type Dot11DataCFAckNoData
- type Dot11DataCFAckPoll
- type Dot11DataCFAckPollNoData
- type Dot11DataCFPoll
- type Dot11DataCFPollNoData
- type Dot11DataNull
- type Dot11DataQOS
- type Dot11DataQOSCFAckPollNoData
- type Dot11DataQOSCFPollNoData
- type Dot11DataQOSData
- type Dot11DataQOSDataCFAck
- type Dot11DataQOSDataCFAckPoll
- type Dot11DataQOSDataCFPoll
- type Dot11DataQOSNull
- type Dot11Flags
- func (d Dot11Flags) FromDS() bool
- func (d Dot11Flags) MD() bool
- func (d Dot11Flags) MF() bool
- func (d Dot11Flags) Order() bool
- func (d Dot11Flags) PowerManagement() bool
- func (d Dot11Flags) Retry() bool
- func (a Dot11Flags) String() string
- func (d Dot11Flags) ToDS() bool
- func (d Dot11Flags) WEP() bool
- type Dot11HTControl
- type Dot11HTControlHT
- type Dot11HTControlMFB
- type Dot11HTControlVHT
- type Dot11InformationElement
- func (m *Dot11InformationElement) CanDecode() gopacket.LayerClass
- func (m *Dot11InformationElement) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *Dot11InformationElement) LayerType() gopacket.LayerType
- func (m *Dot11InformationElement) NextLayerType() gopacket.LayerType
- func (m Dot11InformationElement) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- func (d *Dot11InformationElement) String() string
- type Dot11InformationElementID
- type Dot11LinkAdapationControl
- type Dot11Mgmt
- type Dot11MgmtATIM
- type Dot11MgmtAction
- type Dot11MgmtActionNoAck
- type Dot11MgmtArubaWLAN
- type Dot11MgmtAssociationReq
- func (m *Dot11MgmtAssociationReq) CanDecode() gopacket.LayerClass
- func (m *Dot11MgmtAssociationReq) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *Dot11MgmtAssociationReq) LayerType() gopacket.LayerType
- func (m *Dot11MgmtAssociationReq) NextLayerType() gopacket.LayerType
- func (m Dot11MgmtAssociationReq) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type Dot11MgmtAssociationResp
- func (m *Dot11MgmtAssociationResp) CanDecode() gopacket.LayerClass
- func (m *Dot11MgmtAssociationResp) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *Dot11MgmtAssociationResp) LayerType() gopacket.LayerType
- func (m *Dot11MgmtAssociationResp) NextLayerType() gopacket.LayerType
- func (m Dot11MgmtAssociationResp) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type Dot11MgmtAuthentication
- func (m *Dot11MgmtAuthentication) CanDecode() gopacket.LayerClass
- func (m *Dot11MgmtAuthentication) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *Dot11MgmtAuthentication) LayerType() gopacket.LayerType
- func (m *Dot11MgmtAuthentication) NextLayerType() gopacket.LayerType
- func (m Dot11MgmtAuthentication) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type Dot11MgmtBeacon
- func (m *Dot11MgmtBeacon) CanDecode() gopacket.LayerClass
- func (m *Dot11MgmtBeacon) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *Dot11MgmtBeacon) LayerType() gopacket.LayerType
- func (m *Dot11MgmtBeacon) NextLayerType() gopacket.LayerType
- func (m Dot11MgmtBeacon) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type Dot11MgmtDeauthentication
- func (m *Dot11MgmtDeauthentication) CanDecode() gopacket.LayerClass
- func (m *Dot11MgmtDeauthentication) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *Dot11MgmtDeauthentication) LayerType() gopacket.LayerType
- func (m Dot11MgmtDeauthentication) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type Dot11MgmtDisassociation
- func (m *Dot11MgmtDisassociation) CanDecode() gopacket.LayerClass
- func (m *Dot11MgmtDisassociation) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *Dot11MgmtDisassociation) LayerType() gopacket.LayerType
- func (m Dot11MgmtDisassociation) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type Dot11MgmtMeasurementPilot
- type Dot11MgmtProbeReq
- type Dot11MgmtProbeResp
- func (m *Dot11MgmtProbeResp) CanDecode() gopacket.LayerClass
- func (m *Dot11MgmtProbeResp) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *Dot11MgmtProbeResp) LayerType() gopacket.LayerType
- func (m *Dot11MgmtProbeResp) NextLayerType() gopacket.LayerType
- func (m Dot11MgmtProbeResp) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type Dot11MgmtReassociationReq
- func (m *Dot11MgmtReassociationReq) CanDecode() gopacket.LayerClass
- func (m *Dot11MgmtReassociationReq) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *Dot11MgmtReassociationReq) LayerType() gopacket.LayerType
- func (m *Dot11MgmtReassociationReq) NextLayerType() gopacket.LayerType
- func (m Dot11MgmtReassociationReq) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type Dot11MgmtReassociationResp
- type Dot11QOS
- type Dot11Reason
- type Dot11Status
- type Dot11Type
- type Dot11WEP
- type Dot1Q
- func (d *Dot1Q) CanDecode() gopacket.LayerClass
- func (d *Dot1Q) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (d *Dot1Q) LayerType() gopacket.LayerType
- func (d *Dot1Q) NextLayerType() gopacket.LayerType
- func (d *Dot1Q) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type EAP
- func (e *EAP) CanDecode() gopacket.LayerClass
- func (e *EAP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (e *EAP) LayerType() gopacket.LayerType
- func (e *EAP) NextLayerType() gopacket.LayerType
- func (e *EAP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type EAPCode
- type EAPOL
- func (e *EAPOL) CanDecode() gopacket.LayerClass
- func (e *EAPOL) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (e *EAPOL) LayerType() gopacket.LayerType
- func (e *EAPOL) NextLayerType() gopacket.LayerType
- func (e *EAPOL) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type EAPOLKey
- func (ek *EAPOLKey) CanDecode() gopacket.LayerType
- func (ek *EAPOLKey) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (ek *EAPOLKey) LayerType() gopacket.LayerType
- func (ek *EAPOLKey) NextLayerType() gopacket.LayerType
- func (ek *EAPOLKey) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type EAPOLKeyDescriptorType
- type EAPOLKeyDescriptorVersion
- type EAPOLKeyType
- type EAPOLType
- type EAPType
- type ERSPANII
- func (erspan2 *ERSPANII) CanDecode() gopacket.LayerClass
- func (erspan2 *ERSPANII) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (erspan2 *ERSPANII) LayerType() gopacket.LayerType
- func (erspan2 *ERSPANII) NextLayerType() gopacket.LayerType
- func (erspan2 *ERSPANII) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type EnumMetadata
- type EtherIP
- type Ethernet
- func (eth *Ethernet) CanDecode() gopacket.LayerClass
- func (eth *Ethernet) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (e *Ethernet) LayerType() gopacket.LayerType
- func (e *Ethernet) LinkFlow() gopacket.Flow
- func (eth *Ethernet) NextLayerType() gopacket.LayerType
- func (eth *Ethernet) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type EthernetCTP
- type EthernetCTPForwardData
- type EthernetCTPFunction
- type EthernetCTPReply
- type EthernetType
- type FDDI
- type FDDIFrameControl
- type GRE
- func (g *GRE) CanDecode() gopacket.LayerClass
- func (g *GRE) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (g *GRE) LayerType() gopacket.LayerType
- func (g *GRE) NextLayerType() gopacket.LayerType
- func (g *GRE) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type GRERouting
- type GTPExtensionHeader
- type GTPv1U
- func (g *GTPv1U) CanDecode() gopacket.LayerClass
- func (g *GTPv1U) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (g *GTPv1U) LayerType() gopacket.LayerType
- func (g *GTPv1U) NextLayerType() gopacket.LayerType
- func (g *GTPv1U) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type Geneve
- type GeneveOption
- type HelloPkg
- type HelloPkgV2
- type IANAAddressFamily
- type ICMPv4
- func (i *ICMPv4) CanDecode() gopacket.LayerClass
- func (i *ICMPv4) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (i *ICMPv4) LayerType() gopacket.LayerType
- func (i *ICMPv4) NextLayerType() gopacket.LayerType
- func (i *ICMPv4) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type ICMPv4TypeCode
- type ICMPv6
- func (i *ICMPv6) CanDecode() gopacket.LayerClass
- func (i *ICMPv6) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (i *ICMPv6) LayerType() gopacket.LayerType
- func (i *ICMPv6) NextLayerType() gopacket.LayerType
- func (i *ICMPv6) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- func (i *ICMPv6) SetNetworkLayerForChecksum(l gopacket.NetworkLayer) error
- type ICMPv6Echo
- func (i *ICMPv6Echo) CanDecode() gopacket.LayerClass
- func (i *ICMPv6Echo) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (i *ICMPv6Echo) LayerType() gopacket.LayerType
- func (i *ICMPv6Echo) NextLayerType() gopacket.LayerType
- func (i *ICMPv6Echo) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type ICMPv6NeighborAdvertisement
- func (i *ICMPv6NeighborAdvertisement) CanDecode() gopacket.LayerClass
- func (i *ICMPv6NeighborAdvertisement) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (i *ICMPv6NeighborAdvertisement) LayerType() gopacket.LayerType
- func (i *ICMPv6NeighborAdvertisement) NextLayerType() gopacket.LayerType
- func (i *ICMPv6NeighborAdvertisement) Override() bool
- func (i *ICMPv6NeighborAdvertisement) Router() bool
- func (i *ICMPv6NeighborAdvertisement) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- func (i *ICMPv6NeighborAdvertisement) Solicited() bool
- type ICMPv6NeighborSolicitation
- func (i *ICMPv6NeighborSolicitation) CanDecode() gopacket.LayerClass
- func (i *ICMPv6NeighborSolicitation) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (i *ICMPv6NeighborSolicitation) LayerType() gopacket.LayerType
- func (i *ICMPv6NeighborSolicitation) NextLayerType() gopacket.LayerType
- func (i *ICMPv6NeighborSolicitation) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type ICMPv6Opt
- type ICMPv6Option
- type ICMPv6Options
- type ICMPv6Redirect
- func (i *ICMPv6Redirect) CanDecode() gopacket.LayerClass
- func (i *ICMPv6Redirect) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (i *ICMPv6Redirect) LayerType() gopacket.LayerType
- func (i *ICMPv6Redirect) NextLayerType() gopacket.LayerType
- func (i *ICMPv6Redirect) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type ICMPv6RouterAdvertisement
- func (i *ICMPv6RouterAdvertisement) CanDecode() gopacket.LayerClass
- func (i *ICMPv6RouterAdvertisement) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (i *ICMPv6RouterAdvertisement) LayerType() gopacket.LayerType
- func (i *ICMPv6RouterAdvertisement) ManagedAddressConfig() bool
- func (i *ICMPv6RouterAdvertisement) NextLayerType() gopacket.LayerType
- func (i *ICMPv6RouterAdvertisement) OtherConfig() bool
- func (i *ICMPv6RouterAdvertisement) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type ICMPv6RouterSolicitation
- func (i *ICMPv6RouterSolicitation) CanDecode() gopacket.LayerClass
- func (i *ICMPv6RouterSolicitation) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (i *ICMPv6RouterSolicitation) LayerType() gopacket.LayerType
- func (i *ICMPv6RouterSolicitation) NextLayerType() gopacket.LayerType
- func (i *ICMPv6RouterSolicitation) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type ICMPv6TypeCode
- type IEEEOUI
- type IGMP
- type IGMPType
- type IGMPv1or2
- type IGMPv3GroupRecord
- type IGMPv3GroupRecordType
- type IPProtocol
- type IPSecAH
- type IPSecESP
- type IPv4
- func (ip *IPv4) AddressTo4() error
- func (i *IPv4) CanDecode() gopacket.LayerClass
- func (ip *IPv4) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (i *IPv4) LayerType() gopacket.LayerType
- func (i *IPv4) NetworkFlow() gopacket.Flow
- func (i *IPv4) NextLayerType() gopacket.LayerType
- func (ip *IPv4) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type IPv4Flag
- type IPv4Option
- type IPv6
- func (ipv6 *IPv6) AddressTo16() error
- func (ipv6 *IPv6) CanDecode() gopacket.LayerClass
- func (ipv6 *IPv6) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (ipv6 *IPv6) LayerType() gopacket.LayerType
- func (ipv6 *IPv6) NetworkFlow() gopacket.Flow
- func (ipv6 *IPv6) NextLayerType() gopacket.LayerType
- func (ipv6 *IPv6) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type IPv6Destination
- type IPv6DestinationOption
- type IPv6ExtensionSkipper
- type IPv6Fragment
- type IPv6HopByHop
- type IPv6HopByHopOption
- type IPv6Routing
- type InterAreaPrefixLSA
- type InterAreaRouterLSA
- type IntraAreaPrefixLSA
- type LCM
- func (lcm LCM) CanDecode() gopacket.LayerClass
- func (lcm *LCM) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (lcm LCM) Fingerprint() LCMFingerprint
- func (lcm LCM) LayerContents() []byte
- func (lcm LCM) LayerPayload() []byte
- func (lcm LCM) LayerType() gopacket.LayerType
- func (lcm LCM) NextLayerType() gopacket.LayerType
- func (lcm LCM) Payload() []byte
- type LCMFingerprint
- type LLC
- func (l *LLC) CanDecode() gopacket.LayerClass
- func (l *LLC) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (l *LLC) LayerType() gopacket.LayerType
- func (l *LLC) NextLayerType() gopacket.LayerType
- func (l *LLC) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type LLDPApplicationType
- type LLDPCapabilities
- type LLDPChassisID
- type LLDPChassisIDSubType
- type LLDPCisco2Subtype
- type LLDPEVBCapabilities
- type LLDPEVBSettings
- type LLDPInfo8021
- type LLDPInfo8021Qbg
- type LLDPInfo8023
- type LLDPInfoCisco2
- type LLDPInfoMedia
- type LLDPInfoProfinet
- type LLDPInterfaceSubtype
- type LLDPLinkAggregation
- type LLDPLocation
- type LLDPLocationAddress
- type LLDPLocationAddressLine
- type LLDPLocationAddressType
- type LLDPLocationAddressWhat
- type LLDPLocationCoordinate
- type LLDPLocationECS
- type LLDPLocationFormat
- type LLDPMACPHYConfigStatus
- type LLDPMediaCapabilities
- type LLDPMediaClass
- type LLDPMediaSubtype
- type LLDPMgmtAddress
- type LLDPNetworkPolicy
- type LLDPOrgSpecificTLV
- type LLDPPNIODelay
- type LLDPPNIOMRPPortStatus
- type LLDPPNIOPTCPStatus
- type LLDPPNIOPortStatus
- type LLDPPortID
- type LLDPPortIDSubType
- type LLDPPowerPriority
- type LLDPPowerSource
- type LLDPPowerType
- type LLDPPowerViaMDI
- type LLDPPowerViaMDI8023
- type LLDPProfinetSubtype
- type LLDPSysCapabilities
- type LLDPTLVType
- type LSA
- type LSAheader
- type LSReq
- type LSUpdate
- type LinkLSA
- type LinkLayerDiscovery
- type LinkLayerDiscoveryInfo
- func (l *LinkLayerDiscoveryInfo) Decode8021() (info LLDPInfo8021, err error)
- func (l *LinkLayerDiscoveryInfo) Decode8021Qbg() (info LLDPInfo8021Qbg, err error)
- func (l *LinkLayerDiscoveryInfo) Decode8023() (info LLDPInfo8023, err error)
- func (l *LinkLayerDiscoveryInfo) DecodeCisco2() (info LLDPInfoCisco2, err error)
- func (l *LinkLayerDiscoveryInfo) DecodeMedia() (info LLDPInfoMedia, err error)
- func (l *LinkLayerDiscoveryInfo) DecodeProfinet() (info LLDPInfoProfinet, err error)
- func (c *LinkLayerDiscoveryInfo) LayerType() gopacket.LayerType
- type LinkLayerDiscoveryValue
- type LinkType
- type LinuxSLL
- type LinuxSLLPacketType
- type Loopback
- func (l *Loopback) CanDecode() gopacket.LayerClass
- func (l *Loopback) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (l *Loopback) LayerType() gopacket.LayerType
- func (l *Loopback) NextLayerType() gopacket.LayerType
- func (l *Loopback) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type MLDv1Message
- type MLDv1MulticastListenerDoneMessage
- type MLDv1MulticastListenerQueryMessage
- func (*MLDv1MulticastListenerQueryMessage) CanDecode() gopacket.LayerClass
- func (m *MLDv1MulticastListenerQueryMessage) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *MLDv1MulticastListenerQueryMessage) IsGeneralQuery() bool
- func (m *MLDv1MulticastListenerQueryMessage) IsSpecificQuery() bool
- func (*MLDv1MulticastListenerQueryMessage) LayerType() gopacket.LayerType
- type MLDv1MulticastListenerReportMessage
- type MLDv2MulticastAddressRecord
- type MLDv2MulticastAddressRecordType
- type MLDv2MulticastListenerQueryMessage
- func (*MLDv2MulticastListenerQueryMessage) CanDecode() gopacket.LayerClass
- func (m *MLDv2MulticastListenerQueryMessage) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (*MLDv2MulticastListenerQueryMessage) LayerType() gopacket.LayerType
- func (m *MLDv2MulticastListenerQueryMessage) MaximumResponseDelay() time.Duration
- func (*MLDv2MulticastListenerQueryMessage) NextLayerType() gopacket.LayerType
- func (m *MLDv2MulticastListenerQueryMessage) QQI() time.Duration
- func (m *MLDv2MulticastListenerQueryMessage) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- func (m *MLDv2MulticastListenerQueryMessage) SetMLDv2MaximumResponseDelay(d time.Duration) error
- func (m *MLDv2MulticastListenerQueryMessage) SetQQI(d time.Duration) error
- func (m *MLDv2MulticastListenerQueryMessage) String() string
- type MLDv2MulticastListenerReportMessage
- func (*MLDv2MulticastListenerReportMessage) CanDecode() gopacket.LayerClass
- func (m *MLDv2MulticastListenerReportMessage) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (*MLDv2MulticastListenerReportMessage) LayerType() gopacket.LayerType
- func (*MLDv2MulticastListenerReportMessage) NextLayerType() gopacket.LayerType
- func (m *MLDv2MulticastListenerReportMessage) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- func (m *MLDv2MulticastListenerReportMessage) String() string
- type MPLS
- type ModbusProtocol
- type ModbusTCP
- type NDPBackplaneType
- type NDPChassisType
- type NDPState
- type NTP
- func (d *NTP) CanDecode() gopacket.LayerClass
- func (d *NTP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (d *NTP) LayerType() gopacket.LayerType
- func (d *NTP) NextLayerType() gopacket.LayerType
- func (d *NTP) Payload() []byte
- func (d *NTP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type NTPFixed16Seconds
- type NTPLeapIndicator
- type NTPLog2Seconds
- type NTPMode
- type NTPReferenceID
- type NTPStratum
- type NTPTimestamp
- type NTPVersion
- type NetworkLSA
- type NetworkLSAV2
- type NortelDiscovery
- type OSPF
- type OSPFType
- type OSPFv2
- type OSPFv3
- type PFDirection
- type PFLog
- type PPP
- type PPPType
- type PPPoE
- type PPPoECode
- type PortProtocolVLANID
- type Prefix
- type PrismDID
- type PrismHeader
- type PrismValue
- type ProtocolFamily
- type ProtocolGuessingDecoder
- type ProtocolIdentity
- type RADIUS
- func (radius *RADIUS) CanDecode() gopacket.LayerClass
- func (radius *RADIUS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (radius *RADIUS) LayerType() gopacket.LayerType
- func (radius *RADIUS) Len() (int, error)
- func (radius *RADIUS) NextLayerType() gopacket.LayerType
- func (radius *RADIUS) Payload() []byte
- func (radius *RADIUS) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type RADIUSAttribute
- type RADIUSAttributeLength
- type RADIUSAttributeType
- type RADIUSAttributeValue
- type RADIUSAuthenticator
- type RADIUSCode
- type RADIUSIdentifier
- type RADIUSLength
- type RMCP
- func (r *RMCP) CanDecode() gopacket.LayerClass
- func (r *RMCP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (*RMCP) LayerType() gopacket.LayerType
- func (r *RMCP) NextLayerType() gopacket.LayerType
- func (r *RMCP) Payload() []byte
- func (r *RMCP) SerializeTo(b gopacket.SerializeBuffer, _ gopacket.SerializeOptions) error
- type RMCPClass
- type RUDP
- type RUDPHeaderEACK
- type RUDPHeaderSYN
- type RUDPPort
- type RadioTap
- func (m *RadioTap) CanDecode() gopacket.LayerClass
- func (m *RadioTap) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (m *RadioTap) LayerType() gopacket.LayerType
- func (m *RadioTap) NextLayerType() gopacket.LayerType
- func (m RadioTap) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type RadioTapAMPDUStatus
- type RadioTapAMPDUStatusFlags
- func (self RadioTapAMPDUStatusFlags) DelimCRCErr() bool
- func (self RadioTapAMPDUStatusFlags) DelimCRCKnown() bool
- func (self RadioTapAMPDUStatusFlags) IsLast() bool
- func (self RadioTapAMPDUStatusFlags) IsZerolen() bool
- func (self RadioTapAMPDUStatusFlags) LastKnown() bool
- func (self RadioTapAMPDUStatusFlags) ReportZerolen() bool
- type RadioTapChannelFlags
- func (r RadioTapChannelFlags) CCK() bool
- func (r RadioTapChannelFlags) Dynamic() bool
- func (r RadioTapChannelFlags) GFSK() bool
- func (r RadioTapChannelFlags) Ghz2() bool
- func (r RadioTapChannelFlags) Ghz5() bool
- func (r RadioTapChannelFlags) OFDM() bool
- func (r RadioTapChannelFlags) Passive() bool
- func (a RadioTapChannelFlags) String() string
- func (r RadioTapChannelFlags) Turbo() bool
- type RadioTapChannelFrequency
- type RadioTapFlags
- func (r RadioTapFlags) BadFCS() bool
- func (r RadioTapFlags) CFP() bool
- func (r RadioTapFlags) Datapad() bool
- func (r RadioTapFlags) FCS() bool
- func (r RadioTapFlags) Frag() bool
- func (r RadioTapFlags) ShortGI() bool
- func (r RadioTapFlags) ShortPreamble() bool
- func (a RadioTapFlags) String() string
- func (r RadioTapFlags) WEP() bool
- type RadioTapMCS
- type RadioTapMCSFlags
- type RadioTapMCSKnown
- func (self RadioTapMCSKnown) Bandwidth() bool
- func (self RadioTapMCSKnown) FECType() bool
- func (self RadioTapMCSKnown) GuardInterval() bool
- func (self RadioTapMCSKnown) HTFormat() bool
- func (self RadioTapMCSKnown) MCSIndex() bool
- func (self RadioTapMCSKnown) NESS() bool
- func (self RadioTapMCSKnown) NESS1() bool
- func (self RadioTapMCSKnown) STBC() bool
- type RadioTapPresent
- func (r RadioTapPresent) AMPDUStatus() bool
- func (r RadioTapPresent) Antenna() bool
- func (r RadioTapPresent) Channel() bool
- func (r RadioTapPresent) DBAntennaNoise() bool
- func (r RadioTapPresent) DBAntennaSignal() bool
- func (r RadioTapPresent) DBMAntennaNoise() bool
- func (r RadioTapPresent) DBMAntennaSignal() bool
- func (r RadioTapPresent) DBMTxPower() bool
- func (r RadioTapPresent) DBTxAttenuation() bool
- func (r RadioTapPresent) DataRetries() bool
- func (r RadioTapPresent) EXT() bool
- func (r RadioTapPresent) FHSS() bool
- func (r RadioTapPresent) Flags() bool
- func (r RadioTapPresent) LockQuality() bool
- func (r RadioTapPresent) MCS() bool
- func (r RadioTapPresent) Rate() bool
- func (r RadioTapPresent) RtsRetries() bool
- func (r RadioTapPresent) RxFlags() bool
- func (r RadioTapPresent) TSFT() bool
- func (r RadioTapPresent) TxAttenuation() bool
- func (r RadioTapPresent) TxFlags() bool
- func (r RadioTapPresent) VHT() bool
- type RadioTapRate
- type RadioTapRxFlags
- type RadioTapTxFlags
- type RadioTapVHT
- type RadioTapVHTFlags
- type RadioTapVHTKnown
- func (self RadioTapVHTKnown) Bandwidth() bool
- func (self RadioTapVHTKnown) Beamformed() bool
- func (self RadioTapVHTKnown) GI() bool
- func (self RadioTapVHTKnown) GroupId() bool
- func (self RadioTapVHTKnown) LDPCExtraOFDMSymbol() bool
- func (self RadioTapVHTKnown) PartialAID() bool
- func (self RadioTapVHTKnown) SGINSYMDisambiguation() bool
- func (self RadioTapVHTKnown) STBC() bool
- func (self RadioTapVHTKnown) TXOPPSNotAllowed() bool
- type RadioTapVHTMCSNSS
- type Router
- type RouterLSA
- type RouterLSAV2
- type RouterV2
- type SCTP
- func (t *SCTP) CanDecode() gopacket.LayerClass
- func (sctp *SCTP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (s *SCTP) LayerType() gopacket.LayerType
- func (t *SCTP) NextLayerType() gopacket.LayerType
- func (s SCTP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- func (s *SCTP) TransportFlow() gopacket.Flow
- type SCTPChunk
- type SCTPChunkType
- type SCTPCookieEcho
- type SCTPData
- type SCTPEmptyLayer
- type SCTPError
- type SCTPErrorParameter
- type SCTPHeartbeat
- type SCTPHeartbeatParameter
- type SCTPInit
- type SCTPInitParameter
- type SCTPParameter
- type SCTPPayloadProtocol
- type SCTPPort
- type SCTPSack
- type SCTPShutdown
- type SCTPShutdownAck
- type SCTPUnknownChunkType
- type SFLLACPPortState
- type SFlowASDestination
- type SFlowASPathType
- type SFlowAppresourcesCounters
- type SFlowBaseCounterRecord
- type SFlowBaseFlowRecord
- type SFlowCharSet
- type SFlowCounterDataFormat
- type SFlowCounterRecordType
- type SFlowCounterSample
- type SFlowDataFormat
- type SFlowDataSource
- type SFlowDataSourceExpanded
- type SFlowDatagram
- type SFlowEnterpriseID
- type SFlowEthernetCounters
- type SFlowEthernetFrameFlowRecord
- type SFlowExtendedDecapsulateEgressRecord
- type SFlowExtendedDecapsulateIngressRecord
- type SFlowExtendedGatewayFlowRecord
- type SFlowExtendedIpv4TunnelEgressRecord
- type SFlowExtendedIpv4TunnelIngressRecord
- type SFlowExtendedIpv6TunnelEgressRecord
- type SFlowExtendedIpv6TunnelIngressRecord
- type SFlowExtendedRouterFlowRecord
- type SFlowExtendedSwitchFlowRecord
- type SFlowExtendedURLRecord
- type SFlowExtendedUserFlow
- type SFlowExtendedVniEgressRecord
- type SFlowExtendedVniIngressRecord
- type SFlowFlowDataFormat
- type SFlowFlowRecordType
- type SFlowFlowSample
- type SFlowGenericInterfaceCounters
- type SFlowIPType
- type SFlowIpv4Record
- type SFlowIpv6Record
- type SFlowLACPCounters
- type SFlowOVSDPCounters
- type SFlowOpenflowPortCounters
- type SFlowPORTNAME
- type SFlowProcessorCounters
- type SFlowRawHeaderProtocol
- type SFlowRawPacketFlowRecord
- type SFlowRecord
- type SFlowSampleType
- type SFlowSourceFormat
- type SFlowSourceValue
- type SFlowURLDirection
- type SFlowVLANCounters
- type SIP
- func (s *SIP) CanDecode() gopacket.LayerClass
- func (s *SIP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (s *SIP) GetAllHeaders() map[string][]string
- func (s *SIP) GetAuthorization() string
- func (s *SIP) GetCSeq() int64
- func (s *SIP) GetCallID() string
- func (s *SIP) GetContact() string
- func (s *SIP) GetContentLength() int64
- func (s *SIP) GetFirstHeader(headerName string) string
- func (s *SIP) GetFrom() string
- func (s *SIP) GetHeader(headerName string) []string
- func (s *SIP) GetTo() string
- func (s *SIP) GetUserAgent() string
- func (s *SIP) LayerType() gopacket.LayerType
- func (s *SIP) NextLayerType() gopacket.LayerType
- func (s *SIP) ParseFirstLine(firstLine []byte) error
- func (s *SIP) ParseHeader(header []byte) (err error)
- func (s *SIP) ParseSpecificHeaders(headerName string, headerValue string) (err error)
- func (s *SIP) Payload() []byte
- type SIPMethod
- type SIPVersion
- type SNAP
- func (s *SNAP) CanDecode() gopacket.LayerClass
- func (s *SNAP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (s *SNAP) LayerType() gopacket.LayerType
- func (s *SNAP) NextLayerType() gopacket.LayerType
- func (s *SNAP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type STP
- type TCP
- func (t *TCP) CanDecode() gopacket.LayerClass
- func (t *TCP) ComputeChecksum() (uint16, error)
- func (tcp *TCP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (t *TCP) LayerType() gopacket.LayerType
- func (t *TCP) NextLayerType() gopacket.LayerType
- func (t *TCP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- func (t *TCP) SetInternalPortsForTesting()
- func (i *TCP) SetNetworkLayerForChecksum(l gopacket.NetworkLayer) error
- func (t *TCP) TransportFlow() gopacket.Flow
- type TCPOption
- type TCPOptionKind
- type TCPPort
- type TLS
- func (t *TLS) CanDecode() gopacket.LayerClass
- func (t *TLS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (t *TLS) LayerType() gopacket.LayerType
- func (t *TLS) NextLayerType() gopacket.LayerType
- func (t *TLS) Payload() []byte
- func (t *TLS) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- type TLSAlertDescr
- type TLSAlertLevel
- type TLSAlertRecord
- type TLSAppDataRecord
- type TLSChangeCipherSpecRecord
- type TLSHandshakeRecord
- type TLSRecordHeader
- type TLSType
- type TLSVersion
- type TLSchangeCipherSpec
- type UDP
- func (u *UDP) CanDecode() gopacket.LayerClass
- func (udp *UDP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (u *UDP) LayerType() gopacket.LayerType
- func (u *UDP) NextLayerType() gopacket.LayerType
- func (u *UDP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- func (u *UDP) SetInternalPortsForTesting()
- func (i *UDP) SetNetworkLayerForChecksum(l gopacket.NetworkLayer) error
- func (u *UDP) TransportFlow() gopacket.Flow
- type UDPLite
- type UDPLitePort
- type UDPPort
- type USB
- type USBBulk
- type USBControl
- type USBDirectionType
- type USBEventType
- type USBInterrupt
- type USBRequestBlockSetup
- type USBRequestBlockSetupRequest
- type USBTransportType
- type VLANName
- type VRRPv2
- type VRRPv2AuthType
- type VRRPv2Type
- type VXLAN
- func (vx *VXLAN) CanDecode() gopacket.LayerClass
- func (vx *VXLAN) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
- func (vx *VXLAN) LayerType() gopacket.LayerType
- func (vx *VXLAN) NextLayerType() gopacket.LayerType
- func (vx *VXLAN) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
- Bugs
Constants ¶
const ( ARPRequest = 1 ARPReply = 2 )
Potential values for ARP.Operation.
const ( // ASFDCMIEnterprise is the IANA-assigned Enterprise Number of the Data // Center Manageability Interface Forum. The Presence Pong response's // Enterprise field being set to this value indicates support for DCMI. The // DCMI spec regards the OEM field as reserved, so these should be null. ASFDCMIEnterprise uint32 = 36465 // ASFPresencePongEntityIPMI ANDs with Presence Pong's supported entities // field if the managed system supports IPMI. ASFPresencePongEntityIPMI ASFEntity = 1 << 7 // ASFPresencePongEntityASFv1 ANDs with Presence Pong's supported entities // field if the managed system supports ASF v1.0. ASFPresencePongEntityASFv1 ASFEntity = 1 // ASFPresencePongInteractionSecurityExtensions ANDs with Presence Pong's // supported interactions field if the managed system supports RMCP v2.0 // security extensions. See section 3.2.3. ASFPresencePongInteractionSecurityExtensions ASFInteraction = 1 << 7 // ASFPresencePongInteractionDASH ANDs with Presence Pong's supported // interactions field if the managed system supports DMTF DASH. See // https://www.dmtf.org/standards/dash. ASFPresencePongInteractionDASH ASFInteraction = 1 << 5 )
const ( CDPPoEFourWire byte = 0x01 CDPPoEPDArch byte = 0x02 CDPPoEPDRequest byte = 0x04 CDPPoEPSE byte = 0x08 )
CDP Power-over-Ethernet values.
const ( CDPProtocolTypeNLPID byte = 1 CDPProtocolType802_2 byte = 2 )
CDP Protocol Types
const ( // DecOptionNotEnoughData is returned when there is not enough data during option's decode process DecOptionNotEnoughData = DHCPv4Error("Not enough data to decode") // DecOptionMalformed is returned when the option is malformed DecOptionMalformed = DHCPv4Error("Option is malformed") // InvalidMagicCookie is returned when Magic cookie is missing into BOOTP header InvalidMagicCookie = DHCPv4Error("Bad DHCP header") )
const ( Dot11CodingTypeBCC = 0 Dot11CodingTypeLDPC = 1 )
const ( EAPCodeRequest EAPCode = 1 EAPCodeResponse EAPCode = 2 EAPCodeSuccess EAPCode = 3 EAPCodeFailure EAPCode = 4 // EAPTypeNone means that this EAP layer has no Type or TypeData. // Success and Failure EAPs will have this set. EAPTypeNone EAPType = 0 EAPTypeIdentity EAPType = 1 EAPTypeNotification EAPType = 2 EAPTypeNACK EAPType = 3 EAPTypeOTP EAPType = 4 EAPTypeTokenCard EAPType = 5 )
const ( //ERSPANIIVersionObsolete - The obsolete value for the version field ERSPANIIVersionObsolete = 0x0 // ERSPANIIVersion - The current value for the version field ERSPANIIVersion = 0x1 )
const ( ICMPv4TypeEchoReply = 0 ICMPv4TypeDestinationUnreachable = 3 ICMPv4TypeSourceQuench = 4 ICMPv4TypeRedirect = 5 ICMPv4TypeEchoRequest = 8 ICMPv4TypeRouterAdvertisement = 9 ICMPv4TypeRouterSolicitation = 10 ICMPv4TypeTimeExceeded = 11 ICMPv4TypeParameterProblem = 12 ICMPv4TypeTimestampRequest = 13 ICMPv4TypeTimestampReply = 14 ICMPv4TypeInfoRequest = 15 ICMPv4TypeInfoReply = 16 ICMPv4TypeAddressMaskRequest = 17 ICMPv4TypeAddressMaskReply = 18 )
const ( // DestinationUnreachable ICMPv4CodeNet = 0 ICMPv4CodeHost = 1 ICMPv4CodeProtocol = 2 ICMPv4CodePort = 3 ICMPv4CodeFragmentationNeeded = 4 ICMPv4CodeSourceRoutingFailed = 5 ICMPv4CodeNetUnknown = 6 ICMPv4CodeHostUnknown = 7 ICMPv4CodeSourceIsolated = 8 ICMPv4CodeNetAdminProhibited = 9 ICMPv4CodeHostAdminProhibited = 10 ICMPv4CodeNetTOS = 11 ICMPv4CodeHostTOS = 12 ICMPv4CodeCommAdminProhibited = 13 ICMPv4CodeHostPrecedence = 14 ICMPv4CodePrecedenceCutoff = 15 // TimeExceeded ICMPv4CodeTTLExceeded = 0 ICMPv4CodeFragmentReassemblyTimeExceeded = 1 // ParameterProblem ICMPv4CodePointerIndicatesError = 0 ICMPv4CodeMissingOption = 1 ICMPv4CodeBadLength = 2 // Redirect // ICMPv4CodeNet = same as for DestinationUnreachable // ICMPv4CodeHost = same as for DestinationUnreachable ICMPv4CodeTOSNet = 2 ICMPv4CodeTOSHost = 3 )
const ( // The following are from RFC 4443 ICMPv6TypeDestinationUnreachable = 1 ICMPv6TypePacketTooBig = 2 ICMPv6TypeTimeExceeded = 3 ICMPv6TypeParameterProblem = 4 ICMPv6TypeEchoRequest = 128 ICMPv6TypeEchoReply = 129 // The following are from RFC 4861 ICMPv6TypeRouterSolicitation = 133 ICMPv6TypeRouterAdvertisement = 134 ICMPv6TypeNeighborSolicitation = 135 ICMPv6TypeNeighborAdvertisement = 136 ICMPv6TypeRedirect = 137 // The following are from RFC 2710 ICMPv6TypeMLDv1MulticastListenerQueryMessage = 130 ICMPv6TypeMLDv1MulticastListenerReportMessage = 131 ICMPv6TypeMLDv1MulticastListenerDoneMessage = 132 // The following are from RFC 3810 ICMPv6TypeMLDv2MulticastListenerReportMessageV2 = 143 )
const ( // DestinationUnreachable ICMPv6CodeNoRouteToDst = 0 ICMPv6CodeAdminProhibited = 1 ICMPv6CodeBeyondScopeOfSrc = 2 ICMPv6CodeAddressUnreachable = 3 ICMPv6CodePortUnreachable = 4 ICMPv6CodeSrcAddressFailedPolicy = 5 ICMPv6CodeRejectRouteToDst = 6 // TimeExceeded ICMPv6CodeHopLimitExceeded = 0 ICMPv6CodeFragmentReassemblyTimeExceeded = 1 // ParameterProblem ICMPv6CodeErroneousHeaderField = 0 ICMPv6CodeUnrecognizedNextHeader = 1 ICMPv6CodeUnrecognizedIPv6Option = 2 )
const ( // LCMShortHeaderMagic is the LCM small message header magic number LCMShortHeaderMagic uint32 = 0x4c433032 // LCMFragmentedHeaderMagic is the LCM fragmented message header magic number LCMFragmentedHeaderMagic uint32 = 0x4c433033 )
const ( LLDPCapsOther uint16 = 1 << 0 LLDPCapsRepeater uint16 = 1 << 1 LLDPCapsBridge uint16 = 1 << 2 LLDPCapsWLANAP uint16 = 1 << 3 LLDPCapsRouter uint16 = 1 << 4 LLDPCapsPhone uint16 = 1 << 5 LLDPCapsDocSis uint16 = 1 << 6 LLDPCapsStationOnly uint16 = 1 << 7 LLDPCapsCVLAN uint16 = 1 << 8 LLDPCapsSVLAN uint16 = 1 << 9 LLDPCapsTmpr uint16 = 1 << 10 )
LLDPCapabilities Types
const ( LLDP8021SubtypePortVLANID uint8 = 1 LLDP8021SubtypeProtocolVLANID uint8 = 2 LLDP8021SubtypeVLANName uint8 = 3 LLDP8021SubtypeProtocolIdentity uint8 = 4 LLDP8021SubtypeVDIUsageDigest uint8 = 5 LLDP8021SubtypeManagementVID uint8 = 6 LLDP8021SubtypeLinkAggregation uint8 = 7 )
/ IEEE 802.1 TLV Subtypes
const ( LLDPProtocolVLANIDCapability byte = 1 << 1 LLDPProtocolVLANIDStatus byte = 1 << 2 )
VLAN Port Protocol ID options
const ( LLDPAggregationCapability byte = 1 << 0 LLDPAggregationStatus byte = 1 << 1 )
LACP options
const ( LLDP8023SubtypeMACPHY uint8 = 1 LLDP8023SubtypeMDIPower uint8 = 2 LLDP8023SubtypeLinkAggregation uint8 = 3 LLDP8023SubtypeMTU uint8 = 4 )
IEEE 802.3 TLV Subtypes
const ( LLDPMACPHYCapability byte = 1 << 0 LLDPMACPHYStatus byte = 1 << 1 )
MACPHY options
const ( LLDPMAUTypeUnknown uint16 = 0 LLDPMAUTypeAUI uint16 = 1 LLDPMAUType10Base5 uint16 = 2 LLDPMAUTypeFOIRL uint16 = 3 LLDPMAUType10Base2 uint16 = 4 LLDPMAUType10BaseT uint16 = 5 LLDPMAUType10BaseFP uint16 = 6 LLDPMAUType10BaseFB uint16 = 7 LLDPMAUType10BaseFL uint16 = 8 LLDPMAUType10BROAD36 uint16 = 9 LLDPMAUType10BaseT_HD uint16 = 10 LLDPMAUType10BaseT_FD uint16 = 11 LLDPMAUType10BaseFL_HD uint16 = 12 LLDPMAUType10BaseFL_FD uint16 = 13 LLDPMAUType100BaseT4 uint16 = 14 LLDPMAUType100BaseTX_HD uint16 = 15 LLDPMAUType100BaseTX_FD uint16 = 16 LLDPMAUType100BaseFX_HD uint16 = 17 LLDPMAUType100BaseFX_FD uint16 = 18 LLDPMAUType100BaseT2_HD uint16 = 19 LLDPMAUType100BaseT2_FD uint16 = 20 LLDPMAUType1000BaseX_HD uint16 = 21 LLDPMAUType1000BaseX_FD uint16 = 22 LLDPMAUType1000BaseLX_HD uint16 = 23 LLDPMAUType1000BaseLX_FD uint16 = 24 LLDPMAUType1000BaseSX_HD uint16 = 25 LLDPMAUType1000BaseSX_FD uint16 = 26 LLDPMAUType1000BaseCX_HD uint16 = 27 LLDPMAUType1000BaseCX_FD uint16 = 28 LLDPMAUType1000BaseT_HD uint16 = 29 LLDPMAUType1000BaseT_FD uint16 = 30 LLDPMAUType10GBaseX uint16 = 31 LLDPMAUType10GBaseLX4 uint16 = 32 LLDPMAUType10GBaseR uint16 = 33 LLDPMAUType10GBaseER uint16 = 34 LLDPMAUType10GBaseLR uint16 = 35 LLDPMAUType10GBaseSR uint16 = 36 LLDPMAUType10GBaseW uint16 = 37 LLDPMAUType10GBaseEW uint16 = 38 LLDPMAUType10GBaseLW uint16 = 39 LLDPMAUType10GBaseSW uint16 = 40 LLDPMAUType10GBaseCX4 uint16 = 41 LLDPMAUType2BaseTL uint16 = 42 LLDPMAUType10PASS_TS uint16 = 43 LLDPMAUType100BaseBX10D uint16 = 44 LLDPMAUType100BaseBX10U uint16 = 45 LLDPMAUType100BaseLX10 uint16 = 46 LLDPMAUType1000BaseBX10D uint16 = 47 LLDPMAUType1000BaseBX10U uint16 = 48 LLDPMAUType1000BaseLX10 uint16 = 49 LLDPMAUType1000BasePX10D uint16 = 50 LLDPMAUType1000BasePX10U uint16 = 51 LLDPMAUType1000BasePX20D uint16 = 52 LLDPMAUType1000BasePX20U uint16 = 53 LLDPMAUType10GBaseT uint16 = 54 LLDPMAUType10GBaseLRM uint16 = 55 LLDPMAUType1000BaseKX uint16 = 56 LLDPMAUType10GBaseKX4 uint16 = 57 LLDPMAUType10GBaseKR uint16 = 58 LLDPMAUType10_1GBasePRX_D1 uint16 = 59 LLDPMAUType10_1GBasePRX_D2 uint16 = 60 LLDPMAUType10_1GBasePRX_D3 uint16 = 61 LLDPMAUType10_1GBasePRX_U1 uint16 = 62 LLDPMAUType10_1GBasePRX_U2 uint16 = 63 LLDPMAUType10_1GBasePRX_U3 uint16 = 64 LLDPMAUType10GBasePR_D1 uint16 = 65 LLDPMAUType10GBasePR_D2 uint16 = 66 LLDPMAUType10GBasePR_D3 uint16 = 67 LLDPMAUType10GBasePR_U1 uint16 = 68 LLDPMAUType10GBasePR_U3 uint16 = 69 )
From IANA-MAU-MIB (introduced by RFC 4836) - dot3MauType
const ( LLDPMAUPMDOther uint16 = 1 << 15 LLDPMAUPMD10BaseT uint16 = 1 << 14 LLDPMAUPMD10BaseT_FD uint16 = 1 << 13 LLDPMAUPMD100BaseT4 uint16 = 1 << 12 LLDPMAUPMD100BaseTX uint16 = 1 << 11 LLDPMAUPMD100BaseTX_FD uint16 = 1 << 10 LLDPMAUPMD100BaseT2 uint16 = 1 << 9 LLDPMAUPMD100BaseT2_FD uint16 = 1 << 8 LLDPMAUPMDFDXPAUSE uint16 = 1 << 7 LLDPMAUPMDFDXAPAUSE uint16 = 1 << 6 LLDPMAUPMDFDXSPAUSE uint16 = 1 << 5 LLDPMAUPMDFDXBPAUSE uint16 = 1 << 4 LLDPMAUPMD1000BaseX uint16 = 1 << 3 LLDPMAUPMD1000BaseX_FD uint16 = 1 << 2 LLDPMAUPMD1000BaseT uint16 = 1 << 1 LLDPMAUPMD1000BaseT_FD uint16 = 1 << 0 )
From RFC 3636 - ifMauAutoNegCapAdvertisedBits
const ( LLDPMAUPMDOtherInv uint16 = 1 << 0 LLDPMAUPMD10BaseTInv uint16 = 1 << 1 LLDPMAUPMD10BaseT_FDInv uint16 = 1 << 2 LLDPMAUPMD100BaseT4Inv uint16 = 1 << 3 LLDPMAUPMD100BaseTXInv uint16 = 1 << 4 LLDPMAUPMD100BaseTX_FDInv uint16 = 1 << 5 LLDPMAUPMD100BaseT2Inv uint16 = 1 << 6 LLDPMAUPMD100BaseT2_FDInv uint16 = 1 << 7 LLDPMAUPMDFDXPAUSEInv uint16 = 1 << 8 LLDPMAUPMDFDXAPAUSEInv uint16 = 1 << 9 LLDPMAUPMDFDXSPAUSEInv uint16 = 1 << 10 LLDPMAUPMDFDXBPAUSEInv uint16 = 1 << 11 LLDPMAUPMD1000BaseXInv uint16 = 1 << 12 LLDPMAUPMD1000BaseX_FDInv uint16 = 1 << 13 LLDPMAUPMD1000BaseTInv uint16 = 1 << 14 LLDPMAUPMD1000BaseT_FDInv uint16 = 1 << 15 )
Inverted ifMauAutoNegCapAdvertisedBits if required (Some manufacturers misinterpreted the spec - see https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1455)
const ( LLDPMDIPowerPortClass byte = 1 << 0 LLDPMDIPowerCapability byte = 1 << 1 LLDPMDIPowerStatus byte = 1 << 2 LLDPMDIPowerPairsAbility byte = 1 << 3 )
MDI Power options
const ( LLDP8021QbgEVB uint8 = 0 LLDP8021QbgCDCP uint8 = 1 LLDP8021QbgVDP uint8 = 2 LLDP8021QbgEVB22 uint8 = 13 )
IEEE 802.1Qbg TLV Subtypes
const ( LLDPEVBCapsSTD uint16 = 1 << 7 LLDPEVBCapsRR uint16 = 1 << 6 LLDPEVBCapsRTE uint16 = 1 << 2 LLDPEVBCapsECP uint16 = 1 << 1 LLDPEVBCapsVDP uint16 = 1 << 0 )
LLDPEVBCapabilities Types
const ( LLDPMediaCapsLLDP uint16 = 1 << 0 LLDPMediaCapsNetwork uint16 = 1 << 1 LLDPMediaCapsLocation uint16 = 1 << 2 LLDPMediaCapsPowerPSE uint16 = 1 << 3 LLDPMediaCapsPowerPD uint16 = 1 << 4 LLDPMediaCapsInventory uint16 = 1 << 5 )
LLDPMediaCapabilities Types
const ( LLDPCiscoPSESupport uint8 = 1 << 0 LLDPCiscoPDSparePair uint8 = 1 << 2 LLDPCiscoPSESparePair uint8 = 1 << 3 )
const ( RouterLSAtypeV2 = 0x1 RouterLSAtype = 0x2001 NetworkLSAtypeV2 = 0x2 NetworkLSAtype = 0x2002 SummaryLSANetworktypeV2 = 0x3 InterAreaPrefixLSAtype = 0x2003 SummaryLSAASBRtypeV2 = 0x4 InterAreaRouterLSAtype = 0x2004 ASExternalLSAtypeV2 = 0x5 ASExternalLSAtype = 0x4005 NSSALSAtype = 0x2007 NSSALSAtypeV2 = 0x7 LinkLSAtype = 0x0008 IntraAreaPrefixLSAtype = 0x2009 )
LSA Function Codes for LSAheader.LSType
const ( PrismType1MessageCode uint16 = 0x00000044 PrismType2MessageCode uint16 = 0x00000041 )
const ( RadioTapMCSFlagsBandwidthMask RadioTapMCSFlags = 0x03 RadioTapMCSFlagsShortGI = 0x04 RadioTapMCSFlagsGreenfield = 0x08 RadioTapMCSFlagsFECLDPC = 0x10 RadioTapMCSFlagsSTBCMask = 0x60 RadioTapMCSFlagsNESS0 = 0x80 )
const ( // RMCPVersion1 identifies RMCP v1.0 in the Version header field. Lower // values are considered legacy, while higher values are reserved by the // specification. RMCPVersion1 uint8 = 0x06 // RMCPNormal indicates a "normal" message, i.e. not an acknowledgement. RMCPNormal uint8 = 0 // RMCPAck indicates a message is acknowledging a received normal message. RMCPAck uint8 = 1 << 7 // RMCPClassASF identifies an RMCP message as containing an ASF-RMCP // payload. RMCPClassASF RMCPClass = 0x06 // RMCPClassIPMI identifies an RMCP message as containing an IPMI payload. RMCPClassIPMI RMCPClass = 0x07 // RMCPClassOEM identifies an RMCP message as containing an OEM-defined // payload. RMCPClassOEM RMCPClass = 0x08 )
const ( SCTPProtocolReserved SCTPPayloadProtocol = 0 SCTPPayloadUIA = 1 SCTPPayloadM2UA = 2 SCTPPayloadM3UA = 3 SCTPPayloadSUA = 4 SCTPPayloadM2PA = 5 SCTPPayloadV5UA = 6 SCTPPayloadH248 = 7 SCTPPayloadBICC = 8 SCTPPayloadTALI = 9 SCTPPayloadDUA = 10 SCTPPayloadASAP = 11 SCTPPayloadENRP = 12 SCTPPayloadH323 = 13 SCTPPayloadQIPC = 14 SCTPPayloadSIMCO = 15 SCTPPayloadDDPSegment = 16 SCTPPayloadDDPStream = 17 SCTPPayloadS1AP = 18 )
SCTPPayloadProtocol constonts from http://www.iana.org/assignments/sctp-parameters/sctp-parameters.xhtml
const ( TCPOptionKindEndList = 0 TCPOptionKindNop = 1 TCPOptionKindMSS = 2 // len = 4 TCPOptionKindWindowScale = 3 // len = 3 TCPOptionKindSACKPermitted = 4 // len = 2 TCPOptionKindSACK = 5 // len = n TCPOptionKindEcho = 6 // len = 6, obsolete TCPOptionKindEchoReply = 7 // len = 6, obsolete TCPOptionKindTimestamps = 8 // len = 10 TCPOptionKindPartialOrderConnectionPermitted = 9 // len = 2, obsolete TCPOptionKindPartialOrderServiceProfile = 10 // len = 3, obsolete TCPOptionKindCC = 11 // obsolete TCPOptionKindCCNew = 12 // obsolete TCPOptionKindCCEcho = 13 // obsolete TCPOptionKindAltChecksum = 14 // len = 3, obsolete TCPOptionKindAltChecksumData = 15 // len = n, obsolete )
const ( TLSAlertWarning TLSAlertLevel = 1 TLSAlertFatal TLSAlertLevel = 2 TLSAlertUnknownLevel TLSAlertLevel = 255 TLSAlertCloseNotify TLSAlertDescr = 0 TLSAlertUnexpectedMessage TLSAlertDescr = 10 TLSAlertBadRecordMac TLSAlertDescr = 20 TLSAlertDecryptionFailedRESERVED TLSAlertDescr = 21 TLSAlertRecordOverflow TLSAlertDescr = 22 TLSAlertDecompressionFailure TLSAlertDescr = 30 TLSAlertHandshakeFailure TLSAlertDescr = 40 TLSAlertNoCertificateRESERVED TLSAlertDescr = 41 TLSAlertBadCertificate TLSAlertDescr = 42 TLSAlertUnsupportedCertificate TLSAlertDescr = 43 TLSAlertCertificateRevoked TLSAlertDescr = 44 TLSAlertCertificateExpired TLSAlertDescr = 45 TLSAlertCertificateUnknown TLSAlertDescr = 46 TLSAlertIllegalParameter TLSAlertDescr = 47 TLSAlertUnknownCa TLSAlertDescr = 48 TLSAlertAccessDenied TLSAlertDescr = 49 TLSAlertDecodeError TLSAlertDescr = 50 TLSAlertDecryptError TLSAlertDescr = 51 TLSAlertExportRestrictionRESERVED TLSAlertDescr = 60 TLSAlertProtocolVersion TLSAlertDescr = 70 TLSAlertInsufficientSecurity TLSAlertDescr = 71 TLSAlertInternalError TLSAlertDescr = 80 TLSAlertUserCanceled TLSAlertDescr = 90 TLSAlertNoRenegotiation TLSAlertDescr = 100 TLSAlertUnsupportedExtension TLSAlertDescr = 110 TLSAlertUnknownDescription TLSAlertDescr = 255 )
const ( // ASFRMCPEnterprise is the IANA-assigned Enterprise Number of the ASF-RMCP. ASFRMCPEnterprise uint32 = 4542 )
const (
// IPv6HopByHopOptionJumbogram code as defined in RFC 2675
IPv6HopByHopOptionJumbogram = 0xC2
)
Variables ¶
var ( // ASFDataIdentifierPresencePong is the message type of the response to a // Presence Ping message. It indicates the sender is ASF-RMCP-aware. ASFDataIdentifierPresencePong = ASFDataIdentifier{ Enterprise: ASFRMCPEnterprise, Type: 0x40, } // ASFDataIdentifierPresencePing is a message type sent to a managed client // to solicit a Presence Pong response. Clients may ignore this if the RMCP // version is unsupported. Sending this message with a sequence number <255 // is the recommended way of finding out whether an implementation sends // RMCP ACKs (e.g. iDRAC does, Super Micro does not). // // Systems implementing IPMI must respond to this ping to conform to the // spec, so it is a good substitute for an ICMP ping. ASFDataIdentifierPresencePing = ASFDataIdentifier{ Enterprise: ASFRMCPEnterprise, Type: 0x80, } )
var ( // We use two different endpoint types for IPv4 vs IPv6 addresses, so that // ordering with endpointA.LessThan(endpointB) sanely groups all IPv4 // addresses and all IPv6 addresses, such that IPv6 > IPv4 for all addresses. EndpointIPv4 = gopacket.RegisterEndpointType(1, gopacket.EndpointTypeMetadata{Name: "IPv4", Formatter: func(b []byte) string { return net.IP(b).String() }}) EndpointIPv6 = gopacket.RegisterEndpointType(2, gopacket.EndpointTypeMetadata{Name: "IPv6", Formatter: func(b []byte) string { return net.IP(b).String() }}) EndpointMAC = gopacket.RegisterEndpointType(3, gopacket.EndpointTypeMetadata{Name: "MAC", Formatter: func(b []byte) string { return net.HardwareAddr(b).String() }}) EndpointTCPPort = gopacket.RegisterEndpointType(4, gopacket.EndpointTypeMetadata{Name: "TCP", Formatter: func(b []byte) string { return strconv.Itoa(int(binary.BigEndian.Uint16(b))) }}) EndpointUDPPort = gopacket.RegisterEndpointType(5, gopacket.EndpointTypeMetadata{Name: "UDP", Formatter: func(b []byte) string { return strconv.Itoa(int(binary.BigEndian.Uint16(b))) }}) EndpointSCTPPort = gopacket.RegisterEndpointType(6, gopacket.EndpointTypeMetadata{Name: "SCTP", Formatter: func(b []byte) string { return strconv.Itoa(int(binary.BigEndian.Uint16(b))) }}) EndpointRUDPPort = gopacket.RegisterEndpointType(7, gopacket.EndpointTypeMetadata{Name: "RUDP", Formatter: func(b []byte) string { return strconv.Itoa(int(b[0])) }}) EndpointUDPLitePort = gopacket.RegisterEndpointType(8, gopacket.EndpointTypeMetadata{Name: "UDPLite", Formatter: func(b []byte) string { return strconv.Itoa(int(binary.BigEndian.Uint16(b))) }}) EndpointPPP = gopacket.RegisterEndpointType(9, gopacket.EndpointTypeMetadata{Name: "PPP", Formatter: func([]byte) string { return "point" }}) )
var ( LayerTypeARP = gopacket.RegisterLayerType(10, gopacket.LayerTypeMetadata{Name: "ARP", Decoder: gopacket.DecodeFunc(decodeARP)}) LayerTypeCiscoDiscovery = gopacket.RegisterLayerType(11, gopacket.LayerTypeMetadata{Name: "CiscoDiscovery", Decoder: gopacket.DecodeFunc(decodeCiscoDiscovery)}) LayerTypeEthernetCTP = gopacket.RegisterLayerType(12, gopacket.LayerTypeMetadata{Name: "EthernetCTP", Decoder: gopacket.DecodeFunc(decodeEthernetCTP)}) LayerTypeEthernetCTPForwardData = gopacket.RegisterLayerType(13, gopacket.LayerTypeMetadata{Name: "EthernetCTPForwardData", Decoder: nil}) LayerTypeEthernetCTPReply = gopacket.RegisterLayerType(14, gopacket.LayerTypeMetadata{Name: "EthernetCTPReply", Decoder: nil}) LayerTypeDot1Q = gopacket.RegisterLayerType(15, gopacket.LayerTypeMetadata{Name: "Dot1Q", Decoder: gopacket.DecodeFunc(decodeDot1Q)}) LayerTypeEtherIP = gopacket.RegisterLayerType(16, gopacket.LayerTypeMetadata{Name: "EtherIP", Decoder: gopacket.DecodeFunc(decodeEtherIP)}) LayerTypeEthernet = gopacket.RegisterLayerType(17, gopacket.LayerTypeMetadata{Name: "Ethernet", Decoder: gopacket.DecodeFunc(decodeEthernet)}) LayerTypeGRE = gopacket.RegisterLayerType(18, gopacket.LayerTypeMetadata{Name: "GRE", Decoder: gopacket.DecodeFunc(decodeGRE)}) LayerTypeICMPv4 = gopacket.RegisterLayerType(19, gopacket.LayerTypeMetadata{Name: "ICMPv4", Decoder: gopacket.DecodeFunc(decodeICMPv4)}) LayerTypeIPv4 = gopacket.RegisterLayerType(20, gopacket.LayerTypeMetadata{Name: "IPv4", Decoder: gopacket.DecodeFunc(decodeIPv4)}) LayerTypeIPv6 = gopacket.RegisterLayerType(21, gopacket.LayerTypeMetadata{Name: "IPv6", Decoder: gopacket.DecodeFunc(decodeIPv6)}) LayerTypeLLC = gopacket.RegisterLayerType(22, gopacket.LayerTypeMetadata{Name: "LLC", Decoder: gopacket.DecodeFunc(decodeLLC)}) LayerTypeSNAP = gopacket.RegisterLayerType(23, gopacket.LayerTypeMetadata{Name: "SNAP", Decoder: gopacket.DecodeFunc(decodeSNAP)}) LayerTypeMPLS = gopacket.RegisterLayerType(24, gopacket.LayerTypeMetadata{Name: "MPLS", Decoder: gopacket.DecodeFunc(decodeMPLS)}) LayerTypePPP = gopacket.RegisterLayerType(25, gopacket.LayerTypeMetadata{Name: "PPP", Decoder: gopacket.DecodeFunc(decodePPP)}) LayerTypePPPoE = gopacket.RegisterLayerType(26, gopacket.LayerTypeMetadata{Name: "PPPoE", Decoder: gopacket.DecodeFunc(decodePPPoE)}) LayerTypeRUDP = gopacket.RegisterLayerType(27, gopacket.LayerTypeMetadata{Name: "RUDP", Decoder: gopacket.DecodeFunc(decodeRUDP)}) LayerTypeSCTP = gopacket.RegisterLayerType(28, gopacket.LayerTypeMetadata{Name: "SCTP", Decoder: gopacket.DecodeFunc(decodeSCTP)}) LayerTypeSCTPUnknownChunkType = gopacket.RegisterLayerType(29, gopacket.LayerTypeMetadata{Name: "SCTPUnknownChunkType", Decoder: nil}) LayerTypeSCTPData = gopacket.RegisterLayerType(30, gopacket.LayerTypeMetadata{Name: "SCTPData", Decoder: nil}) LayerTypeSCTPInit = gopacket.RegisterLayerType(31, gopacket.LayerTypeMetadata{Name: "SCTPInit", Decoder: nil}) LayerTypeSCTPSack = gopacket.RegisterLayerType(32, gopacket.LayerTypeMetadata{Name: "SCTPSack", Decoder: nil}) LayerTypeSCTPHeartbeat = gopacket.RegisterLayerType(33, gopacket.LayerTypeMetadata{Name: "SCTPHeartbeat", Decoder: nil}) LayerTypeSCTPError = gopacket.RegisterLayerType(34, gopacket.LayerTypeMetadata{Name: "SCTPError", Decoder: nil}) LayerTypeSCTPShutdown = gopacket.RegisterLayerType(35, gopacket.LayerTypeMetadata{Name: "SCTPShutdown", Decoder: nil}) LayerTypeSCTPShutdownAck = gopacket.RegisterLayerType(36, gopacket.LayerTypeMetadata{Name: "SCTPShutdownAck", Decoder: nil}) LayerTypeSCTPCookieEcho = gopacket.RegisterLayerType(37, gopacket.LayerTypeMetadata{Name: "SCTPCookieEcho", Decoder: nil}) LayerTypeSCTPEmptyLayer = gopacket.RegisterLayerType(38, gopacket.LayerTypeMetadata{Name: "SCTPEmptyLayer", Decoder: nil}) LayerTypeSCTPInitAck = gopacket.RegisterLayerType(39, gopacket.LayerTypeMetadata{Name: "SCTPInitAck", Decoder: nil}) LayerTypeSCTPHeartbeatAck = gopacket.RegisterLayerType(40, gopacket.LayerTypeMetadata{Name: "SCTPHeartbeatAck", Decoder: nil}) LayerTypeSCTPAbort = gopacket.RegisterLayerType(41, gopacket.LayerTypeMetadata{Name: "SCTPAbort", Decoder: nil}) LayerTypeSCTPShutdownComplete = gopacket.RegisterLayerType(42, gopacket.LayerTypeMetadata{Name: "SCTPShutdownComplete", Decoder: nil}) LayerTypeSCTPCookieAck = gopacket.RegisterLayerType(43, gopacket.LayerTypeMetadata{Name: "SCTPCookieAck", Decoder: nil}) LayerTypeTCP = gopacket.RegisterLayerType(44, gopacket.LayerTypeMetadata{Name: "TCP", Decoder: gopacket.DecodeFunc(decodeTCP)}) LayerTypeUDP = gopacket.RegisterLayerType(45, gopacket.LayerTypeMetadata{Name: "UDP", Decoder: gopacket.DecodeFunc(decodeUDP)}) LayerTypeIPv6HopByHop = gopacket.RegisterLayerType(46, gopacket.LayerTypeMetadata{Name: "IPv6HopByHop", Decoder: gopacket.DecodeFunc(decodeIPv6HopByHop)}) LayerTypeIPv6Routing = gopacket.RegisterLayerType(47, gopacket.LayerTypeMetadata{Name: "IPv6Routing", Decoder: gopacket.DecodeFunc(decodeIPv6Routing)}) LayerTypeIPv6Fragment = gopacket.RegisterLayerType(48, gopacket.LayerTypeMetadata{Name: "IPv6Fragment", Decoder: gopacket.DecodeFunc(decodeIPv6Fragment)}) LayerTypeIPv6Destination = gopacket.RegisterLayerType(49, gopacket.LayerTypeMetadata{Name: "IPv6Destination", Decoder: gopacket.DecodeFunc(decodeIPv6Destination)}) LayerTypeIPSecAH = gopacket.RegisterLayerType(50, gopacket.LayerTypeMetadata{Name: "IPSecAH", Decoder: gopacket.DecodeFunc(decodeIPSecAH)}) LayerTypeIPSecESP = gopacket.RegisterLayerType(51, gopacket.LayerTypeMetadata{Name: "IPSecESP", Decoder: gopacket.DecodeFunc(decodeIPSecESP)}) LayerTypeUDPLite = gopacket.RegisterLayerType(52, gopacket.LayerTypeMetadata{Name: "UDPLite", Decoder: gopacket.DecodeFunc(decodeUDPLite)}) LayerTypeFDDI = gopacket.RegisterLayerType(53, gopacket.LayerTypeMetadata{Name: "FDDI", Decoder: gopacket.DecodeFunc(decodeFDDI)}) LayerTypeLoopback = gopacket.RegisterLayerType(54, gopacket.LayerTypeMetadata{Name: "Loopback", Decoder: gopacket.DecodeFunc(decodeLoopback)}) LayerTypeEAP = gopacket.RegisterLayerType(55, gopacket.LayerTypeMetadata{Name: "EAP", Decoder: gopacket.DecodeFunc(decodeEAP)}) LayerTypeEAPOL = gopacket.RegisterLayerType(56, gopacket.LayerTypeMetadata{Name: "EAPOL", Decoder: gopacket.DecodeFunc(decodeEAPOL)}) LayerTypeICMPv6 = gopacket.RegisterLayerType(57, gopacket.LayerTypeMetadata{Name: "ICMPv6", Decoder: gopacket.DecodeFunc(decodeICMPv6)}) LayerTypeLinkLayerDiscovery = gopacket.RegisterLayerType(58, gopacket.LayerTypeMetadata{Name: "LinkLayerDiscovery", Decoder: gopacket.DecodeFunc(decodeLinkLayerDiscovery)}) LayerTypeCiscoDiscoveryInfo = gopacket.RegisterLayerType(59, gopacket.LayerTypeMetadata{Name: "CiscoDiscoveryInfo", Decoder: gopacket.DecodeFunc(decodeCiscoDiscoveryInfo)}) LayerTypeLinkLayerDiscoveryInfo = gopacket.RegisterLayerType(60, gopacket.LayerTypeMetadata{Name: "LinkLayerDiscoveryInfo", Decoder: nil}) LayerTypeNortelDiscovery = gopacket.RegisterLayerType(61, gopacket.LayerTypeMetadata{Name: "NortelDiscovery", Decoder: gopacket.DecodeFunc(decodeNortelDiscovery)}) LayerTypeIGMP = gopacket.RegisterLayerType(62, gopacket.LayerTypeMetadata{Name: "IGMP", Decoder: gopacket.DecodeFunc(decodeIGMP)}) LayerTypePFLog = gopacket.RegisterLayerType(63, gopacket.LayerTypeMetadata{Name: "PFLog", Decoder: gopacket.DecodeFunc(decodePFLog)}) LayerTypeRadioTap = gopacket.RegisterLayerType(64, gopacket.LayerTypeMetadata{Name: "RadioTap", Decoder: gopacket.DecodeFunc(decodeRadioTap)}) LayerTypeDot11 = gopacket.RegisterLayerType(65, gopacket.LayerTypeMetadata{Name: "Dot11", Decoder: gopacket.DecodeFunc(decodeDot11)}) LayerTypeDot11Ctrl = gopacket.RegisterLayerType(66, gopacket.LayerTypeMetadata{Name: "Dot11Ctrl", Decoder: gopacket.DecodeFunc(decodeDot11Ctrl)}) LayerTypeDot11Data = gopacket.RegisterLayerType(67, gopacket.LayerTypeMetadata{Name: "Dot11Data", Decoder: gopacket.DecodeFunc(decodeDot11Data)}) LayerTypeDot11DataCFAck = gopacket.RegisterLayerType(68, gopacket.LayerTypeMetadata{Name: "Dot11DataCFAck", Decoder: gopacket.DecodeFunc(decodeDot11DataCFAck)}) LayerTypeDot11DataCFPoll = gopacket.RegisterLayerType(69, gopacket.LayerTypeMetadata{Name: "Dot11DataCFPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataCFPoll)}) LayerTypeDot11DataCFAckPoll = gopacket.RegisterLayerType(70, gopacket.LayerTypeMetadata{Name: "Dot11DataCFAckPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataCFAckPoll)}) LayerTypeDot11DataNull = gopacket.RegisterLayerType(71, gopacket.LayerTypeMetadata{Name: "Dot11DataNull", Decoder: gopacket.DecodeFunc(decodeDot11DataNull)}) LayerTypeDot11DataCFAckNoData = gopacket.RegisterLayerType(72, gopacket.LayerTypeMetadata{Name: "Dot11DataCFAck", Decoder: gopacket.DecodeFunc(decodeDot11DataCFAck)}) LayerTypeDot11DataCFPollNoData = gopacket.RegisterLayerType(73, gopacket.LayerTypeMetadata{Name: "Dot11DataCFPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataCFPoll)}) LayerTypeDot11DataCFAckPollNoData = gopacket.RegisterLayerType(74, gopacket.LayerTypeMetadata{Name: "Dot11DataCFAckPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataCFAckPoll)}) LayerTypeDot11DataQOSData = gopacket.RegisterLayerType(75, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSData", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSData)}) LayerTypeDot11DataQOSDataCFAck = gopacket.RegisterLayerType(76, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSDataCFAck", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSDataCFAck)}) LayerTypeDot11DataQOSDataCFPoll = gopacket.RegisterLayerType(77, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSDataCFPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSDataCFPoll)}) LayerTypeDot11DataQOSDataCFAckPoll = gopacket.RegisterLayerType(78, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSDataCFAckPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSDataCFAckPoll)}) LayerTypeDot11DataQOSNull = gopacket.RegisterLayerType(79, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSNull", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSNull)}) LayerTypeDot11DataQOSCFPollNoData = gopacket.RegisterLayerType(80, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSCFPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSCFPollNoData)}) LayerTypeDot11DataQOSCFAckPollNoData = gopacket.RegisterLayerType(81, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSCFAckPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSCFAckPollNoData)}) LayerTypeDot11InformationElement = gopacket.RegisterLayerType(82, gopacket.LayerTypeMetadata{Name: "Dot11InformationElement", Decoder: gopacket.DecodeFunc(decodeDot11InformationElement)}) LayerTypeDot11CtrlCTS = gopacket.RegisterLayerType(83, gopacket.LayerTypeMetadata{Name: "Dot11CtrlCTS", Decoder: gopacket.DecodeFunc(decodeDot11CtrlCTS)}) LayerTypeDot11CtrlRTS = gopacket.RegisterLayerType(84, gopacket.LayerTypeMetadata{Name: "Dot11CtrlRTS", Decoder: gopacket.DecodeFunc(decodeDot11CtrlRTS)}) LayerTypeDot11CtrlBlockAckReq = gopacket.RegisterLayerType(85, gopacket.LayerTypeMetadata{Name: "Dot11CtrlBlockAckReq", Decoder: gopacket.DecodeFunc(decodeDot11CtrlBlockAckReq)}) LayerTypeDot11CtrlBlockAck = gopacket.RegisterLayerType(86, gopacket.LayerTypeMetadata{Name: "Dot11CtrlBlockAck", Decoder: gopacket.DecodeFunc(decodeDot11CtrlBlockAck)}) LayerTypeDot11CtrlPowersavePoll = gopacket.RegisterLayerType(87, gopacket.LayerTypeMetadata{Name: "Dot11CtrlPowersavePoll", Decoder: gopacket.DecodeFunc(decodeDot11CtrlPowersavePoll)}) LayerTypeDot11CtrlAck = gopacket.RegisterLayerType(88, gopacket.LayerTypeMetadata{Name: "Dot11CtrlAck", Decoder: gopacket.DecodeFunc(decodeDot11CtrlAck)}) LayerTypeDot11CtrlCFEnd = gopacket.RegisterLayerType(89, gopacket.LayerTypeMetadata{Name: "Dot11CtrlCFEnd", Decoder: gopacket.DecodeFunc(decodeDot11CtrlCFEnd)}) LayerTypeDot11CtrlCFEndAck = gopacket.RegisterLayerType(90, gopacket.LayerTypeMetadata{Name: "Dot11CtrlCFEndAck", Decoder: gopacket.DecodeFunc(decodeDot11CtrlCFEndAck)}) LayerTypeDot11MgmtAssociationReq = gopacket.RegisterLayerType(91, gopacket.LayerTypeMetadata{Name: "Dot11MgmtAssociationReq", Decoder: gopacket.DecodeFunc(decodeDot11MgmtAssociationReq)}) LayerTypeDot11MgmtAssociationResp = gopacket.RegisterLayerType(92, gopacket.LayerTypeMetadata{Name: "Dot11MgmtAssociationResp", Decoder: gopacket.DecodeFunc(decodeDot11MgmtAssociationResp)}) LayerTypeDot11MgmtReassociationReq = gopacket.RegisterLayerType(93, gopacket.LayerTypeMetadata{Name: "Dot11MgmtReassociationReq", Decoder: gopacket.DecodeFunc(decodeDot11MgmtReassociationReq)}) LayerTypeDot11MgmtReassociationResp = gopacket.RegisterLayerType(94, gopacket.LayerTypeMetadata{Name: "Dot11MgmtReassociationResp", Decoder: gopacket.DecodeFunc(decodeDot11MgmtReassociationResp)}) LayerTypeDot11MgmtProbeReq = gopacket.RegisterLayerType(95, gopacket.LayerTypeMetadata{Name: "Dot11MgmtProbeReq", Decoder: gopacket.DecodeFunc(decodeDot11MgmtProbeReq)}) LayerTypeDot11MgmtProbeResp = gopacket.RegisterLayerType(96, gopacket.LayerTypeMetadata{Name: "Dot11MgmtProbeResp", Decoder: gopacket.DecodeFunc(decodeDot11MgmtProbeResp)}) LayerTypeDot11MgmtMeasurementPilot = gopacket.RegisterLayerType(97, gopacket.LayerTypeMetadata{Name: "Dot11MgmtMeasurementPilot", Decoder: gopacket.DecodeFunc(decodeDot11MgmtMeasurementPilot)}) LayerTypeDot11MgmtBeacon = gopacket.RegisterLayerType(98, gopacket.LayerTypeMetadata{Name: "Dot11MgmtBeacon", Decoder: gopacket.DecodeFunc(decodeDot11MgmtBeacon)}) LayerTypeDot11MgmtATIM = gopacket.RegisterLayerType(99, gopacket.LayerTypeMetadata{Name: "Dot11MgmtATIM", Decoder: gopacket.DecodeFunc(decodeDot11MgmtATIM)}) LayerTypeDot11MgmtDisassociation = gopacket.RegisterLayerType(100, gopacket.LayerTypeMetadata{Name: "Dot11MgmtDisassociation", Decoder: gopacket.DecodeFunc(decodeDot11MgmtDisassociation)}) LayerTypeDot11MgmtAuthentication = gopacket.RegisterLayerType(101, gopacket.LayerTypeMetadata{Name: "Dot11MgmtAuthentication", Decoder: gopacket.DecodeFunc(decodeDot11MgmtAuthentication)}) LayerTypeDot11MgmtDeauthentication = gopacket.RegisterLayerType(102, gopacket.LayerTypeMetadata{Name: "Dot11MgmtDeauthentication", Decoder: gopacket.DecodeFunc(decodeDot11MgmtDeauthentication)}) LayerTypeDot11MgmtAction = gopacket.RegisterLayerType(103, gopacket.LayerTypeMetadata{Name: "Dot11MgmtAction", Decoder: gopacket.DecodeFunc(decodeDot11MgmtAction)}) LayerTypeDot11MgmtActionNoAck = gopacket.RegisterLayerType(104, gopacket.LayerTypeMetadata{Name: "Dot11MgmtActionNoAck", Decoder: gopacket.DecodeFunc(decodeDot11MgmtActionNoAck)}) LayerTypeDot11MgmtArubaWLAN = gopacket.RegisterLayerType(105, gopacket.LayerTypeMetadata{Name: "Dot11MgmtArubaWLAN", Decoder: gopacket.DecodeFunc(decodeDot11MgmtArubaWLAN)}) LayerTypeDot11WEP = gopacket.RegisterLayerType(106, gopacket.LayerTypeMetadata{Name: "Dot11WEP", Decoder: gopacket.DecodeFunc(decodeDot11WEP)}) LayerTypeDNS = gopacket.RegisterLayerType(107, gopacket.LayerTypeMetadata{Name: "DNS", Decoder: gopacket.DecodeFunc(decodeDNS)}) LayerTypeUSB = gopacket.RegisterLayerType(108, gopacket.LayerTypeMetadata{Name: "USB", Decoder: gopacket.DecodeFunc(decodeUSB)}) LayerTypeUSBRequestBlockSetup = gopacket.RegisterLayerType(109, gopacket.LayerTypeMetadata{Name: "USBRequestBlockSetup", Decoder: gopacket.DecodeFunc(decodeUSBRequestBlockSetup)}) LayerTypeUSBControl = gopacket.RegisterLayerType(110, gopacket.LayerTypeMetadata{Name: "USBControl", Decoder: gopacket.DecodeFunc(decodeUSBControl)}) LayerTypeUSBInterrupt = gopacket.RegisterLayerType(111, gopacket.LayerTypeMetadata{Name: "USBInterrupt", Decoder: gopacket.DecodeFunc(decodeUSBInterrupt)}) LayerTypeUSBBulk = gopacket.RegisterLayerType(112, gopacket.LayerTypeMetadata{Name: "USBBulk", Decoder: gopacket.DecodeFunc(decodeUSBBulk)}) LayerTypeLinuxSLL = gopacket.RegisterLayerType(113, gopacket.LayerTypeMetadata{Name: "Linux SLL", Decoder: gopacket.DecodeFunc(decodeLinuxSLL)}) LayerTypeSFlow = gopacket.RegisterLayerType(114, gopacket.LayerTypeMetadata{Name: "SFlow", Decoder: gopacket.DecodeFunc(decodeSFlow)}) LayerTypePrismHeader = gopacket.RegisterLayerType(115, gopacket.LayerTypeMetadata{Name: "Prism monitor mode header", Decoder: gopacket.DecodeFunc(decodePrismHeader)}) LayerTypeVXLAN = gopacket.RegisterLayerType(116, gopacket.LayerTypeMetadata{Name: "VXLAN", Decoder: gopacket.DecodeFunc(decodeVXLAN)}) LayerTypeNTP = gopacket.RegisterLayerType(117, gopacket.LayerTypeMetadata{Name: "NTP", Decoder: gopacket.DecodeFunc(decodeNTP)}) LayerTypeDHCPv4 = gopacket.RegisterLayerType(118, gopacket.LayerTypeMetadata{Name: "DHCPv4", Decoder: gopacket.DecodeFunc(decodeDHCPv4)}) LayerTypeVRRP = gopacket.RegisterLayerType(119, gopacket.LayerTypeMetadata{Name: "VRRP", Decoder: gopacket.DecodeFunc(decodeVRRP)}) LayerTypeGeneve = gopacket.RegisterLayerType(120, gopacket.LayerTypeMetadata{Name: "Geneve", Decoder: gopacket.DecodeFunc(decodeGeneve)}) LayerTypeSTP = gopacket.RegisterLayerType(121, gopacket.LayerTypeMetadata{Name: "STP", Decoder: gopacket.DecodeFunc(decodeSTP)}) LayerTypeBFD = gopacket.RegisterLayerType(122, gopacket.LayerTypeMetadata{Name: "BFD", Decoder: gopacket.DecodeFunc(decodeBFD)}) LayerTypeOSPF = gopacket.RegisterLayerType(123, gopacket.LayerTypeMetadata{Name: "OSPF", Decoder: gopacket.DecodeFunc(decodeOSPF)}) LayerTypeICMPv6RouterSolicitation = gopacket.RegisterLayerType(124, gopacket.LayerTypeMetadata{Name: "ICMPv6RouterSolicitation", Decoder: gopacket.DecodeFunc(decodeICMPv6RouterSolicitation)}) LayerTypeICMPv6RouterAdvertisement = gopacket.RegisterLayerType(125, gopacket.LayerTypeMetadata{Name: "ICMPv6RouterAdvertisement", Decoder: gopacket.DecodeFunc(decodeICMPv6RouterAdvertisement)}) LayerTypeICMPv6NeighborSolicitation = gopacket.RegisterLayerType(126, gopacket.LayerTypeMetadata{Name: "ICMPv6NeighborSolicitation", Decoder: gopacket.DecodeFunc(decodeICMPv6NeighborSolicitation)}) LayerTypeICMPv6NeighborAdvertisement = gopacket.RegisterLayerType(127, gopacket.LayerTypeMetadata{Name: "ICMPv6NeighborAdvertisement", Decoder: gopacket.DecodeFunc(decodeICMPv6NeighborAdvertisement)}) LayerTypeICMPv6Redirect = gopacket.RegisterLayerType(128, gopacket.LayerTypeMetadata{Name: "ICMPv6Redirect", Decoder: gopacket.DecodeFunc(decodeICMPv6Redirect)}) LayerTypeGTPv1U = gopacket.RegisterLayerType(129, gopacket.LayerTypeMetadata{Name: "GTPv1U", Decoder: gopacket.DecodeFunc(decodeGTPv1u)}) LayerTypeEAPOLKey = gopacket.RegisterLayerType(130, gopacket.LayerTypeMetadata{Name: "EAPOLKey", Decoder: gopacket.DecodeFunc(decodeEAPOLKey)}) LayerTypeLCM = gopacket.RegisterLayerType(131, gopacket.LayerTypeMetadata{Name: "LCM", Decoder: gopacket.DecodeFunc(decodeLCM)}) LayerTypeICMPv6Echo = gopacket.RegisterLayerType(132, gopacket.LayerTypeMetadata{Name: "ICMPv6Echo", Decoder: gopacket.DecodeFunc(decodeICMPv6Echo)}) LayerTypeSIP = gopacket.RegisterLayerType(133, gopacket.LayerTypeMetadata{Name: "SIP", Decoder: gopacket.DecodeFunc(decodeSIP)}) LayerTypeDHCPv6 = gopacket.RegisterLayerType(134, gopacket.LayerTypeMetadata{Name: "DHCPv6", Decoder: gopacket.DecodeFunc(decodeDHCPv6)}) LayerTypeMLDv1MulticastListenerReport = gopacket.RegisterLayerType(135, gopacket.LayerTypeMetadata{Name: "MLDv1MulticastListenerReport", Decoder: gopacket.DecodeFunc(decodeMLDv1MulticastListenerReport)}) LayerTypeMLDv1MulticastListenerDone = gopacket.RegisterLayerType(136, gopacket.LayerTypeMetadata{Name: "MLDv1MulticastListenerDone", Decoder: gopacket.DecodeFunc(decodeMLDv1MulticastListenerDone)}) LayerTypeMLDv1MulticastListenerQuery = gopacket.RegisterLayerType(137, gopacket.LayerTypeMetadata{Name: "MLDv1MulticastListenerQuery", Decoder: gopacket.DecodeFunc(decodeMLDv1MulticastListenerQuery)}) LayerTypeMLDv2MulticastListenerReport = gopacket.RegisterLayerType(138, gopacket.LayerTypeMetadata{Name: "MLDv2MulticastListenerReport", Decoder: gopacket.DecodeFunc(decodeMLDv2MulticastListenerReport)}) LayerTypeMLDv2MulticastListenerQuery = gopacket.RegisterLayerType(139, gopacket.LayerTypeMetadata{Name: "MLDv2MulticastListenerQuery", Decoder: gopacket.DecodeFunc(decodeMLDv2MulticastListenerQuery)}) LayerTypeTLS = gopacket.RegisterLayerType(140, gopacket.LayerTypeMetadata{Name: "TLS", Decoder: gopacket.DecodeFunc(decodeTLS)}) LayerTypeModbusTCP = gopacket.RegisterLayerType(141, gopacket.LayerTypeMetadata{Name: "ModbusTCP", Decoder: gopacket.DecodeFunc(decodeModbusTCP)}) LayerTypeRMCP = gopacket.RegisterLayerType(142, gopacket.LayerTypeMetadata{Name: "RMCP", Decoder: gopacket.DecodeFunc(decodeRMCP)}) LayerTypeASF = gopacket.RegisterLayerType(143, gopacket.LayerTypeMetadata{Name: "ASF", Decoder: gopacket.DecodeFunc(decodeASF)}) LayerTypeASFPresencePong = gopacket.RegisterLayerType(144, gopacket.LayerTypeMetadata{Name: "ASFPresencePong", Decoder: gopacket.DecodeFunc(decodeASFPresencePong)}) LayerTypeERSPANII = gopacket.RegisterLayerType(145, gopacket.LayerTypeMetadata{Name: "ERSPAN Type II", Decoder: gopacket.DecodeFunc(decodeERSPANII)}) LayerTypeRADIUS = gopacket.RegisterLayerType(146, gopacket.LayerTypeMetadata{Name: "RADIUS", Decoder: gopacket.DecodeFunc(decodeRADIUS)}) )
var ( // LayerClassIPNetwork contains TCP/IP network layer types. LayerClassIPNetwork = gopacket.NewLayerClass([]gopacket.LayerType{ LayerTypeIPv4, LayerTypeIPv6, }) // LayerClassIPTransport contains TCP/IP transport layer types. LayerClassIPTransport = gopacket.NewLayerClass([]gopacket.LayerType{ LayerTypeTCP, LayerTypeUDP, LayerTypeSCTP, }) // LayerClassIPControl contains TCP/IP control protocols. LayerClassIPControl = gopacket.NewLayerClass([]gopacket.LayerType{ LayerTypeICMPv4, LayerTypeICMPv6, }) // LayerClassSCTPChunk contains SCTP chunk types (not the top-level SCTP // layer). LayerClassSCTPChunk = gopacket.NewLayerClass([]gopacket.LayerType{ LayerTypeSCTPUnknownChunkType, LayerTypeSCTPData, LayerTypeSCTPInit, LayerTypeSCTPSack, LayerTypeSCTPHeartbeat, LayerTypeSCTPError, LayerTypeSCTPShutdown, LayerTypeSCTPShutdownAck, LayerTypeSCTPCookieEcho, LayerTypeSCTPEmptyLayer, LayerTypeSCTPInitAck, LayerTypeSCTPHeartbeatAck, LayerTypeSCTPAbort, LayerTypeSCTPShutdownComplete, LayerTypeSCTPCookieAck, }) // LayerClassIPv6Extension contains IPv6 extension headers. LayerClassIPv6Extension = gopacket.NewLayerClass([]gopacket.LayerType{ LayerTypeIPv6HopByHop, LayerTypeIPv6Routing, LayerTypeIPv6Fragment, LayerTypeIPv6Destination, }) LayerClassIPSec = gopacket.NewLayerClass([]gopacket.LayerType{ LayerTypeIPSecAH, LayerTypeIPSecESP, }) // LayerClassICMPv6NDP contains ICMPv6 neighbor discovery protocol // messages. LayerClassICMPv6NDP = gopacket.NewLayerClass([]gopacket.LayerType{ LayerTypeICMPv6RouterSolicitation, LayerTypeICMPv6RouterAdvertisement, LayerTypeICMPv6NeighborSolicitation, LayerTypeICMPv6NeighborAdvertisement, LayerTypeICMPv6Redirect, }) // LayerClassMLDv1 contains multicast listener discovery protocol LayerClassMLDv1 = gopacket.NewLayerClass([]gopacket.LayerType{ LayerTypeMLDv1MulticastListenerQuery, LayerTypeMLDv1MulticastListenerReport, LayerTypeMLDv1MulticastListenerDone, }) // LayerClassMLDv2 contains multicast listener discovery protocol v2 LayerClassMLDv2 = gopacket.NewLayerClass([]gopacket.LayerType{ LayerTypeMLDv1MulticastListenerReport, LayerTypeMLDv1MulticastListenerDone, LayerTypeMLDv2MulticastListenerReport, LayerTypeMLDv1MulticastListenerQuery, LayerTypeMLDv2MulticastListenerQuery, }) )
var DHCPMagic uint32 = 0x63825363
DHCPMagic is the RFC 2131 "magic cooke" for DHCP.
var Dot11TypeMetadata [256]EnumMetadata
var EAPOLTypeMetadata [256]EnumMetadata
var ErrPrismExpectedMoreData = errors.New("Expected more data.")
var ErrPrismInvalidCode = errors.New("Invalid header code.")
var EthernetBroadcast = net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
EthernetBroadcast is the broadcast MAC address used by Ethernet.
var EthernetTypeMetadata [65536]EnumMetadata
var FDDIFrameControlMetadata [256]EnumMetadata
var IPProtocolMetadata [256]EnumMetadata
var LinkTypeMetadata [256]EnumMetadata
var MPLSPayloadDecoder gopacket.Decoder = ProtocolGuessingDecoder{}
MPLSPayloadDecoder is the decoder used to data encapsulated by each MPLS layer. MPLS contains no type information, so we have to explicitly decide which decoder to use. This is initially set to ProtocolGuessingDecoder, our simple attempt at guessing protocols based on the first few bytes of data available to us. However, if you know that in your environment MPLS always encapsulates a specific protocol, you may reset this.
var PPPEndpoint = gopacket.NewEndpoint(EndpointPPP, nil)
PPPEndpoint is a singleton endpoint for PPP. Since there is no actual addressing for the two ends of a PPP connection, we use a singleton value named 'point' for each endpoint.
var PPPFlow = gopacket.NewFlow(EndpointPPP, nil, nil)
PPPFlow is a singleton flow for PPP. Since there is no actual addressing for the two ends of a PPP connection, we use a singleton value to represent the flow for all PPP connections.
var PPPTypeMetadata [65536]EnumMetadata
var PPPoECodeMetadata [256]EnumMetadata
var ProtocolFamilyMetadata [256]EnumMetadata
var RUDPPortNames = map[RUDPPort]string{}
RUDPPortNames contains the string names for all RUDP ports.
var SCTPChunkTypeMetadata [256]EnumMetadata
var SCTPPortNames = sctpPortNames
SCTPPortNames contains the port names for all SCTP ports.
var TCPPortNames = tcpPortNames
TCPPortNames contains the port names for all TCP ports.
var UDPLitePortNames = map[UDPLitePort]string{}
UDPLitePortNames contains the string names for all UDPLite ports.
var UDPPortNames = udpPortNames
UDPPortNames contains the port names for all UDP ports.
var USBTransportTypeMetadata [256]EnumMetadata
Functions ¶
func FuzzLayer ¶ added in v1.1.18
FuzzLayer is a fuzz target for the layers package of gopacket A fuzz target is a function processing a binary blob (byte slice) The process here is to interpret this data as a packet, and print the layers contents. The decoding options and the starting layer are encoded in the first bytes. The function returns 1 if this is a valid packet (no error layer)
func GetLCMLayerType ¶ added in v1.1.15
func GetLCMLayerType(fingerprint LCMFingerprint) gopacket.LayerType
GetLCMLayerType returns the underlying LCM message's LayerType. This LayerType has to be registered by using RegisterLCMLayerType.
func NewIPEndpoint ¶
NewIPEndpoint creates a new IP (v4 or v6) endpoint from a net.IP address. It returns gopacket.InvalidEndpoint if the IP address is invalid.
func NewMACEndpoint ¶
func NewMACEndpoint(a net.HardwareAddr) gopacket.Endpoint
NewMACEndpoint returns a new MAC address endpoint.
func NewRUDPPortEndpoint ¶
NewRUDPPortEndpoint returns an endpoint based on a RUDP port.
func NewSCTPPortEndpoint ¶
NewSCTPPortEndpoint returns an endpoint based on a SCTP port.
func NewTCPPortEndpoint ¶
NewTCPPortEndpoint returns an endpoint based on a TCP port.
func NewUDPLitePortEndpoint ¶
func NewUDPLitePortEndpoint(p UDPLitePort) gopacket.Endpoint
NewUDPLitePortEndpoint returns an endpoint based on a UDPLite port.
func NewUDPPortEndpoint ¶
NewUDPPortEndpoint returns an endpoint based on a UDP port.
func RegisterASFLayerType ¶ added in v1.1.18
func RegisterASFLayerType(a ASFDataIdentifier, l gopacket.LayerType)
RegisterASFLayerType allows specifying that the data block of ASF packets with a given enterprise number and type should be processed by a given layer type. This overrides any existing registrations, including defaults.
func RegisterLCMLayerType ¶ added in v1.1.15
func RegisterLCMLayerType(num int, name string, fingerprint LCMFingerprint, decoder gopacket.Decoder) gopacket.LayerType
RegisterLCMLayerType allows users to register decoders for the underlying LCM payload. This is done based on the fingerprint that every LCM message contains and which identifies it uniquely. If num is not the zero value it will be used when registering with RegisterLayerType towards gopacket, otherwise an incremental value starting from 1001 will be used.
func RegisterRMCPLayerType ¶ added in v1.1.18
RegisterRMCPLayerType allows specifying that the payload of a RMCP packet of a certain class should processed by the provided layer type. This overrides any existing registrations, including defaults.
func RegisterTCPPortLayerType ¶ added in v1.1.13
RegisterTCPPortLayerType creates a new mapping between a TCPPort and an underlaying LayerType.
func RegisterUDPPortLayerType ¶ added in v1.1.13
RegisterUDPPortLayerType creates a new mapping between a UDPPort and an underlaying LayerType.
Types ¶
type ARP ¶
type ARP struct { BaseLayer AddrType LinkType Protocol EthernetType HwAddressSize uint8 ProtAddressSize uint8 Operation uint16 SourceHwAddress []byte SourceProtAddress []byte DstHwAddress []byte DstProtAddress []byte }
ARP is a ARP packet header.
func (*ARP) CanDecode ¶
func (arp *ARP) CanDecode() gopacket.LayerClass
CanDecode returns the set of layer types that this DecodingLayer can decode.
func (*ARP) DecodeFromBytes ¶
func (arp *ARP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
DecodeFromBytes decodes the given bytes into this layer.
func (*ARP) NextLayerType ¶
NextLayerType returns the layer type contained by this DecodingLayer.
func (*ARP) SerializeTo ¶ added in v1.0.1
func (arp *ARP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
SerializeTo writes the serialized form of this layer into the SerializationBuffer, implementing gopacket.SerializableLayer. See the docs for gopacket.SerializableLayer for more info.
type ASExternalLSA ¶ added in v1.1.15
type ASExternalLSA struct { Flags uint8 Metric uint32 PrefixLength uint8 PrefixOptions uint8 RefLSType uint16 AddressPrefix []byte ForwardingAddress []byte ExternalRouteTag uint32 RefLinkStateID uint32 }
ASExternalLSA is the struct from RFC 5340 A.4.7.
type ASExternalLSAV2 ¶ added in v1.1.15
type ASExternalLSAV2 struct { NetworkMask uint32 ExternalBit uint8 Metric uint32 ForwardingAddress uint32 ExternalRouteTag uint32 }
ASExternalLSAV2 is the struct from RFC 2328 A.4.5.
type ASF ¶ added in v1.1.18
type ASF struct { BaseLayer ASFDataIdentifier // Tag is used to match request/response pairs. The tag of a response is set // to that of the message it is responding to. If a message is // unidirectional, i.e. not part of a request/response pair, this is set to // 255. Tag uint8 // Length is the length of this layer's payload in bytes. Length uint8 }
ASF defines ASF's generic RMCP message Data block format. See section 3.2.2.3.
func (*ASF) CanDecode ¶ added in v1.1.18
func (a *ASF) CanDecode() gopacket.LayerClass
CanDecode returns LayerTypeASF. It partially satisfies DecodingLayer.
func (*ASF) DecodeFromBytes ¶ added in v1.1.18
func (a *ASF) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
DecodeFromBytes makes the layer represent the provided bytes. It partially satisfies DecodingLayer.
func (*ASF) LayerType ¶ added in v1.1.18
LayerType returns LayerTypeASF. It partially satisfies Layer and SerializableLayer.
func (*ASF) NextLayerType ¶ added in v1.1.18
NextLayerType returns the layer type corresponding to the message type of this ASF data layer. This partially satisfies DecodingLayer.
func (*ASF) SerializeTo ¶ added in v1.1.18
func (a *ASF) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
SerializeTo writes the serialized fom of this layer into the SerializeBuffer, partially satisfying SerializableLayer.
type ASFDataIdentifier ¶ added in v1.1.18
type ASFDataIdentifier struct { // Enterprise is the IANA Enterprise Number associated with the entity that // defines the message type. A list can be found at // https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers. // This can be thought of as the namespace for the message type. Enterprise uint32 // Type is the message type, defined by the entity associated with the // enterprise above. No pressure, but in the context of EN 4542, 1 byte is // the difference between sending a ping and telling a machine to do an // unconditional power down (0x80 and 0x12 respectively). Type uint8 }
ASFDataIdentifier encapsulates fields used to uniquely identify the format of the data block.
While the enterprise number is almost always 4542 (ASF-RMCP), we support registering layers using structs of this type as a key in case any users are using OEM-extensions.
func (ASFDataIdentifier) LayerType ¶ added in v1.1.18
func (a ASFDataIdentifier) LayerType() gopacket.LayerType
LayerType returns the payload layer type corresponding to an ASF message type.
type ASFEntity ¶ added in v1.1.18
type ASFEntity uint8
ASFEntity is the type of individual entities that a Presence Pong response can indicate support of. The entities currently implemented by the spec are IPMI and ASFv1.
type ASFInteraction ¶ added in v1.1.18
type ASFInteraction uint8
ASFInteraction is the type of individual interactions that a Presence Pong response can indicate support for. The interactions currently implemented by the spec are RMCP security extensions. Although not specified, IPMI uses this field to indicate support for DASH, which is supported as well.
type ASFPresencePong ¶ added in v1.1.18
type ASFPresencePong struct { BaseLayer // Enterprise is the IANA Enterprise Number of an entity that has defined // OEM-specific capabilities for the managed client. If no such capabilities // exist, this is set to ASF's IANA Enterprise Number. Enterprise uint32 // OEM identifies OEM-specific capabilities. Its structure is defined by the // OEM. This is set to 0s if no OEM-specific capabilities exist. This // implementation does not change byte order from the wire for this field. OEM [4]byte // IPMI is true if IPMI is supported by the managed system. There is no // explicit version in the specification, however given the dates, this is // assumed to be IPMI v1.0. Support for IPMI is contained in the "supported // entities" field of the presence pong payload. IPMI bool // ASFv1 indicates support for ASF v1.0. This seems somewhat redundant as // ASF must be supported in order to receive a response. This is contained // in the "supported entities" field of the presence pong payload. ASFv1 bool // SecurityExtensions indicates support for RMCP Security Extensions, // specified in ASF v2.0. This will always be false for v1.x // implementations. This is contained in the "supported interactions" field // of the presence pong payload. This field is defined in ASF v1.0, but has // no useful value. SecurityExtensions bool // DASH is true if DMTF DASH is supported. This is not specified in ASF // v2.0, but in IPMI v2.0, however the former does not preclude it, so we // support it. DASH bool }
ASFPresencePong defines the structure of a Presence Pong message's payload. See section 3.2.4.3.
func (*ASFPresencePong) CanDecode ¶ added in v1.1.18
func (a *ASFPresencePong) CanDecode() gopacket.LayerClass
CanDecode returns LayerTypeASFPresencePong. It partially satisfies DecodingLayer.
func (*ASFPresencePong) DecodeFromBytes ¶ added in v1.1.18
func (a *ASFPresencePong) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
DecodeFromBytes makes the layer represent the provided bytes. It partially satisfies DecodingLayer.
func (*ASFPresencePong) LayerType ¶ added in v1.1.18
func (*ASFPresencePong) LayerType() gopacket.LayerType
LayerType returns LayerTypeASFPresencePong. It partially satisfies Layer and SerializableLayer.
func (*ASFPresencePong) NextLayerType ¶ added in v1.1.18
func (a *ASFPresencePong) NextLayerType() gopacket.LayerType
NextLayerType returns LayerTypePayload, as there are no further layers to decode. This partially satisfies DecodingLayer.
func (*ASFPresencePong) SerializeTo ¶ added in v1.1.18
func (a *ASFPresencePong) SerializeTo(b gopacket.SerializeBuffer, _ gopacket.SerializeOptions) error
SerializeTo writes the serialized fom of this layer into the SerializeBuffer, partially satisfying SerializableLayer.
func (*ASFPresencePong) SupportsDCMI ¶ added in v1.1.18
func (a *ASFPresencePong) SupportsDCMI() bool
SupportsDCMI returns whether the Presence Pong message indicates support for the Data Center Management Interface, which is an extension of IPMI v2.0.
type BFD ¶ added in v1.1.15
type BFD struct { BaseLayer // Stores the packet bytes and payload bytes. Version BFDVersion // Version of the BFD protocol. Diagnostic BFDDiagnostic // Diagnostic code for last state change State BFDState // Current state Poll bool // Requesting verification Final bool // Responding to a received BFD Control packet that had the Poll (P) bit set. ControlPlaneIndependent bool // BFD implementation does not share fate with its control plane AuthPresent bool // Authentication Section is present and the session is to be authenticated Demand bool // Demand mode is active Multipoint bool // For future point-to-multipoint extensions. Must always be zero DetectMultiplier BFDDetectMultiplier // Detection time multiplier MyDiscriminator BFDDiscriminator // A unique, nonzero discriminator value YourDiscriminator BFDDiscriminator // discriminator received from the remote system. DesiredMinTxInterval BFDTimeInterval // Minimum interval, in microseconds, the local system would like to use when transmitting BFD Control packets RequiredMinRxInterval BFDTimeInterval // Minimum interval, in microseconds, between received BFD Control packets that this system is capable of supporting RequiredMinEchoRxInterval BFDTimeInterval // Minimum interval, in microseconds, between received BFD Echo packets that this system is capable of supporting AuthHeader *BFDAuthHeader // Authentication data, variable length. }
BFD represents a BFD control message packet whose payload contains the control information required to for a BFD session.
References ----------
Wikipedia's BFD entry:
https://en.wikipedia.org/wiki/Bidirectional_Forwarding_Detection This is the best place to get an overview of BFD.
RFC 5880 "Bidirectional Forwarding Detection (BFD)" (2010)
https://tools.ietf.org/html/rfc5880 This is the original BFD specification.
RFC 5881 "Bidirectional Forwarding Detection (BFD) for IPv4 and IPv6 (Single Hop)" (2010)
https://tools.ietf.org/html/rfc5881 Describes the use of the Bidirectional Forwarding Detection (BFD) protocol over IPv4 and IPv6 for single IP hops.
func (*BFD) CanDecode ¶ added in v1.1.15
func (d *BFD) CanDecode() gopacket.LayerClass
CanDecode returns a set of layers that BFD objects can decode. As BFD objects can only decide the BFD layer, we can return just that layer. Apparently a single layer type implements LayerClass.
func (*BFD) DecodeFromBytes ¶ added in v1.1.15
func (d *BFD) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
DecodeFromBytes analyses a byte slice and attempts to decode it as a BFD control packet.
Upon succeeds, it loads the BFD object with information about the packet and returns nil. Upon failure, it returns an error (non nil).
func (*BFD) LayerType ¶ added in v1.1.15
LayerType returns the layer type of the BFD object, which is LayerTypeBFD.
func (*BFD) Length ¶ added in v1.1.15
Length returns the data length of a BFD Control message which changes based on the presence and type of authentication contained in the message
func (*BFD) NextLayerType ¶ added in v1.1.15
NextLayerType specifies the next layer that GoPacket should attempt to analyse after this (BFD) layer. As BFD packets do not contain any payload bytes, there are no further layers to analyse.
func (*BFD) Payload ¶ added in v1.1.15
Payload returns an empty byte slice as BFD packets do not carry a payload
func (*BFD) SerializeTo ¶ added in v1.1.15
func (d *BFD) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
SerializeTo writes the serialized form of this layer into the SerializationBuffer, implementing gopacket.SerializableLayer. See the docs for gopacket.SerializableLayer for more info.
type BFDAuthData ¶ added in v1.1.15
type BFDAuthData []byte
BFDAuthData represents the authentication key or digest
type BFDAuthHeader ¶ added in v1.1.15
type BFDAuthHeader struct { AuthType BFDAuthType KeyID BFDAuthKeyID SequenceNumber BFDAuthSequenceNumber Data BFDAuthData }
BFDAuthHeader represents authentication data used in the BFD session
func (*BFDAuthHeader) Length ¶ added in v1.1.15
func (h *BFDAuthHeader) Length() int
Length returns the data length of the BFDAuthHeader based on the authentication type
type BFDAuthKeyID ¶ added in v1.1.15
type BFDAuthKeyID uint8
BFDAuthKeyID represents the authentication key ID in use for this packet. This allows multiple keys to be active simultaneously.
type BFDAuthSequenceNumber ¶ added in v1.1.15
type BFDAuthSequenceNumber uint32
BFDAuthSequenceNumber represents the sequence number for this packet. For Keyed Authentication, this value is incremented occasionally. For Meticulous Keyed Authentication, this value is incremented for each successive packet transmitted for a session. This provides protection against replay attacks.
type BFDAuthType ¶ added in v1.1.15
type BFDAuthType uint8
BFDAuthType represents the authentication used in the BFD session
const ( BFDAuthTypeNone BFDAuthType = 0 // No Auth BFDAuthTypePassword BFDAuthType = 1 // Simple Password BFDAuthTypeKeyedMD5 BFDAuthType = 2 // Keyed MD5 BFDAuthTypeMeticulousKeyedMD5 BFDAuthType = 3 // Meticulous Keyed MD5 BFDAuthTypeKeyedSHA1 BFDAuthType = 4 // Keyed SHA1 BFDAuthTypeMeticulousKeyedSHA1 BFDAuthType = 5 // Meticulous Keyed SHA1 )
constants that define the BFDAuthType
func (BFDAuthType) String ¶ added in v1.1.15
func (at BFDAuthType) String() string
String returns a string version of BFDAuthType
type BFDDetectMultiplier ¶ added in v1.1.15
type BFDDetectMultiplier uint8
BFDDetectMultiplier represents the negotiated transmit interval, multiplied by this value, provides the Detection Time for the receiving system in Asynchronous mode.
type BFDDiagnostic ¶ added in v1.1.15
type BFDDiagnostic uint8
BFDDiagnostic represents diagnostic infomation about a BFD session
const ( BFDDiagnosticNone BFDDiagnostic = 0 // No Diagnostic BFDDiagnosticTimeExpired BFDDiagnostic = 1 // Control Detection Time Expired BFDDiagnosticEchoFailed BFDDiagnostic = 2 // Echo Function Failed BFDDiagnosticNeighborSignalDown BFDDiagnostic = 3 // Neighbor Signaled Session Down BFDDiagnosticForwardPlaneReset BFDDiagnostic = 4 // Forwarding Plane Reset BFDDiagnosticPathDown BFDDiagnostic = 5 // Path Down BFDDiagnosticConcatPathDown BFDDiagnostic = 6 // Concatenated Path Down BFDDiagnosticAdminDown BFDDiagnostic = 7 // Administratively Down BFDDiagnosticRevConcatPathDown BFDDiagnostic = 8 // Reverse Concatenated Path Dow )
constants that define BFDDiagnostic flags
func (BFDDiagnostic) String ¶ added in v1.1.15
func (bd BFDDiagnostic) String() string
String returns a string version of BFDDiagnostic
type BFDDiscriminator ¶ added in v1.1.15
type BFDDiscriminator uint32
BFDDiscriminator is a unique, nonzero discriminator value used to demultiplex multiple BFD sessions between the same pair of systems.
type BFDState ¶ added in v1.1.15
type BFDState uint8
BFDState represents the state of a BFD session
type BFDTimeInterval ¶ added in v1.1.15
type BFDTimeInterval uint32
BFDTimeInterval represents a time interval in microseconds
type BFDVersion ¶ added in v1.1.15
type BFDVersion uint8
BFDVersion represents the version as decoded from the BFD control message
type BaseLayer ¶
type BaseLayer struct { // Contents is the set of bytes that make up this layer. IE: for an // Ethernet packet, this would be the set of bytes making up the // Ethernet frame. Contents []byte // Payload is the set of bytes contained by (but not part of) this // Layer. Again, to take Ethernet as an example, this would be the // set of bytes encapsulated by the Ethernet protocol. Payload []byte }
BaseLayer is a convenience struct which implements the LayerData and LayerPayload functions of the Layer interface.
func (*BaseLayer) LayerContents ¶
LayerContents returns the bytes of the packet layer.
func (*BaseLayer) LayerPayload ¶
LayerPayload returns the bytes contained within the packet layer.
type CDPAddressType ¶
type CDPAddressType uint64
CDPAddressType is used to define TLV values within CDP addresses.
const ( CDPAddressTypeCLNP CDPAddressType = 0x81 CDPAddressTypeIPV4 CDPAddressType = 0xcc CDPAddressTypeIPV6 CDPAddressType = 0xaaaa030000000800 CDPAddressTypeDECNET CDPAddressType = 0xaaaa030000006003 CDPAddressTypeAPPLETALK CDPAddressType = 0xaaaa03000000809b CDPAddressTypeIPX CDPAddressType = 0xaaaa030000008137 CDPAddressTypeVINES CDPAddressType = 0xaaaa0300000080c4 CDPAddressTypeXNS CDPAddressType = 0xaaaa030000000600 CDPAddressTypeAPOLLO CDPAddressType = 0xaaaa030000008019 )
CDP Address types.
func (CDPAddressType) String ¶
func (a CDPAddressType) String() (s string)
type CDPCapabilities ¶
type CDPCapabilities struct { L3Router bool TBBridge bool SPBridge bool L2Switch bool IsHost bool IGMPFilter bool L1Repeater bool IsPhone bool RemotelyManaged bool }
CDPCapabilities represents the capabilities of a device
type CDPCapability ¶
type CDPCapability uint32
CDPCapability is the set of capabilities advertised by a CDP device.
const ( CDPCapMaskRouter CDPCapability = 0x0001 CDPCapMaskTBBridge CDPCapability = 0x0002 CDPCapMaskSPBridge CDPCapability = 0x0004 CDPCapMaskSwitch CDPCapability = 0x0008 CDPCapMaskHost CDPCapability = 0x0010 CDPCapMaskIGMPFilter CDPCapability = 0x0020 CDPCapMaskRepeater CDPCapability = 0x0040 CDPCapMaskPhone CDPCapability = 0x0080 CDPCapMaskRemote CDPCapability = 0x0100 )
CDPCapability values.
type CDPEnergyWise ¶
type CDPEnergyWise struct { EncryptedData []byte Unknown1 uint32 SequenceNumber uint32 ModelNumber string Unknown2 uint16 HardwareID string SerialNum string Unknown3 []byte Role string Domain string Name string ReplyUnknown1 []byte ReplyPort []byte ReplyAddress []byte ReplyUnknown2 []byte ReplyUnknown3 []byte }
CDPEnergyWise is used by CDP to monitor and control power usage.
type CDPEnergyWiseSubtype ¶
type CDPEnergyWiseSubtype uint32
CDPEnergyWiseSubtype is used within CDP to define TLV values.
const ( CDPEnergyWiseRole CDPEnergyWiseSubtype = 0x00000007 CDPEnergyWiseDomain CDPEnergyWiseSubtype = 0x00000008 CDPEnergyWiseName CDPEnergyWiseSubtype = 0x00000009 CDPEnergyWiseReplyTo CDPEnergyWiseSubtype = 0x00000017 )
CDPEnergyWiseSubtype values.
func (CDPEnergyWiseSubtype) String ¶
func (t CDPEnergyWiseSubtype) String() (s string)
type CDPHello ¶
type CDPHello struct { OUI []byte ProtocolID uint16 ClusterMaster net.IP Unknown1 net.IP Version byte SubVersion byte Status byte Unknown2 byte ClusterCommander net.HardwareAddr SwitchMAC net.HardwareAddr Unknown3 byte ManagementVLAN uint16 }
CDPHello is a Cisco Hello message (undocumented, hence the "Unknown" fields)
type CDPLocation ¶
CDPLocation provides location information for a CDP device.
type CDPPowerDialogue ¶
CDPPowerDialogue encapsulates a Power Query/Reply
type CDPSparePairPoE ¶
type CDPSparePairPoE struct { PSEFourWire bool // Supported / Not supported PDRequestOn bool // On / Off PSEOn bool // On / Off }
CDPSparePairPoE provides information on PoE.
type CDPTLVType ¶
type CDPTLVType uint16
CDPTLVType is the type of each TLV value in a CiscoDiscovery packet.
const ( CDPTLVDevID CDPTLVType = 0x0001 CDPTLVAddress CDPTLVType = 0x0002 CDPTLVPortID CDPTLVType = 0x0003 CDPTLVCapabilities CDPTLVType = 0x0004 CDPTLVVersion CDPTLVType = 0x0005 CDPTLVPlatform CDPTLVType = 0x0006 CDPTLVIPPrefix CDPTLVType = 0x0007 CDPTLVHello CDPTLVType = 0x0008 CDPTLVVTPDomain CDPTLVType = 0x0009 CDPTLVNativeVLAN CDPTLVType = 0x000a CDPTLVFullDuplex CDPTLVType = 0x000b CDPTLVVLANReply CDPTLVType = 0x000e CDPTLVVLANQuery CDPTLVType = 0x000f CDPTLVPower CDPTLVType = 0x0010 CDPTLVMTU CDPTLVType = 0x0011 CDPTLVExtendedTrust CDPTLVType = 0x0012 CDPTLVUntrustedCOS CDPTLVType = 0x0013 CDPTLVSysName CDPTLVType = 0x0014 CDPTLVSysOID CDPTLVType = 0x0015 CDPTLVMgmtAddresses CDPTLVType = 0x0016 CDPTLVLocation CDPTLVType = 0x0017 CDPTLVExternalPortID CDPTLVType = 0x0018 CDPTLVPowerRequested CDPTLVType = 0x0019 CDPTLVPowerAvailable CDPTLVType = 0x001a CDPTLVPortUnidirectional CDPTLVType = 0x001b CDPTLVEnergyWise CDPTLVType = 0x001d CDPTLVSparePairPOE CDPTLVType = 0x001f )
CDPTLVType values.
func (CDPTLVType) String ¶
func (t CDPTLVType) String() (s string)
type CDPVLANDialogue ¶
CDPVLANDialogue encapsulates a VLAN Query/Reply
type CiscoDiscovery ¶
type CiscoDiscovery struct { BaseLayer Version byte TTL byte Checksum uint16 Values []CiscoDiscoveryValue }
CiscoDiscovery is a packet layer containing the Cisco Discovery Protocol. See http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm#31885
func (*CiscoDiscovery) LayerType ¶
func (c *CiscoDiscovery) LayerType() gopacket.LayerType
LayerType returns gopacket.LayerTypeCiscoDiscovery.
type CiscoDiscoveryInfo ¶
type CiscoDiscoveryInfo struct { BaseLayer CDPHello DeviceID string Addresses []net.IP PortID string Capabilities CDPCapabilities Version string Platform string IPPrefixes []net.IPNet VTPDomain string NativeVLAN uint16 FullDuplex bool VLANReply CDPVLANDialogue VLANQuery CDPVLANDialogue PowerConsumption uint16 MTU uint32 ExtendedTrust uint8 UntrustedCOS uint8 SysName string SysOID string MgmtAddresses []net.IP Location CDPLocation PowerRequest CDPPowerDialogue PowerAvailable CDPPowerDialogue SparePairPoe CDPSparePairPoE EnergyWise CDPEnergyWise Unknown []CiscoDiscoveryValue }
CiscoDiscoveryInfo represents the decoded details for a set of CiscoDiscoveryValues
func (*CiscoDiscoveryInfo) LayerType ¶
func (c *CiscoDiscoveryInfo) LayerType() gopacket.LayerType
LayerType returns gopacket.LayerTypeCiscoDiscoveryInfo.
type CiscoDiscoveryValue ¶
type CiscoDiscoveryValue struct { Type CDPTLVType Length uint16 Value []byte }
CiscoDiscoveryValue is a TLV value inside a CiscoDiscovery packet layer.
type DHCPMsgType ¶ added in v1.1.12
type DHCPMsgType byte
DHCPMsgType represents a DHCP operation
const ( DHCPMsgTypeUnspecified DHCPMsgType = iota DHCPMsgTypeDiscover DHCPMsgTypeOffer DHCPMsgTypeRequest DHCPMsgTypeDecline DHCPMsgTypeAck DHCPMsgTypeNak DHCPMsgTypeRelease DHCPMsgTypeInform )
Constants that represent DHCP operations
func (DHCPMsgType) String ¶ added in v1.1.12
func (o DHCPMsgType) String() string
String returns a string version of a DHCPMsgType.
type DHCPOpt ¶ added in v1.1.12
type DHCPOpt byte
DHCPOpt represents a DHCP option or parameter from RFC-2132
const ( DHCPOptPad DHCPOpt = 0 DHCPOptSubnetMask DHCPOpt = 1 // 4, net.IP DHCPOptTimeOffset DHCPOpt = 2 // 4, int32 (signed seconds from UTC) DHCPOptRouter DHCPOpt = 3 // n*4, [n]net.IP DHCPOptTimeServer DHCPOpt = 4 // n*4, [n]net.IP DHCPOptNameServer DHCPOpt = 5 // n*4, [n]net.IP DHCPOptDNS DHCPOpt = 6 // n*4, [n]net.IP DHCPOptLogServer DHCPOpt = 7 // n*4, [n]net.IP DHCPOptCookieServer DHCPOpt = 8 // n*4, [n]net.IP DHCPOptLPRServer DHCPOpt = 9 // n*4, [n]net.IP DHCPOptImpressServer DHCPOpt = 10 // n*4, [n]net.IP DHCPOptResLocServer DHCPOpt = 11 // n*4, [n]net.IP DHCPOptHostname DHCPOpt = 12 // n, string DHCPOptBootfileSize DHCPOpt = 13 // 2, uint16 DHCPOptMeritDumpFile DHCPOpt = 14 // >1, string DHCPOptDomainName DHCPOpt = 15 // n, string DHCPOptSwapServer DHCPOpt = 16 // n*4, [n]net.IP DHCPOptRootPath DHCPOpt = 17 // n, string DHCPOptExtensionsPath DHCPOpt = 18 // n, string DHCPOptIPForwarding DHCPOpt = 19 // 1, bool DHCPOptSourceRouting DHCPOpt = 20 // 1, bool DHCPOptPolicyFilter DHCPOpt = 21 // 8*n, [n]{net.IP/net.IP} DHCPOptDatagramMTU DHCPOpt = 22 // 2, uint16 DHCPOptDefaultTTL DHCPOpt = 23 // 1, byte DHCPOptPathMTUAgingTimeout DHCPOpt = 24 // 4, uint32 DHCPOptPathPlateuTableOption DHCPOpt = 25 // 2*n, []uint16 DHCPOptInterfaceMTU DHCPOpt = 26 // 2, uint16 DHCPOptAllSubsLocal DHCPOpt = 27 // 1, bool DHCPOptBroadcastAddr DHCPOpt = 28 // 4, net.IP DHCPOptMaskDiscovery DHCPOpt = 29 // 1, bool DHCPOptMaskSupplier DHCPOpt = 30 // 1, bool DHCPOptRouterDiscovery DHCPOpt = 31 // 1, bool DHCPOptSolicitAddr DHCPOpt = 32 // 4, net.IP DHCPOptStaticRoute DHCPOpt = 33 // n*8, [n]{net.IP/net.IP} -- note the 2nd is router not mask DHCPOptARPTrailers DHCPOpt = 34 // 1, bool DHCPOptARPTimeout DHCPOpt = 35 // 4, uint32 DHCPOptEthernetEncap DHCPOpt = 36 // 1, bool DHCPOptTCPTTL DHCPOpt = 37 // 1, byte DHCPOptTCPKeepAliveInt DHCPOpt = 38 // 4, uint32 DHCPOptTCPKeepAliveGarbage DHCPOpt = 39 // 1, bool DHCPOptNISDomain DHCPOpt = 40 // n, string DHCPOptNISServers DHCPOpt = 41 // 4*n, [n]net.IP DHCPOptNTPServers DHCPOpt = 42 // 4*n, [n]net.IP DHCPOptVendorOption DHCPOpt = 43 // n, [n]byte // may be encapsulated. DHCPOptNetBIOSTCPNS DHCPOpt = 44 // 4*n, [n]net.IP DHCPOptNetBIOSTCPDDS DHCPOpt = 45 // 4*n, [n]net.IP DHCPOptNETBIOSTCPNodeType DHCPOpt = 46 // 1, magic byte DHCPOptNetBIOSTCPScope DHCPOpt = 47 // n, string DHCPOptXFontServer DHCPOpt = 48 // n, string DHCPOptXDisplayManager DHCPOpt = 49 // n, string DHCPOptRequestIP DHCPOpt = 50 // 4, net.IP DHCPOptLeaseTime DHCPOpt = 51 // 4, uint32 DHCPOptExtOptions DHCPOpt = 52 // 1, 1/2/3 DHCPOptMessageType DHCPOpt = 53 // 1, 1-7 DHCPOptServerID DHCPOpt = 54 // 4, net.IP DHCPOptParamsRequest DHCPOpt = 55 // n, []byte DHCPOptMessage DHCPOpt = 56 // n, 3 DHCPOptMaxMessageSize DHCPOpt = 57 // 2, uint16 DHCPOptT1 DHCPOpt = 58 // 4, uint32 DHCPOptT2 DHCPOpt = 59 // 4, uint32 DHCPOptClassID DHCPOpt = 60 // n, []byte DHCPOptClientID DHCPOpt = 61 // n >= 2, []byte DHCPOptDomainSearch DHCPOpt = 119 // n, string DHCPOptSIPServers DHCPOpt = 120 // n, url DHCPOptClasslessStaticRoute DHCPOpt = 121 // DHCPOptEnd DHCPOpt = 255 )
Constants for the DHCPOpt options.
type DHCPOption ¶ added in v1.1.12
DHCPOption rerpresents a DHCP option.
func NewDHCPOption ¶ added in v1.1.12
func NewDHCPOption(t DHCPOpt, data []byte) DHCPOption
NewDHCPOption constructs a new DHCPOption with a given type and data.
func (DHCPOption) String ¶ added in v1.1.12
func (o DHCPOption) String() string
String returns a string version of a DHCP Option.
type DHCPOptions ¶ added in v1.1.12
type DHCPOptions []DHCPOption
DHCPOptions is used to get nicely printed option lists which would normally be cut off after 5 options.
func (DHCPOptions) String ¶ added in v1.1.12
func (o DHCPOptions) String() string
String returns a string version of the options list.
type DHCPv4 ¶ added in v1.1.12
type DHCPv4 struct { BaseLayer Operation DHCPOp HardwareType LinkType HardwareLen uint8 HardwareOpts uint8 Xid uint32 Secs uint16 Flags uint16 ClientIP net.IP YourClientIP net.IP NextServerIP net.IP RelayAgentIP net.IP ClientHWAddr net.HardwareAddr ServerName []byte File []byte Options DHCPOptions }
DHCPv4 contains data for a single DHCP packet.
func (*DHCPv4) CanDecode ¶ added in v1.1.12
func (d *DHCPv4) CanDecode() gopacket.LayerClass
CanDecode returns the set of layer types that this DecodingLayer can decode.
func (*DHCPv4) DecodeFromBytes ¶ added in v1.1.12
func (d *DHCPv4) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
DecodeFromBytes decodes the given bytes into this layer.
func (*DHCPv4) NextLayerType ¶ added in v1.1.12
NextLayerType returns the layer type contained by this DecodingLayer.
func (*DHCPv4) SerializeTo ¶ added in v1.1.12
func (d *DHCPv4) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
SerializeTo writes the serialized form of this layer into the SerializationBuffer, implementing gopacket.SerializableLayer. See the docs for gopacket.SerializableLayer for more info.
type DHCPv4Error ¶ added in v1.1.15
type DHCPv4Error string
DHCPv4Error is used for constant errors for DHCPv4. It is needed for test asserts.
func (DHCPv4Error) Error ¶ added in v1.1.15
func (d DHCPv4Error) Error() string
DHCPv4Error implements error interface.
type DHCPv6 ¶ added in v1.1.15
type DHCPv6 struct { BaseLayer MsgType DHCPv6MsgType HopCount uint8 LinkAddr net.IP PeerAddr net.IP TransactionID []byte Options DHCPv6Options }
DHCPv6 contains data for a single DHCP packet.
func (*DHCPv6) CanDecode ¶ added in v1.1.15
func (d *DHCPv6) CanDecode() gopacket.LayerClass
CanDecode returns the set of layer types that this DecodingLayer can decode.
func (*DHCPv6) DecodeFromBytes ¶ added in v1.1.15
func (d *DHCPv6) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
DecodeFromBytes decodes the given bytes into this layer.
func (*DHCPv6) NextLayerType ¶ added in v1.1.15
NextLayerType returns the layer type contained by this DecodingLayer.
func (*DHCPv6) SerializeTo ¶ added in v1.1.15
func (d *DHCPv6) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
SerializeTo writes the serialized form of this layer into the SerializationBuffer, implementing gopacket.SerializableLayer. See the docs for gopacket.SerializableLayer for more info.
type DHCPv6DUID ¶ added in v1.1.15
type DHCPv6DUID struct { Type DHCPv6DUIDType // LLT, LL HardwareType []byte // EN EnterpriseNumber []byte // LLT Time []byte // LLT, LL LinkLayerAddress net.HardwareAddr // EN Identifier []byte }
DHCPv6DUID means DHCP Unique Identifier as stated in RFC 3315, section 9 (https://tools.ietf.org/html/rfc3315#page-19)
func (*DHCPv6DUID) DecodeFromBytes ¶ added in v1.1.15
func (d *DHCPv6DUID) DecodeFromBytes(data []byte) error
DecodeFromBytes decodes the given bytes into a DHCPv6DUID
func (*DHCPv6DUID) Encode ¶ added in v1.1.15
func (d *DHCPv6DUID) Encode() []byte
Encode encodes the DHCPv6DUID in a slice of bytes
func (*DHCPv6DUID) Len ¶ added in v1.1.15
func (d *DHCPv6DUID) Len() int
Len returns the length of the DHCPv6DUID, respecting the type
func (*DHCPv6DUID) String ¶ added in v1.1.15
func (d *DHCPv6DUID) String() string
type DHCPv6DUIDType ¶ added in v1.1.15
type DHCPv6DUIDType uint16
DHCPv6DUIDType represents a DHCP DUID - RFC-3315
const ( DHCPv6DUIDTypeLLT DHCPv6DUIDType = iota + 1 DHCPv6DUIDTypeEN DHCPv6DUIDTypeLL )
Constants for the DHCPv6DUIDType.
func (DHCPv6DUIDType) String ¶ added in v1.1.15
func (o DHCPv6DUIDType) String() string
String returns a string version of a DHCPv6DUIDType.
type DHCPv6MsgType ¶ added in v1.1.15
type DHCPv6MsgType byte
DHCPv6MsgType represents a DHCPv6 operation
const ( DHCPv6MsgTypeUnspecified DHCPv6MsgType = iota DHCPv6MsgTypeSolicit DHCPv6MsgTypeAdverstise DHCPv6MsgTypeRequest DHCPv6MsgTypeConfirm DHCPv6MsgTypeRenew DHCPv6MsgTypeRebind DHCPv6MsgTypeReply DHCPv6MsgTypeRelease DHCPv6MsgTypeDecline DHCPv6MsgTypeReconfigure DHCPv6MsgTypeInformationRequest DHCPv6MsgTypeRelayForward DHCPv6MsgTypeRelayReply )
Constants that represent DHCP operations
func (DHCPv6MsgType) String ¶ added in v1.1.15
func (o DHCPv6MsgType) String() string
String returns a string version of a DHCPv6MsgType.
type DHCPv6Opt ¶ added in v1.1.15
type DHCPv6Opt uint16
DHCPv6Opt represents a DHCP option or parameter from RFC-3315
const ( DHCPv6OptClientID DHCPv6Opt = 1 DHCPv6OptServerID DHCPv6Opt = 2 DHCPv6OptIANA DHCPv6Opt = 3 DHCPv6OptIATA DHCPv6Opt = 4 DHCPv6OptIAAddr DHCPv6Opt = 5 DHCPv6OptOro DHCPv6Opt = 6 DHCPv6OptPreference DHCPv6Opt = 7 DHCPv6OptElapsedTime DHCPv6Opt = 8 DHCPv6OptRelayMessage DHCPv6Opt = 9 DHCPv6OptAuth DHCPv6Opt = 11 DHCPv6OptUnicast DHCPv6Opt = 12 DHCPv6OptStatusCode DHCPv6Opt = 13 DHCPv6OptRapidCommit DHCPv6Opt = 14 DHCPv6OptUserClass DHCPv6Opt = 15 DHCPv6OptVendorClass DHCPv6Opt = 16 DHCPv6OptVendorOpts DHCPv6Opt = 17 DHCPv6OptInterfaceID DHCPv6Opt = 18 DHCPv6OptReconfigureMessage DHCPv6Opt = 19 DHCPv6OptReconfigureAccept DHCPv6Opt = 20 // RFC 3319 Session Initiation Protocol (SIP) DHCPv6OptSIPServersDomainList DHCPv6Opt = 21 DHCPv6OptSIPServersAddressList DHCPv6Opt = 22 // RFC 3646 DNS Configuration DHCPv6OptDNSServers DHCPv6Opt = 23 DHCPv6OptDomainList DHCPv6Opt = 24 // RFC 3633 Prefix Delegation DHCPv6OptIAPD DHCPv6Opt = 25 DHCPv6OptIAPrefix DHCPv6Opt = 26 // RFC 3898 Network Information Service (NIS) DHCPv6OptNISServers DHCPv6Opt = 27 DHCPv6OptNISPServers DHCPv6Opt = 28 DHCPv6OptNISDomainName DHCPv6Opt = 29 DHCPv6OptNISPDomainName DHCPv6Opt = 30 // RFC 4075 Simple Network Time Protocol (SNTP) DHCPv6OptSNTPServers DHCPv6Opt = 31 // RFC 4242 Information Refresh Time Option DHCPv6OptInformationRefreshTime DHCPv6Opt = 32 // RFC 4280 Broadcast and Multicast Control Servers DHCPv6OptBCMCSServerDomainNameList DHCPv6Opt = 33 DHCPv6OptBCMCSServerAddressList DHCPv6Opt = 34 // RFC 4776 Civic Address ConfigurationOption DHCPv6OptGeoconfCivic DHCPv6Opt = 36 // RFC 4649 Relay Agent Remote-ID DHCPv6OptRemoteID DHCPv6Opt = 37 // RFC 4580 Relay Agent Subscriber-ID DHCPv6OptSubscriberID DHCPv6Opt = 38 // RFC 4704 Client Full Qualified Domain Name (FQDN) DHCPv6OptClientFQDN DHCPv6Opt = 39 // RFC 5192 Protocol for Carrying Authentication for Network Access (PANA) DHCPv6OptPanaAgent DHCPv6Opt = 40 // RFC 4833 Timezone Options DHCPv6OptNewPOSIXTimezone DHCPv6Opt = 41 DHCPv6OptNewTZDBTimezone DHCPv6Opt = 42 // RFC 4994 Relay Agent Echo Request DHCPv6OptEchoRequestOption DHCPv6Opt = 43 // RFC 5007 Leasequery DHCPv6OptLQQuery DHCPv6Opt = 44 DHCPv6OptCLTTime DHCPv6Opt = 45 DHCPv6OptClientData DHCPv6Opt = 46 DHCPv6OptLQRelayData DHCPv6Opt = 47 DHCPv6OptLQClientLink DHCPv6Opt = 48 // RFC 6610 Home Information Discovery in Mobile IPv6 (MIPv6) DHCPv6OptMIP6HNIDF DHCPv6Opt = 49 DHCPv6OptMIP6VDINF DHCPv6Opt = 50 DHCPv6OptMIP6IDINF DHCPv6Opt = 69 DHCPv6OptMIP6UDINF DHCPv6Opt = 70 DHCPv6OptMIP6HNP DHCPv6Opt = 71 DHCPv6OptMIP6HAA DHCPv6Opt = 72 DHCPv6OptMIP6HAF DHCPv6Opt = 73 // RFC 5223 Discovering Location-to-Service Translation (LoST) Servers DHCPv6OptV6LOST DHCPv6Opt = 51 // RFC 5417 Control And Provisioning of Wireless Access Points (CAPWAP) DHCPv6OptCAPWAPACV6 DHCPv6Opt = 52 // RFC 5460 Bulk Leasequery DHCPv6OptRelayID DHCPv6Opt = 53 // RFC 5678 IEEE 802.21 Mobility Services (MoS) Discovery DHCPv6OptIPv6AddressMoS DHCPv6Opt = 54 DHCPv6OptIPv6FQDNMoS DHCPv6Opt = 55 // RFC 5908 NTP Server Option DHCPv6OptNTPServer DHCPv6Opt = 56 // RFC 5986 Discovering the Local Location Information Server (LIS) DHCPv6OptV6AccessDomain DHCPv6Opt = 57 // RFC 5986 SIP User Agent DHCPv6OptSIPUACSList DHCPv6Opt = 58 // RFC 5970 Options for Network Boot DHCPv6OptBootFileURL DHCPv6Opt = 59 DHCPv6OptBootFileParam DHCPv6Opt = 60 DHCPv6OptClientArchType DHCPv6Opt = 61 DHCPv6OptNII DHCPv6Opt = 62 // RFC 6225 Coordinate-Based Location Configuration Information DHCPv6OptGeolocation DHCPv6Opt = 63 // RFC 6334 Dual-Stack Lite DHCPv6OptAFTRName DHCPv6Opt = 64 // RFC 6440 EAP Re-authentication Protocol (ERP) DHCPv6OptERPLocalDomainName DHCPv6Opt = 65 // RFC 6422 Relay-Supplied DHCP Options DHCPv6OptRSOO DHCPv6Opt = 66 // RFC 6603 Prefix Exclude Option for DHCPv6-based Prefix Delegation DHCPv6OptPDExclude DHCPv6Opt = 67 // RFC 6607 Virtual Subnet Selection DHCPv6OptVSS DHCPv6Opt = 68 // RFC 6731 Improved Recursive DNS Server Selection for Multi-Interfaced Nodes DHCPv6OptRDNSSSelection DHCPv6Opt = 74 // RFC 6784 Kerberos Options for DHCPv6 DHCPv6OptKRBPrincipalName DHCPv6Opt = 75 DHCPv6OptKRBRealmName DHCPv6Opt = 76 DHCPv6OptKRBKDC DHCPv6Opt = 77 // RFC 6939 Client Link-Layer Address Option DHCPv6OptClientLinkLayerAddress DHCPv6Opt = 79 // RFC 6977 Triggering DHCPv6 Reconfiguration from Relay Agents DHCPv6OptLinkAddress DHCPv6Opt = 80 // RFC 7037 RADIUS Option for the DHCPv6 Relay Agent DHCPv6OptRADIUS DHCPv6Opt = 81 // RFC 7083 Modification to Default Values of SOL_MAX_RT and INF_MAX_RT DHCPv6OptSolMaxRt DHCPv6Opt = 82 DHCPv6OptInfMaxRt DHCPv6Opt = 83 // RFC 7078 Distributing Address Selection Policy DHCPv6OptAddrSel DHCPv6Opt = 84 DHCPv6OptAddrSelTable DHCPv6Opt = 85 // RFC 7291 DHCP Options for the Port Control Protocol (PCP) DHCPv6OptV6PCPServer DHCPv6Opt = 86 // RFC 7341 DHCPv4-over-DHCPv6 (DHCP 4o6) Transport DHCPv6OptDHCPv4Message DHCPv6Opt = 87 DHCPv6OptDHCPv4OverDHCPv6Server DHCPv6Opt = 88 // RFC 7598 Configuration of Softwire Address and Port-Mapped Clients DHCPv6OptS46Rule DHCPv6Opt = 89 DHCPv6OptS46BR DHCPv6Opt = 90 DHCPv6OptS46DMR DHCPv6Opt = 91 DHCPv6OptS46V4V4Bind DHCPv6Opt = 92 DHCPv6OptS46PortParameters DHCPv6Opt = 93 DHCPv6OptS46ContMAPE DHCPv6Opt = 94 DHCPv6OptS46ContMAPT DHCPv6Opt = 95 DHCPv6OptS46ContLW DHCPv6Opt = 96 // RFC 7600 IPv4 Residual Deployment via IPv6 DHCPv6Opt4RD DHCPv6Opt = 97 DHCPv6Opt4RDMapRule DHCPv6Opt = 98 DHCPv6Opt4RDNonMapRule DHCPv6Opt = 99 // RFC 7653 Active Leasequery DHCPv6OptLQBaseTime DHCPv6Opt = 100 DHCPv6OptLQStartTime DHCPv6Opt = 101 DHCPv6OptLQEndTime DHCPv6Opt = 102 // RFC 7710 Captive-Portal Identification DHCPv6OptCaptivePortal DHCPv6Opt = 103 // RFC 7774 Multicast Protocol for Low-Power and Lossy Networks (MPL) Parameter Configuration DHCPv6OptMPLParameters DHCPv6Opt = 104 // RFC 7839 Access-Network-Identifier (ANI) DHCPv6OptANIATT DHCPv6Opt = 105 DHCPv6OptANINetworkName DHCPv6Opt = 106 DHCPv6OptANIAPName DHCPv6Opt = 107 DHCPv6OptANIAPBSSID DHCPv6Opt = 108 DHCPv6OptANIOperatorID DHCPv6Opt = 109 DHCPv6OptANIOperatorRealm DHCPv6Opt = 110 // RFC 8026 Unified IPv4-in-IPv6 Softwire Customer Premises Equipment (CPE) DHCPv6OptS46Priority DHCPv6Opt = 111 // draft-ietf-opsawg-mud-25 Manufacturer Usage Description (MUD) DHCPv6OptMUDURLV6 DHCPv6Opt = 112 // RFC 8115 IPv4-Embedded Multicast and Unicast IPv6 Prefixes DHCPv6OptV6Prefix64 DHCPv6Opt = 113 // RFC 8156 DHCPv6 Failover Protocol DHCPv6OptFBindingStatus DHCPv6Opt = 114 DHCPv6OptFConnectFlags DHCPv6Opt = 115 DHCPv6OptFDNSRemovalInfo DHCPv6Opt = 116 DHCPv6OptFDNSHostName DHCPv6Opt = 117 DHCPv6OptFDNSZoneName DHCPv6Opt = 118 DHCPv6OptFDNSFlags DHCPv6Opt = 119 DHCPv6OptFExpirationTime DHCPv6Opt = 120 DHCPv6OptFMaxUnacknowledgedBNDUPD DHCPv6Opt = 121 DHCPv6OptFMCLT DHCPv6Opt = 122 DHCPv6OptFPartnerLifetime DHCPv6Opt = 123 DHCPv6OptFPartnerLifetimeSent DHCPv6Opt = 124 DHCPv6OptFPartnerDownTime DHCPv6Opt = 125 DHCPv6OptFPartnerRawCltTime DHCPv6Opt = 126 DHCPv6OptFProtocolVersion DHCPv6Opt = 127 DHCPv6OptFKeepaliveTime DHCPv6Opt = 128 DHCPv6OptFReconfigureData DHCPv6Opt = 129 DHCPv6OptFRelationshipName DHCPv6Opt = 130 DHCPv6OptFServerFlags DHCPv6Opt = 131 DHCPv6OptFServerState DHCPv6Opt = 132 DHCPv6OptFStartTimeOfState DHCPv6Opt = 133 DHCPv6OptFStateExpirationTime DHCPv6Opt = 134 // RFC 8357 Generalized UDP Source Port for DHCP Relay DHCPv6OptRelayPort DHCPv6Opt = 135 // draft-ietf-netconf-zerotouch-25 Zero Touch Provisioning for Networking Devices DHCPv6OptV6ZeroTouchRedirect DHCPv6Opt = 136 // RFC 6153 Access Network Discovery and Selection Function (ANDSF) Discovery DHCPv6OptIPV6AddressANDSF DHCPv6Opt = 143 )
Constants for the DHCPv6Opt options.
type DHCPv6Option ¶ added in v1.1.15
DHCPv6Option rerpresents a DHCP option.
func NewDHCPv6Option ¶ added in v1.1.15
func NewDHCPv6Option(code DHCPv6Opt, data []byte) DHCPv6Option
NewDHCPv6Option constructs a new DHCPv6Option with a given type and data.
func (DHCPv6Option) String ¶ added in v1.1.15
func (o DHCPv6Option) String() string
String returns a string version of a DHCP Option.
type DHCPv6Options ¶ added in v1.1.15
type DHCPv6Options []DHCPv6Option
DHCPv6Options is used to get nicely printed option lists which would normally be cut off after 5 options.
func (DHCPv6Options) String ¶ added in v1.1.15
func (o DHCPv6Options) String() string
String returns a string version of the options list.
type DHCPv6StatusCode ¶ added in v1.1.15
type DHCPv6StatusCode uint16
DHCPv6StatusCode represents a DHCP status code - RFC-3315
const ( DHCPv6StatusCodeSuccess DHCPv6StatusCode = iota DHCPv6StatusCodeUnspecFail DHCPv6StatusCodeNoAddrsAvail DHCPv6StatusCodeNoBinding DHCPv6StatusCodeNotOnLink DHCPv6StatusCodeUseMulticast )
Constants for the DHCPv6StatusCode.
func (DHCPv6StatusCode) String ¶ added in v1.1.15
func (o DHCPv6StatusCode) String() string
String returns a string version of a DHCPv6StatusCode.
type DNS ¶ added in v1.1.7
type DNS struct { BaseLayer // Header fields ID uint16 QR bool OpCode DNSOpCode AA bool // Authoritative answer TC bool // Truncated RD bool // Recursion desired RA bool // Recursion available Z uint8 // Reserved for future use ResponseCode DNSResponseCode QDCount uint16 // Number of questions to expect ANCount uint16 // Number of answers to expect NSCount uint16 // Number of authorities to expect ARCount uint16 // Number of additional records to expect // Entries Questions []DNSQuestion Answers []DNSResourceRecord Authorities []DNSResourceRecord Additionals []DNSResourceRecord // contains filtered or unexported fields }
DNS contains data from a single Domain Name Service packet.
func (*DNS) CanDecode ¶ added in v1.1.7
func (d *DNS) CanDecode() gopacket.LayerClass
CanDecode implements gopacket.DecodingLayer.
func (*DNS) DecodeFromBytes ¶ added in v1.1.7
func (d *DNS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
DecodeFromBytes decodes the slice into the DNS struct.
func (*DNS) NextLayerType ¶ added in v1.1.7
NextLayerType implements gopacket.DecodingLayer.
func (*DNS) SerializeTo ¶ added in v1.1.12
func (d *DNS) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
SerializeTo writes the serialized form of this layer into the SerializationBuffer, implementing gopacket.SerializableLayer.
type DNSClass ¶ added in v1.1.7
type DNSClass uint16
DNSClass defines the class associated with a request/response. Different DNS classes can be thought of as an array of parallel namespace trees.
type DNSMX ¶ added in v1.1.7
DNSMX is a mail exchange record, defining a mail server for a recipient's domain.
type DNSOPT ¶ added in v1.1.17
type DNSOPT struct { Code DNSOptionCode Data []byte }
DNSOPT is a DNS Option, see RFC6891, section 6.1.2
type DNSOpCode ¶ added in v1.1.7
type DNSOpCode uint8
DNSOpCode defines a set of different operation types.
type DNSOptionCode ¶ added in v1.1.17
type DNSOptionCode uint16
DNSOptionCode represents the code of a DNS Option, see RFC6891, section 6.1.2
const ( DNSOptionCodeNSID DNSOptionCode = 3 DNSOptionCodeDAU DNSOptionCode = 5 DNSOptionCodeDHU DNSOptionCode = 6 DNSOptionCodeN3U DNSOptionCode = 7 DNSOptionCodeEDNSClientSubnet DNSOptionCode = 8 DNSOptionCodeEDNSExpire DNSOptionCode = 9 DNSOptionCodeCookie DNSOptionCode = 10 DNSOptionCodeEDNSKeepAlive DNSOptionCode = 11 DNSOptionCodePadding DNSOptionCode = 12 DNSOptionCodeChain DNSOptionCode = 13 DNSOptionCodeEDNSKeyTag DNSOptionCode = 14 DNSOptionCodeEDNSClientTag DNSOptionCode = 16 DNSOptionCodeEDNSServerTag DNSOptionCode = 17 DNSOptionCodeDeviceID DNSOptionCode = 26946 )
DNSOptionCode known values. See IANA
func (DNSOptionCode) String ¶ added in v1.1.17
func (doc DNSOptionCode) String() string
type DNSQuestion ¶ added in v1.1.7
DNSQuestion wraps a single request (question) within a DNS query.
type DNSResourceRecord ¶ added in v1.1.7
type DNSResourceRecord struct { // Header Name []byte Type DNSType Class DNSClass TTL uint32 // RDATA Raw Values DataLength uint16 Data []byte // RDATA Decoded Values IP net.IP NS, CNAME, PTR []byte TXTs [][]byte SOA DNSSOA SRV DNSSRV MX DNSMX OPT []DNSOPT // See RFC 6891, section 6.1.2 URI DNSURI // Undecoded TXT for backward compatibility TXT []byte }
DNSResourceRecord wraps the data from a single DNS resource within a response.
func (*DNSResourceRecord) String ¶ added in v1.1.7
func (rr *DNSResourceRecord) String() string
type DNSResponseCode ¶ added in v1.1.7
type DNSResponseCode uint8
DNSResponseCode provides response codes for question answers.
const ( DNSResponseCodeNoErr DNSResponseCode = 0 // No error DNSResponseCodeFormErr DNSResponseCode = 1 // Format Error [RFC1035] DNSResponseCodeServFail DNSResponseCode = 2 // Server Failure [RFC1035] DNSResponseCodeNXDomain DNSResponseCode = 3 // Non-Existent Domain [RFC1035] DNSResponseCodeNotImp DNSResponseCode = 4 // Not Implemented [RFC1035] DNSResponseCodeRefused DNSResponseCode = 5 // Query Refused [RFC1035] DNSResponseCodeYXDomain DNSResponseCode = 6 // Name Exists when it should not [RFC2136] DNSResponseCodeYXRRSet DNSResponseCode = 7 // RR Set Exists when it should not [RFC2136] DNSResponseCodeNXRRSet DNSResponseCode = 8 // RR Set that should exist does not [RFC2136] DNSResponseCodeNotAuth DNSResponseCode = 9 // Server Not Authoritative for zone [RFC2136] DNSResponseCodeNotZone DNSResponseCode = 10 // Name not contained in zone [RFC2136] DNSResponseCodeBadVers DNSResponseCode = 16 // Bad OPT Version [RFC2671] DNSResponseCodeBadSig DNSResponseCode = 16 // TSIG Signature Failure [RFC2845] DNSResponseCodeBadKey DNSResponseCode = 17 // Key not recognized [RFC2845] DNSResponseCodeBadTime DNSResponseCode = 18 // Signature out of time window [RFC2845] DNSResponseCodeBadMode DNSResponseCode = 19 // Bad TKEY Mode [RFC2930] DNSResponseCodeBadName DNSResponseCode = 20 // Duplicate key name [RFC2930] DNSResponseCodeBadAlg DNSResponseCode = 21 // Algorithm not supported [RFC2930] DNSResponseCodeBadTruc DNSResponseCode = 22 // Bad Truncation [RFC4635] DNSResponseCodeBadCookie DNSResponseCode = 23 // Bad/missing Server Cookie [RFC7873] )
DNSResponseCode known values.
func (DNSResponseCode) String ¶ added in v1.1.7
func (drc DNSResponseCode) String() string
type DNSSOA ¶ added in v1.1.7
DNSSOA is a Start of Authority record. Each domain requires a SOA record at the cutover where a domain is delegated from its parent.
type DNSSRV ¶ added in v1.1.7
DNSSRV is a Service record, defining a location (hostname/port) of a server/service.
type DNSType ¶ added in v1.1.7
type DNSType uint16
DNSType defines the type of data being requested/returned in a question/answer.
const ( DNSTypeA DNSType = 1 // a host address DNSTypeNS DNSType = 2 // an authoritative name server DNSTypeMD DNSType = 3 // a mail destination (Obsolete - use MX) DNSTypeMF DNSType = 4 // a mail forwarder (Obsolete - use MX) DNSTypeCNAME DNSType = 5 // the canonical name for an alias DNSTypeSOA DNSType = 6 // marks the start of a zone of authority DNSTypeMB DNSType = 7 // a mailbox domain name (EXPERIMENTAL) DNSTypeMG DNSType = 8 // a mail group member (EXPERIMENTAL) DNSTypeMR DNSType = 9 // a mail rename domain name (EXPERIMENTAL) DNSTypeNULL DNSType = 10 // a null RR (EXPERIMENTAL) DNSTypeWKS DNSType = 11 // a well known service description DNSTypePTR DNSType = 12 // a domain name pointer DNSTypeHINFO DNSType = 13 // host information DNSTypeMINFO DNSType = 14 // mailbox or mail list information DNSTypeMX DNSType = 15 // mail exchange DNSTypeTXT DNSType = 16 // text strings DNSTypeAAAA DNSType = 28 // a IPv6 host address [RFC3596] DNSTypeSRV DNSType = 33 // server discovery [RFC2782] [RFC6195] DNSTypeOPT DNSType = 41 // OPT Pseudo-RR [RFC6891] DNSTypeURI DNSType = 256 // URI RR [RFC7553] )
DNSType known values.
type DbDescPkg ¶ added in v1.1.15
type DbDescPkg struct { Options uint32 InterfaceMTU uint16 Flags uint16 DDSeqNumber uint32 LSAinfo []LSAheader }
DbDescPkg is the struct from RFC 5340 A.3.3.
type Dot11 ¶ added in v1.1.4
type Dot11 struct { BaseLayer Type Dot11Type Proto uint8 Flags Dot11Flags DurationID uint16 Address1 net.HardwareAddr Address2 net.HardwareAddr Address3 net.HardwareAddr Address4 net.HardwareAddr SequenceNumber uint16 FragmentNumber uint16 Checksum uint32 QOS *Dot11QOS HTControl *Dot11HTControl DataLayer gopacket.Layer }
Dot11 provides an IEEE 802.11 base packet header. See http://standards.ieee.org/findstds/standard/802.11-2012.html for excruciating detail.
func (*Dot11) CanDecode ¶ added in v1.1.4
func (m *Dot11) CanDecode() gopacket.LayerClass
func (*Dot11) ChecksumValid ¶ added in v1.1.4
func (*Dot11) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11) NextLayerType ¶ added in v1.1.4
func (Dot11) SerializeTo ¶ added in v1.1.12
func (m Dot11) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error
type Dot11AckPolicy ¶ added in v1.1.4
type Dot11AckPolicy uint8
const ( Dot11AckPolicyNormal Dot11AckPolicy = 0 Dot11AckPolicyNone Dot11AckPolicy = 1 Dot11AckPolicyNoExplicit Dot11AckPolicy = 2 Dot11AckPolicyBlock Dot11AckPolicy = 3 )
func (Dot11AckPolicy) String ¶ added in v1.1.4
func (a Dot11AckPolicy) String() string
String provides a human readable string for Dot11AckPolicy. This string is possibly subject to change over time; if you're storing this persistently, you should probably store the Dot11AckPolicy value, not its string.
type Dot11Algorithm ¶ added in v1.1.4
type Dot11Algorithm uint16
const ( Dot11AlgorithmOpen Dot11Algorithm = 0 )
func (Dot11Algorithm) String ¶ added in v1.1.4
func (a Dot11Algorithm) String() string
String provides a human readable string for Dot11Algorithm. This string is possibly subject to change over time; if you're storing this persistently, you should probably store the Dot11Algorithm value, not its string.
type Dot11CodingType ¶ added in v1.1.15
type Dot11CodingType uint8
func (Dot11CodingType) String ¶ added in v1.1.15
func (a Dot11CodingType) String() string
type Dot11Ctrl ¶ added in v1.1.4
type Dot11Ctrl struct {
BaseLayer
}
Dot11Ctrl is a base for all IEEE 802.11 control layers.
func (*Dot11Ctrl) CanDecode ¶ added in v1.1.4
func (m *Dot11Ctrl) CanDecode() gopacket.LayerClass
func (*Dot11Ctrl) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11Ctrl) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11Ctrl) NextLayerType ¶ added in v1.1.4
type Dot11CtrlAck ¶ added in v1.1.4
type Dot11CtrlAck struct {
Dot11Ctrl
}
func (*Dot11CtrlAck) CanDecode ¶ added in v1.1.4
func (m *Dot11CtrlAck) CanDecode() gopacket.LayerClass
func (*Dot11CtrlAck) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11CtrlAck) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11CtrlAck) LayerType ¶ added in v1.1.4
func (m *Dot11CtrlAck) LayerType() gopacket.LayerType
type Dot11CtrlBlockAck ¶ added in v1.1.4
type Dot11CtrlBlockAck struct {
Dot11Ctrl
}
func (*Dot11CtrlBlockAck) CanDecode ¶ added in v1.1.4
func (m *Dot11CtrlBlockAck) CanDecode() gopacket.LayerClass
func (*Dot11CtrlBlockAck) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11CtrlBlockAck) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11CtrlBlockAck) LayerType ¶ added in v1.1.4
func (m *Dot11CtrlBlockAck) LayerType() gopacket.LayerType
type Dot11CtrlBlockAckReq ¶ added in v1.1.4
type Dot11CtrlBlockAckReq struct {
Dot11Ctrl
}
func (*Dot11CtrlBlockAckReq) CanDecode ¶ added in v1.1.4
func (m *Dot11CtrlBlockAckReq) CanDecode() gopacket.LayerClass
func (*Dot11CtrlBlockAckReq) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11CtrlBlockAckReq) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11CtrlBlockAckReq) LayerType ¶ added in v1.1.4
func (m *Dot11CtrlBlockAckReq) LayerType() gopacket.LayerType
type Dot11CtrlCFEnd ¶ added in v1.1.4
type Dot11CtrlCFEnd struct {
Dot11Ctrl
}
func (*Dot11CtrlCFEnd) CanDecode ¶ added in v1.1.4
func (m *Dot11CtrlCFEnd) CanDecode() gopacket.LayerClass
func (*Dot11CtrlCFEnd) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11CtrlCFEnd) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11CtrlCFEnd) LayerType ¶ added in v1.1.4
func (m *Dot11CtrlCFEnd) LayerType() gopacket.LayerType
type Dot11CtrlCFEndAck ¶ added in v1.1.4
type Dot11CtrlCFEndAck struct {
Dot11Ctrl
}
func (*Dot11CtrlCFEndAck) CanDecode ¶ added in v1.1.4
func (m *Dot11CtrlCFEndAck) CanDecode() gopacket.LayerClass
func (*Dot11CtrlCFEndAck) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11CtrlCFEndAck) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11CtrlCFEndAck) LayerType ¶ added in v1.1.4
func (m *Dot11CtrlCFEndAck) LayerType() gopacket.LayerType
type Dot11CtrlCTS ¶ added in v1.1.4
type Dot11CtrlCTS struct {
Dot11Ctrl
}
func (*Dot11CtrlCTS) CanDecode ¶ added in v1.1.4
func (m *Dot11CtrlCTS) CanDecode() gopacket.LayerClass
func (*Dot11CtrlCTS) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11CtrlCTS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11CtrlCTS) LayerType ¶ added in v1.1.4
func (m *Dot11CtrlCTS) LayerType() gopacket.LayerType
type Dot11CtrlPowersavePoll ¶ added in v1.1.4
type Dot11CtrlPowersavePoll struct {
Dot11Ctrl
}
func (*Dot11CtrlPowersavePoll) CanDecode ¶ added in v1.1.4
func (m *Dot11CtrlPowersavePoll) CanDecode() gopacket.LayerClass
func (*Dot11CtrlPowersavePoll) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11CtrlPowersavePoll) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11CtrlPowersavePoll) LayerType ¶ added in v1.1.4
func (m *Dot11CtrlPowersavePoll) LayerType() gopacket.LayerType
type Dot11CtrlRTS ¶ added in v1.1.4
type Dot11CtrlRTS struct {
Dot11Ctrl
}
func (*Dot11CtrlRTS) CanDecode ¶ added in v1.1.4
func (m *Dot11CtrlRTS) CanDecode() gopacket.LayerClass
func (*Dot11CtrlRTS) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11CtrlRTS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11CtrlRTS) LayerType ¶ added in v1.1.4
func (m *Dot11CtrlRTS) LayerType() gopacket.LayerType
type Dot11Data ¶ added in v1.1.4
type Dot11Data struct {
BaseLayer
}
Dot11Data is a base for all IEEE 802.11 data layers.
func (*Dot11Data) CanDecode ¶ added in v1.1.4
func (m *Dot11Data) CanDecode() gopacket.LayerClass
func (*Dot11Data) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11Data) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11Data) NextLayerType ¶ added in v1.1.4
type Dot11DataCFAck ¶ added in v1.1.4
type Dot11DataCFAck struct {
Dot11Data
}
func (*Dot11DataCFAck) CanDecode ¶ added in v1.1.4
func (m *Dot11DataCFAck) CanDecode() gopacket.LayerClass
func (*Dot11DataCFAck) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11DataCFAck) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11DataCFAck) LayerType ¶ added in v1.1.4
func (m *Dot11DataCFAck) LayerType() gopacket.LayerType
type Dot11DataCFAckNoData ¶ added in v1.1.4
type Dot11DataCFAckNoData struct {
Dot11Data
}
func (*Dot11DataCFAckNoData) CanDecode ¶ added in v1.1.4
func (m *Dot11DataCFAckNoData) CanDecode() gopacket.LayerClass
func (*Dot11DataCFAckNoData) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11DataCFAckNoData) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11DataCFAckNoData) LayerType ¶ added in v1.1.4
func (m *Dot11DataCFAckNoData) LayerType() gopacket.LayerType
type Dot11DataCFAckPoll ¶ added in v1.1.4
type Dot11DataCFAckPoll struct {
Dot11Data
}
func (*Dot11DataCFAckPoll) CanDecode ¶ added in v1.1.4
func (m *Dot11DataCFAckPoll) CanDecode() gopacket.LayerClass
func (*Dot11DataCFAckPoll) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11DataCFAckPoll) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11DataCFAckPoll) LayerType ¶ added in v1.1.4
func (m *Dot11DataCFAckPoll) LayerType() gopacket.LayerType
type Dot11DataCFAckPollNoData ¶ added in v1.1.4
type Dot11DataCFAckPollNoData struct {
Dot11Data
}
func (*Dot11DataCFAckPollNoData) CanDecode ¶ added in v1.1.4
func (m *Dot11DataCFAckPollNoData) CanDecode() gopacket.LayerClass
func (*Dot11DataCFAckPollNoData) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11DataCFAckPollNoData) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11DataCFAckPollNoData) LayerType ¶ added in v1.1.4
func (m *Dot11DataCFAckPollNoData) LayerType() gopacket.LayerType
type Dot11DataCFPoll ¶ added in v1.1.4
type Dot11DataCFPoll struct {
Dot11Data
}
func (*Dot11DataCFPoll) CanDecode ¶ added in v1.1.4
func (m *Dot11DataCFPoll) CanDecode() gopacket.LayerClass
func (*Dot11DataCFPoll) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11DataCFPoll) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11DataCFPoll) LayerType ¶ added in v1.1.4
func (m *Dot11DataCFPoll) LayerType() gopacket.LayerType
type Dot11DataCFPollNoData ¶ added in v1.1.4
type Dot11DataCFPollNoData struct {
Dot11Data
}
func (*Dot11DataCFPollNoData) CanDecode ¶ added in v1.1.4
func (m *Dot11DataCFPollNoData) CanDecode() gopacket.LayerClass
func (*Dot11DataCFPollNoData) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11DataCFPollNoData) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11DataCFPollNoData) LayerType ¶ added in v1.1.4
func (m *Dot11DataCFPollNoData) LayerType() gopacket.LayerType
type Dot11DataNull ¶ added in v1.1.4
type Dot11DataNull struct {
Dot11Data
}
func (*Dot11DataNull) CanDecode ¶ added in v1.1.4
func (m *Dot11DataNull) CanDecode() gopacket.LayerClass
func (*Dot11DataNull) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11DataNull) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
func (*Dot11DataNull) LayerType ¶ added in v1.1.4
func (m *Dot11DataNull) LayerType() gopacket.LayerType
type Dot11DataQOS ¶ added in v1.1.4
type Dot11DataQOS struct {
Dot11Ctrl
}
func (*Dot11DataQOS) DecodeFromBytes ¶ added in v1.1.4
func (m *Dot11DataQOS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error
type Dot11DataQOSCFAckPollNoData ¶ added in v1.1.4
type Dot11DataQOSCFAckPollNoData struct {
Dot11DataQOS
}
func (*Dot11DataQOSCFAckPollNoData) CanDecode ¶ added in v1.1.4
func (m *Dot11DataQOSCFAckPollNoData) CanDecode() gopacket.LayerClass
func (*Dot11DataQOSCFAckPollNoData) LayerType ¶ added in v1.1.4
func (m *Dot11DataQOSCFAckPollNoData) LayerType() gopacket.LayerType
func (*Dot11DataQOSCFAckPollNoData) NextLayerType ¶ added in v1.1.4
func (m *Dot11DataQOSCFAckPollNoData) NextLayerType() gopacket.LayerType
type Dot11DataQOSCFPollNoData ¶ added in v1.1.4
type Dot11DataQOSCFPollNoData struct {
Dot11DataQOS
}
func (*Dot11DataQOSCFPollNoData) CanDecode ¶ added in v1.1.4
func (m *Dot11DataQOSCFPollNoData) CanDecode() gopacket.LayerClass
func (*Dot11DataQOSCFPollNoData) LayerType ¶ added in v1.1.4
func (m *Dot11DataQOSCFPollNoData) LayerType() gopacket.LayerType
func (*Dot11DataQOSCFPollNoData) NextLayerType ¶ added in v1.1.4
func (m *Dot11DataQOSCFPollNoData) NextLayerType() gopacket.LayerType
type Dot11DataQOSData ¶ added in v1.1.4
type Dot11DataQOSData struct {
Dot11DataQOS
}
func (*Dot11DataQOSData) CanDecode ¶ added in v1.1.4
func (m *Dot11DataQOSData) CanDecode() gopacket.LayerClass
func (*Dot11DataQOSData) LayerType ¶ added in v1.1.4
func (m *Dot11DataQOSData) LayerType() gopacket.LayerType
func (*Dot11DataQOSData) NextLayerType ¶ added in v1.1.4
func (m *Dot11DataQOSData) NextLayerType() gopacket.LayerType
type Dot11DataQOSDataCFAck ¶ added in v1.1.4
type Dot11DataQOSDataCFAck struct {
Dot11DataQOS
}
func (*Dot11DataQOSDataCFAck) CanDecode ¶ added in v1.1.4
func (m *Dot11DataQOSDataCFAck) CanDecode() gopacket.LayerClass
func (*Dot11DataQOSDataCFAck) LayerType ¶ added in v1.1.4
func (m *Dot11DataQOSDataCFAck) LayerType() gopacket.LayerType
func (*Dot11DataQOSDataCFAck) NextLayerType ¶ added in v1.1.4
func (m *Dot11DataQOSDataCFAck) NextLayerType() gopacket.LayerType
type Dot11DataQOSDataCFAckPoll ¶ added in v1.1.4
type Dot11DataQOSDataCFAckPoll struct {
Dot11DataQOS
}
func (*Dot11DataQOSDataCFAckPoll) CanDecode ¶ added in v1.1.4
func (m *Dot11DataQOSDataCFAckPoll) CanDecode() gopacket.LayerClass
func (*Dot11DataQOSDataCFAckPoll) LayerType ¶ added in v1.1.4
func (m *Dot11DataQOSDataCFAckPoll) LayerType() gopacket.LayerType
func (*Dot11DataQOSDataCFAckPoll) NextLayerType ¶ added in v1.1.4
func (m *Dot11DataQOSDataCFAckPoll) NextLayerType() gopacket.LayerType
type Dot11DataQOSDataCFPoll ¶ added in v1.1.4
type Dot11DataQOSDataCFPoll struct {
Dot11DataQOS
}
func (*Dot11DataQOSDataCFPoll) CanDecode ¶ added in v1.1.4
func (m *Dot11DataQOSDataCFPoll) CanDecode() gopacket.LayerClass
func (*Dot11DataQOSDataCFPoll) LayerType ¶ added in v1.1.4
func (m *Dot11DataQOSDataCFPoll) LayerType() gopacket.LayerType
func (*Dot11DataQOSDataCFPoll) NextLayerType ¶ added in v1.1.4
func (m *Dot11DataQOSDataCFPoll) NextLayerType() gopacket.LayerType
type Dot11DataQOSNull ¶ added in v1.1.4
type Dot11DataQOSNull struct {
Dot11DataQOS
}
func (*Dot11DataQOSNull) CanDecode ¶ added in v1.1.4
func (m *Dot11DataQOSNull) CanDecode() gopacket.LayerClass
func (*Dot11DataQOSNull) LayerType ¶ added in v1.1.4
func (m *Dot11DataQOSNull) LayerType() gopacket.LayerType
func (*Dot11DataQOSNull) NextLayerType ¶ added in v1.1.4
func (m *Dot11DataQOSNull) NextLayerType() gopacket.LayerType
type Dot11Flags ¶ added in v1.1.4
type Dot11Flags uint8
Dot11Flags contains the set of 8 flags in the IEEE 802.11 frame control header, all in one place.
const ( Dot11FlagsToDS Dot11Flags = 1 << iota Dot11FlagsFromDS Dot11FlagsMF Dot11FlagsRetry Dot11FlagsPowerManagement Dot11FlagsMD Dot11FlagsWEP Dot11FlagsOrder )
func (Dot11Flags) FromDS ¶ added in v1.1.4
func (d Dot11Flags) FromDS() bool
func (Dot11Flags) MD ¶ added in v1.1.4
func (d Dot11Flags) MD() bool