pub struct NdpCache { /* private fields */ }Expand description
NDP neighbor cache
Implementations§
Source§impl NdpCache
impl NdpCache
Sourcepub fn lookup(&self, addr: &Ipv6Address) -> Option<MacAddress>
pub fn lookup(&self, addr: &Ipv6Address) -> Option<MacAddress>
Look up a neighbor’s MAC address.
Returns Some(MacAddress) if the entry is in Reachable or Stale state.
Sourcepub fn update(&mut self, addr: Ipv6Address, mac: MacAddress, state: NdpState)
pub fn update(&mut self, addr: Ipv6Address, mac: MacAddress, state: NdpState)
Insert or update a neighbor cache entry.
Sourcepub fn mark_incomplete(&mut self, addr: Ipv6Address)
pub fn mark_incomplete(&mut self, addr: Ipv6Address)
Mark an entry as Incomplete (address resolution started).
Sourcepub fn age_entries(&mut self)
pub fn age_entries(&mut self)
Transition a Reachable entry to Stale if its reachable time has expired.
Sourcepub fn remove(&mut self, addr: &Ipv6Address)
pub fn remove(&mut self, addr: &Ipv6Address)
Remove an entry from the cache.
Sourcepub fn get_entries(&self) -> Vec<(Ipv6Address, MacAddress, NdpState)>
pub fn get_entries(&self) -> Vec<(Ipv6Address, MacAddress, NdpState)>
Get all cache entries for display.