class representing a single ARP / NDP neighbor cache entry.
More...
#include <neighbor.hpp>
|
| | Neighbor ()=delete |
| | create instance.
|
| |
| | ~Neighbor ()=default |
| | destroy instance.
|
| |
| uint32_t | index () const noexcept |
| | get interface index.
|
| |
| const IpAddress & | ip () const noexcept |
| | get the destination address.
|
| |
| MacAddress | mac () const |
| | get the address resolved for this entry.
|
| |
| uint16_t | state () const |
| | get the NUD state bitmask.
|
| |
| bool | isReachable () const noexcept |
| | is the entry in NUD_REACHABLE state.
|
| |
| bool | isStale () const noexcept |
| | is the entry in NUD_STALE state.
|
| |
| bool | isPermanent () const noexcept |
| | is the entry in NUD_PERMANENT state (static).
|
| |
| bool | isIncomplete () const noexcept |
| | is the entry in NUD_INCOMPLETE state (resolution ongoing).
|
| |
| bool | isFailed () const noexcept |
| | is the entry in NUD_FAILED state.
|
| |
| int | set (const MacAddress &macAddress, uint16_t state=NUD_PERMANENT, bool sync=false) const |
| | update or replace this neighbor entry in the kernel table.
|
| |
| int | remove (bool sync=false) const |
| | remove this neighbor entry from the kernel table.
|
| |
class representing a single ARP / NDP neighbor cache entry.
◆ Ptr
◆ Neighbor()
| join::Neighbor::Neighbor |
( |
| ) |
|
|
delete |
◆ ~Neighbor()
| join::Neighbor::~Neighbor |
( |
| ) |
|
|
default |
◆ index()
| uint32_t Neighbor::index |
( |
| ) |
const |
|
noexcept |
get interface index.
- Returns
- interface index.
◆ ip()
get the destination address.
- Returns
- IP address.
◆ isFailed()
| bool Neighbor::isFailed |
( |
| ) |
const |
|
noexcept |
is the entry in NUD_FAILED state.
- Returns
- true if failed.
◆ isIncomplete()
| bool Neighbor::isIncomplete |
( |
| ) |
const |
|
noexcept |
is the entry in NUD_INCOMPLETE state (resolution ongoing).
- Returns
- true if incomplete.
◆ isPermanent()
| bool Neighbor::isPermanent |
( |
| ) |
const |
|
noexcept |
is the entry in NUD_PERMANENT state (static).
- Returns
- true if permanent.
◆ isReachable()
| bool Neighbor::isReachable |
( |
| ) |
const |
|
noexcept |
is the entry in NUD_REACHABLE state.
- Returns
- true if reachable.
◆ isStale()
| bool Neighbor::isStale |
( |
| ) |
const |
|
noexcept |
is the entry in NUD_STALE state.
- Returns
- true if stale.
◆ mac()
get the address resolved for this entry.
- Returns
- MAC address.
◆ remove()
| int Neighbor::remove |
( |
bool | sync = false | ) |
const |
remove this neighbor entry from the kernel table.
- Parameters
-
| sync | wait for operation completion if true. |
- Returns
- 0 on success, -1 on failure.
◆ set()
| int Neighbor::set |
( |
const MacAddress & | macAddress, |
|
|
uint16_t | state = NUD_PERMANENT, |
|
|
bool | sync = false ) const |
update or replace this neighbor entry in the kernel table.
- Parameters
-
| macAddress | new address to associate. |
| state | NUD state to set (default: NUD_PERMANENT). |
| sync | wait for operation completion if true. |
- Returns
- 0 on success, -1 on failure.
◆ state()
| uint16_t Neighbor::state |
( |
| ) |
const |
get the NUD state bitmask.
- Returns
- NUD state flags.
◆ NeighborManager
◆ operator<
compare two neighbor for ordering.
- Parameters
-
| lhs | left side key. |
| rhs | right side key. |
- Returns
- true if lhs is less than rhs.
◆ operator==
compare if two neighbor are equal.
- Parameters
-
| lhs | left side key. |
| rhs | right side key. |
- Returns
- true if both are equal.
The documentation for this class was generated from the following files: