File: /usr/include/bits/ioctl-types.h

1     /* Structure types for pre-termios terminal ioctls.  Linux version.
2        Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
3        This file is part of the GNU C Library.
4     
5        The GNU C Library is free software; you can redistribute it and/or
6        modify it under the terms of the GNU Library General Public License as
7        published by the Free Software Foundation; either version 2 of the
8        License, or (at your option) any later version.
9     
10        The GNU C Library is distributed in the hope that it will be useful,
11        but WITHOUT ANY WARRANTY; without even the implied warranty of
12        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13        Library General Public License for more details.
14     
15        You should have received a copy of the GNU Library General Public
16        License along with the GNU C Library; see the file COPYING.LIB.  If not,
17        write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18        Boston, MA 02111-1307, USA.  */
19     
20     #ifndef _SYS_IOCTL_H
21     # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
22     #endif
23     
24     /* Get definition of constants for use with `ioctl'.  */
25     #include <asm/ioctls.h>
26     
27     
28     struct winsize
29       {
30         unsigned short int ws_row;
31         unsigned short int ws_col;
32         unsigned short int ws_xpixel;
33         unsigned short int ws_ypixel;
34       };
35     
36     #define NCC 8
37     struct termio
38       {
39         unsigned short int c_iflag;		/* input mode flags */
40         unsigned short int c_oflag;		/* output mode flags */
41         unsigned short int c_cflag;		/* control mode flags */
42         unsigned short int c_lflag;		/* local mode flags */
43         unsigned char c_line;		/* line discipline */
44         unsigned char c_cc[NCC];		/* control characters */
45     };
46     
47     /* modem lines */
48     #define TIOCM_LE	0x001
49     #define TIOCM_DTR	0x002
50     #define TIOCM_RTS	0x004
51     #define TIOCM_ST	0x008
52     #define TIOCM_SR	0x010
53     #define TIOCM_CTS	0x020
54     #define TIOCM_CAR	0x040
55     #define TIOCM_RNG	0x080
56     #define TIOCM_DSR	0x100
57     #define TIOCM_CD	TIOCM_CAR
58     #define TIOCM_RI	TIOCM_RNG
59     
60     /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
61     
62     /* line disciplines */
63     #define N_TTY		0
64     #define N_SLIP		1
65     #define N_MOUSE		2
66     #define N_PPP		3
67     #define N_STRIP		4
68     #define N_AX25		5
69     #define N_X25		6	/* X.25 async  */
70     #define N_6PACK		7
71     #define N_MASC		8	/* Mobitex module  */
72     #define N_R3964		9	/* Simatic R3964 module  */
73     #define N_PROFIBUS_FDL	10	/* Profibus  */
74     #define N_IRDA		11	/* Linux IR  */
75     #define N_SMSBLOCK	12	/* SMS block mode  */
76     #define N_HDLC		13	/* synchronous HDLC  */
77     #define N_SYNC_PPP	14	/* synchronous PPP  */
78