[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: IP address without hostname



On  0, Bob Proulx <bob@proulx.com> wrote:
> Peter Bartosch <peter@bartosch.net> [2002-08-17 17:25:58 +0200]:
> > i'm searching for a function to gather the IP adresses from the  
> > interfaces of a computer - without having the hostname nor any other  
> > information ...  
> 
> Curiosity has me asking, if you care to share otherwise don't worry
> about it, for what purpose do you need to know the host IP address?
> 
> > > I found this somewhere on another maillist. It uses ioctl() to poll some 
> > > information.
> 
> Note that it is possible for the list of IPs returned to vary over
> time.  Interfaces can be brought up and down while the computer is
> operating.  If the interface is on a PCMCIA in a laptop then the
> network can be established or the network can be brought down at any
> time.

Not only on PCMCIA - I terrorize my machine with 'ifconfig eth0 down'
every now and then.  When I do so I don't want all my apps whinging
(although some of them do).  Moreover, the entire layered networking
model was designed to stop you worrying about this sort of thing.
There is a transport layer there; don't mess with it unless you really
have to.

Tom
-- 
Tom Cook
Information Technology Services, The University of Adelaide

"Other people's priorities are endlessly odd."
	- Kingsley Amis

Get my GPG public key: https://pinky.its.adelaide.edu.au/~tkcook/tom.cook-at-adelaide.edu.au

Attachment: pgpnpNrtyqiwK.pgp
Description: PGP signature


Reply to: