I got some issues with pcap_setdirection(3PCAP), because after opening in live mode a net device, i call the function pcap_setdirection in order to get only the incoming packet, the pcap_setdirection successfully returns, the i call the function pcap_next_ex(), but it always returns with 0, clear sign of error.
is that a bug ? or can anyone explain to me what's wrong ? Thanks in advance.
This is the code:
pcap_t* handle = pcap_open_live(name, 65535, PROMISC, NO_TIME_OUT, errbuf);
if( pcap_setdirection(handle,PCAP_D_IN) == -1){cout << "error setting read direction" <<endl;return false;}
pcap_next_ex(handle, &header, &pkt_data); //it always return with 0 why ?
Administrators of the "libpcap" SourceForge project have superseded this tracker item (formerly artifact 3600071, now bug 179) with issue 183 of the "libpcap" GitHub project.