device connected

Is there a way in say the /proc filesystem to tell if the ethernet media is actually connected or not? I understand how to tell if the device is there or no.

Reply to
Michael Lodman
Loading thread data ...

Hi Michael,

Whether or not a cable is connected is information available from the ethernet card's MII PHY. Depending on the card, this info is available to the linux driver, and you can usually see it reported in the kernel logs. I have never seen any ethernet driver implement it under a /proc entry, although it's not impossible. There are also some user-space tools you may find of interest: mii-diag, mii-tool and eth-tool, which talk to the mii via ioctls to the ethernet driver.

regards,

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Damion de Soto - Software Engineer  email:     damion@snapgear.com
 Click to see the full signature
Reply to
Damion de Soto

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.