delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/05/06/21:46:39

From: lyger AT fh-landshut DOT de (Oliver Copp)
Subject: Finding Out My Own IP-Address
6 May 1998 21:46:39 -0700 :
Message-ID: <199805062058.NAA06618.cygnus.gnu-win32@cygnus.com>
To: gnu-win32 AT cygnus DOT com

Hi !

Is there a function which allows me to find out my current IP address ?

My best guess was to use gethostbyname("localhost") but that always returns
127.0.0.1. 

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.

Anyone ;-) ?

Thanks in advance.

Oliver Copp                               ________ ___  __   _    _
copp AT tnm DOT simplenet DOT com                   |__    __|   \|  | / \  / \
http://tnm.simplenet.com/                   |  |  |  |\   |/   \/   \
TNM - The Wrestling Simulator               |__|  |__| \__|___/\/\___\
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019