Annotation of XNU/bsd/sys/ttycom.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * The contents of this file constitute Original Code as defined in and
                      7:  * are subject to the Apple Public Source License Version 1.1 (the
                      8:  * "License").  You may not use this file except in compliance with the
                      9:  * License.  Please obtain a copy of the License at
                     10:  * http://www.apple.com/publicsource and read it before using this file.
                     11:  * 
                     12:  * This Original Code and all software distributed under the License are
                     13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     17:  * License for the specific language governing rights and limitations
                     18:  * under the License.
                     19:  * 
                     20:  * @APPLE_LICENSE_HEADER_END@
                     21:  */
                     22: /* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */
                     23: /*-
                     24:  * Copyright (c) 1982, 1986, 1990, 1993, 1994
                     25:  *     The Regents of the University of California.  All rights reserved.
                     26:  * (c) UNIX System Laboratories, Inc.
                     27:  * All or some portions of this file are derived from material licensed
                     28:  * to the University of California by American Telephone and Telegraph
                     29:  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
                     30:  * the permission of UNIX System Laboratories, Inc.
                     31:  *
                     32:  * Redistribution and use in source and binary forms, with or without
                     33:  * modification, are permitted provided that the following conditions
                     34:  * are met:
                     35:  * 1. Redistributions of source code must retain the above copyright
                     36:  *    notice, this list of conditions and the following disclaimer.
                     37:  * 2. Redistributions in binary form must reproduce the above copyright
                     38:  *    notice, this list of conditions and the following disclaimer in the
                     39:  *    documentation and/or other materials provided with the distribution.
                     40:  * 3. All advertising materials mentioning features or use of this software
                     41:  *    must display the following acknowledgement:
                     42:  *      This product includes software developed by the University of
                     43:  *      California, Berkeley and its contributors.
                     44:  * 4. Neither the name of the University nor the names of its contributors
                     45:  *    may be used to endorse or promote products derived from this software
                     46:  *    without specific prior written permission.
                     47:  *
                     48:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     49:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     50:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     51:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     52:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     53:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     54:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     55:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     56:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     57:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     58:  * SUCH DAMAGE.
                     59:  *
                     60:  *     @(#)ttycom.h    8.1 (Berkeley) 3/28/94
                     61:  */
                     62: 
                     63: #ifndef        _SYS_TTYCOM_H_
                     64: #define        _SYS_TTYCOM_H_
                     65: 
                     66: #include <sys/ioccom.h>
                     67: 
                     68: /*
                     69:  * Tty ioctl's except for those supported only for backwards compatibility
                     70:  * with the old tty driver.
                     71:  */
                     72: 
                     73: /*
                     74:  * Window/terminal size structure.  This information is stored by the kernel
                     75:  * in order to provide a consistent interface, but is not used by the kernel.
                     76:  */
                     77: struct winsize {
                     78:        unsigned short  ws_row;         /* rows, in characters */
                     79:        unsigned short  ws_col;         /* columns, in characters */
                     80:        unsigned short  ws_xpixel;      /* horizontal size, pixels */
                     81:        unsigned short  ws_ypixel;      /* vertical size, pixels */
                     82: };
                     83: 
                     84: #define        TIOCMODG        _IOR('t', 3, int)       /* get modem control state */
                     85: #define        TIOCMODS        _IOW('t', 4, int)       /* set modem control state */
                     86: #define                TIOCM_LE        0001            /* line enable */
                     87: #define                TIOCM_DTR       0002            /* data terminal ready */
                     88: #define                TIOCM_RTS       0004            /* request to send */
                     89: #define                TIOCM_ST        0010            /* secondary transmit */
                     90: #define                TIOCM_SR        0020            /* secondary receive */
                     91: #define                TIOCM_CTS       0040            /* clear to send */
                     92: #define                TIOCM_CAR       0100            /* carrier detect */
                     93: #define                TIOCM_CD        TIOCM_CAR
                     94: #define                TIOCM_RNG       0200            /* ring */
                     95: #define                TIOCM_RI        TIOCM_RNG
                     96: #define                TIOCM_DSR       0400            /* data set ready */
                     97:                                                /* 8-10 compat */
                     98: #define        TIOCEXCL         _IO('t', 13)           /* set exclusive use of tty */
                     99: #define        TIOCNXCL         _IO('t', 14)           /* reset exclusive use of tty */
                    100:                                                /* 15 unused */
                    101: #define        TIOCFLUSH       _IOW('t', 16, int)      /* flush buffers */
                    102:                                                /* 17-18 compat */
                    103: #define        TIOCGETA        _IOR('t', 19, struct termios) /* get termios struct */
                    104: #define        TIOCSETA        _IOW('t', 20, struct termios) /* set termios struct */
                    105: #define        TIOCSETAW       _IOW('t', 21, struct termios) /* drain output, set */
                    106: #define        TIOCSETAF       _IOW('t', 22, struct termios) /* drn out, fls in, set */
                    107: #define        TIOCGETD        _IOR('t', 26, int)      /* get line discipline */
                    108: #define        TIOCSETD        _IOW('t', 27, int)      /* set line discipline */
                    109:                                                /* 127-124 compat */
                    110: #define        TIOCSBRK         _IO('t', 123)          /* set break bit */
                    111: #define        TIOCCBRK         _IO('t', 122)          /* clear break bit */
                    112: #define        TIOCSDTR         _IO('t', 121)          /* set data terminal ready */
                    113: #define        TIOCCDTR         _IO('t', 120)          /* clear data terminal ready */
                    114: #define        TIOCGPGRP       _IOR('t', 119, int)     /* get pgrp of tty */
                    115: #define        TIOCSPGRP       _IOW('t', 118, int)     /* set pgrp of tty */
                    116:                                                /* 117-116 compat */
                    117: #define        TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */
                    118: #define        TIOCSTI         _IOW('t', 114, char)    /* simulate terminal input */
                    119: #define        TIOCNOTTY        _IO('t', 113)          /* void tty association */
                    120: #define        TIOCPKT         _IOW('t', 112, int)     /* pty: set/clear packet mode */
                    121: #define                TIOCPKT_DATA            0x00    /* data packet */
                    122: #define                TIOCPKT_FLUSHREAD       0x01    /* flush packet */
                    123: #define                TIOCPKT_FLUSHWRITE      0x02    /* flush packet */
                    124: #define                TIOCPKT_STOP            0x04    /* stop output */
                    125: #define                TIOCPKT_START           0x08    /* start output */
                    126: #define                TIOCPKT_NOSTOP          0x10    /* no more ^S, ^Q */
                    127: #define                TIOCPKT_DOSTOP          0x20    /* now do ^S ^Q */
                    128: #define                TIOCPKT_IOCTL           0x40    /* state change of pty driver */
                    129: #define        TIOCSTOP         _IO('t', 111)          /* stop output, like ^S */
                    130: #define        TIOCSTART        _IO('t', 110)          /* start output, like ^Q */
                    131: #define        TIOCMSET        _IOW('t', 109, int)     /* set all modem bits */
                    132: #define        TIOCMBIS        _IOW('t', 108, int)     /* bis modem bits */
                    133: #define        TIOCMBIC        _IOW('t', 107, int)     /* bic modem bits */
                    134: #define        TIOCMGET        _IOR('t', 106, int)     /* get all modem bits */
                    135: #define        TIOCREMOTE      _IOW('t', 105, int)     /* remote input editing */
                    136: #define        TIOCGWINSZ      _IOR('t', 104, struct winsize)  /* get window size */
                    137: #define        TIOCSWINSZ      _IOW('t', 103, struct winsize)  /* set window size */
                    138: #define        TIOCUCNTL       _IOW('t', 102, int)     /* pty: set/clr usr cntl mode */
                    139: #define        TIOCSTAT         _IO('t', 101)          /* simulate ^T status message */
                    140: #define                UIOCCMD(n)      _IO('u', n)     /* usr cntl op "n" */
                    141: #define        TIOCSCONS       _IO('t', 99)            /* 4.2 compatibility */
                    142: #define        TIOCCONS        _IOW('t', 98, int)      /* become virtual console */
                    143: #define        TIOCSCTTY        _IO('t', 97)           /* become controlling tty */
                    144: #define        TIOCEXT         _IOW('t', 96, int)      /* pty: external processing */
                    145: #define        TIOCSIG          _IO('t', 95)           /* pty: generate signal */
                    146: #define        TIOCDRAIN        _IO('t', 94)           /* wait till output drained */
                    147: #define        TIOCMSDTRWAIT   _IOW('t', 91, int)      /* modem: set wait on close */
                    148: #define        TIOCMGDTRWAIT   _IOR('t', 90, int)      /* modem: get wait on close */
                    149: #define        TIOCTIMESTAMP   _IOR('t', 89, struct timeval)   /* enable/get timestamp
                    150:                                                 * of last input event */
                    151: #define        TIOCDCDTIMESTAMP _IOR('t', 88, struct timeval)  /* enable/get timestamp
                    152:                                                 * of last DCd rise */
                    153: #define        TIOCSDRAINWAIT  _IOW('t', 87, int)      /* set ttywait timeout */
                    154: #define        TIOCGDRAINWAIT  _IOR('t', 86, int)      /* get ttywait timeout */
                    155: #define        TIOCDSIMICROCODE _IO('t', 85)           /* download microcode to
                    156:                                                 * DSI Softmodem */
                    157: 
                    158: #define        TTYDISC         0               /* termios tty line discipline */
                    159: #define        TABLDISC        3               /* tablet discipline */
                    160: #define        SLIPDISC        4               /* serial IP discipline */
                    161: #define        PPPDISC         5               /* PPP discipline */
                    162: 
                    163: #endif /* !_SYS_TTYCOM_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.