Networking Forums

Networking Forums > Computer Networking > Linux Networking > ethernet cable state recognition

Reply
Thread Tools Display Modes

ethernet cable state recognition

 
 
Claudio Melis
Guest
Posts: n/a

 
      04-29-2004, 02:57 PM
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
 
 
 
 
Toni Erdmann
Guest
Posts: n/a

 
      04-29-2004, 03:12 PM
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
 
/dev/rob0
Guest
Posts: n/a

 
      04-29-2004, 08:12 PM
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
 
Tauno Voipio
Guest
Posts: n/a

 
      04-30-2004, 12:08 PM
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
 
Chris Newey
Guest
Posts: n/a

 
      05-01-2004, 03:44 PM

"/dev/rob0" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> 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
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ethernet Cable Five Iron Wireless Internet 1 01-05-2012 03:08 AM
Computer shuts down when I connect my cable modem through the ethernet cable Jeffrey W. Bowen Broadband Hardware 2 12-06-2008 05:22 PM
PCMCIA NIC 'Media State ...:Cable Disconnected' Dougie Wireless Internet 0 10-07-2006 10:59 AM
USB to Ethernet Cable Jumbo's Chippy Wireless Internet 9 03-07-2006 08:00 PM
Using Power over Ethernet to power two devices from a single ethernet cable Bob Alston Wireless Internet 5 08-16-2004 12:02 AM



1 2 3 4 5 6 7 8 9 10 11