Andre Poenitz wrote:
> 
> On Fri, Oct 19, 2001 at 12:11:06PM +0200, Stephan Witt wrote:
> > > How do you get "The IP-address" of some machine?
> > > This logic is flawed.
> >
> > You need the IP-address of your own machine to
> 
> My machine can have any number of IP adresses, including 0, 1, and 42.
> So which is the "right" one?

The code gets the first one. Creates the symlink or compares
with the content of the symlink created by the same code 
running by another instance of lyx (which is using the first one too).
No problem.

I cannot think of a machine which has no name and no interface these days.
That means no IP at all. And there is an error then and you can fall back
to 127.0.0.1.

> > I know, this is not really robust. One have to use gethostbyname_r
> > to be reentrant, avoid inet_ntoa and so on. But the idea is like that.
> 
> Maybe it would even help in most cases, but so does some alias or wrapper
> script...

I wanted to answer the question: How can I get my IP address?
Nothing more.

Stephan

------------------------------------------------
<[EMAIL PROTECTED]> | beusen Solutions GmbH
fon: +49 30 549932-62    | Landsberger Allee 366
fax: +49 30 549932-21    | 12681 Berlin, Germany
------------------------------------------------

Reply via email to