[Winpcap-users] Detecting TCP/IP for a NIC

Gianluca Varenni gianluca.varenni at cacetech.com
Tue Jan 29 19:36:54 GMT 2008


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).

A couple ways come to my mind to know if TCP/IP is bound to a network card:
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.
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.

Both the interfaces are documented in the MSDN documentation.

Hope it helps
GV


  ----- Original Message ----- 
  From: Peter Hegel 
  To: winpcap-users at winpcap.org 
  Sent: Friday, January 25, 2008 8:17 AM
  Subject: [Winpcap-users] Detecting TCP/IP for a NIC


  Hi All

  I'm trying to detect if TCP/IP protocol is installed for a NIC under WinXP/Vista.

  Using PacketGetNetInfoEx and checking ss_family for AF_INET does work most times. But on some laptops PacketGetNetInfoEx reports ss_family equal to AF_INET, even if TCP/IP is unchecked in the Connection Properties of the NIC.

  Is there another way to figure out if a NIC has TCP/IP enabled?

  Help appreciated!

  Peter



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


  _______________________________________________
  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/20080129/f9418dd0/attachment.htm


More information about the Winpcap-users mailing list