#include "sniff.h" extern FILE *rawtcp; int readPacket(struct etherpacket *p,int l) { static int n=0; int l1; struct pcap_pkthdr ph; if (fread(&ph,16,1,rawtcp) != 1) return 0; l1=fread(p,ph.caplen,1,rawtcp); if (l1 > 9) { n++; fprintf(stderr,"%d ",n); } return ph.caplen; }