How to Determine LAN Speed and Duplex Setting
Hello to All,
I need to programmatically determine the LAN Speed and Duplex setting (HALF/FULL) of a network card in the UNIX environment. I am mainly interested in HP-UX, Solaris, and Linux. Does anyone have any working examples, either C/C++, that demonstrates how to programmatically obtain the configured LAN speed and Duplex setting? It is my expectation that the approach will most likely be different for each of the listed operating systems. If anyone can just give me something to start with, I would be very thankful for the help.
I know that command like lanadmin can provide this information, however I am seeking a clean programmatic solution not a command parsing solution.
As always, I extend my sincerest thanks to all that respond.