pub struct Ipv4Repr {
pub src_addr: Address,
pub dst_addr: Address,
pub next_header: Protocol,
pub payload_len: usize,
pub hop_limit: u8,
}
Expand description
A high-level representation of an Internet Protocol version 4 packet header.
Fields§
§src_addr: Address
§dst_addr: Address
§next_header: Protocol
§payload_len: usize
§hop_limit: u8
Implementations§
§impl Repr
impl Repr
pub fn parse<T>(
packet: &Packet<&T>,
checksum_caps: &ChecksumCapabilities
) -> Result<Repr, Error>where
T: AsRef<[u8]> + ?Sized,
pub fn parse<T>( packet: &Packet<&T>, checksum_caps: &ChecksumCapabilities ) -> Result<Repr, Error>where T: AsRef<[u8]> + ?Sized,
Parse an Internet Protocol version 4 packet and return a high-level representation.
pub const fn buffer_len(&self) -> usize
pub const fn buffer_len(&self) -> usize
Return the length of a header that will be emitted from this high-level representation.
Trait Implementations§
impl Copy for Repr
impl Eq for Repr
impl StructuralEq for Repr
impl StructuralPartialEq for Repr
Auto Trait Implementations§
impl RefUnwindSafe for Repr
impl Send for Repr
impl Sync for Repr
impl Unpin for Repr
impl UnwindSafe for Repr
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