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