Pcap
lastmod 2025-04-22created 2021-12-165 edits
pcap (packet capture) consists of an API for capturing network traffic in the field of computer network administration. Unix-like operating systems include pcap in the libpcap library. Windows uses a port of libpcap called WinPcap.
Monitoring software can use libpcap or WinPcap to capture packets traveling over the network, and newer versions can not only transmit network packets at the link layer but also retrieve a list of network interfaces that can be used with libpcap or WinPcap.
The pcap API is written in C, and other languages such as Java, .NET languages, and scripting languages generally use wrappers. These wrappers are not provided by libpcap or WinPcap themselves. C++ programs can link directly to the C API. Only one partial object-oriented C++ wrapper is currently available from an external source.
Server packet analysis
See Tcpdump#Server packet analysis for details.