[−][src]Struct packet_crafter::headers::IpHeader
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]
fn make(self) -> PacketData
[src]
fn parse(raw_data: &[u8]) -> Result<Box<Self>, ParseError>
[src]
fn get_proto(&self) -> Protocol
[src]
fn get_length(&self) -> u8
[src]
fn get_min_length() -> u8
[src]
Auto Trait Implementations
impl RefUnwindSafe for IpHeader
impl Send for IpHeader
impl Sync for IpHeader
impl Unpin for IpHeader
impl UnwindSafe for IpHeader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,