in reply to Using socket instead of pcap
pcap and friends capture and analyze packets at layer 2 and above.
I'm hoping that is enough said - case closed.
Syntactic sugar causes cancer of the semicolon. --Alan Perlis