xref: /netbsd-src/sys/dev/qbus/if_il.h (revision 95e1ffb15694e54f29f8baaa4232152b703c2a5a)
1*95e1ffb1Schristos /*	$NetBSD: if_il.h,v 1.3 2005/12/11 12:23:29 christos Exp $	*/
270266358Sragge /*
370266358Sragge  * Copyright (c) 1982, 1986 Regents of the University of California.
470266358Sragge  * All rights reserved.
570266358Sragge  *
670266358Sragge  * Redistribution and use in source and binary forms, with or without
770266358Sragge  * modification, are permitted provided that the following conditions
870266358Sragge  * are met:
970266358Sragge  * 1. Redistributions of source code must retain the above copyright
1070266358Sragge  *    notice, this list of conditions and the following disclaimer.
1170266358Sragge  * 2. Redistributions in binary form must reproduce the above copyright
1270266358Sragge  *    notice, this list of conditions and the following disclaimer in the
1370266358Sragge  *    documentation and/or other materials provided with the distribution.
14aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
1570266358Sragge  *    may be used to endorse or promote products derived from this software
1670266358Sragge  *    without specific prior written permission.
1770266358Sragge  *
1870266358Sragge  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1970266358Sragge  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2070266358Sragge  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2170266358Sragge  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2270266358Sragge  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2370266358Sragge  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2470266358Sragge  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2570266358Sragge  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2670266358Sragge  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2770266358Sragge  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2870266358Sragge  * SUCH DAMAGE.
2970266358Sragge  *
3070266358Sragge  *	@(#)if_il.h	7.3 (Berkeley) 6/28/90
3170266358Sragge  */
3270266358Sragge 
3370266358Sragge /*
3470266358Sragge  * Structure of an Ethernet header -- receive format
3570266358Sragge  */
3670266358Sragge struct	il_rheader {
3770266358Sragge 	u_char	ilr_status;		/* Frame Status */
3870266358Sragge 	u_char	ilr_fill1;
3970266358Sragge 	u_short	ilr_length;		/* Frame Length */
4070266358Sragge 	u_char	ilr_dhost[6];		/* Destination Host */
4170266358Sragge 	u_char	ilr_shost[6];		/* Source Host */
4270266358Sragge 	u_short	ilr_type;		/* Type of packet */
4370266358Sragge };
4470266358Sragge 
4570266358Sragge /*
4670266358Sragge  * Structure of statistics record
4770266358Sragge  */
4870266358Sragge struct	il_stats {
4970266358Sragge 	u_short	ils_fill1;
5070266358Sragge 	u_short	ils_length;		/* Length (should be 62) */
5170266358Sragge 	u_char	ils_addr[6];		/* Ethernet Address */
5270266358Sragge 	u_short	ils_frames;		/* Number of Frames Received */
5370266358Sragge 	u_short	ils_rfifo;		/* Number of Frames in Receive FIFO */
5470266358Sragge 	u_short	ils_xmit;		/* Number of Frames Transmitted */
5570266358Sragge 	u_short	ils_xcollis;		/* Number of Excess Collisions */
5670266358Sragge 	u_short	ils_frag;		/* Number of Fragments Received */
5770266358Sragge 	u_short	ils_lost;		/* Number of Times Frames Lost */
5870266358Sragge 	u_short	ils_multi;		/* Number of Multicasts Accepted */
5970266358Sragge 	u_short	ils_rmulti;		/* Number of Multicasts Rejected */
6070266358Sragge 	u_short	ils_crc;		/* Number of CRC Errors */
6170266358Sragge 	u_short	ils_align;		/* Number of Alignment Errors */
6270266358Sragge 	u_short	ils_collis;		/* Number of Collisions */
6370266358Sragge 	u_short	ils_owcollis;		/* Number of Out-of-window Collisions */
6470266358Sragge 	u_short	ils_fill2[8];
6570266358Sragge 	char	ils_module[8];		/* Module ID */
6670266358Sragge 	char	ils_firmware[8];	/* Firmware ID */
6770266358Sragge };
6870266358Sragge 
6970266358Sragge /*
7070266358Sragge  * Structure of Collision Delay Time Record
7170266358Sragge  */
7270266358Sragge struct	il_collis {
7370266358Sragge 	u_short	ilc_fill1;
7470266358Sragge 	u_short	ilc_length;		/* Length (should be 0-32) */
7570266358Sragge 	u_short	ilc_delay[16];		/* Delay Times */
7670266358Sragge };
77