Initial commit
This commit is contained in:
commit
c1e7415871
56 changed files with 3225 additions and 0 deletions
19
tun/src/windows/queue.rs
Normal file
19
tun/src/windows/queue.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
use crate::TunInterface;
|
||||
use std::os::unix::io::{AsRawFd, IntoRawFd, RawFd};
|
||||
|
||||
pub struct TunQueue {
|
||||
inner: crate::windows::sys::
|
||||
inner: socket2::Socket,
|
||||
}
|
||||
|
||||
impl AsRawFd for TunQueue {
|
||||
fn as_raw_fd(&self) -> RawFd {
|
||||
self.socket.as_raw_fd()
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoRawFd for TunQueue {
|
||||
fn into_raw_fd(self) -> RawFd {
|
||||
self.socket.into_raw_fd()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue