3 releases

Uses old Rust 2015

0.1.2 Nov 12, 2018
0.1.1 Nov 12, 2018
0.1.0 Nov 5, 2018

#9 in #libpcap

MIT license

2MB
43K SLoC

C 41K SLoC // 0.3% comments Rust 1K SLoC // 0.0% comments Happy 771 SLoC M4 445 SLoC // 0.5% comments Visual Studio Project 232 SLoC Assembly 132 SLoC // 0.2% comments GNU Style Assembly 128 SLoC Python 74 SLoC // 0.7% comments Visual Studio Solution 27 SLoC Bitbake 8 SLoC

Rustcap

Rust wrapper for libpcap

*nix build status Windows build status

Developing

Windows

By default, rustcap will link with library files from the WinPcap SDK. These files (for both MSVC and MinGW) are included in this repo under the terms of the WinPcap License

MSVC:

  • Packet.lib
  • wpcap.lib

MinGW:

  • libpacket.a
  • libwpcap.a

To link with a different version of WinPcap such as Npcap, set env var... TODO. Note that Npcap is subject to a different License; see the documentation for details.

*nix

By default, rustcap will link with libpcap found by pkg-config or pcap-config (usually /usr/lib/libpcap.dylib or /usr/lib/libpcap.so). To change this, set env var... TODO

Runtime

Windows

At runtime, rustcap will expect Packet.dll and wpcap.dll to be available in the default DLL search paths (see https://msdn.microsoft.com/en-us/library/7d83bc18.aspx). This means in order to run tests and for any end user applications using this code, winpcap and its driver will need to be installed

You can download and install from the following sources:

Each download is subject to a different License; see the documentation for details.

*nix

libpcap will need to be available on the library path

Dependencies