<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>You cannot do that directly with WinPcap (btw, if possible, do
not use the Packet API. It is no longer documented, and subject to change
without notice).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>A couple ways come to my mind to know if TCP/IP is bound to a
network card:</FONT></DIV>
<DIV><FONT size=2>1. use the IP helper API. The IP helper API should only list
the adapters bound to the TCP/IP protocol driver. Match the list with the one
returned by WinPcap.</FONT></DIV>
<DIV><FONT size=2>2. Use the INetCfg COM interface to obtain all the adapters
and their bindings. You should be able to find which adapters are bound to the
tcp/ip protocol driver and which not.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Both the interfaces are documented in the MSDN
documentation.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Hope it helps</FONT></DIV>
<DIV><FONT size=2>GV</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=peter.hegel@doli.de href="mailto:peter.hegel@doli.de">Peter Hegel</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, January 25, 2008 8:17
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] Detecting TCP/IP
for a NIC</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2>
<P>Hi All</P>
<P>I’m trying to detect if TCP/IP protocol is installed for a NIC under
WinXP/Vista.</P>
<P>Using PacketGetNetInfoEx and checking ss_family for </FONT><FONT
face="Courier New" size=2>AF_INET</FONT><FONT size=2> does work most times.
But on some laptops PacketGetNetInfoEx reports ss_family equal to </FONT><FONT
face="Courier New" size=2>AF_INET, </FONT><FONT size=2>even if TCP/IP is
unchecked in the Connection Properties of the NIC.</P>
<P>Is there another way to figure out if a NIC has TCP/IP enabled?</P>
<P>Help appreciated!</P>
<P>Peter</P></FONT></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE></BODY></HTML>