[−][src]Struct neli::nl::Nlmsghdr
Top level netlink header and payload
Fields
nl_len: u32
Length of the netlink message
nl_type: T
Type of the netlink message
nl_flags: NlmFFlags
Flags indicating properties of the request or response
nl_seq: u32
Sequence number for netlink protocol
nl_pid: u32
ID of the netlink destination for requests and source for responses.
nl_payload: NlPayload<P>
Payload of netlink message
Implementations
impl<T, P> Nlmsghdr<T, P> where
T: NlType,
P: Nl,
[src]
T: NlType,
P: Nl,
pub fn new(
nl_len: Option<u32>,
nl_type: T,
nl_flags: NlmFFlags,
nl_seq: Option<u32>,
nl_pid: Option<u32>,
nl_payload: NlPayload<P>
) -> Self
[src]
nl_len: Option<u32>,
nl_type: T,
nl_flags: NlmFFlags,
nl_seq: Option<u32>,
nl_pid: Option<u32>,
nl_payload: NlPayload<P>
) -> Self
Create a new top level netlink packet with a payload.
pub fn get_payload(&self) -> Result<&P, NlError>
[src]
Get the payload if there is one or return an error.
pub fn header_size() -> usize
[src]
Get the size of the netlink header.
Trait Implementations
impl<T: Debug, P: Debug> Debug for Nlmsghdr<T, P>
[src]
impl<T, P> FromIterator<Nlmsghdr<T, P>> for NlBuffer<T, P>
[src]
pub fn from_iter<I>(i: I) -> Self where
I: IntoIterator<Item = Nlmsghdr<T, P>>,
[src]
I: IntoIterator<Item = Nlmsghdr<T, P>>,
impl<T, P> Nl for Nlmsghdr<T, P> where
T: NlType,
P: Nl,
[src]
T: NlType,
P: Nl,
pub fn serialize(&self, mem: SerBuffer<'_>) -> Result<(), SerError>
[src]
pub fn deserialize(mem: DeBuffer<'_>) -> Result<Self, DeError>
[src]
pub fn size(&self) -> usize
[src]
pub fn type_size() -> Option<usize>
[src]
pub fn type_asize() -> Option<usize>
[src]
pub fn asize(&self) -> usize
[src]
pub fn pad(&self, mem: SerBuffer<'_>) -> Result<(), SerError>
[src]
impl<T: PartialEq, P: PartialEq> PartialEq<Nlmsghdr<T, P>> for Nlmsghdr<T, P>
[src]
pub fn eq(&self, other: &Nlmsghdr<T, P>) -> bool
[src]
pub fn ne(&self, other: &Nlmsghdr<T, P>) -> bool
[src]
impl<T, P> StructuralPartialEq for Nlmsghdr<T, P>
[src]
Auto Trait Implementations
impl<T, P> RefUnwindSafe for Nlmsghdr<T, P> where
P: RefUnwindSafe,
T: RefUnwindSafe,
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, P> Send for Nlmsghdr<T, P> where
P: Send,
T: Send,
P: Send,
T: Send,
impl<T, P> Sync for Nlmsghdr<T, P> where
P: Sync,
T: Sync,
P: Sync,
T: Sync,
impl<T, P> Unpin for Nlmsghdr<T, P> where
P: Unpin,
T: Unpin,
P: Unpin,
T: Unpin,
impl<T, P> UnwindSafe for Nlmsghdr<T, P> where
P: UnwindSafe,
T: UnwindSafe,
P: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,