pub struct ArpCacheEntry {
pub ip_address: Ipv4Address,
pub mac_address: [u8; 6],
pub timestamp: u64,
pub state: ArpEntryState,
}Expand description
ARP cache entry
Fields§
§ip_address: Ipv4AddressIP address
mac_address: [u8; 6]MAC address
timestamp: u64Timestamp when entry was created
state: ArpEntryStateEntry state
Implementations§
Source§impl ArpCacheEntry
impl ArpCacheEntry
Sourcepub fn new(ip_address: Ipv4Address, mac_address: [u8; 6]) -> Self
pub fn new(ip_address: Ipv4Address, mac_address: [u8; 6]) -> Self
Create a new ARP cache entry
Sourcepub fn pending(ip_address: Ipv4Address) -> Self
pub fn pending(ip_address: Ipv4Address) -> Self
Create a pending ARP cache entry
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if the ARP cache entry has expired An entry expires after 1 minute (60000 ticks) in the Valid state
Trait Implementations§
Source§impl Clone for ArpCacheEntry
impl Clone for ArpCacheEntry
Source§fn clone(&self) -> ArpCacheEntry
fn clone(&self) -> ArpCacheEntry
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ArpCacheEntry
impl RefUnwindSafe for ArpCacheEntry
impl Send for ArpCacheEntry
impl Sync for ArpCacheEntry
impl Unpin for ArpCacheEntry
impl UnwindSafe for ArpCacheEntry
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)