I would like to detect, if a network adapter on Windows is a USB RNDIS connection to my mobile phone (Samsung Galaxy).
With NetworkInterface.GetAllNetworkInterfaces()
, I can get the adapter, but I don’t know, how to detect, if it’s the RNDIS connection.
The NetworkInterface.NetworkInterfaceType
, shows Ethernet
to me.
foreach (var adapter in NetworkInterface.GetAllNetworkInterfaces())
if (adapter.OperationalStatus == OperationalStatus.Up)
{
...
}