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

1995/0721/pc/devether.c (diff list | history)

1995/0713/sys/src/9/pc/devether.c:101,1071995/0721/sys/src/9/pc/devether.c:101,107 (short | long | prev | next)
1992/0424    
} 
 
1993/1120    
void 
1994/0702    
etherrloop(Ether *ctlr, Etherpkt *pkt, long len, int tome) 
1995/0721    
etherrloop(Ether *ctlr, Etherpkt *pkt, long len) 
1993/1120    
{ 
1995/0713    
	Block *bp; 
1993/1120    
	ushort type; 
1995/0713/sys/src/9/pc/devether.c:111,1171995/0721/sys/src/9/pc/devether.c:111,117
1993/1120    
	type = (pkt->type[0]<<8)|pkt->type[1]; 
	ep = &ctlr->f[Ntypes]; 
	for(fp = ctlr->f; fp < ep; fp++){ 
1995/0713    
		if((f = *fp) && ((tome && f->type==type) || f->type < 0)){ 
1995/0721    
		if((f = *fp) && (f->type == type || f->type < 0)){ 
1995/0713    
			if(f->type > -2){ 
				if(qproduce(f->in, pkt->d, len) < 0) 
					ctlr->soverflows++; 
1995/0713/sys/src/9/pc/devether.c:139,1561995/0721/sys/src/9/pc/devether.c:139,155
1993/1120    
static int 
etherwloop(Ether *ctlr, Etherpkt *pkt, long len) 
{ 
1994/0702    
	int s, tome, bcast; 
1995/0721    
	int s, different; 
1993/1120    
 
1994/0702    
	tome = memcmp(pkt->d, ctlr->ea, sizeof(pkt->d)) == 0; 
	bcast = memcmp(pkt->d, ctlr->bcast, sizeof(pkt->d)) == 0; 
	if(!tome && !bcast && ctlr->prom==0 && ctlr->all==0) 
1995/0721    
	different = memcmp(pkt->d, ctlr->ea, sizeof(pkt->d)); 
	if(different && memcmp(pkt->d, ctlr->bcast, sizeof(pkt->d))) 
1993/1120    
		return 0; 
 
	s = splhi(); 
1994/0702    
	etherrloop(ctlr, pkt, len, tome||bcast); 
1995/0721    
	etherrloop(ctlr, pkt, len); 
1993/1120    
	splx(s); 
1994/0702    
 
	return tome; 
1995/0721    
	return different == 0; 
1993/1120    
} 
 
1993/1113    
long 


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