This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Finding Out My Own IP-Address
- To: gnu-win32 at cygnus dot com
- Subject: Re: Finding Out My Own IP-Address
- From: "Ron G. Minnich" <rminnich at sarnoff dot com>
- Date: Mon, 11 May 1998 08:53:21 -0400 (EDT)
On Wed, 6 May 1998, $Bill Luebkert wrote:
> > When I dial in to my provider via NT-RAS, I'm assigned a dynamic IP address -
> > which is what I'm trying to find out.
> $name = (gethostbyname ("localhost"))[0];
> $addr = (gethostbyname ($name))[4];
OK, I believe this works. But why doesn't
gethostname
followed by a gethostbyname? no gethostname entry?
Also why the [4]?
ron
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".