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