MCPcopy Index your code
hub / github.com/google/gopacket / TestPacketIPv4Fragmented

Function TestPacketIPv4Fragmented

layers/decode_test.go:1349–1356  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1347}
1348
1349func TestPacketIPv4Fragmented(t *testing.T) {
1350 p := gopacket.NewPacket(testPacketIPv4Fragmented, LinkTypeEthernet, testDecodeOptions)
1351 if p.ErrorLayer() != nil {
1352 t.Error("Failed to decode packet:", p.ErrorLayer().Error())
1353 }
1354 checkLayers(p, []gopacket.LayerType{LayerTypeEthernet, LayerTypeIPv4, gopacket.LayerTypeFragment}, t)
1355 testSerializationWithOpts(t, p, testPacketIPv4Fragmented, gopacket.SerializeOptions{FixLengths: true, ComputeChecksums: true})
1356}
1357
1358// TestSCTPChunkBadLength tests for issue #146
1359func TestSCTPChunkBadLength(t *testing.T) {

Callers

nothing calls this directly

Calls 5

ErrorLayerMethod · 0.95
NewPacketFunction · 0.92
checkLayersFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…