What is INADDR_LOOPBACK for in sockets?

Dieter Rothmeier dieter at lynn.cs.ucla.edu
Sat Dec 2 09:12:06 AEST 1989


While reading some code, I came across the following
construct:

struct sockaddr_in sin;
....
sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
...


I know about INADDR_ANY, but I've never seen this one.
It's defined in <netinet/in.h>. I looked through the
documentation (this is on a Sun 3/80) quite extensively,
but couldn't find anything.

Any help would be appreciated.
Dieter



More information about the Comp.unix.wizards mailing list