feat: added tcp
sorry Judah
This commit is contained in:
@@ -92,6 +92,7 @@ extern "C" {
|
||||
pub fn rtnl_link_get_name(link: *mut rtnl_link) -> *const c_char;
|
||||
pub fn rtnl_link_get_ifindex(link: *mut rtnl_link) -> c_int;
|
||||
pub fn rtnl_link_get_type(link: *mut rtnl_link) -> *const c_char;
|
||||
pub fn rtnl_link_get_mtu(link: *mut rtnl_link) -> c_uint;
|
||||
|
||||
pub fn rtnl_route_alloc_cache(
|
||||
sock: *mut nl_sock,
|
||||
|
||||
@@ -91,6 +91,11 @@ impl Link {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the MTU of the link
|
||||
pub fn mtu(&self) -> u32 {
|
||||
unsafe { rtnl_link_get_mtu(self.link) }
|
||||
}
|
||||
|
||||
/// Determines the type of link. Ethernet devices are "veth or eth"
|
||||
pub fn ltype(&self) -> Option<String> {
|
||||
unsafe {
|
||||
|
||||
Reference in New Issue
Block a user