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

Function testSerialization

layers/decode_test.go:498–507  ·  view source on GitHub ↗
(t *testing.T, p gopacket.Packet, data []byte)

Source from the content-addressed store, hash-verified

496}
497
498func testSerialization(t *testing.T, p gopacket.Packet, data []byte) {
499 for _, opts := range []gopacket.SerializeOptions{
500 gopacket.SerializeOptions{},
501 gopacket.SerializeOptions{FixLengths: true},
502 gopacket.SerializeOptions{ComputeChecksums: true},
503 gopacket.SerializeOptions{FixLengths: true, ComputeChecksums: true},
504 } {
505 testSerializationWithOpts(t, p, data, opts)
506 }
507}
508
509func testSerializationWithOpts(t *testing.T, p gopacket.Packet, data []byte, opts gopacket.SerializeOptions) {
510 // Test re-serialization.

Callers 7

TestICMPFunction · 0.85
TestICMP6Function · 0.85
TestMPLSFunction · 0.85
TestPPPGREIPv4IPv6VLANFunction · 0.85
TestPPPoEICMPv6Function · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…