cethernetlabwindows

How to get current running ethernet speed from LabWindows\CVI C code or CMD commands


I am developing Test Equipment which has couple of Ethernet ports. As part of the testing i want to check the current speed of the ethernet ports (10/100/1000) when a tested unit is connected.

How can i get this information? is there a C library or CMD command which i can use that can supply this information?


Solution

  • use wmic command like this

    wmic PATH Win32_NetworkAdapter WHERE "PhysicalAdapter = TRUE AND NetEnabled = TRUE" GET Name, Speed

    Win32_NetworkAdapter classof WMI