Open source java library for libpcap and winpcap

jNetPcap is an open-source java library. It contains:

  • A Java wrapper for nearly all libpcap library native calls
  • Decodes captured packets in real-time
  • Provides a large library of network protocols (core protocols)
  • Users can easily add their own protocol definitions using java SDK
  • jNetPcap uses a mixture of native and java implementation for optimum packet decoding performance
  • Winpcap is also supported and all of its windows extensions are available, including remote captures.

To use jNetPcap in Linux, you have to add a reference in your project to jnetpcap.jar and copy into /usr/lib.

Get it from here.