if_cnwioctl.h revision 1.2 1 1.2 itojun /* $NetBSD: if_cnwioctl.h,v 1.2 1999/11/29 12:54:00 itojun Exp $ */
2 1.2 itojun
3 1.2 itojun /*
4 1.2 itojun * Copyright (c) 1996, 1997 Berkeley Software Design, Inc.
5 1.2 itojun * All rights reserved.
6 1.2 itojun *
7 1.2 itojun * Redistribution and use in source and binary forms, with or without
8 1.2 itojun * modification, are permitted provided that this notice is retained,
9 1.2 itojun * the conditions in the following notices are met, and terms applying
10 1.2 itojun * to contributors in the following notices also apply to Berkeley
11 1.2 itojun * Software Design, Inc.
12 1.2 itojun *
13 1.2 itojun * 1. Redistributions of source code must retain the above copyright
14 1.2 itojun * notice, this list of conditions and the following disclaimer.
15 1.2 itojun * 2. Redistributions in binary form must reproduce the above copyright
16 1.2 itojun * notice, this list of conditions and the following disclaimer in the
17 1.2 itojun * documentation and/or other materials provided with the distribution.
18 1.2 itojun * 3. All advertising materials mentioning features or use of this software
19 1.2 itojun * must display the following acknowledgement:
20 1.2 itojun * This product includes software developed by
21 1.2 itojun * Berkeley Software Design, Inc.
22 1.2 itojun * 4. Neither the name of the Berkeley Software Design, Inc. nor the names
23 1.2 itojun * of its contributors may be used to endorse or promote products derived
24 1.2 itojun * from this software without specific prior written permission.
25 1.2 itojun *
26 1.2 itojun * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN, INC. ``AS IS'' AND
27 1.2 itojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 1.2 itojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 1.2 itojun * ARE DISCLAIMED. IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN, INC. BE LIABLE
30 1.2 itojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 1.2 itojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 1.2 itojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 1.2 itojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 1.2 itojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 1.2 itojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 1.2 itojun * SUCH DAMAGE.
37 1.2 itojun *
38 1.2 itojun * PAO2 Id: if_cnwioctl.h,v 1.1.8.1 1998/12/05 22:47:11 itojun Exp
39 1.2 itojun *
40 1.2 itojun * Paul Borman, December 1996
41 1.2 itojun *
42 1.2 itojun * This driver is derived from a generic frame work which is
43 1.2 itojun * Copyright(c) 1994,1995,1996
44 1.2 itojun * Yoichi Shinoda, Yoshitaka Tokugawa, WIDE Project, Wildboar Project
45 1.2 itojun * and Foretune. All rights reserved.
46 1.2 itojun *
47 1.2 itojun * A linux driver was used as the "hardware reference manual" (i.e.,
48 1.2 itojun * to determine registers and a general outline of how the card works)
49 1.2 itojun * That driver is publically available and copyright
50 1.2 itojun *
51 1.2 itojun * John Markus Bj,Ax(Brndalen
52 1.2 itojun * Department of Computer Science
53 1.2 itojun * University of Troms,Ax(B
54 1.2 itojun * Norway
55 1.2 itojun * johnm (at) staff.cs.uit.no, http://www.cs.uit.no/~johnm/
56 1.2 itojun */
57 1.2 itojun
58 1.1 itojun struct cnwstatus {
59 1.1 itojun struct ifreq ifr;
60 1.1 itojun u_char data[0x100];
61 1.1 itojun };
62 1.1 itojun
63 1.1 itojun struct cnwstats {
64 1.2 itojun u_quad_t nws_rx;
65 1.2 itojun u_quad_t nws_rxerr;
66 1.2 itojun u_quad_t nws_rxoverflow;
67 1.2 itojun u_quad_t nws_rxoverrun;
68 1.2 itojun u_quad_t nws_rxcrcerror;
69 1.2 itojun u_quad_t nws_rxframe;
70 1.2 itojun u_quad_t nws_rxerrors;
71 1.2 itojun u_quad_t nws_rxavail;
72 1.2 itojun u_quad_t nws_rxone;
73 1.2 itojun u_quad_t nws_tx;
74 1.2 itojun u_quad_t nws_txokay;
75 1.2 itojun u_quad_t nws_txabort;
76 1.2 itojun u_quad_t nws_txlostcd;
77 1.2 itojun u_quad_t nws_txerrors;
78 1.2 itojun u_quad_t nws_txretries[16];
79 1.1 itojun };
80 1.1 itojun
81 1.1 itojun struct cnwistats {
82 1.1 itojun struct ifreq ifr;
83 1.1 itojun struct cnwstats stats;
84 1.1 itojun };
85 1.1 itojun
86 1.1 itojun struct cnwtrail {
87 1.1 itojun u_char what;
88 1.1 itojun u_char status;
89 1.1 itojun u_short length;
90 1.1 itojun struct timeval when;
91 1.1 itojun struct timeval done;
92 1.1 itojun };
93 1.1 itojun
94 1.1 itojun struct cnwitrail {
95 1.1 itojun struct ifreq ifr;
96 1.1 itojun int head;
97 1.1 itojun struct cnwtrail trail[128];
98 1.1 itojun };
99 1.1 itojun
100 1.1 itojun #define ifr_domain ifr_ifru.ifru_flags /* domain */
101 1.1 itojun #define ifr_key ifr_ifru.ifru_flags /* scramble key */
102 1.1 itojun
103 1.1 itojun #define SIOCSCNWDOMAIN _IOW('i', 254, struct ifreq) /* set domain */
104 1.1 itojun #define SIOCGCNWDOMAIN _IOWR('i', 253, struct ifreq) /* get domain */
105 1.1 itojun #define SIOCSCNWKEY _IOWR('i', 252, struct ifreq) /* set scramble key */
106 1.1 itojun #define SIOCGCNWSTATUS _IOWR('i', 251, struct cnwstatus)/* get raw status */
107 1.1 itojun #define SIOCGCNWSTATS _IOWR('i', 250, struct cnwistats)/* get stats */
108 1.1 itojun #define SIOCGCNWTRAIL _IOWR('i', 249, struct cnwitrail)/* get trail */
109