1 /* 2 * Copyright (c) 1992 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Sony Corp. and Kazumasa Utashiro of Software Research Associates, Inc. 7 * 8 * %sccs.include.redist.c% 9 * 10 * from: $Hdr: if_en.h,v 4.300 91/06/09 06:25:56 root Rel41 $ SONY 11 * 12 * @(#)if_en.h 7.2 (Berkeley) 06/27/92 13 */ 14 15 /* 16 * Structure of an Ethernet header -- receive format 17 */ 18 struct en_rheader { 19 u_char enr_dhost[6]; /* Destination Host */ 20 u_char enr_shost[6]; /* Source Host */ 21 u_short enr_type; /* Type of packet */ 22 }; 23 24 #ifdef KERNEL 25 /* 26 * Ethernet software status per interface. 27 * 28 * Each interface is referenced by a network interface structure, 29 * es_if, which the routing code uses to locate the interface. 30 * This structure contains the output queue for the interface, its address, ... 31 * We also have, for each interface, a IOP interface structure, which 32 * contains information about the IOP resources held by the interface: 33 * map registers, buffered data paths, etc. Information is cached in this 34 * structure for use by the if_iop.c routines in running the interface 35 * efficiently. 36 */ 37 struct en_softc { 38 struct arpcom es_ac; /* Ethernet common part */ 39 struct ifnews es_ifnews; /* IOP resources */ 40 int es_flags; 41 #ifdef NOTDEF /* KU:XXX */ 42 int es_oactive; /* # of active output buffers */ 43 #endif 44 int es_interval; /* interval of watchdog */ 45 caddr_t es_bpf; 46 }; 47 48 #define es_if es_ac.ac_if /* network-visible interface */ 49 #define es_addr es_ac.ac_enaddr /* hardware Ethernet address */ 50 51 #define ENF_RUNNING 0x01 /* board is running */ 52 #define ENF_SETADDR 0x02 /* physical address is changed */ 53 54 #define ENWATCHINTERVAL 60 /* once every 60 seconds */ 55 56 #endif /* KERNEL */ 57