Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_unix/sys/src/9/teg2/etherif.h – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
enum
2
{
3
	MaxEther	= 4,
4
	Ntypes		= 8,
5
};
6
 
7
typedef struct Ether Ether;
8
struct Ether {
9
	RWlock;
10
	ISAConf;			/* hardware info */
11
 
12
	int	ctlrno;
13
	ulong	tbdf;
14
	int	minmtu;
15
	int 	maxmtu;
16
 
17
	Netif;
18
 
19
	void	(*attach)(Ether*);	/* filled in by reset routine */
20
	void	(*detach)(Ether*);
21
	void	(*transmit)(Ether*);
22
	void	(*interrupt)(Ureg*, void*);
23
	long	(*ifstat)(Ether*, void*, long, ulong);
24
	long 	(*ctl)(Ether*, void*, long); /* custom ctl messages */
25
	void	(*power)(Ether*, int);	/* power on/off */
26
	void	(*shutdown)(Ether*);	/* shutdown hardware before reboot */
27
 
28
	void*	ctlr;
29
	uchar	ea[Eaddrlen];
30
	void*	address;
31
	int	irq;
32
 
33
	Queue*	oq;
34
};
35
 
36
extern Block* etheriq(Ether*, Block*, int);
37
extern void addethercard(char*, int(*)(Ether*));
38
extern ulong ethercrc(uchar*, int);
39
extern int parseether(uchar*, char*);
40
 
41
#define NEXT(x, l)	(((x)+1)%(l))
42
#define PREV(x, l)	(((x) == 0) ? (l)-1: (x)-1)