/* IEEE 802.3 stuff -- i will concentrate on .11 stuff before! */
#include <netinet/if_ether.h> /* for ethhdr struct */
#include <netinet/ip.h> /* ip */
/* IEEE 802.3 stuff -- i will concentrate on .11 stuff before! */
#include <netinet/if_ether.h> /* for ethhdr struct */
#include <netinet/ip.h> /* ip */
/* IEEE 802.11 stuff -- will become one include later ... */
#include "ieee80211.h" /* from hunz's aeolus, short hostap_wlan.h */
/* IEEE 802.11 stuff -- will become one include later ... */
#include "ieee80211.h" /* from hunz's aeolus, short hostap_wlan.h */
- pcap_dispatch(pcap_handle,-1,(pcap_handler)pcap_process,
- (u_char *)&p_count);
+ pcap_loop(pcap_handle,-1,pcap_process,(u_char *)p_count);
- printf("---> package %d ---- %s",count,
- ctime((const time_t*)pcap_header->ts.tv_sec));
+ printf("---> package %d ---- %s",*p_count,
+ ctime((const time_t*)&(pcap_header->ts.tv_sec)));
printf("pcap header: ");
printf("capture length=%d ",pcap_header->caplen);
printf("length(off wire)=%d\n",pcap_header->len);
/* is ieee802.11 ? -- we assume yes :) */
printf("pcap header: ");
printf("capture length=%d ",pcap_header->caplen);
printf("length(off wire)=%d\n",pcap_header->len);
/* is ieee802.11 ? -- we assume yes :) */
printf("time2live = %x ip_proto = %x\n",ntohs(ip_hdr->ip_ttl),
ntohs(ip_hdr->ip_p));
printf("chksum: %x\n",ntohs(ip_hdr->ip_sum));
printf("time2live = %x ip_proto = %x\n",ntohs(ip_hdr->ip_ttl),
ntohs(ip_hdr->ip_p));
printf("chksum: %x\n",ntohs(ip_hdr->ip_sum));
}
printf("all_hex_dump:\n");
for(i=sizeof(struct ethhdr);i<pcap_header->caplen;i++)
printf("%x ",*(package+i));
}
printf("all_hex_dump:\n");
for(i=sizeof(struct ethhdr);i<pcap_header->caplen;i++)
printf("%x ",*(package+i));