pub struct Ipv4Fragmenter {
pub mtu: usize,
pub copy_options: bool,
}Expand description
Fragmenter for IPv4 packets.
Fields§
§mtu: usizeMaximum fragment size (including IP header).
copy_options: boolWhether to copy options to all fragments.
Implementations§
Source§impl Ipv4Fragmenter
impl Ipv4Fragmenter
Sourcepub fn copy_options(self, copy: bool) -> Self
pub fn copy_options(self, copy: bool) -> Self
Set whether to copy options to non-first fragments.
Sourcepub fn needs_fragmentation(&self, packet: &[u8]) -> bool
pub fn needs_fragmentation(&self, packet: &[u8]) -> bool
Check if a packet needs fragmentation.
Trait Implementations§
Source§impl Clone for Ipv4Fragmenter
impl Clone for Ipv4Fragmenter
Source§fn clone(&self) -> Ipv4Fragmenter
fn clone(&self) -> Ipv4Fragmenter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Ipv4Fragmenter
impl Debug for Ipv4Fragmenter
Auto Trait Implementations§
impl Freeze for Ipv4Fragmenter
impl RefUnwindSafe for Ipv4Fragmenter
impl Send for Ipv4Fragmenter
impl Sync for Ipv4Fragmenter
impl Unpin for Ipv4Fragmenter
impl UnsafeUnpin for Ipv4Fragmenter
impl UnwindSafe for Ipv4Fragmenter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more