[−][src]Struct pnet::packet::ipv6::FragmentPacket
A structure enabling manipulation of on the wire packets
Implementations
impl<'a> FragmentPacket<'a>
[src]
pub fn new(packet: &'p [u8]) -> Option<FragmentPacket<'p>>
[src]
Constructs a new FragmentPacket. If the provided buffer is less than the minimum required packet size, this will return None.
pub fn owned(packet: Vec<u8, Global>) -> Option<FragmentPacket<'static>>
[src]
Constructs a new FragmentPacket. If the provided buffer is less than the minimum required packet size, this will return None. With this constructor the FragmentPacket will own its own data and the underlying buffer will be dropped when the FragmentPacket is.
pub fn to_immutable(&'p self) -> FragmentPacket<'p>
[src]
Maps from a FragmentPacket to a FragmentPacket
pub fn consume_to_immutable(self) -> FragmentPacket<'a>
[src]
Maps from a FragmentPacket to a FragmentPacket while consuming the source
pub const fn minimum_packet_size() -> usize
[src]
The minimum size (in bytes) a packet of this type can be. It's based on the total size of the fixed-size fields.
pub fn packet_size(_packet: &Fragment) -> usize
[src]
The size (in bytes) of a Fragment instance when converted into a byte-array
pub fn get_next_header(&self) -> IpNextHeaderProtocol
[src]
Get the value of the next_header field
pub fn get_reserved(&self) -> u8
[src]
Get the reserved field.
pub fn get_fragment_offset_with_flags(&self) -> u16
[src]
Get the fragment_offset_with_flags field. This field is always stored big-endian within the struct, but this accessor returns host order.
pub fn get_id(&self) -> u32
[src]
Get the id field. This field is always stored big-endian within the struct, but this accessor returns host order.
impl<'p> FragmentPacket<'p>
[src]
pub fn get_fragment_offset(&self) -> u16
[src]
pub fn is_last_fragment(&self) -> bool
[src]
Trait Implementations
impl<'p> Debug for FragmentPacket<'p>
[src]
impl<'p> FromPacket for FragmentPacket<'p>
[src]
impl<'a> Packet for FragmentPacket<'a>
[src]
impl<'a> PacketSize for FragmentPacket<'a>
[src]
pub fn packet_size(&self) -> usize
[src]
impl<'p> PartialEq<FragmentPacket<'p>> for FragmentPacket<'p>
[src]
pub fn eq(&self, other: &FragmentPacket<'p>) -> bool
[src]
pub fn ne(&self, other: &FragmentPacket<'p>) -> bool
[src]
impl<'p> StructuralPartialEq for FragmentPacket<'p>
[src]
Auto Trait Implementations
impl<'p> RefUnwindSafe for FragmentPacket<'p>
impl<'p> Send for FragmentPacket<'p>
impl<'p> Sync for FragmentPacket<'p>
impl<'p> Unpin for FragmentPacket<'p>
impl<'p> UnwindSafe for FragmentPacket<'p>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,