pub fn new(proto: NlFamily) -> Result<Self, io::Error> {
        let fd =
            match unsafe { libc::socket(AddrFamily::Netlink.into(), libc::SOCK_RAW, proto.into()) }
            {
                i if i >= 0 => Ok(i),
                _ => Err(io::Error::last_os_error()),
            }?;
        Ok(NlSocket { fd })
    }
/// Wrapper around `socket()` syscall filling in the
/// netlink-specific information.
Wrapper around `socket()` syscall filling in the
netlink-specific information.
Wrapper around ` socket () ` syscall filling in the netlink - specific information .
pub fn new(proto: NlFamily) -> Result<Self, io::Error> {
        let fd =
            match unsafe { libc::socket(AddrFamily::Netlink.into(), libc::SOCK_RAW, proto.into()) }
            {
                i if i >= 0 => Ok(i),
                _ => Err(io::Error::last_os_error()),
            }?;
        Ok(NlSocket { fd })
    }
pub fn new ( proto : NlFamily ) -> Result < Self , io :: Error > { let fd = match unsafe { libc :: socket ( AddrFamily :: Netlink . into ( ) , libc :: SOCK_RAW , proto . into ( ) ) } { i if i >= 0 => Ok ( i ) , _ => Err ( io :: Error :: last_os_error ( ) ) , } ? ; Ok ( NlSocket { fd } ) }
Wrapper around `socket()` syscall filling in the
netlink-specific information.
Wrapper around ` socket () ` syscall filling in the netlink - specific information .
proto
NlFamily
proto
NlFamily