Struct netlink_rust::Socket [−][src]
pub struct Socket { /* fields omitted */ }
Netlink Socket can be used to communicate with the Linux kernel using the netlink protocol.
Methods
impl Socket
[src]
impl Socket
pub fn new(protocol: Protocol) -> Result<Socket>
[src]
pub fn new(protocol: Protocol) -> Result<Socket>
Create a new Socket
pub fn new_multicast(protocol: Protocol, groups: u32) -> Result<Socket>
[src]
pub fn new_multicast(protocol: Protocol, groups: u32) -> Result<Socket>
Create a new Socket which subscribes to the provided multi-cast groups
pub fn multicast_group_subscribe(&mut self, group: u32) -> Result<()>
[src]
pub fn multicast_group_subscribe(&mut self, group: u32) -> Result<()>
Subscribe to the multi-cast group provided
pub fn send_message<S: Sendable>(&mut self, payload: &S) -> Result<usize>
[src]
pub fn send_message<S: Sendable>(&mut self, payload: &S) -> Result<usize>
Send the provided package on the socket
pub fn receive(&mut self) -> Result<Vec<u8>>
[src]
pub fn receive(&mut self) -> Result<Vec<u8>>
Receive binary data on the socket
pub fn receive_messages(&mut self) -> Result<Vec<Message>>
[src]
pub fn receive_messages(&mut self) -> Result<Vec<Message>>
Receive Messages pending on the socket