File: getdevices.rs

package info (click to toggle)
rust-pcap 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 584 kB
  • sloc: makefile: 2
file content (9 lines) | stat: -rw-r--r-- 315 bytes parent folder | download
1
2
3
4
5
6
7
8
9
fn main() {
    // list all of the devices pcap tells us are available
    for device in pcap::Device::list().expect("device lookup failed") {
        println!("Found device! {:?}", device);

        // now you can create a Capture with this Device if you want.
        // see example/easylisten.rs for how
    }
}