tshark packet capture tutorial

C++
tshark -i wlan0 -w capture-output.pcap
Source

Also in C++: