--- linuxinclude/netinet/if_ether.h~ Wed Apr 20 16:36:23 1994 +++ linuxinclude/netinet/if_ether.h Wed Apr 20 16:36:23 1994 @@ -21,6 +21,59 @@ */ #include +/* Linux NET-3 doesn't include the following historical BSDoid definitions */ + +struct arphdr { + unsigned short ar_hrd; /* format of hardware address */ + unsigned short ar_pro; /* format of protocol address */ + unsigned char ar_hln; /* length of hardware address */ + unsigned char ar_pln; /* length of protocol address */ + unsigned short ar_op; /* ARP opcode (command) */ + + /* The rest is variable in size, according to the sizes above. */ +#if 0 + unsigned char ar_sha[]; /* sender hardware address */ + unsigned char ar_spa[]; /* sender protocol address */ + unsigned char ar_tha[]; /* target hardware address */ + unsigned char ar_tpa[]; /* target protocol address */ +#endif /* not actually included! */ +}; + +struct ifnet { + char *if_name; /* name, e.g. ``en'' or ``lo'' */ + short if_unit; /* sub-unit for device driver */ + short if_mtu; /* maximum transmission unit */ + short if_flags; /* up/down, broadcast, etc. */ + short if_timer; /* time 'til if_watchdog called */ + int if_metric; /* routing metric (not used) */ + struct ifaddr *if_addrlist; /* linked list of addrs per if */ + struct ifqueue { + struct mbuf *ifq_head; + struct mbuf *ifq_tail; + int ifq_len; + int ifq_maxlen; + int ifq_drops; + } if_snd; /* output queue */ + + /* Procedure handles. */ + int (*if_init)(); /* init routine */ + int (*if_output)(); /* output routine */ + int (*if_ioctl)(); /* ioctl routine */ + int (*if_reset)(); /* bus reset routine */ + int (*if_watchdog)(); /* timer routine */ + + /* Generic interface statistics. */ + int if_ipackets; /* packets recv'd on interface */ + int if_ierrors; /* input errors on interface */ + int if_opackets; /* packets sent on interface */ + int if_oerrors; /* output errors on interface */ + int if_collisions; /* collisions on CSMA i'faces */ + + /* Linked list: pointer to next interface. */ + struct ifnet *if_next; +}; + + /* * Ethernet address - 6 octets */