ethernet cable state recognition

This is a discussion on ethernet cable state recognition within the Linux Networking forums, part of the Linux Forums category; Hi to everyone. I need to write a little application to recognize if the ethernet cable is up or down. ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-29-2004
Claudio Melis
 
Posts: n/a
Default ethernet cable state recognition

Hi to everyone.
I need to write a little application to recognize if the ethernet
cable is up or down. Not ethernet interface but really ethernet cable.
Someone can tell me where I will start? I try to see some files in
/proc/ directory but everithing "speak" about interface state.
I also tryed to start to write a simple C program. In this program I
read the infos in the ifreq structure like ifr_flags but I didn't find
the infos that I want.
I want to say that my kernel doesn's recognize cable state when I put
in/out it.
I must insert something in my kernel configuration?

I hope in some help...

Claudio Melis
Reply With Quote
  #2 (permalink)  
Old 04-29-2004
Toni Erdmann
 
Posts: n/a
Default Re: ethernet cable state recognition

Claudio Melis wrote:
> Hi to everyone.
> I need to write a little application to recognize if the ethernet
> cable is up or down. Not ethernet interface but really ethernet cable.
> Someone can tell me where I will start? I try to see some files in
> /proc/ directory but everithing "speak" about interface state.
> I also tryed to start to write a simple C program. In this program I
> read the infos in the ifreq structure like ifr_flags but I didn't find
> the infos that I want.
> I want to say that my kernel doesn's recognize cable state when I put
> in/out it.
> I must insert something in my kernel configuration?


Have a look at the source code of 'mii-tool' or just
call it from shell.

It's about
- cable connected or not
- Half- or FullDuplex
- 10 or 100 MBit/sec
- ...

Toni
Reply With Quote
  #3 (permalink)  
Old 04-29-2004
/dev/rob0
 
Posts: n/a
Default Re: ethernet cable state recognition

On Thu, 29 Apr 2004 07:57:25 -0700, Claudio Melis wrote:
> I need to write a little application to recognize if the ethernet
> cable is up or down. Not ethernet interface but really ethernet cable.
> Someone can tell me where I will start? I try to see some files in


http://www.scyld.com/ - it might already be written.
--
/dev/rob0 - preferred_email=i$((28*28+28))@softhome.net
or put "not-spam" or "/dev/rob0" in Subject header to reply

Reply With Quote
  #4 (permalink)  
Old 04-30-2004
Tauno Voipio
 
Posts: n/a
Default Re: ethernet cable state recognition

Claudio Melis wrote:
> Hi to everyone.
> I need to write a little application to recognize if the ethernet
> cable is up or down. Not ethernet interface but really ethernet cable.
> Someone can tell me where I will start? I try to see some files in
> /proc/ directory but everithing "speak" about interface state.
> I also tryed to start to write a simple C program. In this program I
> read the infos in the ifreq structure like ifr_flags but I didn't find
> the infos that I want.
> I want to say that my kernel doesn's recognize cable state when I put
> in/out it.
> I must insert something in my kernel configuration?
>
> I hope in some help...
>
> Claudio Melis


Have a look at ifplugd:

<http://www.stud.uni-hamburg.de/users/lennart/projects/ifplugd/>.

The interfaces with 100 Mbits/s capability have a standard connection
to the physical level, called MII (Media Independent Interface).

With 10 Mbits/s only, it's dependent whether the driver is capable
and willing to give the information.

Tauno Voipio
tauno voipio @ iki fi

Reply With Quote
  #5 (permalink)  
Old 05-01-2004
Chris Newey
 
Posts: n/a
Default Re: ethernet cable state recognition


"/dev/rob0" <rob0@gmx.co.uk> wrote in message
news:pan.2004.04.29.20.12.18.421639@gmx.co.uk...
> On Thu, 29 Apr 2004 07:57:25 -0700, Claudio Melis wrote:
> > I need to write a little application to recognize if the ethernet
> > cable is up or down. Not ethernet interface but really ethernet cable.
> > Someone can tell me where I will start? I try to see some files in

>
> http://www.scyld.com/ - it might already be written.
> --
> /dev/rob0 - preferred_email=i$((28*28+28))@softhome.net
> or put "not-spam" or "/dev/rob0" in Subject header to reply
>


Hi,
If you want the physical cable status you have a problem 'cos this will be
hardware specific. Are you sure this is what you need? Or do you want to
know if the device is sending/receiving IP packets?


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:13 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0