#[repr(C)]pub struct Nlmsghdr {
pub nlmsg_len: u32,
pub nlmsg_type: u16,
pub nlmsg_flags: u16,
pub nlmsg_seq: u32,
pub nlmsg_pid: u32,
}Expand description
A message header.
A copy of the packet description from the libmnl
- Netlink message:
|<----------------- 4 bytes ------------------->|
|<----- 2 bytes ------>|<------- 2 bytes ------>|
|-----------------------------------------------|
| Message length (including header) |
|-----------------------------------------------|
| Message type | Message flags |
|-----------------------------------------------|
| Message sequence number |
|-----------------------------------------------|
| Netlink PortID |
|-----------------------------------------------|
| |
. Payload .
|_______________________________________________| There is usually an extra header after the the Netlink header (at the
beginning of the payload). This extra header is specific of the Netlink
subsystem. After this extra header, it comes the sequence of attributes
that are expressed in Type-Length-Value (TLV) format.Fields§
§nlmsg_len: u32Length of message including header
nlmsg_type: u16Message content
nlmsg_flags: u16Additional flags
nlmsg_seq: u32Sequence number
nlmsg_pid: u32Sending process port ID
Implementations§
Source§impl Nlmsghdr
impl Nlmsghdr
pub fn nftnl_nlmsg_flags_native(&self) -> Option<NlmFFlags>
Sourcepub fn mnl_nlmsg_portid_ok(&self, portid: u32) -> bool
pub fn mnl_nlmsg_portid_ok(&self, portid: u32) -> bool
verifies that port id value is correct.
Sourcepub fn mnl_nlmsg_seq_ok(&self, seq: u32) -> bool
pub fn mnl_nlmsg_seq_ok(&self, seq: u32) -> bool
Verifies the sequence number is correct.
Trait Implementations§
impl Copy for Nlmsghdr
impl Eq for Nlmsghdr
impl StructuralPartialEq for Nlmsghdr
Auto Trait Implementations§
impl Freeze for Nlmsghdr
impl RefUnwindSafe for Nlmsghdr
impl Send for Nlmsghdr
impl Sync for Nlmsghdr
impl Unpin for Nlmsghdr
impl UnwindSafe for Nlmsghdr
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