Struct netlink_packet_route::rtnl::neighbour::NeighbourHeader
source · #[non_exhaustive]pub struct NeighbourHeader {
pub family: u8,
pub ifindex: u32,
pub state: u16,
pub flags: u8,
pub ntype: u8,
}Expand description
Neighbour headers have the following structure:
0 8 16 24 32
+----------------+----------------+----------------+----------------+
| family | padding |
+----------------+----------------+----------------+----------------+
| link index |
+----------------+----------------+----------------+----------------+
| state | flags | ntype |
+----------------+----------------+----------------+----------------+
NeighbourHeader exposes all these fields.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.family: u8§ifindex: u32§state: u16Neighbour cache entry state. It should be set to one of the
NUD_* constants
flags: u8Neighbour cache entry flags. It should be set to a combination
of the NTF_* constants
ntype: u8Neighbour cache entry type. It should be set to one of the
NDA_* constants.
Trait Implementations§
source§impl Clone for NeighbourHeader
impl Clone for NeighbourHeader
source§fn clone(&self) -> NeighbourHeader
fn clone(&self) -> NeighbourHeader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for NeighbourHeader
impl Debug for NeighbourHeader
source§impl Default for NeighbourHeader
impl Default for NeighbourHeader
source§fn default() -> NeighbourHeader
fn default() -> NeighbourHeader
Returns the “default value” for a type. Read more
source§impl Emitable for NeighbourHeader
impl Emitable for NeighbourHeader
source§impl<T: AsRef<[u8]>> Parseable<NeighbourMessageBuffer<T>> for NeighbourHeader
impl<T: AsRef<[u8]>> Parseable<NeighbourMessageBuffer<T>> for NeighbourHeader
source§fn parse(buf: &NeighbourMessageBuffer<T>) -> Result<Self, DecodeError>
fn parse(buf: &NeighbourMessageBuffer<T>) -> Result<Self, DecodeError>
Deserialize the current type.
source§impl PartialEq<NeighbourHeader> for NeighbourHeader
impl PartialEq<NeighbourHeader> for NeighbourHeader
source§fn eq(&self, other: &NeighbourHeader) -> bool
fn eq(&self, other: &NeighbourHeader) -> bool
This method tests for
self and other values to be equal, and is used
by ==.