Strange network devices

I use the NetworkInformation namespace to display all network devices.

NetworkInterface.GetAllNetworkInterfaces();

When I get the list, there are some strange unknown devices:

enter image description here

What is it? And should I, and if, then, get rid of them? Theoretically, it should show only a LAN connection and a wireless connection. In the Network Connections section, I cannot find anything like it.

+3
source share
2 answers

Windows has network “devices” that do not exist from the point of view of physical equipment - they are used for various things, such as VPN connections (for example, a tunneling pseudo-interface) and a loopback adapter, which corresponds to 127.0.0.1

, WMI ,

using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(new SelectQuery("Win32_NetworkAdapter")))
{
    foreach (ManagementObject mo in searcher.Get())
    {
        if ((bool)mo["PhysicalAdapter"])
            Console.WriteLine(mo["Name"]);
    }
}

( MSDN)

, true/false PhysicalAdapter bool.

+3

, , " * []", ( - ?).

loopback , IP-, (.. , localhost / ).

, .

0

Source: https://habr.com/ru/post/1787840/


All Articles