Introduction
Pcap provides a packet processing library for rapid development on top of JVM languages.
Hello Pcap!
"Hello pcap!" implementation in different JVM languages.
var service = Service.Creator.create("PcapService");
try (var pcap = service.live(service.interfaces(), new DefaultLiveOptions())) {
pcap.loop(10, (args, header, buffer) -> {
System.out.println("Args : " + args);
System.out.println("Header : " + header);
System.out.println("Packet : " + buffer);
}, "Hello pcap!");
}
Version History
Pcap is using semantic versioning: https://semver.org
Version
Latest Version
Release Date
Latest Release
1.0.0
1.0.7
2020-12-24
2021-03-12
1.2.0
1.2.2
2021-02-01
2021-03-20
1.3.0
1.3.4
2021-05-02
2021-11-15
1.4.0
1.4.2
2021-12-25
2022-09-13
Project Status
Supported platforms
Linux (Tested)
Mac OS (Tested)
Windows (Tested)
FreeBSD (Tested)
Other OSes that supported by both Libpcap and JNA (Untested).
Requirements
Java 7+
Libpcap for Unix or Npcap for Windows
Java module system with java 9+
Pcap can be used in modular java 9+ applications with specific module name listed below:
pcap-spi: pcap.spi
pcap-jdk7: pcap.jdk7
pcap-common: pcap.common
pcap-codec: pcap.codec
Disclimers
Every types, methods, or fields annotated with @Incubating might be changed or removed at any time.
Every types, methods, or fields annotated with @Incubating does not imply that the functionality being tested.
Calling the @Restricted method might crash your app if you use it incorrectly. Make sure you know what you're doing with it.
Last updated
Was this helpful?