pub trait NetlinkConnection {
// Required methods
fn new() -> Result<Self, NetlinkError>
where Self: Sized;
fn qdiscs(&self) -> Result<Vec<TcMsg>, NetlinkError>;
fn classes(&self, index: i32) -> Result<Vec<TcMsg>, NetlinkError>;
fn links(&self) -> Result<Vec<LinkMsg>, NetlinkError>;
}
Expand description
A trait for a netlink connection.
This trait allows for mocking the netlink connection in tests.
Required Methods§
Sourcefn new() -> Result<Self, NetlinkError>where
Self: Sized,
fn new() -> Result<Self, NetlinkError>where
Self: Sized,
Create a new netlink connection. Initialize a new netlink socket and connect to the kernel.