mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juan Gomez <juang@us.ibm.com>
To: Burton Samograd <kruhft@kruhft.dyndns.org>
Cc: linux-kernel@vger.kernel.org, linux-kernel-owner@vger.kernel.org
Subject: Re: Getting interface IP addresses with proc filesystem
Date: Wed, 8 Jan 2003 12:16:04 -0800	[thread overview]
Message-ID: <OF6BBE4A7C.C4B419C9-ON87256CA8.006F1B9C@us.ibm.com> (raw)

                                                                                                               
                                                                                                               
                                                                                                               


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



             reply	other threads:[~2003-01-08 20:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-08 20:16 Juan Gomez [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-01-08  2:06 Burton Samograd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF6BBE4A7C.C4B419C9-ON87256CA8.006F1B9C@us.ibm.com \
    --to=juang@us.ibm.com \
    --cc=kruhft@kruhft.dyndns.org \
    --cc=linux-kernel-owner@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®