pcapplusplus

C++ framework for network packet sniffing, parsing and crafting

brewmacoslinux
Try with needOr install directly
Source

About

C++ network sniffing, packet parsing and crafting framework

Commands

pcapplusplus

Examples

Capture packets from network interface and display basic info$ pcapplusplus -i eth0 -c 10
Read and parse packets from a pcap file$ pcapplusplus -f capture.pcap -c 50
Filter packets by protocol (e.g., TCP only)$ pcapplusplus -i eth0 -f 'tcp' -c 20