feat: fixed pcap linking and added nix packages
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
use std::{
|
||||
ffi::{CStr, CString},
|
||||
ptr, slice
|
||||
ptr, slice,
|
||||
};
|
||||
|
||||
pub mod error;
|
||||
@@ -410,7 +410,9 @@ impl<T: NotListening> Interface<T> {
|
||||
|
||||
Ok(stream::InterfaceStream {
|
||||
inner: tokio::io::unix::AsyncFd::with_interest(
|
||||
stream::InternalInterfaceStream::<DevActivated>::new(unsafe { std::mem::transmute(self) })?,
|
||||
stream::InternalInterfaceStream::<DevActivated>::new(unsafe {
|
||||
std::mem::transmute(self)
|
||||
})?,
|
||||
tokio::io::Interest::READABLE,
|
||||
)?,
|
||||
})
|
||||
|
||||
@@ -24,7 +24,10 @@ use futures::{ready, StreamExt};
|
||||
use tokio::io::unix::AsyncFd;
|
||||
use tokio_stream::StreamMap;
|
||||
|
||||
use super::{error, ffi, packets, Activated, NotListening, Disabled, State, Interface, DevActivated, DevDisabled, PcapDevIterator};
|
||||
use super::{
|
||||
error, ffi, packets, Activated, DevActivated, DevDisabled, Disabled, Interface, NotListening,
|
||||
PcapDevIterator, State,
|
||||
};
|
||||
|
||||
pub(crate) struct InternalInterfaceStream<T: Activated> {
|
||||
interface: Interface<T>,
|
||||
|
||||
Reference in New Issue
Block a user