Browse Source

initial commit

master
Michael Preisach 8 years ago
commit
0cafdeac9a
  1. 21
      src/main.rs

21
src/main.rs

@ -0,0 +1,21 @@
extern crate pcap;
extern crate regex;
extern crate pcap_file;
use pcap::Device;
fn main() {
let devices = Device::list().unwrap();
println!("Devices:");
for i in devices {
println!("Device {:?}", i);
}
let mut cap = Device::lookup().unwrap().open().unwrap();
while let Ok(packet) = cap.next() {
println!("received packet! {:?}", packet);
}
}
Loading…
Cancel
Save