sl@0: /*- sl@0: * Copyright (c) 1982, 1986, 1990, 1993, 1994 sl@0: * The Regents of the University of California. All rights reserved. sl@0: * (c) UNIX System Laboratories, Inc. sl@0: * All or some portions of this file are derived from material licensed sl@0: * to the University of California by American Telephone and Telegraph sl@0: * Co. or Unix System Laboratories, Inc. and are reproduced herein with sl@0: * the permission of UNIX System Laboratories, Inc. sl@0: * sl@0: * Redistribution and use in source and binary forms, with or without sl@0: * modification, are permitted provided that the following conditions sl@0: * are met: sl@0: * 1. Redistributions of source code must retain the above copyright sl@0: * notice, this list of conditions and the following disclaimer. sl@0: * 2. Redistributions in binary form must reproduce the above copyright sl@0: * notice, this list of conditions and the following disclaimer in the sl@0: * documentation and/or other materials provided with the distribution. sl@0: * 4. Neither the name of the University nor the names of its contributors sl@0: * may be used to endorse or promote products derived from this software sl@0: * without specific prior written permission. sl@0: * sl@0: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND sl@0: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE sl@0: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE sl@0: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE sl@0: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL sl@0: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS sl@0: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) sl@0: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT sl@0: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY sl@0: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF sl@0: * SUCH DAMAGE. sl@0: * sl@0: * @(#)ttycom.h 8.1 (Berkeley) 3/28/94 sl@0: * $FreeBSD: src/sys/sys/ttycom.h,v 1.23 2004/06/25 21:54:49 phk Exp $ sl@0: */ sl@0: sl@0: #ifndef _SYS_TTYCOM_H_ sl@0: #define _SYS_TTYCOM_H_ sl@0: sl@0: #include sl@0: sl@0: /* sl@0: * Tty ioctl's except for those supported only for backwards compatibility sl@0: * with the old tty driver. sl@0: */ sl@0: sl@0: /* sl@0: * Window/terminal size structure. This information is stored by the kernel sl@0: * in order to provide a consistent interface, but is not used by the kernel. sl@0: */ sl@0: struct winsize { sl@0: unsigned short ws_row; /* rows, in characters */ sl@0: unsigned short ws_col; /* columns, in characters */ sl@0: unsigned short ws_xpixel; /* horizontal size, pixels */ sl@0: unsigned short ws_ypixel; /* vertical size, pixels */ sl@0: }; sl@0: sl@0: /* 0-2 compat */ sl@0: /* 3-4 obsolete */ sl@0: /* 5-7 obsolete or unused */ sl@0: /* 8-10 compat */ sl@0: /* 11-12 obsolete or unused */ sl@0: #define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */ sl@0: #define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */ sl@0: /* 15 unused */ sl@0: #define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */ sl@0: /* 17-18 compat */ sl@0: #define TIOCGETA _IOR('t', 19, struct termios) /* get termios struct */ sl@0: #define TIOCSETA _IOW('t', 20, struct termios) /* set termios struct */ sl@0: #define TIOCSETAW _IOW('t', 21, struct termios) /* drain output, set */ sl@0: #define TIOCSETAF _IOW('t', 22, struct termios) /* drn out, fls in, set */ sl@0: /* 23-25 obsolete or unused */ sl@0: #define TIOCGETD _IOR('t', 26, int) /* get line discipline */ sl@0: #define TIOCSETD _IOW('t', 27, int) /* set line discipline */ sl@0: /* 28-69 free */ sl@0: /* 127-124 compat */ sl@0: #define TIOCSBRK _IO('t', 123) /* set break bit */ sl@0: #define TIOCCBRK _IO('t', 122) /* clear break bit */ sl@0: #define TIOCSDTR _IO('t', 121) /* set data terminal ready */ sl@0: #define TIOCCDTR _IO('t', 120) /* clear data terminal ready */ sl@0: #define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */ sl@0: #define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */ sl@0: /* 117-116 compat */ sl@0: #define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ sl@0: #define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */ sl@0: #define TIOCNOTTY _IO('t', 113) /* void tty association */ sl@0: #define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */ sl@0: #define TIOCPKT_DATA 0x00 /* data packet */ sl@0: #define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ sl@0: #define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ sl@0: #define TIOCPKT_STOP 0x04 /* stop output */ sl@0: #define TIOCPKT_START 0x08 /* start output */ sl@0: #define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ sl@0: #define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ sl@0: #define TIOCPKT_IOCTL 0x40 /* state change of pty driver */ sl@0: #define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ sl@0: #define TIOCSTART _IO('t', 110) /* start output, like ^Q */ sl@0: #define TIOCMSET _IOW('t', 109, int) /* set all modem bits */ sl@0: #define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ sl@0: #define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ sl@0: #define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ sl@0: #define TIOCM_LE 0001 /* line enable */ sl@0: #define TIOCM_DTR 0002 /* data terminal ready */ sl@0: #define TIOCM_RTS 0004 /* request to send */ sl@0: #define TIOCM_ST 0010 /* secondary transmit */ sl@0: #define TIOCM_SR 0020 /* secondary receive */ sl@0: #define TIOCM_CTS 0040 /* clear to send */ sl@0: #define TIOCM_DCD 0100 /* data carrier detect */ sl@0: #define TIOCM_RI 0200 /* ring indicate */ sl@0: #define TIOCM_DSR 0400 /* data set ready */ sl@0: #define TIOCM_CD TIOCM_DCD sl@0: #define TIOCM_CAR TIOCM_DCD sl@0: #define TIOCM_RNG TIOCM_RI sl@0: #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ sl@0: #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ sl@0: #define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ sl@0: #define TIOCSTAT _IO('t', 101) /* simulate ^T status message */ sl@0: #define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */ sl@0: /* 100 see consio.h */ sl@0: /* 99 obsolete or unused */ sl@0: #define TIOCCONS _IOW('t', 98, int) /* become virtual console */ sl@0: #define TIOCSCTTY _IO('t', 97) /* become controlling tty */ sl@0: /* 97-90 tun; some conflicts */ sl@0: #define TIOCEXT _IOW('t', 96, int) /* pty: external processing */ sl@0: #define TIOCSIG _IO('t', 95) /* pty: generate signal */ sl@0: #define TIOCDRAIN _IO('t', 94) /* wait till output drained */ sl@0: /* 92-90 tap; some conflicts */ sl@0: #define TIOCMSDTRWAIT _IOW('t', 91, int) /* modem: set wait on close */ sl@0: #define TIOCMGDTRWAIT _IOR('t', 90, int) /* modem: get wait on close */ sl@0: /* 90-70 ppp; many conflicts */ sl@0: #define TIOCTIMESTAMP _IOR('t', 89, struct timeval) /* enable/get timestamp sl@0: * of last input event */ sl@0: /* 88 slip, ppp; conflicts */ sl@0: #define TIOCSDRAINWAIT _IOW('t', 87, int) /* set ttywait timeout */ sl@0: #define TIOCGDRAINWAIT _IOR('t', 86, int) /* get ttywait timeout */ sl@0: /* 84-80 slip */ sl@0: sl@0: #define TTYDISC 0 /* termios tty line discipline */ sl@0: #define SLIPDISC 4 /* serial IP discipline */ sl@0: #define PPPDISC 5 /* PPP discipline */ sl@0: #define NETGRAPHDISC 6 /* Netgraph tty node discipline */ sl@0: #define H4DISC 7 /* Netgraph Bluetooth H4 discipline */ sl@0: sl@0: #endif /* !_SYS_TTYCOM_H_ */