[Winpcap-users] pcap_sendpacket - different results on 3.1 and 4.0

Helmut Vaupotitsch helmut.vaupotitsch at gmx.net
Sun Oct 25 00:46:17 PDT 2009


My application uses the result of pcap_sendpacket() for a mechanism to 
detect if a network cable is connected to the bound adapter. The result 
is different if no cable is connected and a different driver is used:

LibraryVersion: WinPcap version 3.1 (packet.dll version 3, 1, 0, 27), 
based on libpcap version 0.9[.x].
Result is < 0 if no cable is connected
FLibraryVersion: WinPcap version 4.0.2 (packet.dll version, 
based on libpcap version 0.9.5'
Result is always 0

Question: What´s the reason for this behaviour, does the newer driver 
use a transmitt queue internally? i read also 

Question: how can i detect undoubtable if the bound adapter is currently 
physically connected(Link is active)?
i could use GetIfTable from IPHLPAPI.DLL and look at the "Operational 
Status", but IMHO this wastes a lot of time.
Can i use a OID PacketRequest for this purpose?

Using WinXP SP2 / Delphi

Thanks in advance

More information about the Winpcap-users mailing list