X-Git-Url: https://code.octet-stream.net/netwatcher/blobdiff_plain/f9df7170ac929ccc915642c2e6415e768973bb54..addb589bf51bdc5b5e253c0b5cbd47394e293ba7:/src/watch_linux.rs?ds=inline diff --git a/src/watch_linux.rs b/src/watch_linux.rs index 95ef106..c1f08a2 100644 --- a/src/watch_linux.rs +++ b/src/watch_linux.rs @@ -4,9 +4,6 @@ use std::os::fd::OwnedFd; use nix::libc::poll; use nix::libc::pollfd; use nix::libc::POLLIN; -use nix::libc::RTMGRP_IPV4_IFADDR; -use nix::libc::RTMGRP_IPV6_IFADDR; -use nix::libc::RTMGRP_LINK; use nix::sys::socket::bind; use nix::sys::socket::recv; use nix::sys::socket::socket; @@ -22,6 +19,10 @@ use crate::Error; use crate::List; use crate::Update; +const RTMGRP_IPV4_IFADDR: u32 = 0x10; +const RTMGRP_IPV6_IFADDR: u32 = 0x20; +const RTMGRP_LINK: u32 = 0x01; + pub(crate) struct WatchHandle { // Dropping will close the fd which will be detected by poll _pipefd: OwnedFd,