SerializeTo writes the serialized form of this layer into the SerializationBuffer, implementing gopacket.SerializableLayer. See the docs for gopacket.SerializableLayer for more info.
(b SerializeBuffer, opts SerializeOptions)
| 66 | // SerializationBuffer, implementing gopacket.SerializableLayer. |
| 67 | // See the docs for gopacket.SerializableLayer for more info. |
| 68 | func (p Payload) SerializeTo(b SerializeBuffer, opts SerializeOptions) error { |
| 69 | bytes, err := b.PrependBytes(len(p)) |
| 70 | if err != nil { |
| 71 | return err |
| 72 | } |
| 73 | copy(bytes, p) |
| 74 | return nil |
| 75 | } |
| 76 | |
| 77 | // decodePayload decodes data by returning it all in a Payload layer. |
| 78 | func decodePayload(data []byte, p PacketBuilder) error { |
nothing calls this directly
no test coverage detected