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

  }
}

文章標籤
全站熱搜
創作者介紹
創作者 Joy 的頭像
Joy

正Man's World

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