Struct libarp::arp::ArpMessage
source · 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: MacAddr
§source_protocol_address: Ipv4Addr
§target_hardware_address: MacAddr
§target_protocol_address: Ipv4Addr
§ethertype: EtherType
§operation: Operation
Implementations§
source§impl ArpMessage
impl ArpMessage
sourcepub fn new(
ethertype: EtherType,
source_hardware_address: MacAddr,
source_protocol_address: Ipv4Addr,
target_hardware_address: MacAddr,
target_protocol_address: Ipv4Addr,
operation: Operation
) -> Self
pub fn new( ethertype: EtherType, source_hardware_address: MacAddr, source_protocol_address: Ipv4Addr, target_hardware_address: MacAddr, target_protocol_address: Ipv4Addr, operation: Operation ) -> Self
Constructs a new ARP message with arbitrary field contents.
sourcepub fn new_arp_request(
source_hardware_address: MacAddr,
source_protocol_address: Ipv4Addr,
target_protocol_address: Ipv4Addr
) -> Self
pub fn new_arp_request( source_hardware_address: MacAddr, source_protocol_address: Ipv4Addr, target_protocol_address: Ipv4Addr ) -> Self
Constructs a new ARP request message.
sourcepub fn new_arp_response(
source_hardware_address: MacAddr,
source_protocol_address: Ipv4Addr,
target_hardware_address: MacAddr,
target_protocol_address: Ipv4Addr
) -> Self
pub fn new_arp_response( source_hardware_address: MacAddr, source_protocol_address: Ipv4Addr, target_hardware_address: MacAddr, target_protocol_address: Ipv4Addr ) -> Self
Constructs a new ARP response message.
sourcepub fn new_rarp_request(
source_hardware_address: MacAddr,
target_hardware_address: MacAddr
) -> Self
pub fn new_rarp_request( source_hardware_address: MacAddr, target_hardware_address: MacAddr ) -> Self
Constructs a new RARP request message.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ArpMessage
impl Send for ArpMessage
impl Sync for ArpMessage
impl Unpin for ArpMessage
impl UnwindSafe for ArpMessage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more