plan 9 kernel history: overview | file list | diff list

1992/0625/pc/devether.c (diff list | history)

1992/0506/sys/src/9/pc/devether.c:59,641992/0625/sys/src/9/pc/devether.c:59,65 (short | long | prev | next)
1992/0403    
 */ 
1992/0410    
struct Type { 
1992/0403    
	QLock; 
1992/0625    
	Netprot;			/* stat info */ 
1992/0403    
	int	type;			/* ethernet type */ 
	int	prom;			/* promiscuous mode */ 
	Queue	*q; 
1992/0506/sys/src/9/pc/devether.c:96,1021992/0625/sys/src/9/pc/devether.c:97,102
1992/0424    
	uchar	kproc;		/* true if kproc started */ 
	char	name[NAMELEN];	/* name of kproc */ 
1992/0403    
	Network	net; 
1992/0410    
	Netprot	prot[NType]; 
1992/0403    
 
1992/0424    
	Queue	lbq;		/* software loopback packet queue */ 
 
1992/0506/sys/src/9/pc/devether.c:331,3371992/0625/sys/src/9/pc/devether.c:331,337
1992/0410    
	tp->q = 0; 
	tp->prom = 0; 
	tp->inuse = 0; 
	netdisown(&tp->ctlr->net, tp - tp->ctlr->type); 
1992/0625    
	netdisown(tp); 
1992/0505    
	tp->ctlr = 0; 
1992/0410    
	qunlock(tp); 
1992/0403    
} 
1992/0506/sys/src/9/pc/devether.c:357,3631992/0625/sys/src/9/pc/devether.c:357,363
1992/0403    
			continue; 
		} 
1992/0410    
		tp->inuse = 1; 
		netown(&cp->net, tp - cp->type, u->p->user, 0); 
1992/0625    
		netown(tp, u->p->user, 0); 
1992/0410    
		qunlock(tp); 
		return tp - cp->type; 
1992/0403    
	} 
1992/0506/sys/src/9/pc/devether.c:483,4901992/0625/sys/src/9/pc/devether.c:483,492
1992/0424    
void 
etherreset(void) 
{ 
	Ctlr *cp = &ctlr[0]; 
1992/0625    
	int i; 
	Ctlr *cp; 
1992/0410    
 
1992/0625    
	cp = &ctlr[0]; 
1992/0424    
	cp->hw = &wd8013; 
	(*cp->hw->reset)(cp); 
1992/0410    
 
1992/0506/sys/src/9/pc/devether.c:497,5071992/0625/sys/src/9/pc/devether.c:499,510
1992/0424    
	cp->net.listen = 0; 
	cp->net.clone = clonecon; 
	cp->net.ninfo = 2; 
	cp->net.prot = cp->prot; 
	cp->net.info[0].name = "stats"; 
	cp->net.info[0].fill = statsfill; 
	cp->net.info[1].name = "type"; 
	cp->net.info[1].fill = typefill; 
1992/0625    
	for(i = 0; i < NType; i++) 
		netadd(&cp->net, &cp->type[i], i); 
1992/0403    
} 
 
1992/0425    
void 
1992/0506/sys/src/9/pc/devether.c:611,6191992/0625/sys/src/9/pc/devether.c:614,622
1992/0424    
	int i; 
	uchar msr; 
1992/0403    
 
1992/0501    
	cp->rb = ialloc(sizeof(Buffer)*Nrb, 1); 
1992/0625    
	cp->rb = xspanalloc(sizeof(Buffer)*Nrb, BY2PG, 0); 
1992/0501    
	cp->nrb = Nrb; 
1992/0502    
	cp->tb = ialloc(sizeof(Buffer)*Ntb, 1); 
1992/0625    
	cp->tb = xspanalloc(sizeof(Buffer)*Ntb, BY2PG, 0); 
1992/0502    
	cp->ntb = Ntb; 
1992/0424    
 
	msr = IN(hw, msr); 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)