hcap 0.0.2

A packet capture API around pcap/wpcap
Documentation
1
2
3
4
5
6
7
8
9
extern crate pcap;

fn main() {
    // get the default Device
    let mut cap = pcap::Device::lookup().unwrap().open().unwrap();

    // get a packet and print its bytes
    println!("{:?}", cap.next());
}