File:  [Research Unix] / researchv10no / ipc / libin / in_address.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/inet/in.h>
#include <stdio.h>
#include <ctype.h>
#include <ipc.h>
#include "config.h"

extern in_addr in_aton();

/* translate a host name into its first address */
in_addr
in_address(host)
char *host;
{
	char *inet;
	in_addr addr;

	/* is it an address */
	addr = in_aton(host);
	if(addr!=INADDR_ANY)
		return addr;

	/* look up the system */
	inet = qvalue("in", host, (char *)NULL);
	if(inet==NULL)
		return INADDR_ANY;
	else
		return in_aton(inet);
}

unix.superglobalmegacorp.com

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