[Winpcap-users] Problem with PCAP_OPENFLAG_NOCAPTURE_LOCAL on
leo0888 at gmail.com
Mon Sep 10 22:13:54 GMT 2007
I am having problem using pcap_open() with PCAP_OPENFLAG_NOCAPTURE_LOCAL on
windows 2000. I modified basic_dump.c with code from sendpack.c to send
100 bytes to the selected network adapter, but used pcap_open() (from
userlevelbridge) instead of pcap_open_live(). I resulted exe works on win
xp but not on win 2000. I compiled on cygwin and verified using ethereal to
capture the packet. The pcap_open code from userlevelbridge is:
if((adhandle = pcap_open(d->name, // name of the device
65536, // portion of the packet to capture.
// 65536 grants that the whole packet will be captured
on every link layer.
PCAP_OPENFLAG_PROMISCUOUS | // flags. We specify that we
don't want to capture loopback packets, and that the driver should deliver
us the packets as fast as possible
500, // read timeout
NULL, // remote authentication
errbuf // error buffer
)) == NULL)
fprintf(stderr,"\nUnable to open the adapter. %s is not supported by
/* Free the device list */
If I commented out the PCAP_OPENFLAG_NOCAPTURE_LOCAL flag, then it would
work on both win XP and 2000 platforms, but the packet is looped back.
Any help to make the PCAP_OPENFLAG_NOCAPTURE_LOCAL flag work on win 2000
would be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Winpcap-users