Package libpcap

A system-independent interface for user-level packet capture

Libpcap provides a portable framework for low-level network
monitoring. Libpcap can provide network statistics collection,
security monitoring and network debugging. Since almost every system
vendor provides a different interface for packet capture, the libpcap
authors created this system-independent API to ease in porting and to
alleviate the need for several system-dependent packet capture modules
in each application.

Install libpcap if you need to do low-level network traffic monitoring
on your network.

Miscellanea (Section 7)
pcap_compile() is used to compile a string into a filter program. The resulting filter program can then be applied to some stream of packets to determine which...
For a live capture or “savefile”, libpcap supplies, as the return value of the pcap_datalink(3PCAP) routine, a value that indicates the type of link-layer...
When capturing traffic, each packet is given a time stamp representing, for incoming packets, the arrival time of the packet and, for outgoing packets, the...