[][src]Struct pcap_async::Handle

pub struct Handle { /* fields omitted */ }

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.