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

Function LayerGoString

packet.go:394–398  ·  view source on GitHub ↗

LayerGoString returns a representation of the layer in Go syntax, taking care to shorten "very long" BaseLayer byte slices

(l Layer)

Source from the content-addressed store, hash-verified

392// LayerGoString returns a representation of the layer in Go syntax,
393// taking care to shorten "very long" BaseLayer byte slices
394func LayerGoString(l Layer) string {
395 b := new(bytes.Buffer)
396 layerGoString(l, b)
397 return b.String()
398}
399
400func (p *packet) packetString() string {
401 var b bytes.Buffer

Callers 1

TestIPv6JumbogramDecodeFunction · 0.92

Calls 2

layerGoStringFunction · 0.85
StringMethod · 0.65

Tested by 1

TestIPv6JumbogramDecodeFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…