Ethernet.PacketA decoded Ethernet header. protocol is None if the EtherType is not recognized.
val decode :
Bstr.t ->
len:int ->
(t * Slice_bstr.t, [> `Invalid_ethernet_packet ]) resultdecode buf ~len decodes an Ethernet frame from the first len bytes of buf. Returns the header and a slice pointing to the payload (after the 14-byte Ethernet header).