/// Opens a new netlink socket, bound to this process' PID
Opens a new netlink socket, bound to this process' PID
Opens a new netlink socket bound to this process ' PID
fn open_nl_route_socket() -> Result<NlSocketHandle, NlError> {
    // retrieve PID
    let pid = unsafe { libc::getpid() } as u32;
    // open and bind socket
    // groups is set to None(0), because we want no notifications
    let sock = NlSocketHandle::connect(NlFamily::Route, Some(pid), &[])?;
    Ok(sock)
}
fn open_nl_route_socket ( ) -> Result < NlSocketHandle , NlError > { // retrieve PID let pid = unsafe { libc :: getpid ( ) } as u32 ; // open and bind socket // groups is set to None(0), because we want no notifications let sock = NlSocketHandle :: connect ( NlFamily :: Route , Some ( pid ) , & [ ] ) ? ; Ok ( sock ) }
Opens a new netlink socket, bound to this process' PID
Opens a new netlink socket bound to this process ' PID