1139825Simp/*- 21541Srgrimes * Copyright (c) 1990, 1993 31541Srgrimes * The Regents of the University of California. All rights reserved. 41541Srgrimes * (c) UNIX System Laboratories, Inc. 51541Srgrimes * All or some portions of this file are derived from material licensed 61541Srgrimes * to the University of California by American Telephone and Telegraph 71541Srgrimes * Co. or Unix System Laboratories, Inc. and are reproduced herein with 81541Srgrimes * the permission of UNIX System Laboratories, Inc. 91541Srgrimes * 101541Srgrimes * Redistribution and use in source and binary forms, with or without 111541Srgrimes * modification, are permitted provided that the following conditions 121541Srgrimes * are met: 131541Srgrimes * 1. Redistributions of source code must retain the above copyright 141541Srgrimes * notice, this list of conditions and the following disclaimer. 151541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 161541Srgrimes * notice, this list of conditions and the following disclaimer in the 171541Srgrimes * documentation and/or other materials provided with the distribution. 181541Srgrimes * 4. Neither the name of the University nor the names of its contributors 191541Srgrimes * may be used to endorse or promote products derived from this software 201541Srgrimes * without specific prior written permission. 211541Srgrimes * 221541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 231541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 241541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 251541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 261541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 271541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 281541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 291541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 301541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 311541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 321541Srgrimes * SUCH DAMAGE. 331541Srgrimes * 341541Srgrimes * @(#)ioctl_compat.h 8.4 (Berkeley) 1/21/94 3550477Speter * $FreeBSD$ 361541Srgrimes */ 371541Srgrimes 381541Srgrimes#ifndef _SYS_IOCTL_COMPAT_H_ 391541Srgrimes#define _SYS_IOCTL_COMPAT_H_ 401541Srgrimes 41191919Sed#ifndef COMPAT_43TTY 42191919Sed#error "Definitions not available without TTY ioctl compat." 43191919Sed#endif 44191919Sed 451541Srgrimesstruct tchars { 461541Srgrimes char t_intrc; /* interrupt */ 471541Srgrimes char t_quitc; /* quit */ 481541Srgrimes char t_startc; /* start output */ 491541Srgrimes char t_stopc; /* stop output */ 501541Srgrimes char t_eofc; /* end-of-file */ 511541Srgrimes char t_brkc; /* input delimiter (like nl) */ 521541Srgrimes}; 531541Srgrimes 541541Srgrimesstruct ltchars { 551541Srgrimes char t_suspc; /* stop process signal */ 561541Srgrimes char t_dsuspc; /* delayed stop process signal */ 571541Srgrimes char t_rprntc; /* reprint line */ 581541Srgrimes char t_flushc; /* flush output (toggles) */ 591541Srgrimes char t_werasc; /* word erase */ 601541Srgrimes char t_lnextc; /* literal next character */ 611541Srgrimes}; 621541Srgrimes 631541Srgrimes/* 641541Srgrimes * Structure for TIOCGETP and TIOCSETP ioctls. 651541Srgrimes */ 661541Srgrimesstruct sgttyb { 671541Srgrimes char sg_ispeed; /* input speed */ 681541Srgrimes char sg_ospeed; /* output speed */ 691541Srgrimes char sg_erase; /* erase character */ 701541Srgrimes char sg_kill; /* kill character */ 711541Srgrimes short sg_flags; /* mode flags */ 721541Srgrimes}; 731541Srgrimes 74179784Sed#define OTIOCGETD _IOR('t', 0, int) /* get line discipline */ 75179784Sed#define OTIOCSETD _IOW('t', 1, int) /* set line discipline */ 76196884Sed#define TIOCHPCL _IO('t', 2) /* hang up on last close */ 77196884Sed#define TIOCGETP _IOR('t', 8, struct sgttyb) /* get parameters */ 78196884Sed#define TIOCSETP _IOW('t', 9, struct sgttyb) /* set parameters */ 79196884Sed#define TIOCSETN _IOW('t',10, struct sgttyb) /* as above, but no flush */ 80196884Sed#define TIOCSETC _IOW('t',17, struct tchars) /* set special characters */ 81196884Sed#define TIOCGETC _IOR('t',18, struct tchars) /* get special characters */ 821541Srgrimes#define TANDEM 0x00000001 /* send stopc on out q full */ 831541Srgrimes#define CBREAK 0x00000002 /* half-cooked mode */ 841541Srgrimes#define LCASE 0x00000004 /* simulate lower case */ 851541Srgrimes#define ECHO 0x00000008 /* echo input */ 861541Srgrimes#define CRMOD 0x00000010 /* map \r to \r\n on output */ 871541Srgrimes#define RAW 0x00000020 /* no i/o processing */ 881541Srgrimes#define ODDP 0x00000040 /* get/send odd parity */ 891541Srgrimes#define EVENP 0x00000080 /* get/send even parity */ 901541Srgrimes#define ANYP 0x000000c0 /* get any parity/send none */ 911541Srgrimes#define NLDELAY 0x00000300 /* \n delay */ 921541Srgrimes#define NL0 0x00000000 931541Srgrimes#define NL1 0x00000100 /* tty 37 */ 941541Srgrimes#define NL2 0x00000200 /* vt05 */ 951541Srgrimes#define NL3 0x00000300 961541Srgrimes#define TBDELAY 0x00000c00 /* horizontal tab delay */ 971541Srgrimes#define TAB0 0x00000000 981541Srgrimes#define TAB1 0x00000400 /* tty 37 */ 991541Srgrimes#define TAB2 0x00000800 1001541Srgrimes#define XTABS 0x00000c00 /* expand tabs on output */ 1011541Srgrimes#define CRDELAY 0x00003000 /* \r delay */ 1021541Srgrimes#define CR0 0x00000000 1031541Srgrimes#define CR1 0x00001000 /* tn 300 */ 1041541Srgrimes#define CR2 0x00002000 /* tty 37 */ 1051541Srgrimes#define CR3 0x00003000 /* concept 100 */ 1061541Srgrimes#define VTDELAY 0x00004000 /* vertical tab delay */ 1071541Srgrimes#define FF0 0x00000000 1081541Srgrimes#define FF1 0x00004000 /* tty 37 */ 1091541Srgrimes#define BSDELAY 0x00008000 /* \b delay */ 1101541Srgrimes#define BS0 0x00000000 1111541Srgrimes#define BS1 0x00008000 1121541Srgrimes#define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY) 1131541Srgrimes#define CRTBS 0x00010000 /* do backspacing for crt */ 1141541Srgrimes#define PRTERA 0x00020000 /* \ ... / erase */ 1151541Srgrimes#define CRTERA 0x00040000 /* " \b " to wipe out char */ 1161541Srgrimes#define TILDE 0x00080000 /* hazeltine tilde kludge */ 1171541Srgrimes#define MDMBUF 0x00100000 /*start/stop output on carrier*/ 1181541Srgrimes#define LITOUT 0x00200000 /* literal output */ 1191541Srgrimes#define TOSTOP 0x00400000 /*SIGSTOP on background output*/ 1201541Srgrimes#define FLUSHO 0x00800000 /* flush output to terminal */ 1211541Srgrimes#define NOHANG 0x01000000 /* (no-op) was no SIGHUP on carrier drop */ 1221541Srgrimes#define L001000 0x02000000 1231541Srgrimes#define CRTKIL 0x04000000 /* kill line with " \b " */ 1241541Srgrimes#define PASS8 0x08000000 1251541Srgrimes#define CTLECH 0x10000000 /* echo control chars as ^X */ 1261541Srgrimes#define PENDIN 0x20000000 /* tp->t_rawq needs reread */ 1271541Srgrimes#define DECCTQ 0x40000000 /* only ^Q starts after ^S */ 1281541Srgrimes#define NOFLSH 0x80000000 /* no output flush on signal */ 129196884Sed#define OTIOCCONS _IO('t', 98) /* for hp300 -- sans int arg */ 130196884Sed#define TIOCGLTC _IOR('t', 116,struct ltchars) /* get special chars */ 131196884Sed#define TIOCSLTC _IOW('t', 117,struct ltchars) /* set special chars */ 1321541Srgrimes#define TIOCLGET _IOR('t', 124, int) /* get local modes */ 1331541Srgrimes#define LCRTBS (CRTBS>>16) 1341541Srgrimes#define LPRTERA (PRTERA>>16) 1351541Srgrimes#define LCRTERA (CRTERA>>16) 1361541Srgrimes#define LTILDE (TILDE>>16) 1371541Srgrimes#define LMDMBUF (MDMBUF>>16) 1381541Srgrimes#define LLITOUT (LITOUT>>16) 1391541Srgrimes#define LTOSTOP (TOSTOP>>16) 1401541Srgrimes#define LFLUSHO (FLUSHO>>16) 1411541Srgrimes#define LNOHANG (NOHANG>>16) 1421541Srgrimes#define LCRTKIL (CRTKIL>>16) 1431541Srgrimes#define LPASS8 (PASS8>>16) 1441541Srgrimes#define LCTLECH (CTLECH>>16) 1451541Srgrimes#define LPENDIN (PENDIN>>16) 1461541Srgrimes#define LDECCTQ (DECCTQ>>16) 1471541Srgrimes#define LNOFLSH (NOFLSH>>16) 148196884Sed#define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */ 149196884Sed#define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */ 150196884Sed#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ 151179784Sed 1521541Srgrimes#endif /* !_SYS_IOCTL_COMPAT_H_ */ 153