ProtocolGuessingDecoder attempts to guess the protocol of the bytes it's given, then decode the packet accordingly. Its algorithm for guessing is: If the packet starts with byte 0x45-0x4F: IPv4 If the packet starts with byte 0x60-0x6F: IPv6 Otherwise: Error See draft-hsmit-isis-aal5mux-00.txt for
| 31 | // Otherwise: Error |
| 32 | // See draft-hsmit-isis-aal5mux-00.txt for more detail on this approach. |
| 33 | type ProtocolGuessingDecoder struct{} |
| 34 | |
| 35 | func (ProtocolGuessingDecoder) Decode(data []byte, p gopacket.PacketBuilder) error { |
| 36 | switch data[0] { |
nothing calls this directly
no outgoing calls
no test coverage detected