1 enum { 2 MaxEther = 6, 3 Ntypes = 8, 4 }; 5 6 typedef struct Ether Ether; 7 struct Ether { 8 RWlock; /* TO DO */ 9 ISAConf; /* hardware info */ 10 int ctlrno; 11 int tbdf; /* type+busno+devno+funcno */ 12 int minmtu; 13 int maxmtu; 14 uchar ea[Eaddrlen]; 15 int encry; 16 17 void (*attach)(Ether*); /* filled in by reset routine */ 18 void (*closed)(Ether*); 19 void (*detach)(Ether*); 20 void (*transmit)(Ether*); 21 void (*interrupt)(Ureg*, void*); 22 long (*ifstat)(Ether*, void*, long, ulong); 23 long (*ctl)(Ether*, void*, long); /* custom ctl messages */ 24 void (*power)(Ether*, int); /* power on/off */ 25 void (*shutdown)(Ether*); /* shutdown hardware before reboot */ 26 void *ctlr; 27 int pcmslot; /* PCMCIA */ 28 int fullduplex; /* non-zero if full duplex */ 29 30 Queue* oq; 31 32 Netif; 33 }; 34 35 extern Block* etheriq(Ether*, Block*, int); 36 extern void addethercard(char*, int(*)(Ether*)); 37 extern int archether(int, Ether*); 38