[][src]Struct net_parser_rs::layer3::ipv4::IPv4

pub struct IPv4<'a> {
    pub version_and_length: u8,
    pub tos: u8,
    pub raw_length: u16,
    pub id: u16,
    pub flags: u16,
    pub ttl: u8,
    pub protocol: InternetProtocolId,
    pub checksum: u16,
    pub src_ip: IpAddr,
    pub dst_ip: IpAddr,
    pub payload: &'a [u8],
    pub options: Option<&'a [u8]>,
    pub padding: Option<&'a [u8]>,
}

Fields

version_and_length: u8tos: u8raw_length: u16id: u16flags: u16ttl: u8protocol: InternetProtocolIdchecksum: u16src_ip: IpAddrdst_ip: IpAddrpayload: &'a [u8]options: Option<&'a [u8]>padding: Option<&'a [u8]>

Methods

impl<'a> IPv4<'a>[src]

pub fn as_bytes(&self) -> Vec<u8>[src]

pub fn parse<'b>(input: &'b [u8]) -> Result<(&'b [u8], IPv4<'b>), Error>[src]

Trait Implementations

impl<'a> Clone for IPv4<'a>[src]

impl<'a> Copy for IPv4<'a>[src]

impl<'a> Debug for IPv4<'a>[src]

impl<'a> FlowExtraction for IPv4<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for IPv4<'a>

impl<'a> Send for IPv4<'a>

impl<'a> Sync for IPv4<'a>

impl<'a> Unpin for IPv4<'a>

impl<'a> UnwindSafe for IPv4<'a>

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.