C语言编程检测sniffer
1、首先打开VC++6.0

3、选择C++ source file 新建一个空白文档

5、声明一个结构体struct arp_struct {/*定义一个arp帧结构*/ u_char dst_mac[6]; u_char src_mac[6]; u_short pkt_type; u_short hw_type; u_short pro_type; u_char hw_len; u_char pro_len; u_short arp_op; u_char sender_eth[6]; u_char sender_ip[4]; u_char target_eth[6]; u_char target_ip[4]; };
