pcap_t *p = pcap_open_live("eth0", 65535, 1, 500. errbuf); u_char *buf = pcap_next(p, pkt_hdr); in libpcap 1.7.4, if after 500 ms no packet is captured it's return NULL, in libpcap 1.8.1 pcap_next still waiting next packet.
pcap_t *p = pcap_open_live("eth0", 65535, 1, 500. errbuf);
u_char *buf = pcap_next(p, pkt_hdr);
in libpcap 1.7.4, if after 500 ms no packet is captured it's return NULL, in libpcap 1.8.1 pcap_next still waiting next packet.