LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-12-2007, 08:54 AM   #1
keanu
LQ Newbie
 
Registered: Sep 2007
Posts: 6

Rep: Reputation: 0
Need network adapter information in a c program


Platform : redhat ent linux 4
i am working on a c program in which i need some details which are listed below:

> network Adapter Description (name of the hardware).
> the link speed or the bandwidth of the connection.
> the current bandwidth under usage.

can anyone tell me where i can get a library that helps in getting these system information. i've already tried libgtop and libpcap but they dont provide the above mentioned information.also i am not allowed to write anything to the disk.

Last edited by keanu; 09-12-2007 at 08:57 AM. Reason: better explaination of problem
 
Old 09-14-2007, 02:39 PM   #2
firstfire
Member
 
Registered: Mar 2006
Location: Ekaterinburg, Russia
Distribution: Debian, Ubuntu
Posts: 709

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
Hello.

Take a look at `lspci (8)' and `/proc/bus/pci/devices'. Try `lspci -vv'. Maybe the source code of lspci will be helpful.

Hope, this helps.
 
Old 09-17-2007, 05:19 AM   #3
keanu
LQ Newbie
 
Registered: Sep 2007
Posts: 6

Original Poster
Rep: Reputation: 0
thankyou, it really helped

apart from "lspci" i also studied source of "ethtool"... it was giving the required output , so i'am going with "ethtool"...
 
  


Reply

Tags
network, programming, redhat



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora C2 - Wireless network drivers? Broadcom 802.11g Network Adapter FragTek Linux - Wireless Networking 7 01-22-2010 12:10 AM
Using /proc to access process information from a program? smoothdogg00 Programming 1 12-20-2006 01:37 PM
Can't setup network with rtl8150 usb network adapter IvanJ Linux - Networking 1 12-27-2005 12:16 AM
How do I gather information on the video adapter gianh Linux - General 1 04-22-2004 08:33 AM
new network adapter under mandrake single network firewall nerip Linux - Networking 3 08-03-2002 02:13 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration