Networking Forums

Networking Forums > Computer Networking > Linux Networking > How do I explore the possbile speed for an interface from C code?

Reply
Thread Tools Display Modes

How do I explore the possbile speed for an interface from C code?

 
 
echi111@sbcglobal.net
Guest
Posts: n/a

 
      04-12-2005, 12:29 AM
Hi,

Need to find all the possible speed a given interface card (in eth0)
may support. The mii-tool didn't give me the correct speeds. Anyone can
shine some code how this can be done in C?

Thanks.

Eric.

 
Reply With Quote
 
 
 
 
Daniel Lopes
Guest
Posts: n/a

 
      04-12-2005, 12:36 AM
(E-Mail Removed) schrieb:
> Hi,
>
> Need to find all the possible speed a given interface card (in eth0)
> may support. The mii-tool didn't give me the correct speeds. Anyone can
> shine some code how this can be done in C?
>
> Thanks.
>
> Eric.
>

You can use the ethtool for this:
root@lopsch-server:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
 
Reply With Quote
 
echi111@sbcglobal.net
Guest
Posts: n/a

 
      04-12-2005, 11:56 PM
Thanks very much.

Eric

 
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
speed drop after mac code request Ian Robertson Broadband 2 06-20-2010 06:01 PM
Come & Explore the 'Universe'... J-Rome Wireless Internet 0 05-21-2007 05:05 AM
[YOURSELLERS.COM] Explore hidden treasurers on the net Quaid Wireless Internet 0 01-12-2007 05:51 AM
Cannot Scan / explore domain =?Utf-8?B?ZHN1YmFy?= Windows Networking 1 10-06-2004 02:35 PM
Set speed/duplex on sis900 ethernet interface AnyBody43 Linux Networking 4 10-30-2003 09:41 AM



1 2 3 4 5 6 7 8 9 10 11