Mail Archives: djgpp/1997/06/09/04:52:17
> 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:
>
> <snip>
>
> > tmpentry = gethostbyname ("localhost");
>
> <snip>
>
> 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
- Raw text -