libpcap is the actual library underneath tcpdump and Wireshark, and its BPF filter compiler is the same one that later evolved into the Linux kernel's eBPF subsystem. Learning the pcap_open_live/pcap_setfilter/pcap_loop flow is what lets you write custom intrusion-detection sensors or protocol analyzers instead of just reading someone else's capture.