6 typedef struct Macent Macent;
13 typedef struct Ether Ether;
15 ISAConf; /* hardware info */
16 int tbdf; /* type+busno+devno+funcno */
22 void (*attach)(Ether*); /* filled in by reset routine */
23 void (*transmit)(Ether*);
24 long (*ifstat)(Ether*, void*, long, ulong);
25 long (*ctl)(Ether*, void*, long); /* custom ctl messages */
26 void (*power)(Ether*, int); /* power on/off */
27 void (*shutdown)(Ether*); /* shutdown hardware before reboot */
35 Macent mactab[127]; /* for bridge */
38 extern void etheriq(Ether*, Block*);
39 extern void addethercard(char*, int(*)(Ether*));
40 extern ulong ethercrc(uchar*, int);
41 extern int parseether(uchar*, char*);
43 #define NEXT(x, l) (((x)+1)%(l))
44 #define PREV(x, l) (((x) == 0) ? (l)-1: (x)-1)
45 #define HOWMANY(x, y) (((x)+((y)-1))/(y))
46 #define ROUNDUP(x, y) (HOWMANY((x), (y))*(y))