+ my_info_struct.count=0;
+ my_info_struct.mmode=argv[2][0];
+ strcpy(my_info_struct.dev,argv[1]);
+ /* do loopp */
+ pcap_loop(pcap_handle,-1,pcap_process,(u_char *)&my_info_struct);
+ return 0;
+}
+
+
+/* pcap_process callback function */
+void pcap_process(u_char *info,const struct pcap_pkthdr *pcap_header,
+ const u_char *package) {
+
+ /* local variables */
+ struct ethhdr *e_hdr;
+ struct ip *ip_hdr;
+ struct ieee802_11_hdr *w_hdr;
+ struct info_struct *my_info_struct;
+ int i;
+
+ my_info_struct=(struct info_struct *)info;
+ ++(my_info_struct->count);
+