Struct netlink_packet_core::header::NetlinkHeader
source · pub struct NetlinkHeader {
pub length: u32,
pub message_type: u16,
pub flags: u16,
pub sequence_number: u32,
pub port_number: u32,
}
Expand description
A Netlink header representation. A netlink header has the following structure:
0 8 16 24 32
+----------------+----------------+----------------+----------------+
| packet length (including header) |
+----------------+----------------+----------------+----------------+
| message type | flags |
+----------------+----------------+----------------+----------------+
| sequence number |
+----------------+----------------+----------------+----------------+
| port number (formerly known as PID) |
+----------------+----------------+----------------+----------------+
Fields§
§length: u32
Length of the netlink packet, including the header and the payload
message_type: u16
NetlinkMessage type. The meaning of this field depends on the netlink protocol family in use.
flags: u16
Flags. It should be set to one of the NLM_F_*
constants.
sequence_number: u32
Sequence number of the packet
port_number: u32
Port number (usually set to the the process ID)
Trait Implementations§
source§impl Clone for NetlinkHeader
impl Clone for NetlinkHeader
source§fn clone(&self) -> NetlinkHeader
fn clone(&self) -> NetlinkHeader
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 NetlinkHeader
impl Debug for NetlinkHeader
source§impl Default for NetlinkHeader
impl Default for NetlinkHeader
source§fn default() -> NetlinkHeader
fn default() -> NetlinkHeader
Returns the “default value” for a type. Read more
source§impl Emitable for NetlinkHeader
impl Emitable for NetlinkHeader
source§impl Hash for NetlinkHeader
impl Hash for NetlinkHeader
source§impl<'a, T: AsRef<[u8]> + ?Sized> Parseable<NetlinkBuffer<&'a T>> for NetlinkHeader
impl<'a, T: AsRef<[u8]> + ?Sized> Parseable<NetlinkBuffer<&'a T>> for NetlinkHeader
source§fn parse(buf: &NetlinkBuffer<&'a T>) -> Result<NetlinkHeader, DecodeError>
fn parse(buf: &NetlinkBuffer<&'a T>) -> Result<NetlinkHeader, DecodeError>
Deserialize the current type.
source§impl PartialEq for NetlinkHeader
impl PartialEq for NetlinkHeader
source§fn eq(&self, other: &NetlinkHeader) -> bool
fn eq(&self, other: &NetlinkHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for NetlinkHeader
impl Eq for NetlinkHeader
impl StructuralPartialEq for NetlinkHeader
Auto Trait Implementations§
impl Freeze for NetlinkHeader
impl RefUnwindSafe for NetlinkHeader
impl Send for NetlinkHeader
impl Sync for NetlinkHeader
impl Unpin for NetlinkHeader
impl UnwindSafe for NetlinkHeader
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)