how to programatically obtain informations about existing NICs on the system


 
Thread Tools Search this Thread
Top Forums Programming how to programatically obtain informations about existing NICs on the system
# 1  
Old 11-03-2008
how to programatically obtain informations about existing NICs on the system

hi,
i would like to know how to programatically obtain informations about existing NICs (both configured and non-configured if possible) on *NIX?
i need to write simple *NIX C/C++ program that will have these informations. i have tried to search forums (and also google) with no luck. any help will be more than welcomme.

cheers
# 2  
Old 11-03-2008
In Linux you have the /proc filesystem that stores information about that. You just have to read /proc/net/dev (for example) and handle the strings. Try searching for ifconfig source code, it might come in handy.
# 3  
Old 11-06-2008
many 10X for that! does anyone knows how to do that on solaris, HP-UX and Tru64?
also, i am generally very interested in *NIX system programming, can You please point some good book(s) on the subject of handling processes, users, devices, file systems, etc? 10x in advance
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SSH Programatically

Hi Experts, Need some help. I am trying below code programatically to login to ssh ip from a csv file. the below code logging into all servers and executing some command line syntax. But what I need is for example if i have 5 IP's ,if first one connects successfully and executes the... (3 Replies)
Discussion started by: onenessboy
3 Replies

2. Red Hat

No space in volume group. How to create a file system using existing logical volume

Hello Guys, I want to create a file system dedicated for an application installation. But there is no space in volume group to create a new logical volume. There is enough space in other logical volume which is being mounted on /var. I know we can use that logical volume and create a virtual... (2 Replies)
Discussion started by: vamshigvk475
2 Replies

3. HP-UX

Gcc and C/aC++ co-existing on HP-UX Itanium system

Our company developed applications on an HP-UX 11 Itanium system using gcc. We did not have HP's C/aC++ system installed. We are now attempting to install/run on a customer system that already has C/aC++ on it. Can gcc (gcc-4.3.2, or just the runtime libraries gcclib-4.3.2) be installed and... (1 Reply)
Discussion started by: northb
1 Replies

4. Shell Programming and Scripting

awk/sed inserting muliple informations in one column

I'm probably sure I need to use either awk or sed judging by research but I'm not sure what exact command I have to do to do following...:wall: So this is my text file CPU 1 2 3 4 5 6 RAM 2 3 4 5 6 7 HAR 3 4 5 6 7 8 -------------- my input: Cur_CPU=10 Cur_RAM=11 Cur_HAR=13 Desired... (5 Replies)
Discussion started by: simonirang
5 Replies

5. Solaris

How to extend an existing file system using SVM in solaris 10

Hi All I want to extend this file system to 120Gb: df -h /xyz Filesystem size used avail capacity Mounted on /dev/md/dsk/d80 98G 35G 62G 37% /xyzand the NetApp admin is going to give me an LUN with 22Gb. This file system is mounted on: metastat d80... (1 Reply)
Discussion started by: fretagi
1 Replies

6. Solaris

Command History - size, security and more informations

Hi! I need to know how to increase the size of History, creating greater security in it, and view commands with details such as date and time; Also need to know if they learn to write a 'history' command made ​​via WinSCP; Thank you! ---------- Post updated at 01:36 PM ----------... (4 Replies)
Discussion started by: poyato
4 Replies

7. Shell Programming and Scripting

Runtime informations - bash script

Hello, I'm running a bash script and I'd like to get more accurate a runtime information then now. So far I've been using this method: STARTM=`date -u "+%s"` ......... *script function.... ......... STOPM=`date -u "+%s"` RUNTIMEM=`expr $STOPM - $STARTM` if (($RUNTIMEM>59)); then... (3 Replies)
Discussion started by: TehOne
3 Replies

8. Shell Programming and Scripting

How to obtain system open file table value in Linux

Hello , I want to get current system open file table value. Can any one help. Thanking you, mahesh (0 Replies)
Discussion started by: mahesh.
0 Replies

9. Shell Programming and Scripting

how to read i-node informations (date of creation)

Hi, I'm looking for a way to get the date of creation for a file. Is it possible ? I know that these informations are in the i-node but I don't know how to access them (if the 'find' command can do it with option -ctime, I have reasons to believe in it). Thanks for helping me ! (1 Reply)
Discussion started by: mullmafr
1 Replies
Login or Register to Ask a Question