Struct lib::arp::ArpMessage[][src]

pub struct ArpMessage {
    pub source_hardware_address: MacAddr,
    pub source_protocol_address: Ipv4Addr,
    pub target_hardware_address: MacAddr,
    pub target_protocol_address: Ipv4Addr,
    pub ethertype: EtherType,
    pub operation: Operation,
}

Fields

source_hardware_address: MacAddrsource_protocol_address: Ipv4Addrtarget_hardware_address: MacAddrtarget_protocol_address: Ipv4Addrethertype: EtherTypeoperation: Operation

Implementations

impl ArpMessage[src]

pub fn new_arp_request(
    source_hardware_address: MacAddr,
    source_protocol_address: Ipv4Addr,
    target_protocol_address: Ipv4Addr
) -> Self
[src]

pub fn new_arp_response(
    source_hardware_address: MacAddr,
    source_protocol_address: Ipv4Addr,
    target_hardware_address: MacAddr,
    target_protocol_address: Ipv4Addr
) -> Self
[src]

pub fn new_rarp_request(
    source_hardware_address: MacAddr,
    target_hardware_address: MacAddr
) -> Self
[src]

pub fn new_rarp_response(
    source_hardware_address: MacAddr,
    source_protocol_address: Ipv4Addr,
    target_hardware_address: MacAddr,
    target_protocol_address: Ipv4Addr
) -> Self
[src]

pub fn send(&self, interface: &Interface) -> Result<(), Error>[src]

Trait Implementations

impl From<ArpPacket<'_>> for ArpMessage[src]

fn from(arp_packet: ArpPacket<'_>) -> Self[src]

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.