pub struct RouteHandle(/* private fields */);Implementations§
Source§impl RouteHandle
impl RouteHandle
pub fn new(handle: Handle) -> Self
Sourcepub fn get(&self, route: RouteMessage) -> RouteGetRequest
pub fn get(&self, route: RouteMessage) -> RouteGetRequest
Retrieve the list of routing table entries (equivalent to ip route show)
The RouteMessage could be built by crate::RouteMessageBuilder.
In order to perform kernel side filter, please enable
NETLINK_GET_STRICT_CHK via
rtnetlink::sys::Socket::set_netlink_get_strict_chk(true).
Sourcepub fn add(&self, route: RouteMessage) -> RouteAddRequest
pub fn add(&self, route: RouteMessage) -> RouteAddRequest
Add an routing table entry (equivalent to ip route add)
The RouteMessage could be built by crate::RouteMessageBuilder.
Sourcepub fn del(&self, route: RouteMessage) -> RouteDelRequest
pub fn del(&self, route: RouteMessage) -> RouteDelRequest
Delete the given routing table entry (equivalent to ip route del)
The RouteMessage could be built by crate::RouteMessageBuilder.
Trait Implementations§
Source§impl Clone for RouteHandle
impl Clone for RouteHandle
Source§fn clone(&self) -> RouteHandle
fn clone(&self) -> RouteHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RouteHandle
impl !RefUnwindSafe for RouteHandle
impl Send for RouteHandle
impl Sync for RouteHandle
impl Unpin for RouteHandle
impl !UnwindSafe for RouteHandle
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