Home | History | Annotate | Line # | Download | only in pcmcia
      1  1.5  dholland /*	$NetBSD: if_cnwioctl.h,v 1.5 2015/09/06 06:01:00 dholland 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.3     perry  * 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.5  dholland #include <sys/ioccom.h>
     59  1.5  dholland 
     60  1.1    itojun struct cnwstatus {
     61  1.1    itojun 	struct ifreq	ifr;
     62  1.1    itojun 	u_char		data[0x100];
     63  1.1    itojun };
     64  1.1    itojun 
     65  1.1    itojun struct cnwstats {
     66  1.2    itojun 	u_quad_t nws_rx;
     67  1.2    itojun 	u_quad_t nws_rxerr;
     68  1.2    itojun 	u_quad_t nws_rxoverflow;
     69  1.2    itojun 	u_quad_t nws_rxoverrun;
     70  1.2    itojun 	u_quad_t nws_rxcrcerror;
     71  1.2    itojun 	u_quad_t nws_rxframe;
     72  1.2    itojun 	u_quad_t nws_rxerrors;
     73  1.2    itojun 	u_quad_t nws_rxavail;
     74  1.2    itojun 	u_quad_t nws_rxone;
     75  1.2    itojun 	u_quad_t nws_tx;
     76  1.2    itojun 	u_quad_t nws_txokay;
     77  1.2    itojun 	u_quad_t nws_txabort;
     78  1.2    itojun 	u_quad_t nws_txlostcd;
     79  1.2    itojun 	u_quad_t nws_txerrors;
     80  1.2    itojun 	u_quad_t nws_txretries[16];
     81  1.1    itojun };
     82  1.1    itojun 
     83  1.1    itojun struct cnwistats {
     84  1.1    itojun 	struct ifreq	ifr;
     85  1.1    itojun 	struct cnwstats stats;
     86  1.1    itojun };
     87  1.1    itojun 
     88  1.1    itojun struct cnwtrail {
     89  1.1    itojun 	u_char		what;
     90  1.1    itojun 	u_char		status;
     91  1.1    itojun 	u_short		length;
     92  1.1    itojun 	struct timeval	when;
     93  1.1    itojun 	struct timeval	done;
     94  1.1    itojun };
     95  1.1    itojun 
     96  1.1    itojun struct cnwitrail {
     97  1.1    itojun 	struct ifreq	ifr;
     98  1.1    itojun 	int		head;
     99  1.1    itojun 	struct cnwtrail trail[128];
    100  1.1    itojun };
    101  1.1    itojun 
    102  1.1    itojun #define ifr_domain	ifr_ifru.ifru_flags     /* domain */
    103  1.1    itojun #define ifr_key		ifr_ifru.ifru_flags     /* scramble key */
    104  1.1    itojun 
    105  1.1    itojun #define SIOCSCNWDOMAIN	_IOW('i', 254, struct ifreq)	/* set domain */
    106  1.1    itojun #define SIOCGCNWDOMAIN	_IOWR('i', 253, struct ifreq)	/* get domain */
    107  1.1    itojun #define SIOCSCNWKEY	_IOWR('i', 252, struct ifreq)	/* set scramble key */
    108  1.1    itojun #define	SIOCGCNWSTATUS	_IOWR('i', 251, struct cnwstatus)/* get raw status */
    109  1.1    itojun #define	SIOCGCNWSTATS	_IOWR('i', 250, struct cnwistats)/* get stats */
    110  1.1    itojun #define	SIOCGCNWTRAIL	_IOWR('i', 249, struct cnwitrail)/* get trail */
    111