Fw: [Winpcap-users] Different results of pcap_findalldevs_ex

ceo at triplebit.com ceo at triplebit.com
Sat Oct 18 04:45:13 GMT 2008



Thanks GV,
Here is a device list of all adapters. When using from the thread I miss the first one which is "...dialup and VPN...". 
I do almost nothing that I attached later after the device list.
Regards
I. lesher
device list
1.Adapter for generic dialup and VPN capture
2.CNet PRO200 PCI Fast Ethernet Adapter
3. Realtek RTLB139 Family Fast Ethernet Adapter
4. Realtek RTLB139 Family Fast Ethernet Adapter

the code before pcap_findalldevs -
void CDllPcapApp::Obtain_Device_List(void)

{

pcap_if_t *alldevs;

pcap_if_t *d;

int i=0;

char errbuf[PCAP_ERRBUF_SIZE];

pcap_t *adhandle;

u_int netmask;

char packet_filter[] = "ip";

struct bpf_program fcode;

/* Retrieve the device list from the local machine */

if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL /* auth is not needed */, &alldevs, errbuf) == -1)

{

fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf);

exit(1);

}

.

.


  What's the adapter which is missing?
  Are you calling/initializing any other component in that thread before calling pcap_findalldevs?

  Have a nice day
  GV

  ----- Original Message ----- 
    From: ceo at triplebit.com 
    To: winpcap-users at winpcap.org 
    Sent: Friday, October 17, 2008 1:35 AM
    Subject: [Winpcap-users] Different results of pcap_findalldevs_ex


    Hi all,
    Since no one answered my quetstion I'll do it again...

    I use pcap_findalldevs_ex from Dot Net application with Interoperability. I use it in different cases-
    1. In one case I use it from a Winform which is the main thread object and I get 3 network devices.
    2. In a second case I use it from a WorkerThread and I get only 2 network devices.
    Is that normal and is there a way to eliminate the difference?

    Regards
    I. lesher


----------------------------------------------------------------------------


    _______________________________________________
    Winpcap-users mailing list
    Winpcap-users at winpcap.org
    https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20081018/a82862dd/attachment.htm


More information about the Winpcap-users mailing list