Struct pnet::packet::ipv4::Ipv4OptionPacket []

pub struct Ipv4OptionPacket<'p> {
    // some fields omitted
}

A structure enabling manipulation of on the wire packets

Methods

impl<'a> Ipv4OptionPacket<'a>

fn new<'p>(packet: &'p [u8]) -> Option<Ipv4OptionPacket<'p>>

Constructs a new Ipv4OptionPacket. If the provided buffer is less than the minimum required packet size, this will return None.

fn to_immutable<'p>(&'p self) -> Ipv4OptionPacket<'p>

Maps from a Ipv4OptionPacket to a Ipv4OptionPacket

fn minimum_packet_size() -> usize

The minimum size (in bytes) a packet of this type can be. It's based on the total size of the fixed-size fields.

fn packet_size(_packet: &Ipv4Option) -> usize

The size (in bytes) of a Ipv4Option instance when converted into a byte-array

fn get_copied(&self) -> u1

Get the copied field

fn get_class(&self) -> u2

Get the class field

fn get_number(&self) -> u5

Get the number field

fn get_length(&self) -> u8

Get the length field

Trait Implementations

impl<'a> PacketSize for Ipv4OptionPacket<'a>

fn packet_size(&self) -> usize

impl<'a> Packet for Ipv4OptionPacket<'a>

fn packet<'p>(&'p self) -> &'p [u8]

fn payload<'p>(&'p self) -> &'p [u8]

impl<'p> FromPacket for Ipv4OptionPacket<'p>

type T = Ipv4Option

fn from_packet(&self) -> Ipv4Option

impl<'p> Debug for Ipv4OptionPacket<'p>

fn fmt(&self, fmt: &mut Formatter) -> Result

Derived Implementations

impl<'p> PartialEq for Ipv4OptionPacket<'p>

fn eq(&self, __arg_0: &Ipv4OptionPacket<'p>) -> bool

fn ne(&self, __arg_0: &Ipv4OptionPacket<'p>) -> bool