xref: /csrg-svn/sys/news3400/if/if_en.h (revision 63305)
153897Smckusick /*
2*63305Sbostic  * Copyright (c) 1992, 1993
3*63305Sbostic  *	The Regents of the University of California.  All rights reserved.
453897Smckusick  *
553897Smckusick  * This code is derived from software contributed to Berkeley by
653897Smckusick  * Sony Corp. and Kazumasa Utashiro of Software Research Associates, Inc.
753897Smckusick  *
853897Smckusick  * %sccs.include.redist.c%
953897Smckusick  *
1053897Smckusick  * from: $Hdr: if_en.h,v 4.300 91/06/09 06:25:56 root Rel41 $ SONY
1153897Smckusick  *
12*63305Sbostic  *	@(#)if_en.h	8.1 (Berkeley) 06/11/93
1353897Smckusick  */
1453897Smckusick 
1553897Smckusick /*
1653897Smckusick  * Structure of an Ethernet header -- receive format
1753897Smckusick  */
1853897Smckusick struct en_rheader {
1953897Smckusick 	u_char	enr_dhost[6];		/* Destination Host */
2053897Smckusick 	u_char	enr_shost[6];		/* Source Host */
2153897Smckusick 	u_short	enr_type;		/* Type of packet */
2253897Smckusick };
2353897Smckusick 
2453897Smckusick #ifdef KERNEL
2553897Smckusick /*
2653897Smckusick  * Ethernet software status per interface.
2753897Smckusick  *
2853897Smckusick  * Each interface is referenced by a network interface structure,
2953897Smckusick  * es_if, which the routing code uses to locate the interface.
3053897Smckusick  * This structure contains the output queue for the interface, its address, ...
3153897Smckusick  * We also have, for each interface, a IOP interface structure, which
3253897Smckusick  * contains information about the IOP resources held by the interface:
3353897Smckusick  * map registers, buffered data paths, etc.  Information is cached in this
3453897Smckusick  * structure for use by the if_iop.c routines in running the interface
3553897Smckusick  * efficiently.
3653897Smckusick  */
3753897Smckusick struct	en_softc {
3853897Smckusick 	struct	arpcom es_ac;		/* Ethernet common part */
3953897Smckusick 	struct	ifnews es_ifnews;	/* IOP resources */
4053897Smckusick 	int	es_flags;
4153897Smckusick #ifdef NOTDEF /* KU:XXX */
4253897Smckusick 	int	es_oactive;		/* # of active output buffers */
4353897Smckusick #endif
4453897Smckusick 	int	es_interval;		/* interval of watchdog */
4554516Sutashiro 	caddr_t	es_bpf;
4653897Smckusick };
4753897Smckusick 
4853897Smckusick #define	es_if	es_ac.ac_if		/* network-visible interface */
4953897Smckusick #define	es_addr	es_ac.ac_enaddr		/* hardware Ethernet address */
5053897Smckusick 
5153897Smckusick #define	ENF_RUNNING	0x01		/* board is running */
5253897Smckusick #define	ENF_SETADDR	0x02		/* physical address is changed */
5353897Smckusick 
5453897Smckusick #define	ENWATCHINTERVAL	60		/* once every 60 seconds */
5553897Smckusick 
5653897Smckusick #endif /* KERNEL */
57