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