Function get_packetdata

Source
pub fn get_packetdata(
    i: &[u8],
    linktype: Linktype,
    caplen: usize,
) -> Option<PacketData<'_>>
Available on crate feature data only.
Expand description

Get packet data, depending on linktype.

Returns packet data, or None if data could not be extracted (for ex, inner parsing error). If linktype is not supported, PacketData::Unsupported is used.