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

2001/0504/pc/devether.c (diff list | history)

2001/0203/sys/src/9/pc/devether.c:248,2542001/0504/sys/src/9/pc/devether.c:248,254 (short | long | prev | next)
1998/0319    
etherwrite(Chan* chan, void* buf, long n, vlong) 
1992/0407    
{ 
1997/0327    
	Ether *ether; 
	Block *bp; 
2001/0504    
	Block *volatile bp; 
2000/0817    
	int nn; 
1992/0407    
 
1997/0327    
	ether = etherxx[chan->dev]; 
2001/0203/sys/src/9/pc/devether.c:269,2762001/0504/sys/src/9/pc/devether.c:269,281
1997/1101    
		error(Etoosmall); 
 
1997/0327    
	bp = allocb(n); 
2001/0504    
	if(waserror()){ 
		freeb(bp); 
		nexterror(); 
	} 
1997/0327    
	memmove(bp->rp, buf, n); 
	memmove(bp->rp+Eaddrlen, ether->ea, Eaddrlen); 
2001/0504    
	poperror(); 
1997/0327    
	bp->wp += n; 
1992/0403    
 
1997/0327    
	return etheroq(ether, bp); 


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