Struct pcap::Device [] [src]

pub struct Device {
    pub name: String,
    pub desc: Option<String>,
}
[]

A network device name and (potentially) pcap's description of it.

Fields

name
desc

Methods

impl Device

fn open(self) -> Result<Capture<Active>, Error>[]

Opens a Capture<Active> on this device.

fn lookup() -> Result<Device, Error>[]

Returns the default Device suitable for captures according to pcap_lookupdev, or an error from pcap.

fn list() -> Result<Vec<Device>, Error>[]

Returns a vector of Devices known by pcap via pcap_findalldevs.

Trait Implementations

Derived Implementations

impl Debug for Device

fn fmt(&self, __arg_0: &mut Formatter) -> Result