Search code examples
cethernet

How to get network packets from Ethernet card in ANSI C?


I have to write some code to retrieve network packets from an Ethernet card in Windows using ANSI C. Can anybody tell me where to get started?


Solution

  • The easiest way to do this is to use the PCAP library, there's a version for Windows here and a basic example here