SerializeTo writes the serialized form of this layer into the SerializationBuffer, implementing gopacket.SerializableLayer. See the docs for gopacket.SerializableLayer for more info.
(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions)
| 198 | // SerializationBuffer, implementing gopacket.SerializableLayer. |
| 199 | // See the docs for gopacket.SerializableLayer for more info. |
| 200 | func (i *ICMPv6RouterSolicitation) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { |
| 201 | if err := i.Options.SerializeTo(b, opts); err != nil { |
| 202 | return err |
| 203 | } |
| 204 | |
| 205 | buf, err := b.PrependBytes(4) |
| 206 | if err != nil { |
| 207 | return err |
| 208 | } |
| 209 | |
| 210 | copy(buf, lotsOfZeros[:4]) |
| 211 | return nil |
| 212 | } |
| 213 | |
| 214 | // CanDecode returns the set of layer types that this DecodingLayer can decode. |
| 215 | func (i *ICMPv6RouterSolicitation) CanDecode() gopacket.LayerClass { |
nothing calls this directly
no test coverage detected