This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to get Ethernet link status?


What is the official method used to get the link status of an
interface (up/down, 10/100/1000, full/half duplex)?

<snip>


A standard way of doing this would be to use the ioctl SIOCGETIFMEDIA, and check the IFM_AVALID and IFM_ACTIVE flags in the IFM status returned.

Note that we did this for link up/down status only, but I would assume you can query the link speed etc via the same interface.


Kelvin.


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]