SerializeTo writes the serialized form of this layer into the SerializationBuffer, implementing gopacket.SerializableLayer
(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions)
| 39 | // SerializeTo writes the serialized form of this layer into the |
| 40 | // SerializationBuffer, implementing gopacket.SerializableLayer |
| 41 | func (e *EAPOL) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { |
| 42 | bytes, _ := b.PrependBytes(4) |
| 43 | bytes[0] = e.Version |
| 44 | bytes[1] = byte(e.Type) |
| 45 | binary.BigEndian.PutUint16(bytes[2:], e.Length) |
| 46 | return nil |
| 47 | } |
| 48 | |
| 49 | // CanDecode returns the set of layer types that this DecodingLayer can decode. |
| 50 | func (e *EAPOL) CanDecode() gopacket.LayerClass { |
nothing calls this directly
no test coverage detected