summary refs log tree commit diff
path: root/net_util
diff options
context:
space:
mode:
Diffstat (limited to 'net_util')
-rw-r--r--net_util/src/lib.rs18
1 files changed, 2 insertions, 16 deletions
diff --git a/net_util/src/lib.rs b/net_util/src/lib.rs
index ba7d507..273c1ca 100644
--- a/net_util/src/lib.rs
+++ b/net_util/src/lib.rs
@@ -18,7 +18,7 @@ use std::str::FromStr;
 
 use libc::EPERM;
 
-use sys_util::{Error as SysError, Pollable};
+use sys_util::{Error as SysError};
 use sys_util::{ioctl_with_val, ioctl_with_ref, ioctl_with_mut_ref};
 
 #[derive(Debug)]
@@ -160,7 +160,7 @@ pub struct Tap {
     if_name: [u8; 16usize],
 }
 
-pub trait TapT: Read + Write + AsRawFd + Pollable + Send + Sized {
+pub trait TapT: Read + Write + AsRawFd + Send + Sized {
     /// Create a new tap interface. Set the `vnet_hdr` flag to true to allow offloading on this tap,
     /// which will add an extra 12 byte virtio net header to incoming frames. Offloading cannot
     /// be used if `vnet_hdr` is false.
@@ -449,14 +449,6 @@ impl AsRawFd for Tap {
     }
 }
 
-// Safe since the tap fd's lifetime lasts as long as this trait object, and the
-// tap fd is pollable.
-unsafe impl Pollable for Tap {
-    fn pollable_fd(&self) -> RawFd {
-        self.tap_file.as_raw_fd()
-    }
-}
-
 pub mod fakes {
     use super::*;
     use std::fs::OpenOptions;
@@ -549,12 +541,6 @@ pub mod fakes {
             self.tap_file.as_raw_fd()
         }
     }
-
-    unsafe impl Pollable for FakeTap {
-        fn pollable_fd(&self) -> RawFd {
-            self.tap_file.as_raw_fd()
-        }
-    }
 }
 
 #[cfg(test)]