[][src]Struct packet_crafter::headers::IpHeader

pub struct IpHeader { /* fields omitted */ }

Methods

impl IpHeader[src]

pub fn get_tos(&self) -> &u8[src]

pub fn get_packet_len(&self) -> &u16[src]

pub fn get_identification(&self) -> &u16[src]

pub fn get_next_protocol(&self) -> &u8[src]

pub fn get_src_ip(&self) -> &[u8; 4][src]

pub fn get_dst_ip(&self) -> &[u8; 4][src]

impl IpHeader[src]

pub fn set_tos(&mut self, v: u8)[src]

pub fn set_packet_len(&mut self, v: u16)[src]

pub fn set_identification(&mut self, v: u16)[src]

pub fn set_dst_ip(&mut self, v: [u8; 4])[src]

impl IpHeader[src]

pub fn new(src_ip: [u8; 4], dst_ip: [u8; 4]) -> Self[src]

pub fn set_next_protocol(&mut self, proto: Protocol) -> &mut Self[src]

Trait Implementations

impl Header for IpHeader[src]

Auto Trait Implementations

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, 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.