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