Wireshark uses libpcap on unix platforms and its WinPcap port for Windows. This library provides an API for capturing packets (Wireshark can also capture frames, but I have not found in pcap docs that pcap can do this).
, ; libpcap tcpdump unix ( , ) WinPcap Windows Filtering Platform Windows.
:
http://www.tcpdump.org/pcap3_man.html
http://www.winpcap.org/docs/docs_412/html/main.html