l2_packet_winpcap.c | 30 #include <pcap.h> 48 pcap_t *pcap; member in struct:l2_packet_data 82 ret = pcap_sendpacket(l2->pcap, buf, len); 93 ret = pcap_sendpacket(l2->pcap, (u8 *) eth, mlen); 133 pcap_dispatch(l2->pcap, 1, l2_packet_receive_cb, 169 l2->pcap = pcap_open_live(l2->ifname, 2500, 0, 1, pcap_err); 170 if (l2->pcap == NULL) { 182 if (pcap_compile(l2->pcap, &pcap_fp, pcap_filter, 1, pcap_netp) < 0) { 183 fprintf(stderr, "pcap_compile: %s\n", pcap_geterr(l2->pcap)); 187 if (pcap_setfilter(l2->pcap, &pcap_fp) < 0) [all...] |