6 typedef struct Ether Ether;
17 void (*attach)(Ether*); /* filled in by reset routine */
18 void (*detach)(Ether*);
19 void (*transmit)(Ether*);
20 void (*interrupt)(Ureg*, void*);
21 long (*ifstat)(Ether*, void*, long, ulong);
22 long (*ctl)(Ether*, void*, long); /* custom ctl messages */
23 void (*power)(Ether*, int); /* power on/off */
24 void (*shutdown)(Ether*); /* shutdown hardware before reboot */
32 extern Block* etheriq(Ether*, Block*, int);
33 extern void addethercard(char*, int(*)(Ether*));
34 extern ulong ethercrc(uchar*, int);
35 extern int parseether(uchar*, char*);
37 #define NEXT(x, l) (((x)+1)%(l))
38 #define PREV(x, l) (((x) == 0) ? (l)-1: (x)-1)
39 #define HOWMANY(x, y) (((x)+((y)-1))/(y))
40 #define ROUNDUP(x, y) (HOWMANY((x), (y))*(y))