Libpcap implement a network-based packet sniffer

The basic function is to capture all packets flowing through Ben Wang card.

  Implementation process:

  1. Find network equipment
  2. Open Network equipment
  3. Find the device information
  4. Input filtering rules
  5. Compile input rules
  6. Set the input rules
  7. Start capturing packets
  8. Call packet analysis module
  9. Output MAC, IP, and protocol data frame
  10. End 

Guess you like

Origin www.cnblogs.com/hshy/p/11408906.html