Back to index

lightning-sunbird  0.9+nobinonly
ttycom.h
Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 1982, 1986, 1990, 1993, 1994
00003  *     The Regents of the University of California.  All rights reserved.
00004  * (c) UNIX System Laboratories, Inc.
00005  * All or some portions of this file are derived from material licensed
00006  * to the University of California by American Telephone and Telegraph
00007  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
00008  * the permission of UNIX System Laboratories, Inc.
00009  *
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions
00012  * are met:
00013  * 1. Redistributions of source code must retain the above copyright
00014  *    notice, this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in the
00017  *    documentation and/or other materials provided with the distribution.
00018  * [3 Deleted as of 22Jul99, see
00019  *     ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
00020  *        for details]
00021  * 4. Neither the name of the University nor the names of its contributors
00022  *    may be used to endorse or promote products derived from this software
00023  *    without specific prior written permission.
00024  *
00025  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00026  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00027  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00028  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00029  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00030  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00031  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00032  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00033  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00034  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00035  * SUCH DAMAGE.
00036  *
00037  *     @(#)ttycom.h  8.1 (Berkeley) 3/28/94
00038  */
00039 
00040 /* Adapted for GUSI by Matthias Neeracher <neeri@iis.ee.ethz.ch> */
00041 
00042 #ifndef       _SYS_TTYCOM_H_
00043 #define       _SYS_TTYCOM_H_
00044 
00045 /* MPW specific codes */
00046 #define FIOINTERACTIVE (('f'<<8)|0x02)     /* If device is interactive */
00047 #define FIOREFNUM           (('f'<<8)|0x05)       /* Return fs refnum */
00048 #define FIOSETEOF           (('f'<<8)|0x06)       /* Set file length */
00049 
00050 #include <sys/ioccom.h>
00051 
00052 /*
00053  * Tty ioctl's except for those supported only for backwards compatibility
00054  * with the old tty driver.
00055  */
00056 
00057 /*
00058  * Window/terminal size structure.  This information is stored by the kernel
00059  * in order to provide a consistent interface, but is not used by the kernel.
00060  */
00061 struct winsize {
00062        unsigned short       ws_row;              /* rows, in characters */
00063        unsigned short       ws_col;              /* columns, in characters */
00064        unsigned short       ws_xpixel;    /* horizontal size, pixels */
00065        unsigned short       ws_ypixel;    /* vertical size, pixels */
00066 };
00067 
00068 #define       TIOCMODG      _IOR('t', 3, int)    /* get modem control state */
00069 #define       TIOCMODS      _IOW('t', 4, int)    /* set modem control state */
00070 #define              TIOCM_LE      0001          /* line enable */
00071 #define              TIOCM_DTR     0002          /* data terminal ready */
00072 #define              TIOCM_RTS     0004          /* request to send */
00073 #define              TIOCM_ST      0010          /* secondary transmit */
00074 #define              TIOCM_SR      0020          /* secondary receive */
00075 #define              TIOCM_CTS     0040          /* clear to send */
00076 #define              TIOCM_CAR     0100          /* carrier detect */
00077 #define              TIOCM_CD      TIOCM_CAR
00078 #define              TIOCM_RNG     0200          /* ring */
00079 #define              TIOCM_RI      TIOCM_RNG
00080 #define              TIOCM_DSR     0400          /* data set ready */
00081                                           /* 8-10 compat */
00082 #define       TIOCEXCL       _IO('t', 13)        /* set exclusive use of tty */
00083 #define       TIOCNXCL       _IO('t', 14)        /* reset exclusive use of tty */
00084                                           /* 15 unused */
00085 #define       TIOCFLUSH     _IOW('t', 16, int)   /* flush buffers */
00086                                           /* 17-18 compat */
00087 #define       TIOCGETA      _IOR('t', 19, struct termios) /* get termios struct */
00088 #define       TIOCSETA      _IOW('t', 20, struct termios) /* set termios struct */
00089 #define       TIOCSETAW     _IOW('t', 21, struct termios) /* drain output, set */
00090 #define       TIOCSETAF     _IOW('t', 22, struct termios) /* drn out, fls in, set */
00091 #define       TIOCGETD      _IOR('t', 26, int)   /* get line discipline */
00092 #define       TIOCSETD      _IOW('t', 27, int)   /* set line discipline */
00093                                           /* 127-124 compat */
00094 #define       TIOCSBRK       _IO('t', 123)              /* set break bit */
00095 #define       TIOCCBRK       _IO('t', 122)              /* clear break bit */
00096 #define       TIOCSDTR       _IO('t', 121)              /* set data terminal ready */
00097 #define       TIOCCDTR       _IO('t', 120)              /* clear data terminal ready */
00098 #define       TIOCGPGRP     _IOR('t', 119, int)  /* get pgrp of tty */
00099 #define       TIOCSPGRP     _IOW('t', 118, int)  /* set pgrp of tty */
00100                                           /* 117-116 compat */
00101 #define       TIOCOUTQ      _IOR('t', 115, int)  /* output queue size */
00102 #define       TIOCSTI              _IOW('t', 114, char) /* simulate terminal input */
00103 #define       TIOCNOTTY      _IO('t', 113)              /* void tty association */
00104 #define       TIOCPKT              _IOW('t', 112, int)  /* pty: set/clear packet mode */
00105 #define              TIOCPKT_DATA         0x00   /* data packet */
00106 #define              TIOCPKT_FLUSHREAD    0x01   /* flush packet */
00107 #define              TIOCPKT_FLUSHWRITE   0x02   /* flush packet */
00108 #define              TIOCPKT_STOP         0x04   /* stop output */
00109 #define              TIOCPKT_START        0x08   /* start output */
00110 #define              TIOCPKT_NOSTOP              0x10   /* no more ^S, ^Q */
00111 #define              TIOCPKT_DOSTOP              0x20   /* now do ^S ^Q */
00112 #define              TIOCPKT_IOCTL        0x40   /* state change of pty driver */
00113 #define       TIOCSTOP       _IO('t', 111)              /* stop output, like ^S */
00114 #define       TIOCSTART      _IO('t', 110)              /* start output, like ^Q */
00115 #define       TIOCMSET      _IOW('t', 109, int)  /* set all modem bits */
00116 #define       TIOCMBIS      _IOW('t', 108, int)  /* bis modem bits */
00117 #define       TIOCMBIC      _IOW('t', 107, int)  /* bic modem bits */
00118 #define       TIOCMGET      _IOR('t', 106, int)  /* get all modem bits */
00119 #define       TIOCREMOTE    _IOW('t', 105, int)  /* remote input editing */
00120 #define       TIOCGWINSZ    _IOR('t', 104, struct winsize)     /* get window size */
00121 #define       TIOCSWINSZ    _IOW('t', 103, struct winsize)     /* set window size */
00122 #define       TIOCUCNTL     _IOW('t', 102, int)  /* pty: set/clr usr cntl mode */
00123 #define              UIOCCMD(n)    _IO('u', n)   /* usr cntl op "n" */
00124 #define       TIOCCONS      _IOW('t', 98, int)   /* become virtual console */
00125 #define       TIOCSCTTY      _IO('t', 97)        /* become controlling tty */
00126 #define       TIOCEXT              _IOW('t', 96, int)   /* pty: external processing */
00127 #define       TIOCSIG               _IO('t', 95)        /* pty: generate signal */
00128 #define       TIOCDRAIN      _IO('t', 94)        /* wait till output drained */
00129 
00130 #define       TTYDISC              0             /* termios tty line discipline */
00131 #define       TABLDISC      3             /* tablet discipline */
00132 #define       SLIPDISC      4             /* serial IP discipline */
00133 
00134 #endif /* !_SYS_TTYCOM_H_ */