Bob Beers | 50ee11f | 2010-03-04 08:40:46 -0500 | [diff] [blame] | 1 | #ifndef _INC_SBEWIOC_H_ |
| 2 | #define _INC_SBEWIOC_H_ |
| 3 | |
| 4 | /*----------------------------------------------------------------------------- |
| 5 | * sbew_ioc.h - |
| 6 | * |
| 7 | * Copyright (C) 2002-2005 SBE, Inc. |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License as published by |
| 11 | * the Free Software Foundation; either version 2 of the License, or |
| 12 | * (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * For further information, contact via email: support@sbei.com |
| 20 | * SBE, Inc. San Ramon, California U.S.A. |
| 21 | * |
| 22 | *----------------------------------------------------------------------------- |
Bob Beers | 50ee11f | 2010-03-04 08:40:46 -0500 | [diff] [blame] | 23 | */ |
| 24 | |
Bob Beers | 50ee11f | 2010-03-04 08:40:46 -0500 | [diff] [blame] | 25 | #include <linux/ioctl.h> |
Bob Beers | 50ee11f | 2010-03-04 08:40:46 -0500 | [diff] [blame] | 26 | |
Bob Beers | 50ee11f | 2010-03-04 08:40:46 -0500 | [diff] [blame] | 27 | #define SBE_LOCKFILE "/tmp/.sbewan.LCK" |
| 28 | |
| 29 | #define SBE_IOC_COOKIE 0x19780926 |
| 30 | #define SBE_IOC_MAGIC ('s') |
| 31 | |
| 32 | /* IOW write - data has to go into driver from application */ |
| 33 | /* IOR read - data has to be returned to application from driver */ |
| 34 | |
| 35 | /* |
| 36 | * Note: for an IOWR Ioctl, the read and write data do not have to |
| 37 | * be the same size, but the entity declared within the IOC must be |
| 38 | * the larger of the two. |
| 39 | */ |
| 40 | |
| 41 | #define SBE_IOC_LOGLEVEL _IOW(SBE_IOC_MAGIC, 0x00, int) |
| 42 | #define SBE_IOC_CHAN_NEW _IOW(SBE_IOC_MAGIC, 0x01,int) /* unused */ |
| 43 | #define SBE_IOC_CHAN_UP _IOW(SBE_IOC_MAGIC, 0x02,int) /* unused */ |
| 44 | #define SBE_IOC_CHAN_DOWN _IOW(SBE_IOC_MAGIC, 0x03,int) /* unused */ |
| 45 | #define SBE_IOC_CHAN_GET _IOWR(SBE_IOC_MAGIC,0x04, struct sbecom_chan_param) |
| 46 | #define SBE_IOC_CHAN_SET _IOW(SBE_IOC_MAGIC, 0x05, struct sbecom_chan_param) |
| 47 | #define SBE_IOC_CHAN_GET_STAT _IOWR(SBE_IOC_MAGIC,0x06, struct sbecom_chan_stats) |
| 48 | #define SBE_IOC_CHAN_DEL_STAT _IOW(SBE_IOC_MAGIC, 0x07, int) |
| 49 | #define SBE_IOC_PORTS_ENABLE _IOW(SBE_IOC_MAGIC, 0x0A, int) |
| 50 | #define SBE_IOC_PORT_GET _IOWR(SBE_IOC_MAGIC,0x0C, struct sbecom_port_param) |
| 51 | #define SBE_IOC_PORT_SET _IOW(SBE_IOC_MAGIC, 0x0D, struct sbecom_port_param) |
| 52 | #define SBE_IOC_READ_VEC _IOWR(SBE_IOC_MAGIC,0x10, struct sbecom_wrt_vec) |
| 53 | #define SBE_IOC_WRITE_VEC _IOWR(SBE_IOC_MAGIC,0x11, struct sbecom_wrt_vec) |
| 54 | #define SBE_IOC_GET_SN _IOR(SBE_IOC_MAGIC, 0x12, u_int32_t) |
| 55 | #define SBE_IOC_RESET_DEV _IOW(SBE_IOC_MAGIC, 0x13, int) |
| 56 | #define SBE_IOC_FRAMER_GET _IOWR(SBE_IOC_MAGIC,0x14, struct sbecom_framer_param) |
| 57 | #define SBE_IOC_FRAMER_SET _IOW(SBE_IOC_MAGIC, 0x15, struct sbecom_framer_param) |
| 58 | #define SBE_IOC_CARD_GET _IOR(SBE_IOC_MAGIC, 0x20, struct sbecom_card_param) |
| 59 | #define SBE_IOC_CARD_SET _IOW(SBE_IOC_MAGIC, 0x21, struct sbecom_card_param) |
| 60 | #define SBE_IOC_CARD_GET_STAT _IOR(SBE_IOC_MAGIC, 0x22, struct temux_card_stats) |
| 61 | #define SBE_IOC_CARD_DEL_STAT _IO(SBE_IOC_MAGIC, 0x23) |
| 62 | #define SBE_IOC_CARD_CHAN_STAT _IOR(SBE_IOC_MAGIC, 0x24, struct sbecom_chan_stats) |
| 63 | #define SBE_IOC_CARD_BLINK _IOW(SBE_IOC_MAGIC, 0x30, int) |
| 64 | #define SBE_IOC_DRVINFO_GET _IOWR(SBE_IOC_MAGIC,0x31, struct sbe_drv_info) |
| 65 | #define SBE_IOC_BRDINFO_GET _IOR(SBE_IOC_MAGIC, 0x32, struct sbe_brd_info) |
| 66 | #define SBE_IOC_IID_GET _IOWR(SBE_IOC_MAGIC,0x33, struct sbe_iid_info) |
| 67 | #define SBE_IOC_BRDADDR_GET _IOWR(SBE_IOC_MAGIC, 0x34, struct sbe_brd_addr) |
| 68 | |
| 69 | #ifdef NOT_YET_COMMON |
| 70 | #define SBE_IOC_TSIOC_GET _IOWR(SBE_IOC_MAGIC,0x16, struct wanc1t3_ts_param) |
| 71 | #define SBE_IOC_TSIOC_SET _IOW(SBE_IOC_MAGIC, 0x17, struct wanc1t3_ts_param) |
| 72 | #endif |
| 73 | |
| 74 | /* |
| 75 | * Restrict SBE_IOC_WRITE_VEC & READ_VEC to a single parameter pair, application |
| 76 | * then must issue multiple Ioctls for large blocks of contiguous data. |
| 77 | */ |
| 78 | |
| 79 | #define SBE_IOC_MAXVEC 1 |
| 80 | |
Bob Beers | 50ee11f | 2010-03-04 08:40:46 -0500 | [diff] [blame] | 81 | #endif /*** _INC_SBEWIOC_H_ ***/ |