1 /* Copyright (C) 1992-2022 Free Software Foundation, Inc. 2 This file is part of the GNU C Library. 3 4 The GNU C Library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Lesser General Public 6 License as published by the Free Software Foundation; either 7 version 2.1 of the License, or (at your option) any later version. 8 9 The GNU C Library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with the GNU C Library; if not, see 16 <https://www.gnu.org/licenses/>. */ 17 18 #ifndef __BITS_IOCTLS_H 19 #define __BITS_IOCTLS_H 1 20 21 #if !defined _HURD_IOCTL_H && !defined _SYS_IOCTL_H 22 # error "Never use <bits/ioctls.h> directly; include <hurd/ioctl.h> instead." 23 #endif 24 25 /* These macros are also defined in <bits/termios.h> (with numerically 26 identical values) but this serves to shut up cpp's complaining. */ 27 28 #ifdef NL0 29 # undef NL0 30 #endif 31 #ifdef NL1 32 # undef NL1 33 #endif 34 #ifdef TAB0 35 # undef TAB0 36 #endif 37 #ifdef TAB1 38 # undef TAB1 39 #endif 40 #ifdef TAB2 41 # undef TAB2 42 #endif 43 #ifdef CR0 44 # undef CR0 45 #endif 46 #ifdef CR1 47 # undef CR1 48 #endif 49 #ifdef CR2 50 # undef CR2 51 #endif 52 #ifdef CR3 53 # undef CR3 54 #endif 55 #ifdef FF0 56 # undef FF0 57 #endif 58 #ifdef FF1 59 # undef FF1 60 #endif 61 #ifdef BS0 62 # undef BS0 63 #endif 64 #ifdef BS1 65 # undef BS1 66 #endif 67 #ifdef MDMBUF 68 # undef MDMBUF 69 #endif 70 #ifdef ECHO 71 # undef ECHO 72 #endif 73 #ifdef TOSTOP 74 # undef TOSTOP 75 #endif 76 #ifdef FLUSHO 77 # undef FLUSHO 78 #endif 79 #ifdef PENDIN 80 # undef PENDIN 81 #endif 82 #ifdef NOFLSH 83 # undef NOFLSH 84 #endif 85 86 /* Hurd ioctl request are made up of several fields: 87 88 10987654321098765432109876543210 89 IOt0t1t2cc0c0cc1c1cc2ggggccccccc 90 91 bits [31,30]: inout direction (enum __ioctl_dir) 92 bits [29,11]: type encoding as follows; zero count indicates omitted datum 93 [29,28]: datum #0 type (enum __ioctl_datum) 94 [27,26]: datum #1 type (enum __ioctl_datum) 95 [24,25]: datum #2 type (enum __ioctl_datum) 96 [23,19]: datum #0 count [0,31] 97 [18,14]: datum #1 count [0,31] 98 [13,11]: datum #2 count [0,3] 99 bits [07,10]: group (letter - 'f': ['f','v']) 100 bits [00,06]: command [0,127] 101 102 The following macros construct and dissect these fields. */ 103 104 enum __ioctl_dir 105 { 106 IOC_VOID = 0, /* No parameters. */ 107 IOC_OUT = 1, /* Data is written into the user's buffer. */ 108 IOC_IN = 2, /* Data is read from the user's buffer. */ 109 IOC_INOUT = (IOC_IN|IOC_OUT) 110 }; 111 112 enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 }; 113 114 /* Construct an ioctl from constructed type plus other fields. */ 115 #define _IOC(inout, group, num, type) \ 116 ((num) | ((((group) - 'f') | ((type) | (inout) << 19) << 4) << 7)) 117 118 /* Dissect an ioctl into its component fields. */ 119 #define _IOC_INOUT(request) (((unsigned int) (request) >> 30) & IOC_INOUT) 120 #define _IOC_GROUP(request) ('f' + (((unsigned int) (request) >> 7) & 0xf)) 121 #define _IOC_COMMAND(request) ((unsigned int) (request) & 0x7f) 122 #define _IOC_TYPE(request) (((unsigned int) (request) >> 11) & 0x7ffff) 123 #define _IOC_NOTYPE(request) ((unsigned int) (request) & 0x3ff) 124 125 /* Construct a type information field from 126 the broken-out type and count fields. */ 127 #define _IOT(t0, c0, t1, c1, t2, c2) \ 128 ((c2) | (((c1) | ((c0) | ((t2) | ((t1) | (t0) << 2) << 2) << 5) << 5) << 3)) 129 130 /* Dissect a type information field into the type and count fields. */ 131 #define _IOT_TYPE0(type) (((unsigned int) (type) >> 17) & 3) 132 #define _IOT_TYPE1(type) (((unsigned int) (type) >> 15) & 3) 133 #define _IOT_TYPE2(type) (((unsigned int) (type) >> 13) & 3) 134 #define _IOT_COUNT0(type) (((unsigned int) (type) >> 8) & 0x1f) 135 #define _IOT_COUNT1(type) (((unsigned int) (type) >> 3) & 0x1f) 136 #define _IOT_COUNT2(type) (((unsigned int) (type) >> 0) & 7) 137 138 /* Construct an ioctl from all the broken-out fields. */ 139 #define _IOCT(inout, group, num, t0, c0, t1, c1, t2, c2) \ 140 _IOC ((inout), (group), (num), _IOT ((t0), (c0), (t1), (c1), (t2), (c2))) 141 142 /* Construct an individual type field for TYPE. */ 143 #define _IOTS(type) \ 144 (sizeof (type) == 8 ? IOC_64 : (enum __ioctl_datum) (sizeof (type) >> 1)) 145 146 /* Construct a type information field for 147 a single argument of the scalar TYPE. */ 148 #define _IOT_SIMPLE(type) _IOT (_IOTS (type), 1, 0, 0, 0, 0) 149 150 /* Basic C types. */ 151 #define _IOT__IOTBASE_char _IOT_SIMPLE (char) 152 #define _IOT__IOTBASE_short _IOT_SIMPLE (short) 153 #define _IOT__IOTBASE_int _IOT_SIMPLE (int) 154 #define _IOT__IOTBASE_long _IOT_SIMPLE (long) 155 #define _IOT_char _IOT_SIMPLE (char) 156 #define _IOT_short _IOT_SIMPLE (short) 157 #define _IOT_int _IOT_SIMPLE (int) 158 #define _IOT_long _IOT_SIMPLE (long) 159 160 #define _IOT__IOTBASE_int8_t _IOT_SIMPLE (int8_t) 161 #define _IOT__IOTBASE_uint8_t _IOT_SIMPLE (uint8_t) 162 #define _IOT__IOTBASE_int16_t _IOT_SIMPLE (int16_t) 163 #define _IOT__IOTBASE_uint16_t _IOT_SIMPLE (uint16_t) 164 #define _IOT__IOTBASE_int32_t _IOT_SIMPLE (int32_t) 165 #define _IOT__IOTBASE_uint32_t _IOT_SIMPLE (uint32_t) 166 #define _IOT__IOTBASE_int64_t _IOT_SIMPLE (int64_t) 167 #define _IOT__IOTBASE_uint64_t _IOT_SIMPLE (uint64_t) 168 169 #define _IOT__IOTBASE_size_t _IOT_SIMPLE (size_t) 170 #define _IOT__IOTBASE_ssize_t _IOT_SIMPLE (ssize_t) 171 172 173 /* Standard flavors of ioctls. 174 _IOT_foobar is defined either in this file, 175 or where struct foobar is defined. */ 176 #define _IO(g, n) _IOC (IOC_VOID, (g), (n), 0) 177 #define _IOIW(g, n, t) _IOC (IOC_VOID, (g), (n), _IOC_ENCODE_TYPE (t)) 178 #define _IOR(g, n, t) _IOC (IOC_OUT, (g), (n), _IOC_ENCODE_TYPE (t)) 179 #define _IOW(g, n, t) _IOC (IOC_IN, (g), (n), _IOC_ENCODE_TYPE (t)) 180 #define _IOWR(g, n, t) _IOC (IOC_INOUT, (g), (n), _IOC_ENCODE_TYPE (t)) 181 182 /* These macros do some preprocessor gymnastics to turn a TYPESPEC of 183 `struct foobar' into the identifier `_IOT_foobar', which is generally 184 defined using `_IOT' (above) in whatever file defines `struct foobar'. 185 For a TYPESPEC that does not begin with `struct' produces a different 186 identifier: `int' produces `_IOT__IOTBASE_int'. These identifiers 187 are defined for the basic C types above. */ 188 #define _IOC_ENCODE_TYPE(typespec) _IOC_ENCODE_TYPE_1(_IOTBASE_##typespec) 189 #define _IOTBASE_struct 190 #define _IOC_ENCODE_TYPE_1(typespec) _IOC_ENCODE_TYPE_2(typespec) 191 #define _IOC_ENCODE_TYPE_2(typespec) _IOT_##typespec 192 193 /* Also, ignore signedness. */ 194 #define _IOTBASE_unsigned 195 #define _IOTBASE_signed 196 197 198 /* ioctls verbatim from 4.4 <sys/ioctl.h>. */ 199 200 #define TIOCMODG _IOR('t', 3, int) /* get modem control state */ 201 #define TIOCMODS _IOW('t', 4, int) /* set modem control state */ 202 #define TIOCM_LE 0001 /* line enable */ 203 #define TIOCM_DTR 0002 /* data terminal ready */ 204 #define TIOCM_RTS 0004 /* request to send */ 205 #define TIOCM_ST 0010 /* secondary transmit */ 206 #define TIOCM_SR 0020 /* secondary receive */ 207 #define TIOCM_CTS 0040 /* clear to send */ 208 #define TIOCM_CAR 0100 /* carrier detect */ 209 #define TIOCM_CD TIOCM_CAR 210 #define TIOCM_RNG 0200 /* ring */ 211 #define TIOCM_RI TIOCM_RNG 212 #define TIOCM_DSR 0400 /* data set ready */ 213 /* 8-10 compat */ 214 #define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */ 215 #define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */ 216 /* 15 unused */ 217 #define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */ 218 /* 17-18 compat */ 219 #define TIOCGETA _IOR('t', 19, struct termios) /* get termios struct */ 220 #define TIOCSETA _IOW('t', 20, struct termios) /* set termios struct */ 221 #define TIOCSETAW _IOW('t', 21, struct termios) /* drain output, set */ 222 #define TIOCSETAF _IOW('t', 22, struct termios) /* drn out, fls in, set */ 223 #define TIOCGETD _IOR('t', 26, int) /* get line discipline */ 224 #define TIOCSETD _IOW('t', 27, int) /* set line discipline */ 225 /* 127-124 compat */ 226 #define TIOCSBRK _IO('t', 123) /* set break bit */ 227 #define TIOCCBRK _IO('t', 122) /* clear break bit */ 228 #define TIOCSDTR _IO('t', 121) /* set data terminal ready */ 229 #define TIOCCDTR _IO('t', 120) /* clear data terminal ready */ 230 #define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */ 231 #define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */ 232 /* 117-116 compat */ 233 #define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ 234 #define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */ 235 #define TIOCNOTTY _IO('t', 113) /* void tty association */ 236 #define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */ 237 #define TIOCPKT_DATA 0x00 /* data packet */ 238 #define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ 239 #define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ 240 #define TIOCPKT_STOP 0x04 /* stop output */ 241 #define TIOCPKT_START 0x08 /* start output */ 242 #define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ 243 #define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ 244 #define TIOCPKT_IOCTL 0x40 /* state change of pty driver */ 245 #define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ 246 #define TIOCSTART _IO('t', 110) /* start output, like ^Q */ 247 #define TIOCMSET _IOW('t', 109, int) /* set all modem bits */ 248 #define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ 249 #define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ 250 #define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ 251 #define TIOCREMOTE _IOW('t', 105, int) /* remote input editing */ 252 #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ 253 #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ 254 #define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ 255 #define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */ 256 #define TIOCCONS _IOW('t', 98, int) /* become virtual console */ 257 #define TIOCSCTTY _IO('t', 97) /* become controlling tty */ 258 #define TIOCEXT _IOW('t', 96, int) /* pty: external processing */ 259 #define TIOCSIG _IO('t', 95) /* pty: generate signal */ 260 #define TIOCDRAIN _IO('t', 94) /* wait till output drained */ 261 262 #define TTYDISC 0 /* termios tty line discipline */ 263 #define TABLDISC 3 /* tablet discipline */ 264 #define SLIPDISC 4 /* serial IP discipline */ 265 266 267 #define FIOCLEX _IO('f', 1) /* set close on exec on fd */ 268 #define FIONCLEX _IO('f', 2) /* remove close on exec */ 269 #define FIONREAD _IOR('f', 127, int) /* get # bytes to read */ 270 #define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */ 271 #define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */ 272 #define FIOSETOWN _IOW('f', 124, int) /* set owner */ 273 #define FIOGETOWN _IOR('f', 123, int) /* get owner */ 274 275 /* socket i/o controls */ 276 #define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ 277 #define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ 278 #define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ 279 #define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ 280 #define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ 281 #define SIOCSPGRP _IOW('s', 8, int) /* set process group */ 282 #define SIOCGPGRP _IOR('s', 9, int) /* get process group */ 283 284 #define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */ 285 #define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */ 286 287 #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ 288 #define OSIOCGIFADDR _IOWR('i',13, struct ifreq) /* get ifnet address */ 289 #define SIOCGIFADDR _IOWR('i',33, struct ifreq) /* get ifnet address */ 290 #define SIOCGIFHWADDR _IOWR('i',39, struct ifreq) /* get hwaddress */ 291 #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ 292 #define OSIOCGIFDSTADDR _IOWR('i',15, struct ifreq) /* get p-p address */ 293 #define SIOCGIFDSTADDR _IOWR('i',34, struct ifreq) /* get p-p address */ 294 #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq_short)/* set ifnet flags */ 295 #define SIOCGIFFLAGS _IOWR('i',17, struct ifreq_short)/* get ifnet flags */ 296 #define OSIOCGIFBRDADDR _IOWR('i',18, struct ifreq) /* get broadcast addr */ 297 #define SIOCGIFBRDADDR _IOWR('i',35, struct ifreq) /* get broadcast addr */ 298 #define SIOCSIFBRDADDR _IOW('i',19, struct ifreq) /* set broadcast addr */ 299 #define OSIOCGIFCONF _IOWR('i',20, struct ifconf) /* get ifnet list */ 300 #define SIOCGIFCONF _IOWR('i',36, struct ifconf) /* get ifnet list */ 301 #define OSIOCGIFNETMASK _IOWR('i',21, struct ifreq) /* get net addr mask */ 302 #define SIOCGIFNETMASK _IOWR('i',37, struct ifreq) /* get net addr mask */ 303 #define SIOCSIFNETMASK _IOW('i',22, struct ifreq) /* set net addr mask */ 304 #define SIOCGIFMETRIC _IOWR('i',23, struct ifreq_int) /* get IF metric */ 305 #define SIOCSIFMETRIC _IOW('i',24, struct ifreq_int) /* set IF metric */ 306 #define SIOCDIFADDR _IOW('i',25, struct ifreq) /* delete IF addr */ 307 #define SIOCAIFADDR _IOW('i',26, struct ifaliasreq) /* add/chg IF alias */ 308 309 #define SIOCSARP _IOW('i', 30, struct arpreq) /* set arp entry */ 310 #define OSIOCGARP _IOWR('i',31, struct arpreq) /* get arp entry */ 311 #define SIOCGARP _IOWR('i',38, struct arpreq) /* get arp entry */ 312 #define SIOCDARP _IOW('i', 32, struct arpreq) /* delete arp entry */ 313 314 #define SIOCGIFMTU _IOWR('i', 51, struct ifreq_int)/* get IF mtu */ 315 #define SIOCSIFMTU _IOW('i', 52, struct ifreq_int) /* set IF mtu */ 316 317 #define SIOCGIFINDEX _IOWR('i', 90, struct ifreq_int)/* get IF index */ 318 #define SIOCGIFNAME _IOWR('i', 91, struct ifreq_int)/* set IF name */ 319 320 321 /* Compatibility with 4.3 BSD terminal driver. 322 From 4.4 <sys/ioctl_compat.h>. */ 323 324 #ifdef __USE_MISC 325 #ifdef USE_OLD_TTY 326 # undef TIOCGETD 327 # define TIOCGETD _IOR('t', 0, int) /* get line discipline */ 328 # undef TIOCSETD 329 # define TIOCSETD _IOW('t', 1, int) /* set line discipline */ 330 #else 331 # define OTIOCGETD _IOR('t', 0, int) /* get line discipline */ 332 # define OTIOCSETD _IOW('t', 1, int) /* set line discipline */ 333 #endif 334 #define TIOCHPCL _IO('t', 2) /* hang up on last close */ 335 #define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */ 336 #define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */ 337 #define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty*/ 338 #define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */ 339 #define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */ 340 #define TANDEM 0x00000001 /* send stopc on out q full */ 341 #define CBREAK 0x00000002 /* half-cooked mode */ 342 #define LCASE 0x00000004 /* simulate lower case */ 343 #define ECHO 0x00000008 /* echo input */ 344 #define CRMOD 0x00000010 /* map \r to \r\n on output */ 345 #define RAW 0x00000020 /* no i/o processing */ 346 #define ODDP 0x00000040 /* get/send odd parity */ 347 #define EVENP 0x00000080 /* get/send even parity */ 348 #define ANYP 0x000000c0 /* get any parity/send none */ 349 #define NLDELAY 0x00000300 /* \n delay */ 350 #define NL0 0x00000000 351 #define NL1 0x00000100 /* tty 37 */ 352 #define NL2 0x00000200 /* vt05 */ 353 #define NL3 0x00000300 354 #define TBDELAY 0x00000c00 /* horizontal tab delay */ 355 #define TAB0 0x00000000 356 #define TAB1 0x00000400 /* tty 37 */ 357 #define TAB2 0x00000800 358 #define XTABS 0x00000c00 /* expand tabs on output */ 359 #define CRDELAY 0x00003000 /* \r delay */ 360 #define CR0 0x00000000 361 #define CR1 0x00001000 /* tn 300 */ 362 #define CR2 0x00002000 /* tty 37 */ 363 #define CR3 0x00003000 /* concept 100 */ 364 #define VTDELAY 0x00004000 /* vertical tab delay */ 365 #define FF0 0x00000000 366 #define FF1 0x00004000 /* tty 37 */ 367 #define BSDELAY 0x00008000 /* \b delay */ 368 #define BS0 0x00000000 369 #define BS1 0x00008000 370 #define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY) 371 #define CRTBS 0x00010000 /* do backspacing for crt */ 372 #define PRTERA 0x00020000 /* \ ... / erase */ 373 #define CRTERA 0x00040000 /* " \b " to wipe out char */ 374 #define TILDE 0x00080000 /* hazeltine tilde kludge */ 375 #define MDMBUF 0x00100000 /*start/stop output on carrier*/ 376 #define LITOUT 0x00200000 /* literal output */ 377 #define TOSTOP 0x00400000 /*SIGSTOP on background output*/ 378 #define FLUSHO 0x00800000 /* flush output to terminal */ 379 #define NOHANG 0x01000000 /* (no-op) was no SIGHUP on carrier drop */ 380 #define L001000 0x02000000 381 #define CRTKIL 0x04000000 /* kill line with " \b " */ 382 #define PASS8 0x08000000 383 #define CTLECH 0x10000000 /* echo control chars as ^X */ 384 #define PENDIN 0x20000000 /* tp->t_rawq needs reread */ 385 #define DECCTQ 0x40000000 /* only ^Q starts after ^S */ 386 #define NOFLSH 0x80000000 /* no output flush on signal */ 387 #define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ 388 #define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */ 389 #define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */ 390 #define TIOCLGET _IOR('t', 124, int) /* get local modes */ 391 #define LCRTBS (CRTBS>>16) 392 #define LPRTERA (PRTERA>>16) 393 #define LCRTERA (CRTERA>>16) 394 #define LTILDE (TILDE>>16) 395 #define LMDMBUF (MDMBUF>>16) 396 #define LLITOUT (LITOUT>>16) 397 #define LTOSTOP (TOSTOP>>16) 398 #define LFLUSHO (FLUSHO>>16) 399 #define LNOHANG (NOHANG>>16) 400 #define LCRTKIL (CRTKIL>>16) 401 #define LPASS8 (PASS8>>16) 402 #define LCTLECH (CTLECH>>16) 403 #define LPENDIN (PENDIN>>16) 404 #define LDECCTQ (DECCTQ>>16) 405 #define LNOFLSH (NOFLSH>>16) 406 #define TIOCSLTC _IOW('t',117,struct ltchars)/* set local special chars*/ 407 #define TIOCGLTC _IOR('t',116,struct ltchars)/* get local special chars*/ 408 #define OTIOCCONS _IO('t', 98) /* for hp300 -- sans int arg */ 409 #define OTTYDISC 0 410 #define NETLDISC 1 411 #define NTTYDISC 2 412 413 /* From 4.4 <sys/ttydev.h>. */ 414 #ifdef USE_OLD_TTY 415 # define B0 0 416 # define B50 1 417 # define B75 2 418 # define B110 3 419 # define B134 4 420 # define B150 5 421 # define B200 6 422 # define B300 7 423 # define B600 8 424 # define B1200 9 425 # define B1800 10 426 # define B2400 11 427 # define B4800 12 428 # define B9600 13 429 # define EXTA 14 430 # define EXTB 15 431 #endif /* USE_OLD_TTY */ 432 #endif 433 434 #endif /* bits/ioctls.h */ 435