SerializeTo writes the serialized form of this layer into the SerializationBuffer, implementing gopacket.SerializableLayer.
(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions)
| 62 | // SerializeTo writes the serialized form of this layer into the |
| 63 | // SerializationBuffer, implementing gopacket.SerializableLayer. |
| 64 | func (l *Loopback) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { |
| 65 | bytes, err := b.PrependBytes(4) |
| 66 | if err != nil { |
| 67 | return err |
| 68 | } |
| 69 | binary.LittleEndian.PutUint32(bytes, uint32(l.Family)) |
| 70 | return nil |
| 71 | } |
| 72 | |
| 73 | func decodeLoopback(data []byte, p gopacket.PacketBuilder) error { |
| 74 | l := Loopback{} |
nothing calls this directly
no test coverage detected