[Winpcap-users] pcap_live_dump() problem

MqX mqx at low-axs.net
Thu Nov 24 20:23:18 GMT 2005


Hello, i tryed to use this function and it never works.
it always returns -1, so i guess it fails at all because there packets 
to capture.

-- snipped ---
pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf);
for(d=alldevs, i=0; i < Listbox->GetCurSel(); d=d->next, i++); // that 
works :)
if 
((adhandle=pcap_open(d->name,65536,PCAP_OPENFLAG_PROMISCUOUS,1000,NULL,errbuf))==NULL)
{
    pcap_freealldevs(alldevs);
    return -1;
}
pcap_freealldevs(alldevs);
pcap_live_dump(adhandle,"~ldump",0,0);

// after some seconds

pcap_live_dump_ended(adhandle,0);
-- snipped ---

could someone point me in the right direction, plz.


Deston H.



More information about the Winpcap-users mailing list