Getting the ipaddress of a specific interface


#1

Hi

I was wondering if there’s an easy way to get the ip address of a specific
interface (and not just the main ip adders)? From what I’ve seen I can run
regexp against node.network.interfaces.X.addresses.keys, if there more
elegant way?

Thanks in advance

Haim


#2

I haven’t found one. I do the same thing you mentioned.

Sent from my iPhone

On Aug 14, 2011, at 3:49 PM, Haim Ashkenazi haim.ashkenazi@gmail.com wrote:

Hi

I was wondering if there’s an easy way to get the ip address of a specific interface (and not just the main ip adders)? From what I’ve seen I can run regexp against node.network.interfaces.X.addresses.keys, if there more elegant way?

Thanks in advance

Haim


#3

Hi,

On Sun, Aug 14, 2011 at 11:55 PM, Charles Sullivan <
charlie.sullivan@gmail.com> wrote:

I haven’t found one. I do the same thing you mentioned.

I just got this link from irc. It seems a little cleaner the regexp:

Thanks

Sent from my iPhone

On Aug 14, 2011, at 3:49 PM, Haim Ashkenazi haim.ashkenazi@gmail.com
wrote:

Hi

I was wondering if there’s an easy way to get the ip address of a specific
interface (and not just the main ip adders)? From what I’ve seen I can run
regexp against node.network.interfaces.X.addresses.keys, if there more
elegant way?

Thanks in advance

Haim


Haim