Menu

#179 pcap_setdirection(3PCAP) issues

Git head
closed
nobody
None
5
2013-11-20
2013-01-09
Francesco
No

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 ?

Discussion

  • Denis Ovsienko

    Denis Ovsienko - 2013-11-20
    • status: open --> closed
    • Group: --> Git head
     
  • Denis Ovsienko

    Denis Ovsienko - 2013-11-20

    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.

     
MongoDB Logo MongoDB