pcap 0.1.1

A packet capture API around pcap/wpcap
docs.rs failed to build pcap-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: pcap-2.0.0

pcap Build status Crates.io

Documentation

This is a Rust language crate for accessing the packet sniffing capabilities of pcap (or wpcap on Windows). It is limited in functionality, so if you need anything feel free to post an issue or submit a pull request!

  • List devices
  • Open capture handle on a device
  • Configure some parameters like promiscuity and buffer length
  • Get packets from the capture handle

See examples for usage.

Building

Windows

Install WinPcap.

Place wpcap.dll in your C:\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\ directory on 64 bit or C:\Rust\bin\rustlib\i686-pc-windows-gnu\lib\ on 32 bit.

Linux

On Debian based Linux, install libpcap-dev.

Mac OS X

Currently not supported because I don't have OSX, let me know if you can help.