Re: [tcpdump-workers] why does pcap_dispatch return 0?

2015-10-11 Thread Guy Harris
On Oct 11, 2015, at 5:00 PM, liu wen wrote: > int pcapfd; > pcap_t *pcap_handle; > struct event pcap_ev; > > pcap_handle = create_pcap("eth0", NONBLOCKING); > pcapfd = pcap_get_selectable_fd(pcap_handle); > if(pcapfd<0){ > perror("pcap_get_selectable_fd() failed!\n"); > exit(1); > } > > if (s

[tcpdump-workers] why does pcap_dispatch return 0?

2015-10-11 Thread liu wen
I'm using libpcap and libevent in a program. the related source codes are: const u_int16_t RELAY_PORT = 8000; pcap_t *create_pcap(const void *dev, pcap_sty