7 typedef struct Ether Ether;
10 ISAConf; /* hardware info */
18 void (*attach)(Ether*); /* filled in by reset routine */
19 void (*closed)(Ether*);
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 */
28 int pcmslot; /* PCMCIA */
29 int fullduplex; /* non-zero if full duplex */
30 int linkchg; /* link status changed? */
31 uvlong starttime; /* last activity time */
42 ulong resets; /* after initialisation */
43 ulong bcasts; /* broadcast pkts rcv'd */
44 ulong mcasts; /* multicast pkts rcv'd */
49 extern Block* etheriq(Ether*, Block*, int);
50 extern void addethercard(char*, int(*)(Ether*));
51 extern ulong ethercrc(uchar*, int);
52 extern int parseether(uchar*, char*);
54 #define NEXT(x, l) (((x)+1)%(l))
55 #define PREV(x, l) (((x) == 0) ? (l)-1: (x)-1)