1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
/*! This crate provides a library for parsing and manipulating network data, packet captures. # Usage Add `ether` to the dependencies in your `Cargo.toml` and the following to *root* of your crate: ```rust extern crate ether; ``` Here's a simple example that prints all packets received on interface `en0`: ```rust,no_run extern crate ether; use ether::tap; use ether::tap::Stream; fn main() { let mut tap = tap::Tap::new("en0").unwrap(); for packet in tap.stream().wait().filter_map(|p| p.ok()) { println!("{:?}", packet); } } ``` */ extern crate num; extern crate libc; extern crate glob; extern crate futures; mod utility; pub mod packet; pub mod pcap; pub mod tap;