pub struct IpInfo {
pub ifname: String,
pub index: i32,
pub addr: IpAddr,
pub mask: u32,
pub family: u16,
pub state: IpState,
}
Expand description
Information in the kernel about an IP address.
Fields§
§ifname: String
§index: i32
§addr: IpAddr
§mask: u32
§family: u16
§state: IpState
Implementations§
Source§impl IpInfo
impl IpInfo
Sourcepub fn obj(&self) -> Result<(String, String), Error>
pub fn obj(&self) -> Result<(String, String), Error>
Get the address object associated with this IP address.
The return value is a tuple of the form (name, kind). Name is an illumos
address object name of the form link-name
/address-name
and kind is
the kind of address such as static, dhcp, etc.
Trait Implementations§
impl Eq for IpInfo
impl StructuralPartialEq for IpInfo
Auto Trait Implementations§
impl Freeze for IpInfo
impl RefUnwindSafe for IpInfo
impl Send for IpInfo
impl Sync for IpInfo
impl Unpin for IpInfo
impl UnwindSafe for IpInfo
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