Skip to main content

decode_frame

Function decode_frame 

Source
pub fn decode_frame(frame: &[u8]) -> Result<LldpFrame>
Expand description

Parse an Ethernet frame carrying an LLDPDU.

The EtherType is checked: the BPF filter already restricts capture to 0x88CC, but the UDP test transport carries whole frames from an arbitrary sender and must not trust them.