i found some interesting thing.<br><br>if i call <br><br> if(pcap_findalldevs(&alldevs, errbuf) == -1)<br> {<br> fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);<br> exit(1);<br>
}<br><br>from my dialog's code its returns 3 adapters:<br>1: adapter for generic dialup and vpn capture<br>2. my ethernet interface<br>3. my wifi interface<br><br>but if i call that function from thread, that is runs by next function:<br>
<br>CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)THREAD, CWnd::m_hWnd, THREAD_PRIORITY_HIGHEST, &dwID[0]);<br><br>it returns only 2 adapters, ethernet and wifi, no generic.<br>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.<br>
<br>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. <br>