ioctl-types.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
  2. Copyright (C) 1997, 1999, 2000, 2001 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, write to the Free
  14. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  15. 02111-1307 USA. */
  16. #ifndef _SYS_IOCTL_H
  17. # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
  18. #endif
  19. /* Get definition of constants for use with `ioctl'. */
  20. #include <asm/ioctls.h>
  21. struct winsize
  22. {
  23. unsigned short int ws_row;
  24. unsigned short int ws_col;
  25. unsigned short int ws_xpixel;
  26. unsigned short int ws_ypixel;
  27. };
  28. #define NCC 8
  29. struct termio
  30. {
  31. unsigned short int c_iflag; /* input mode flags */
  32. unsigned short int c_oflag; /* output mode flags */
  33. unsigned short int c_cflag; /* control mode flags */
  34. unsigned short int c_lflag; /* local mode flags */
  35. char c_line; /* line discipline */
  36. /* Yes, this is really NCCS. */
  37. unsigned char c_cc[32 /* NCCS */]; /* control characters */
  38. };
  39. /* modem lines */
  40. #define TIOCM_LE 0x001 /* line enable */
  41. #define TIOCM_DTR 0x002 /* data terminal ready */
  42. #define TIOCM_RTS 0x004 /* request to send */
  43. #define TIOCM_ST 0x010 /* secondary transmit */
  44. #define TIOCM_SR 0x020 /* secondary receive */
  45. #define TIOCM_CTS 0x040 /* clear to send */
  46. #define TIOCM_CAR 0x100 /* carrier detect */
  47. #define TIOCM_CD TIOCM_CAR
  48. #define TIOCM_RNG 0x200 /* ring */
  49. #define TIOCM_RI TIOCM_RNG
  50. #define TIOCM_DSR 0x400 /* data set ready */
  51. /* line disciplines */
  52. #define N_TTY 0
  53. #define N_SLIP 1
  54. #define N_MOUSE 2
  55. #define N_PPP 3
  56. #define N_STRIP 4
  57. #define N_AX25 5
  58. #define N_X25 6 /* X.25 async */
  59. #define N_6PACK 7
  60. #define N_MASC 8 /* Mobitex module */
  61. #define N_R3964 9 /* Simatic R3964 module */
  62. #define N_PROFIBUS_FDL 10 /* Profibus */
  63. #define N_IRDA 11 /* Linux IR */
  64. #define N_SMSBLOCK 12 /* SMS block mode */
  65. #define N_HDLC 13 /* synchronous HDLC */
  66. #define N_SYNC_PPP 14 /* synchronous PPP */
  67. #define N_HCI 15 /* Bluetooth HCI UART */