Date: Mon, 9 Jun 1997 16:48:22 +0800 (GMT) From: Orlando Andico To: "Jason M. Daniels" cc: djgpp AT delorie DOT com Subject: Re: TCP/IP, what is my IP address? In-Reply-To: <5ng5rt$eo6@news.epcc.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk > Orlando Andico (orly AT gibson DOT eee DOT upd DOT edu DOT ph) wrote: > > Uhm. If you're using UNIX, you can do something like this: > > > > > tmpentry = gethostbyname ("localhost"); > > > > Won't this always return 127.0.0.1, though? Hmm. That's a possibility. In which case, it's UNIX-flavor-dependent. I guess you could use gethostname(2) to get the hostname, then do the stuff I've mentioned previously. ----------------------------------------------------------------------- Orlando Alcantara Andico WWW: http://www2.mozcom.com/~orly/ Email: orly AT mozcom DOT com ICBM: 14 deg. 30' N, 120 deg. 59' E POTS: (+632) 932-2385