MCPcopy
hub / github.com/google/gopacket / Layer

Interface Layer

base.go:19–27  ·  view source on GitHub ↗

Layer represents a single decoded packet layer (using either the OSI or TCP/IP definition of a layer). When decoding, a packet's data is broken up into a number of layers. The caller may call LayerType() to figure out which type of layer they've received from the packet. Optionally, they may then

Source from the content-addressed store, hash-verified

17// they may then use a type assertion to get the actual layer type for deep
18// inspection of the data.
19type Layer interface {
20 // LayerType is the gopacket type for this layer.
21 LayerType() LayerType
22 // LayerContents returns the set of bytes that make up this layer.
23 LayerContents() []byte
24 // LayerPayload returns the set of bytes contained within this layer, not
25 // including the layer itself.
26 LayerPayload() []byte
27}
28
29// Payload is a Layer containing the payload of a packet. The definition of
30// what constitutes the payload of a packet depends on previous layers; for

Callers 20

LayerStringFunction · 0.65
LayerMethod · 0.65
LayerClassMethod · 0.65
LayerMethod · 0.65
LayerClassMethod · 0.65
RunFunction · 0.65
benchmarkPacketDecodeFunction · 0.65
NextLayerTypeMethod · 0.65
LayerDumpFunction · 0.65
packetStringMethod · 0.65
assembleMethod · 0.65
checkLayersFunction · 0.65

Implementers 2

DecodeFailuredecode.go
LCMlayers/lcm.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…