[][src]Function pcap_parser::data::get_packetdata

pub fn get_packetdata<'a>(
    i: &'a [u8],
    linktype: Linktype,
    caplen: usize
) -> Option<PacketData<'a>>

Get packet data, depending on linktype.

Get packet data, depending on linktype.

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