[Winpcap-users] adapter for generic dialup and vpn capture

inter inter intercepter.mail at gmail.com
Mon Jul 12 03:22:27 PDT 2010


i found some interesting thing.

if i call

    if(pcap_findalldevs(&alldevs, errbuf) == -1)
    {
        fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
        exit(1);
    }

from my dialog's code its returns 3 adapters:
1: adapter for generic dialup and vpn capture
2. my ethernet interface
3. my wifi interface

but if i call that function from thread, that is runs by next function:

CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)THREAD, CWnd::m_hWnd,
THREAD_PRIORITY_HIGHEST, &dwID[0]);

it returns only 2 adapters, ethernet and wifi, no generic.
i had that problem a few years ago, but didn't get it was messed with
threads, so i just looked for string 'generic' in adapter's name and skipped
it.

now i did it the other way, just called pcap_findalldevs before creating
thread and put result in global variable alldevs so thread see all 3
adapters.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20100712/04f7175f/attachment.htm 


More information about the Winpcap-users mailing list