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

/* netinit.c - netinit */

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

#ifndef	RING0IN
#define RING0IN		-1
#endif
#ifndef	RING0OUT
#define	RING0OUT -1
#endif
#ifndef	RING1IN
#define RING1IN	 -1
#endif
#ifndef	RING1OUT
#define	RING1OUT -1
#endif
#ifndef	NNETS
#define	NNETS	 0
#endif

#define	MAXNETS	 2		/* maximum nets assigned in netdevs	*/
static	int	 netdevs[][MAXNETS]
			= {RING0IN,RING0OUT,RING1IN,RING1OUT};

/*------------------------------------------------------------------------
 *  netinit  --  iniitalize networks by starting frame level I/O
 *------------------------------------------------------------------------
 */
netinit()
{
	int	netid;

	if (NNETS > MAXNETS)
		panic("netinit - too few devices to netdevs table");
	frbpool = mkpool(FRLEN, NFRAMES);
	for (netid=0 ; netid<NNETS ; netid++)
		frinit(netid, netdevs[netid][0] , netdevs[netid][1]);
	return(OK);
}

unix.superglobalmegacorp.com

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