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))) ;

  }
}

arrow
arrow
    全站熱搜

    Joy 發表在 痞客邦 留言(0) 人氣()