Pcap

libpcap
Developer(s)The Tcpdump team
Stable release
1.10.4 / April 7, 2023; 17 months ago (2023-04-07)[1]
Repositorylibpcap on GitHub
Written inC
Operating systemLinux, Solaris, FreeBSD, NetBSD, OpenBSD, macOS, other Unix-like
TypeLibrary for packet capture
LicenseBSD[2]
Websitewww.tcpdump.org
WinPcap
Developer(s)Riverbed Technology
Final release
4.1.3 / March 8, 2013; 11 years ago (2013-03-08)[3]
Operating systemWindows
TypeLibrary for packet capture
LicenseFreeware
Websitewww.winpcap.org
Npcap
Developer(s)the Nmap project
Stable release
1.79 / January 19, 2024; 7 months ago (2024-01-19)[4]
Operating systemWindows
TypeLibrary for packet capture
LicenseProprietary (source available)
Websitenpcap.com

In the field of computer network administration, pcap is an application programming interface (API) for capturing network traffic. While the name is an abbreviation of packet capture, that is not the API's proper name. Unix-like systems implement pcap in the libpcap library; for Windows, there is a port of libpcap named WinPcap that is no longer supported or developed, and a port named Npcap for Windows 7 and later that is still supported.

Monitoring software may use libpcap, WinPcap, or Npcap to capture network packets traveling over a computer network and, in newer versions, to transmit packets on a network at the link layer, and to get a list of network interfaces for possible use with libpcap, WinPcap, or Npcap.

The pcap API is written in C, so other languages such as Java, .NET languages, and scripting languages generally use a wrapper; no such wrappers are provided by libpcap or WinPcap itself. C++ programs may link directly to the C API or make use of an object-oriented wrapper.

  1. ^ "tcpdump and libpcap latest release". tcpdump.org. Retrieved 2023-02-08.
  2. ^ "tcpdump and libpcap license". tcpdump.org. Retrieved 2020-05-02.
  3. ^ "WinPcap Changelog".
  4. ^ "npcap/CHANGELOG.md". GitHub.