[Winpcap-users] Crash with non existent device name
Rohan Sen
senrohan at gmail.com
Fri Feb 16 12:23:12 GMT 2007
Hi All,
Recently I upgraded one my app which used to WinPcap 3.1 to 4.0.
I replaced by pcap_open_live() api call with pcap_open().
After this change I noticed that if the device indicated by 'source'
argument does not exist the latest version of WinPcap
throws exception whereas the earlier version used to return -1 and I was
able to indicate the error to use and exit.
My call to pcap_open() is as follows:
fp = pcap_open(ifName,
65536,
/* We do not want to get the packet we sent */
PCAP_OPENFLAG_PROMISCUOUS|PCAP_OPENFLAG_NOCAPTURE_LOCAL,
1,
NULL,
errBuf);
I would really appreciate if someone could point me if any additional
check/function call is
necessary to avoid the exception.
--
thanks,
Rohan Sen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20070216/a3db1958/attachment.htm
More information about the Winpcap-users
mailing list