#[repr(C)]struct Ipv4Header {
info1: u8,
info2: u8,
len: [u8; 2],
ident: [u8; 2],
flags_and_frag: [u8; 2],
ttl: u8,
prot: u8,
csum: [u8; 2],
source: [u8; 4],
dest: [u8; 4],
}
Fields
info1: u8
info2: u8
len: [u8; 2]
ident: [u8; 2]
flags_and_frag: [u8; 2]
ttl: u8
prot: u8
csum: [u8; 2]
source: [u8; 4]
dest: [u8; 4]
Implementations
sourceimpl Ipv4Header
impl Ipv4Header
pub fn dest_addr(&self) -> Ipv4Addr
pub fn source_addr(&self) -> Ipv4Addr
pub fn packet_len(&self) -> usize
Trait Implementations
sourceimpl Clone for Ipv4Header
impl Clone for Ipv4Header
sourcefn clone(&self) -> Ipv4Header
fn clone(&self) -> Ipv4Header
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Ipv4Header
impl Debug for Ipv4Header
sourceimpl Header for Ipv4Header
impl Header for Ipv4Header
impl Copy for Ipv4Header
Auto Trait Implementations
impl ObjSafe for Ipv4Header
impl RefUnwindSafe for Ipv4Header
impl Send for Ipv4Header
impl Sync for Ipv4Header
impl Unpin for Ipv4Header
impl UnwindSafe for Ipv4Header
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more