Hi:
Recently, I wrote a program on a Linux machine which is able to
detect whether the machine is connected to the network. I used the
Linux netstat program with the –i option to do the trick. netstat has
a running flag (shown as a R when exercute netstat –i command), which
will be turned on if the network cable is plugged into the machine and
vice versa. However, it turns out that on some motherboards (I am
using on broad network cards) the netstat will fail to detect the
connection status. That is, no matter the network cable is plugged in
or not, the running flag (R) is always on.
The Linux system that works:
ASUS P4PEX motherboard and unpatched Redhat 9.0 OS
The Linux system that doesn't work:
Gigabyte GA8IPE-1000G motherboard and updatched Redhat 9.0 OS
The bad news for me is that I have to make the program work on the
second Linux system (with Gigabyte motherboard) :'( Does
anyone have any clue where the problem lies? I have been stuck on this
problem for some time now. Can anybody please help? Thank you for your
time