# kaitoy/pcap4j

A Java library for capturing, crafting, and sending packets.

Repository: https://github.com/kaitoy/pcap4j
Canonical: https://ross.abutalabs.com/products/pcap4j
Homepage: https://www.pcap4j.org/
Language: Java
License: NOASSERTION
License Family: other
Topics: capture-packets, winpcap, libpcap, sending-packets, java-library, pcap-library, jna, java, npcap
Last push: 2022-09-05T12:47:30+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5372, "days_push": 1458, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1240, forks 313 (observed 2026-08-28T04:04:06.132253+00:00)

## What it is
Pcap4J is a Java library for capturing, crafting, and sending network packets. It wraps native packet capture libraries (libpcap, WinPcap, Npcap) via JNA and exposes Java-oriented APIs for building packet analysis and network tools.

## Use cases
- capture packets in java
- craft and send custom network packets
- parse pcap packet headers like ethernet ipv4 tcp
- build a network sniffer or traffic analyzer in java
- list network interfaces and open live capture handles
- replay or generate packets for testing

## When to choose
- you need packet capture or injection from Java on JVM platforms
- you want a pure-Java API over libpcap/WinPcap/Npcap without writing JNI bindings
- you need to parse or build protocol packets (Ethernet, IP, TCP, etc.) programmatically

## When to avoid
- you need a high-performance packet processing pipeline where native tools like libpcap directly or DPDK are better
- you need a maintained project - releases stopped in 2022 and maintenance appears limited
- you need packet capture on platforms without libpcap/WinPcap/Npcap available

## Facets
- artifact type: library
- maturity: maintenance
- function: networking, developer-tools, parser
- domain: networking, security, developer-tools
- platform: windows, cross-platform, jvm
- tags: packet-capture, packet-crafting, libpcap, winpcap, npcap, jna, packet-sniffing, java-library, linux, macos

## Member repositories
- kaitoy/pcap4j (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:06.132253+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:09:53.233749+00:00, confidence not recorded.
  - readme: https://github.com/kaitoy/pcap4j (fetched 2026-08-28T04:04:06.132253+00:00, sha debb7cc7a85c)
  - homepage: https://www.pcap4j.org/ (fetched 2026-08-29T12:20:28.445390+00:00, sha 84334f32cd04)
- Data as of 2026-08-30T08:39:29.467469+00:00.
