Auto-Choose Internet Network Adapter

Home Forums Discussions Support Auto-Choose Internet Network Adapter

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4853
    Billk
    Participant

      Using the Winpk Filter product…

      What is a way to find the network adapter that is being used for the Internet, or any active TCP/IP network connection for that matter?

      Thanks!

      #5568
      Vadim Smirnov
      Keymaster

        There is no difference on the NDIS level between network adapter connected to the corporate network and internet adapter connected to the Internet. However, you can use IP HELPER API to query routing table, usually the default gateway interface (route 0.0.0.0 mask 0.0.0.0) is the Internet one. IP Helper API can be also used for enumeratimg active connections.

        #5569
        PLY
        Participant

          Can you give me an example code for use IP HELPER API to find the network adapter that connected the Internet ?

          #5570
          Vadim Smirnov
          Keymaster

            I’m sorry, I have not ready function for this, but you can use GetIpForwardTable for retrieving the IP routing table. Usually the deafault gateway interface (0.0.0.0 mask 0.0.0.0 is the Internet one).

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.