ioctl-types.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* Structure types for pre-termios terminal ioctls. Linux/powerpc version.
  2. Copyright (C) 2014-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  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. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef _SYS_IOCTL_H
  16. # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
  17. #endif
  18. /* Get definition of constants for use with `ioctl'. */
  19. #include <asm/ioctls.h>
  20. struct winsize
  21. {
  22. unsigned short int ws_row;
  23. unsigned short int ws_col;
  24. unsigned short int ws_xpixel;
  25. unsigned short int ws_ypixel;
  26. };
  27. #define NCC 10
  28. struct termio
  29. {
  30. unsigned short int c_iflag; /* input mode flags */
  31. unsigned short int c_oflag; /* output mode flags */
  32. unsigned short int c_cflag; /* control mode flags */
  33. unsigned short int c_lflag; /* local mode flags */
  34. unsigned char c_line; /* line discipline */
  35. unsigned char c_cc[NCC]; /* control characters */
  36. };
  37. /* modem lines */
  38. #define TIOCM_LE 0x001
  39. #define TIOCM_DTR 0x002
  40. #define TIOCM_RTS 0x004
  41. #define TIOCM_ST 0x008
  42. #define TIOCM_SR 0x010
  43. #define TIOCM_CTS 0x020
  44. #define TIOCM_CAR 0x040
  45. #define TIOCM_RNG 0x080
  46. #define TIOCM_DSR 0x100
  47. #define TIOCM_CD TIOCM_CAR
  48. #define TIOCM_RI TIOCM_RNG
  49. /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
  50. /* line disciplines */
  51. #define N_TTY 0
  52. #define N_SLIP 1
  53. #define N_MOUSE 2
  54. #define N_PPP 3
  55. #define N_STRIP 4
  56. #define N_AX25 5
  57. #define N_X25 6 /* X.25 async */
  58. #define N_6PACK 7
  59. #define N_MASC 8 /* Mobitex module */
  60. #define N_R3964 9 /* Simatic R3964 module */
  61. #define N_PROFIBUS_FDL 10 /* Profibus */
  62. #define N_IRDA 11 /* Linux IR */
  63. #define N_SMSBLOCK 12 /* SMS block mode */
  64. #define N_HDLC 13 /* synchronous HDLC */
  65. #define N_SYNC_PPP 14 /* synchronous PPP */
  66. #define N_HCI 15 /* Bluetooth HCI UART */