* Getting interface IP addresses with proc filesystem
@ 2003-01-08 2:06 Burton Samograd
0 siblings, 0 replies; 2+ messages in thread
From: Burton Samograd @ 2003-01-08 2:06 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 934 bytes --]
Hi all,
I'm curious how one goes about getting the current IP addresses held by a
machine. I saw some rather convoluted code in qmail that shows how to do it but
it seems like a rather difficult (and future bug ridden if the interface
changes) piece of code and was thinking that a /proc/net interface would be the
easiest solution, at least on the end user side.
My thinking goes along the lines of adding a file in /proc/net called interfaces
(or something more appropriate) which gives the following type of listing:
eth0 12.35.23.58
eth0:0 192.168.0.1
lo 127.0.0.1
ppp0 45.3.3.89
etc
for each of the registered interfaces on the machine. Nice, simple and
shouldn't be too hard to implement, correct? Is this type of information
already present through some other mechanism that I haven't found yet?
Thanks in advance.
--
burton samograd
kruhft@kruhft.dyndns.org
http://kruhftwerk.dyndns.org
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Getting interface IP addresses with proc filesystem
@ 2003-01-08 20:16 Juan Gomez
0 siblings, 0 replies; 2+ messages in thread
From: Juan Gomez @ 2003-01-08 20:16 UTC (permalink / raw)
To: Burton Samograd; +Cc: linux-kernel, linux-kernel-owner
I proposed something along this lines but got lot of opposing remarks as I
wanted to identify a given interface as *primary*.
I think this feature is needed and we should add it to the kernel, I need
it, you need it, for sure someone else will need it.
Juan
|---------+---------------------------------->
| | Burton Samograd |
| | <kruhft@kruhft.dyndns.o|
| | rg> |
| | Sent by: |
| | linux-kernel-owner@vger|
| | .kernel.org |
| | |
| | |
| | 01/07/03 06:06 PM |
| | |
|---------+---------------------------------->
>-------------------------------------------------------------------------------------------------------------------------|
| |
| To: linux-kernel@vger.kernel.org |
| cc: |
| Subject: Getting interface IP addresses with proc filesystem |
| |
>-------------------------------------------------------------------------------------------------------------------------|
Hi all,
I'm curious how one goes about getting the current IP addresses held by a
machine. I saw some rather convoluted code in qmail that shows how to do
it but
it seems like a rather difficult (and future bug ridden if the interface
changes) piece of code and was thinking that a /proc/net interface would be
the
easiest solution, at least on the end user side.
My thinking goes along the lines of adding a file in /proc/net called
interfaces
(or something more appropriate) which gives the following type of listing:
eth0 12.35.23.58
eth0:0 192.168.0.1
lo 127.0.0.1
ppp0 45.3.3.89
etc
for each of the registered interfaces on the machine. Nice, simple and
shouldn't be too hard to implement, correct? Is this type of information
already present through some other mechanism that I haven't found yet?
Thanks in advance.
--
burton samograd
kruhft@kruhft.dyndns.org
http://kruhftwerk.dyndns.org
#### C.DTF has been removed from this note on January 08, 2003 by Juan
Gomez
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-08 20:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-08 2:06 Getting interface IP addresses with proc filesystem Burton Samograd
-- strict thread matches above, loose matches on Subject: below --
2003-01-08 20:16 Juan Gomez
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.