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

1997/0415/pc/etherif.h (diff list | history)

pc/etherif.h on 1993/1113
1993/1113    
enum { 
1996/0607    
	MaxEther	= 24, 
1993/1113    
	Ntypes		= 8, 
}; 
 
typedef struct Ether Ether; 
struct Ether { 
	ISAConf;			/* hardware info */ 
1995/0721    
	int	ctlrno; 
1997/0327    
	int	tbdf;			/* type+busno+devno+funcno */ 
1996/0601    
	int	mbps;			/* Mbps */ 
1997/0327    
	uchar	ea[Eaddrlen]; 
1993/1113    
 
	void	(*attach)(Ether*);	/* filled in by reset routine */ 
1997/0327    
	void	(*transmit)(Ether*); 
1993/1124    
	void	(*interrupt)(Ureg*, void*); 
1996/0607    
	long	(*ifstat)(Ether*, void*, long, ulong); 
1995/0721    
	void	*ctlr; 
1993/1113    
 
1997/0327    
	Queue*	oq; 
1993/1113    
 
	Netif; 
}; 
 
1997/0327    
extern Block* etheriq(Ether*, Block*, int); 
1994/0202    
extern void addethercard(char*, int(*)(Ether*)); 
1997/0415    
extern ulong ethercrc(uchar*, int); 
1993/1116    
 
1993/1113    
#define NEXT(x, l)	(((x)+1)%(l)) 
1996/0622    
#define PREV(x, l)	(((x) == 0) ? (l)-1: (x)-1) 
1993/1113    
#define	HOWMANY(x, y)	(((x)+((y)-1))/(y)) 
#define ROUNDUP(x, y)	(HOWMANY((x), (y))*(y)) 


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