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)
| 120 | // SerializationBuffer, implementing gopacket.SerializableLayer. |
| 121 | // See the docs for gopacket.SerializableLayer for more info. |
| 122 | func (p *Fragment) SerializeTo(b SerializeBuffer, opts SerializeOptions) error { |
| 123 | bytes, err := b.PrependBytes(len(*p)) |
| 124 | if err != nil { |
| 125 | return err |
| 126 | } |
| 127 | copy(bytes, *p) |
| 128 | return nil |
| 129 | } |
| 130 | |
| 131 | // decodeFragment decodes data by returning it all in a Fragment layer. |
| 132 | func decodeFragment(data []byte, p PacketBuilder) error { |
nothing calls this directly
no test coverage detected