[−][src]Struct netlink_proto::sys::Socket
An I/O object representing a Netlink socket.
Implementations
impl TokioSocket
[src]
pub fn bind(&mut self, addr: &SocketAddr) -> Result<(), Error>
[src]
This function will create a new Netlink socket and attempt to bind it to
the addr
provided.
pub fn bind_auto(&mut self) -> Result<SocketAddr, Error>
[src]
pub fn new(protocol: isize) -> Result<TokioSocket, Error>
[src]
pub fn connect(&self, addr: &SocketAddr) -> Result<(), Error>
[src]
pub async fn send(&'_ mut self, buf: &'_ [u8]) -> Result<usize, Error>
[src]
pub async fn send_to(
&'_ mut self,
buf: &'_ [u8],
addr: &'_ SocketAddr
) -> Result<usize, Error>
[src]
&'_ mut self,
buf: &'_ [u8],
addr: &'_ SocketAddr
) -> Result<usize, Error>
pub fn poll_send_to(
&mut self,
cx: &mut Context<'_>,
buf: &[u8],
addr: &SocketAddr
) -> Poll<Result<usize, Error>>
[src]
&mut self,
cx: &mut Context<'_>,
buf: &[u8],
addr: &SocketAddr
) -> Poll<Result<usize, Error>>
pub async fn recv(&'_ mut self, buf: &'_ mut [u8]) -> Result<usize, Error>
[src]
pub async fn recv_from(
&'_ mut self,
buf: &'_ mut [u8]
) -> Result<(usize, SocketAddr), Error>
[src]
&'_ mut self,
buf: &'_ mut [u8]
) -> Result<(usize, SocketAddr), Error>
pub async fn recv_from_full(
&'_ mut self
) -> Result<(Vec<u8, Global>, SocketAddr), Error>
[src]
&'_ mut self
) -> Result<(Vec<u8, Global>, SocketAddr), Error>
pub fn poll_recv_from(
&mut self,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<(usize, SocketAddr), Error>>
[src]
&mut self,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<(usize, SocketAddr), Error>>
pub fn poll_recv_from_full(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<(Vec<u8, Global>, SocketAddr), Error>>
[src]
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<(Vec<u8, Global>, SocketAddr), Error>>
pub fn set_pktinfo(&mut self, value: bool) -> Result<(), Error>
[src]
pub fn get_pktinfo(&self) -> Result<bool, Error>
[src]
pub fn add_membership(&mut self, group: u32) -> Result<(), Error>
[src]
pub fn drop_membership(&mut self, group: u32) -> Result<(), Error>
[src]
pub fn set_broadcast_error(&mut self, value: bool) -> Result<(), Error>
[src]
NETLINK_BROADCAST_ERROR
(since Linux 2.6.30). When not set, netlink_broadcast()
only
reports ESRCH
errors and silently ignore NOBUFS
errors.
pub fn get_broadcast_error(&self) -> Result<bool, Error>
[src]
pub fn set_no_enobufs(&mut self, value: bool) -> Result<(), Error>
[src]
NETLINK_NO_ENOBUFS
(since Linux 2.6.30). This flag can be used by unicast and broadcast
listeners to avoid receiving ENOBUFS
errors.
pub fn get_no_enobufs(&self) -> Result<bool, Error>
[src]
pub fn set_listen_all_namespaces(&mut self, value: bool) -> Result<(), Error>
[src]
NETLINK_LISTEN_ALL_NSID
(since Linux 4.2). When set, this socket will receive netlink
notifications from all network namespaces that have an nsid assigned into the network
namespace where the socket has been opened. The nsid is sent to user space via an ancillary
data.
pub fn get_listen_all_namespaces(&self) -> Result<bool, Error>
[src]
pub fn set_cap_ack(&mut self, value: bool) -> Result<(), Error>
[src]
NETLINK_CAP_ACK
(since Linux 4.2). The kernel may fail to allocate the necessary room
for the acknowledgment message back to user space. This option trims off the payload of
the original netlink message. The netlink message header is still included, so the user can
guess from the sequence number which message triggered the acknowledgment.
pub fn get_cap_ack(&self) -> Result<bool, Error>
[src]
Trait Implementations
impl AsRawFd for TokioSocket
[src]
impl FromRawFd for TokioSocket
[src]
pub unsafe fn from_raw_fd(fd: i32) -> TokioSocket
[src]
Auto Trait Implementations
impl !RefUnwindSafe for TokioSocket
impl Send for TokioSocket
impl Sync for TokioSocket
impl Unpin for TokioSocket
impl !UnwindSafe for TokioSocket
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>,