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

Method Put

parser.go:150–158  ·  view source on GitHub ↗

Put implements DecodingLayerContainer interface.

(d DecodingLayer)

Source from the content-addressed store, hash-verified

148
149// Put implements DecodingLayerContainer interface.
150func (dl DecodingLayerMap) Put(d DecodingLayer) DecodingLayerContainer {
151 for _, typ := range d.CanDecode().LayerTypes() {
152 if dl == nil {
153 dl = make(map[LayerType]DecodingLayer)
154 }
155 dl[typ] = d
156 }
157 return dl
158}
159
160// Decoder implements DecodingLayerContainer interface.
161func (dl DecodingLayerMap) Decoder(typ LayerType) (DecodingLayer, bool) {

Callers

nothing calls this directly

Calls 2

LayerTypesMethod · 0.65
CanDecodeMethod · 0.65

Tested by

no test coverage detected