void
packet_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
{
struct ip *iph ;
if(ntohs(((struct ether_header *)p)->ether_type) == ETHERTYPE_IP){
printf("Ethernet header size:%d\n",(sizeof(struct ether_header)));
printf("IP header size:%d\n",(sizeof(struct ip))) ;
}
}
全站熱搜