1 /* 2 * Copyright (c) 1986 Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Micom-Interlan Inc. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the University of California, Berkeley. The name of the 14 * University may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * 20 * @(#)if_ix.h 7.2 (Berkeley) 08/04/88 21 */ 22 23 union ix_stats { 24 struct { /* General statistics below */ 25 u_char macg_physaddr[6]; 26 u_short macg_pad; 27 u_long dlag_rcvmac; /* packets received by DLA from MAC */ 28 u_long dlag_rcvpass; /* packets passed to users by DLA */ 29 u_long dlag_txreq; /* packets sent by users to DLA */ 30 u_long dlag_txsnt; /* packets sent by DLA to MAC */ 31 u_short dlag_chaopn; /* channels open */ 32 u_short dlag_maxopn; /* max channels opened concurrently */ 33 u_long macg_frmtos; /* packets discarded by MAC */ 34 u_long macg_frmpas; /* packets sent to DLA by MAC */ 35 u_long macg_x2x; /* packets put on wire by MAC */ 36 u_long macg_x2r; /* packets looped by MAC */ 37 u_long macg_xrty; /* transmitter retries */ 38 u_short macg_noap; /* open MAC paths */ 39 u_short macg_nprom; /* open promiscuous paths */ 40 u_short macg_conopn; /* max concurrent MAC paths */ 41 u_short sysg_crce; /* CRC errors */ 42 u_short sysg_alne; /* alignment errors */ 43 u_short sysg_rsce; /* resource errors */ 44 u_short sysg_ovre; /* overrun errors */ 45 } ixg; 46 struct { /* Channel statistics below */ 47 u_long dabc_rcvacc; /* packets received */ 48 u_long dabc_rcvtoss; /* packets discarded, queue full */ 49 u_long dabc_rcvpass; /* packets passed to user */ 50 u_long dabc_txreq; /* packets sent by user */ 51 u_long dabc_txsent; /* packets sent to MAC */ 52 u_long macc_rcvcnt; /* packets received by MAC */ 53 u_long macc_txtcnt; /* packets sent by MAC to wire */ 54 u_long macc_lowmem; /* packets discarded, no mem */ 55 } ixc; 56 }; 57 #define IXC_MAP(a) (((a) << 6) | 0100077) 58 59 #define IXC_OPEN IXC_MAP(1) /* Open Channel */ 60 #define IXC_CLOSE IXC_MAP(2) /* Close Channel */ 61 #define IXC_MCAST IXC_MAP(3) /* Set Multicast Addresses */ 62 #define IXC_RECV IXC_MAP(4) /* Receive Frame */ 63 #define IXC_RECVF IXC_MAP(5) /* Receive Fragment */ 64 #define IXC_XMIT IXC_MAP(6) /* Send Frame */ 65 #define IXC_GSTAT IXC_MAP(7) /* Get General Statistics */ 66 #define IXC_CSTAT IXC_MAP(8) /* Get Channel Statistics */ 67 #define IXC_GSCLR IXC_MAP(9) /* Clear General Statistics */ 68 #define IXC_CSCLR IXC_MAP(10) /* Clear Channel Statistics */ 69 #define IXC_RESET IXC_MAP(11) /* Reset DLA module */ 70 #define IXC_LDPA IXC_MAP(12) /* Load Physical Address */ 71