Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | /* ** ----------------------------------------------------------------------------- ** ** Perle Specialix driver for Linux ** Ported from existing RIO Driver for SCO sources. * * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ** ** Module : daemon.h ** SID : 1.3 ** Last Modified : 11/6/98 11:34:09 ** Retrieved : 11/6/98 11:34:21 ** ** ident @(#)daemon.h 1.3 ** ** ----------------------------------------------------------------------------- */ #ifndef __rio_daemon_h__ #define __rio_daemon_h__ #ifdef SCCS_LABELS #ifndef lint static char *_daemon_h_sccs_ = "@(#)daemon.h 1.3"; #endif #endif /* ** structures used on /dev/rio */ struct Error { uint Error; uint Entry; uint Other; }; struct DownLoad { char *DataP; uint Count; uint ProductCode; }; /* ** A few constants.... */ #ifndef MAX_VERSION_LEN #define MAX_VERSION_LEN 256 #endif #ifndef MAX_XP_CTRL_LEN #define MAX_XP_CTRL_LEN 16 /* ALSO IN PORT.H */ #endif struct PortSetup { uint From; /* Set/Clear XP & IXANY Control from this port.... */ uint To; /* .... to this port */ uint XpCps; /* at this speed */ char XpOn[MAX_XP_CTRL_LEN]; /* this is the start string */ char XpOff[MAX_XP_CTRL_LEN]; /* this is the stop string */ uchar IxAny; /* enable/disable IXANY */ uchar IxOn; /* enable/disable IXON */ uchar Lock; /* lock port params */ uchar Store; /* store params across closes */ uchar Drain; /* close only when drained */ }; struct LpbReq { uint Host; uint Link; struct LPB *LpbP; }; struct RupReq { uint HostNum; uint RupNum; struct RUP *RupP; }; struct PortReq { uint SysPort; struct Port *PortP; }; struct StreamInfo { uint SysPort; #if 0 queue_t RQueue; queue_t WQueue; #else int RQueue; int WQueue; #endif }; struct HostReq { uint HostNum; struct Host *HostP; }; struct HostDpRam { uint HostNum; struct DpRam *DpRamP; }; struct DebugCtrl { uint SysPort; uint Debug; uint Wait; }; struct MapInfo { uint FirstPort; /* 8 ports, starting from this (tty) number */ uint RtaUnique; /* reside on this RTA (unique number) */ }; struct MapIn { uint NumEntries; /* How many port sets are we mapping? */ struct MapInfo *MapInfoP; /* Pointer to (user space) info */ }; struct SendPack { unsigned int PortNum; unsigned char Len; unsigned char Data[PKT_MAX_DATA_LEN]; }; struct SpecialRupCmd { struct PKT Packet; unsigned short Host; unsigned short RupNum; }; struct IdentifyRta { ulong RtaUnique; uchar ID; }; struct KillNeighbour { ulong UniqueNum; uchar Link; }; struct rioVersion { char version[MAX_VERSION_LEN]; char relid[MAX_VERSION_LEN]; int buildLevel; char buildDate[MAX_VERSION_LEN]; }; /* ** RIOC commands are for the daemon type operations ** ** 09.12.1998 ARG - ESIL 0776 part fix ** Definition for 'RIOC' also appears in rioioctl.h, so we'd better do a ** #ifndef here first. ** rioioctl.h also now has #define 'RIO_QUICK_CHECK' as this ioctl is now ** allowed to be used by customers. */ #ifndef RIOC #define RIOC ('R'<<8)|('i'<<16)|('o'<<24) #endif /* ** Boot stuff */ #define RIO_GET_TABLE (RIOC | 100) #define RIO_PUT_TABLE (RIOC | 101) #define RIO_ASSIGN_RTA (RIOC | 102) #define RIO_DELETE_RTA (RIOC | 103) #define RIO_HOST_FOAD (RIOC | 104) #define RIO_QUICK_CHECK (RIOC | 105) #define RIO_SIGNALS_ON (RIOC | 106) #define RIO_SIGNALS_OFF (RIOC | 107) #define RIO_CHANGE_NAME (RIOC | 108) #define RIO_DOWNLOAD (RIOC | 109) #define RIO_GET_LOG (RIOC | 110) #define RIO_SETUP_PORTS (RIOC | 111) #define RIO_ALL_MODEM (RIOC | 112) /* ** card state, debug stuff */ #define RIO_NUM_HOSTS (RIOC | 120) #define RIO_HOST_LPB (RIOC | 121) #define RIO_HOST_RUP (RIOC | 122) #define RIO_HOST_PORT (RIOC | 123) #define RIO_PARMS (RIOC | 124) #define RIO_HOST_REQ (RIOC | 125) #define RIO_READ_CONFIG (RIOC | 126) #define RIO_SET_CONFIG (RIOC | 127) #define RIO_VERSID (RIOC | 128) #define RIO_FLAGS (RIOC | 129) #define RIO_SETDEBUG (RIOC | 130) #define RIO_GETDEBUG (RIOC | 131) #define RIO_READ_LEVELS (RIOC | 132) #define RIO_SET_FAST_BUS (RIOC | 133) #define RIO_SET_SLOW_BUS (RIOC | 134) #define RIO_SET_BYTE_MODE (RIOC | 135) #define RIO_SET_WORD_MODE (RIOC | 136) #define RIO_STREAM_INFO (RIOC | 137) #define RIO_START_POLLER (RIOC | 138) #define RIO_STOP_POLLER (RIOC | 139) #define RIO_LAST_ERROR (RIOC | 140) #define RIO_TICK (RIOC | 141) #define RIO_TOCK (RIOC | 241) /* I did this on purpose, you know. */ #define RIO_SEND_PACKET (RIOC | 142) #define RIO_SET_BUSY (RIOC | 143) #define SPECIAL_RUP_CMD (RIOC | 144) #define RIO_FOAD_RTA (RIOC | 145) #define RIO_ZOMBIE_RTA (RIOC | 146) #define RIO_IDENTIFY_RTA (RIOC | 147) #define RIO_KILL_NEIGHBOUR (RIOC | 148) #define RIO_DEBUG_MEM (RIOC | 149) /* ** 150 - 167 used..... See below */ #define RIO_GET_PORT_SETUP (RIOC | 168) #define RIO_RESUME (RIOC | 169) #define RIO_MESG (RIOC | 170) #define RIO_NO_MESG (RIOC | 171) #define RIO_WHAT_MESG (RIOC | 172) #define RIO_HOST_DPRAM (RIOC | 173) #define RIO_MAP_B50_TO_50 (RIOC | 174) #define RIO_MAP_B50_TO_57600 (RIOC | 175) #define RIO_MAP_B110_TO_110 (RIOC | 176) #define RIO_MAP_B110_TO_115200 (RIOC | 177) #define RIO_GET_PORT_PARAMS (RIOC | 178) #define RIO_SET_PORT_PARAMS (RIOC | 179) #define RIO_GET_PORT_TTY (RIOC | 180) #define RIO_SET_PORT_TTY (RIOC | 181) #define RIO_SYSLOG_ONLY (RIOC | 182) #define RIO_SYSLOG_CONS (RIOC | 183) #define RIO_CONS_ONLY (RIOC | 184) #define RIO_BLOCK_OPENS (RIOC | 185) /* ** 02.03.1999 ARG - ESIL 0820 fix : ** RIOBootMode is no longer use by the driver, so these ioctls ** are now obsolete : ** #define RIO_GET_BOOT_MODE (RIOC | 186) #define RIO_SET_BOOT_MODE (RIOC | 187) ** */ #define RIO_MEM_DUMP (RIOC | 189) #define RIO_READ_REGISTER (RIOC | 190) #define RIO_GET_MODTYPE (RIOC | 191) #define RIO_SET_TIMER (RIOC | 192) #define RIO_READ_CHECK (RIOC | 196) #define RIO_WAITING_FOR_RESTART (RIOC | 197) #define RIO_BIND_RTA (RIOC | 198) #define RIO_GET_BINDINGS (RIOC | 199) #define RIO_PUT_BINDINGS (RIOC | 200) #define RIO_MAKE_DEV (RIOC | 201) #define RIO_MINOR (RIOC | 202) #define RIO_IDENTIFY_DRIVER (RIOC | 203) #define RIO_DISPLAY_HOST_CFG (RIOC | 204) /* ** MAKE_DEV / MINOR stuff */ #define RIO_DEV_DIRECT 0x0000 #define RIO_DEV_MODEM 0x0200 #define RIO_DEV_XPRINT 0x0400 #define RIO_DEV_MASK 0x0600 /* ** port management, xprint stuff */ #define rIOCN(N) (RIOC|(N)) #define rIOCR(N,T) (RIOC|(N)) #define rIOCW(N,T) (RIOC|(N)) #define RIO_GET_XP_ON rIOCR(150,char[16]) /* start xprint string */ #define RIO_SET_XP_ON rIOCW(151,char[16]) #define RIO_GET_XP_OFF rIOCR(152,char[16]) /* finish xprint string */ #define RIO_SET_XP_OFF rIOCW(153,char[16]) #define RIO_GET_XP_CPS rIOCR(154,int) /* xprint CPS */ #define RIO_SET_XP_CPS rIOCW(155,int) #define RIO_GET_IXANY rIOCR(156,int) /* ixany allowed? */ #define RIO_SET_IXANY rIOCW(157,int) #define RIO_SET_IXANY_ON rIOCN(158) /* allow ixany */ #define RIO_SET_IXANY_OFF rIOCN(159) /* disallow ixany */ #define RIO_GET_MODEM rIOCR(160,int) /* port is modem/direct line? */ #define RIO_SET_MODEM rIOCW(161,int) #define RIO_SET_MODEM_ON rIOCN(162) /* port is a modem */ #define RIO_SET_MODEM_OFF rIOCN(163) /* port is direct */ #define RIO_GET_IXON rIOCR(164,int) /* ixon allowed? */ #define RIO_SET_IXON rIOCW(165,int) #define RIO_SET_IXON_ON rIOCN(166) /* allow ixon */ #define RIO_SET_IXON_OFF rIOCN(167) /* disallow ixon */ #define RIO_GET_SIVIEW ((('s')<<8) | 106) /* backwards compatible with SI */ #define RIO_IOCTL_UNKNOWN -2 #endif |