#[non_exhaustive]pub struct FdbEntry { /* private fields */ }Expand description
FDB entry information.
Represents a bridge forwarding database entry, containing MAC address to port mappings, optional VLAN information, and VXLAN remote endpoint data.
Fields are pub(crate); consumers read via the per-field
accessor methods. The struct is #[non_exhaustive] so the
kernel can grow new FDB attribute fields without it being a
breaking change.
Implementations§
Source§impl FdbEntry
impl FdbEntry
Sourcepub fn from_neighbor(msg: &NeighborMessage) -> Option<Self>
pub fn from_neighbor(msg: &NeighborMessage) -> Option<Self>
Create from a NeighborMessage.
Returns None if the message doesn’t have a valid MAC address.
Sourcepub fn state(&self) -> NeighborState
pub fn state(&self) -> NeighborState
Entry state (permanent / reachable / stale / …).
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
Check if this is a permanent (static) entry.
Sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
Check if this is a dynamic (learned) entry.
Sourcepub fn is_extern_learn(&self) -> bool
pub fn is_extern_learn(&self) -> bool
Check if entry was externally learned (NTF_EXT_LEARNED).
Sourcepub fn is_sticky(&self) -> bool
pub fn is_sticky(&self) -> bool
Check if the entry is sticky (NTF_STICKY) — not refreshed or replaced by MAC learning.
Sourcepub fn is_offloaded(&self) -> bool
pub fn is_offloaded(&self) -> bool
Check if the entry is offloaded to hardware (NTF_OFFLOADED). This flag is set by the kernel and read-only.