Annotation of 42BSD/lib/libc/net/gethostbyaddr.c, revision 1.1

1.1     ! root        1: /*     gethostbyaddr.c 4.3     82/10/06        */
        !             2: 
        !             3: #include <netdb.h>
        !             4: 
        !             5: struct hostent *
        !             6: gethostbyaddr(addr, len, type)
        !             7:        char *addr;
        !             8:        register int len, type;
        !             9: {
        !            10:        register struct hostent *p;
        !            11: 
        !            12:        sethostent(0);
        !            13:        while (p = gethostent()) {
        !            14:                if (p->h_addrtype != type || p->h_length != len)
        !            15:                        continue;
        !            16:                if (bcmp(p->h_addr, addr, len) == 0)
        !            17:                        break;
        !            18:        }
        !            19:        endhostent();
        !            20:        return (p);
        !            21: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.