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

1.1       root        1: #include <sys/types.h>
                      2: #include <sys/stat.h>
                      3: #include <sys/inet/in.h>
                      4: #include <stdio.h>
                      5: #include <ctype.h>
                      6: #include <ipc.h>
                      7: #include "config.h"
                      8: 
                      9: extern char *in_ntoa();
                     10: extern char *strcpy();
                     11: 
                     12: char *
                     13: in_host(addr)
                     14:        in_addr addr;
                     15: {
                     16:        static char host[128];
                     17:        char *name;
                     18: 
                     19:        strcpy(host, in_ntoa(addr));
                     20: 
                     21:        /* look up the system */
                     22:        name = qvalue("dom|name", host, (char *)NULL);
                     23:        if(name==NULL) {
                     24:                /* no such system - return the ip number */
                     25:                return host;
                     26:        } else {
                     27:                return name;
                     28:        }
                     29: }

unix.superglobalmegacorp.com

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