pub struct NetlinkSkBuff { /* private fields */ }Expand description
A wrapper around struct sk_buff for generic netlink messages.
This type is intended to be specific for buffers used with netlink only, and other usecases for
struct sk_buff are out-of-scope for this abstraction.
§Invariants
The pointer has ownership over a valid sk_buff.
Implementations§
Source§impl NetlinkSkBuff
impl NetlinkSkBuff
Sourcepub fn new(size: usize, flags: Flags) -> Result<NetlinkSkBuff, AllocError>
pub fn new(size: usize, flags: Flags) -> Result<NetlinkSkBuff, AllocError>
Creates a new NetlinkSkBuff with the given size.
Sourcepub fn genlmsg_put(
self,
portid: u32,
seq: u32,
family: &'static Family,
cmd: u8,
) -> Result<GenlMsg, AllocError>
pub fn genlmsg_put( self, portid: u32, seq: u32, family: &'static Family, cmd: u8, ) -> Result<GenlMsg, AllocError>
Puts a generic netlink header into the NetlinkSkBuff.
Trait Implementations§
Source§impl Drop for NetlinkSkBuff
impl Drop for NetlinkSkBuff
Auto Trait Implementations§
impl !Send for NetlinkSkBuff
impl !Sync for NetlinkSkBuff
impl Freeze for NetlinkSkBuff
impl RefUnwindSafe for NetlinkSkBuff
impl Unpin for NetlinkSkBuff
impl UnsafeUnpin for NetlinkSkBuff
impl UnwindSafe for NetlinkSkBuff
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> KnownSize for T
impl<T> KnownSize for T
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
Initializes
slot. Read more