libpacket_core

Trait Packet

Source
pub trait Packet {
    // Required methods
    fn packet(&self) -> &[u8] ;
    fn payload(&self) -> &[u8] ;
}
Expand description

Represents a generic network packet.

Required Methods§

Source

fn packet(&self) -> &[u8]

Retrieve the underlying buffer for the packet.

Source

fn payload(&self) -> &[u8]

Retrieve the payload for the packet.

Implementors§