[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Network card cable connection query



Dnia 2008-09-25, czw o godzinie 11:15 +0100, Dan Track pisze:
> Hi
> 
> Is there a way to identify whether a network card has a rj45 cable
> plugged into it from linux?
> 

  For checking if cable is plugged:
% cat /sys/class/net/ep0/carrier  
1

  For checking, if it's RJ45 -- ioctl() that ethtool uses to check used
port (you can also use ioctl() to check if link is detected).

  For checking if cable is plugged and there is valid network
configuration -- ask NetworkManager, I think.
-- 
Tomasz Torcz


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]