[−][src]Struct pcap_async::Handle
Wrapper around a pcap_t handle to indicate live or offline capture, and allow the handle to be interrupted to stop capture.
Implementations
impl Handle
[src]
pub fn is_live_capture(&self) -> bool
[src]
pub fn live_capture(iface: &str) -> Result<Arc<Handle>, Error>
[src]
Create a live capture from a string representing an interface
pub fn file_capture<P: AsRef<Path>>(path: P) -> Result<Arc<Handle>, Error>
[src]
Create an offline capture from a path to a file
pub fn dead(linktype: i32, snaplen: i32) -> Result<Arc<Handle>, Error>
[src]
Create a dead handle, typically used for compiling bpf's
pub fn lookup() -> Result<Arc<Handle>, Error>
[src]
pub fn set_non_block(&self) -> Result<&Self, Error>
[src]
pub fn set_promiscuous(&self) -> Result<&Self, Error>
[src]
pub fn set_snaplen(&self, snaplen: u32) -> Result<&Self, Error>
[src]
pub fn set_timeout(&self, dur: &Duration) -> Result<&Self, Error>
[src]
pub fn set_buffer_size(&self, buffer_size: u32) -> Result<&Self, Error>
[src]
pub fn compile_bpf(&self, bpf: &str) -> Result<Bpf, Error>
[src]
pub fn set_bpf(&self, bpf: Bpf) -> Result<&Self, Error>
[src]
pub fn set_immediate_mode(&self) -> Result<&Self, Error>
[src]
pub fn activate(&self) -> Result<&Self, Error>
[src]
pub fn fd(&self) -> Result<i32, Error>
[src]
pub fn as_mut_ptr(&self) -> *mut pcap_t
[src]
pub fn interrupted(&self) -> bool
[src]
pub fn interrupt(&self)
[src]
pub fn stats(&self) -> Result<Stats, Error>
[src]
pub fn close(&self)
[src]
Trait Implementations
impl Clone for Handle
[src]
impl Drop for Handle
[src]
impl Send for Handle
[src]
impl Sync for Handle
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,