[svlug] APIs for getting info on active interfaces

Greg Larkin glarkin at sourcehosting.net
Thu Jul 3 14:11:45 PDT 2003


At 04:49 PM 7/3/2003, you wrote:

>HI,
>
>
>
>I have never used KDCOP.
>
>Any place where I can find useful documentation on using KDCOP to develop 
>applications.
>
>
>
>Thanks.
>
>Karthik
>
>
>
>Case Jones <philipj at interchange.ubc.ca>
>Sent by: svlug-bounces+kramachandra=mail.unomaha.edu at lists.svlug.org
>07/02/2003 11:26 PM MST
>
>To: svlug at lists.svlug.org
>cc:
>bcc:
>Subject: Re: [svlug] APIs for getting info on active interfaces
>
>
>On Thu, 3 Jul 2003 00:44:29 -0500
>"Karthik Ramachandra" <kramachandra at mail.unomaha.edu> wrote:
>
> > hi ,
>
> > I am writing an application using Linux (Red Hat 8).
> >
> > I am looking for APIs which will give me information about all the active
> > interfaces on my machine.
> >
> > Can anybody point me in the right direction.
>
>In KDE, there's kdcop (which covers kde applications)...
>
>Case


Hi Karthik,

I just did a "strace /sbin/ifconfig -a" on a Linux box (RH 9.0) here to see 
how the program get its information about network interfaces (I assume 
that's the kind of interface you are looking for).  It appears to parse 
various files in the /proc/net directory.

For instance, try this command:

cat /proc/net/dev | tail +3 | cut -f1 -d: | sed -e 's/ //g'

and you'll get a list of the interfaces on the machine.  I'm not sure if 
that's enough for you to use, but maybe it will work.

Regards,
Greg

----
Greg Larkin
SourceHosting.Net, LLC
The new baseline for configuration management

glarkin at sourcehosting.net
http://www.sourcehosting.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.svlug.org/archives/svlug/attachments/20030703/f98c8138/attachment.htm


More information about the svlug mailing list