[][src]Struct pnet::packet::ipv4::Ipv4

pub struct Ipv4 {
    pub version: u8,
    pub header_length: u8,
    pub dscp: u8,
    pub ecn: u8,
    pub total_length: u16,
    pub identification: u16,
    pub flags: u8,
    pub fragment_offset: u16,
    pub ttl: u8,
    pub next_level_protocol: IpNextHeaderProtocol,
    pub checksum: u16,
    pub source: Ipv4Addr,
    pub destination: Ipv4Addr,
    pub options: Vec<Ipv4Option, Global>,
    pub payload: Vec<u8, Global>,
}

Represents an IPv4 Packet.

Fields

version: u8header_length: u8dscp: u8ecn: u8total_length: u16identification: u16flags: u8fragment_offset: u16ttl: u8next_level_protocol: IpNextHeaderProtocolchecksum: u16source: Ipv4Addrdestination: Ipv4Addroptions: Vec<Ipv4Option, Global>payload: Vec<u8, Global>

Trait Implementations

impl Clone for Ipv4[src]

impl Debug for Ipv4[src]

Auto Trait Implementations

impl RefUnwindSafe for Ipv4

impl Send for Ipv4

impl Sync for Ipv4

impl Unpin for Ipv4

impl UnwindSafe for Ipv4

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.