Annotation of researchv10no/ipc/libin/in_address.c, revision 1.1.1.1

1.1       root        1: #include <sys/inet/in.h>
                      2: #include <stdio.h>
                      3: #include <ctype.h>
                      4: #include <ipc.h>
                      5: #include "config.h"
                      6: 
                      7: extern in_addr in_aton();
                      8: 
                      9: /* translate a host name into its first address */
                     10: in_addr
                     11: in_address(host)
                     12: char *host;
                     13: {
                     14:        char *inet;
                     15:        in_addr addr;
                     16: 
                     17:        /* is it an address */
                     18:        addr = in_aton(host);
                     19:        if(addr!=INADDR_ANY)
                     20:                return addr;
                     21: 
                     22:        /* look up the system */
                     23:        inet = qvalue("in", host, (char *)NULL);
                     24:        if(inet==NULL)
                     25:                return INADDR_ANY;
                     26:        else
                     27:                return in_aton(inet);
                     28: }

unix.superglobalmegacorp.com

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