File:  [Research Unix] / researchv10no / ipc / libin / in_host.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

#include <sys/types.h>
#include <sys/stat.h>
#include <sys/inet/in.h>
#include <stdio.h>
#include <ctype.h>
#include <ipc.h>
#include "config.h"

extern char *in_ntoa();
extern char *strcpy();

char *
in_host(addr)
	in_addr addr;
{
	static char host[128];
	char *name;

	strcpy(host, in_ntoa(addr));

	/* look up the system */
	name = qvalue("dom|name", host, (char *)NULL);
	if(name==NULL) {
		/* no such system - return the ip number */
		return host;
	} else {
		return name;
	}
}

unix.superglobalmegacorp.com

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