File:  [XINU] / xinu / sys / netnum.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:39:04 2018 UTC (8 years, 2 months ago) by root
Branches: xinu, MAIN
CVS tags: xinu-19870308, HEAD
Xinu for VAX

/* netnum.c - netnum */

#include <conf.h>
#include <kernel.h>
#include <network.h>

/*------------------------------------------------------------------------
 *  netnum  -  obtain the network portion of a given IP address
 *------------------------------------------------------------------------
 */
netnum(netpart, address)
IPaddr	netpart;
IPaddr	address;
{
	blkcopy(netpart, address, IPLEN);
	switch (netpart[0] & IPTMASK) {
		case IPATYP: netpart[1] = '\0';	/* fall through */
		case IPBTYP: netpart[2] = '\0';	/* fall through */
		case IPCTYP: netpart[3] = '\0';
	}
	return(OK);
}

unix.superglobalmegacorp.com

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