I need the test case for Ethernet in Linux using C code to check eth0. If eth0 is down, we enable the net then check if up and the test is passed.<
eth0
You may want to take advantage of libudev to get around in /sys:
http://www.signal11.us/oss/udev/