Home | History | Annotate | Line # | Download | only in sys
ioctl_compat.h revision 1.9
      1  1.9  cgd /*	$NetBSD: ioctl_compat.h,v 1.9 1994/06/29 06:44:26 cgd Exp $	*/
      2  1.9  cgd 
      3  1.6  cgd /*
      4  1.7  cgd  * Copyright (c) 1990, 1993
      5  1.7  cgd  *	The Regents of the University of California.  All rights reserved.
      6  1.6  cgd  * (c) UNIX System Laboratories, Inc.
      7  1.6  cgd  * All or some portions of this file are derived from material licensed
      8  1.6  cgd  * to the University of California by American Telephone and Telegraph
      9  1.6  cgd  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
     10  1.6  cgd  * the permission of UNIX System Laboratories, Inc.
     11  1.6  cgd  *
     12  1.6  cgd  * Redistribution and use in source and binary forms, with or without
     13  1.6  cgd  * modification, are permitted provided that the following conditions
     14  1.6  cgd  * are met:
     15  1.6  cgd  * 1. Redistributions of source code must retain the above copyright
     16  1.6  cgd  *    notice, this list of conditions and the following disclaimer.
     17  1.6  cgd  * 2. Redistributions in binary form must reproduce the above copyright
     18  1.6  cgd  *    notice, this list of conditions and the following disclaimer in the
     19  1.6  cgd  *    documentation and/or other materials provided with the distribution.
     20  1.6  cgd  * 3. All advertising materials mentioning features or use of this software
     21  1.6  cgd  *    must display the following acknowledgement:
     22  1.6  cgd  *	This product includes software developed by the University of
     23  1.6  cgd  *	California, Berkeley and its contributors.
     24  1.6  cgd  * 4. Neither the name of the University nor the names of its contributors
     25  1.6  cgd  *    may be used to endorse or promote products derived from this software
     26  1.6  cgd  *    without specific prior written permission.
     27  1.6  cgd  *
     28  1.6  cgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     29  1.6  cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     30  1.6  cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     31  1.6  cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     32  1.6  cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     33  1.6  cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     34  1.6  cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     35  1.6  cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     36  1.6  cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     37  1.6  cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     38  1.6  cgd  * SUCH DAMAGE.
     39  1.6  cgd  *
     40  1.8  cgd  *	@(#)ioctl_compat.h	8.4 (Berkeley) 1/21/94
     41  1.6  cgd  */
     42  1.6  cgd 
     43  1.6  cgd #ifndef _SYS_IOCTL_COMPAT_H_
     44  1.6  cgd #define	_SYS_IOCTL_COMPAT_H_
     45  1.6  cgd 
     46  1.6  cgd #include <sys/ttychars.h>
     47  1.6  cgd #include <sys/ttydev.h>
     48  1.6  cgd 
     49  1.6  cgd struct tchars {
     50  1.6  cgd 	char	t_intrc;	/* interrupt */
     51  1.6  cgd 	char	t_quitc;	/* quit */
     52  1.6  cgd 	char	t_startc;	/* start output */
     53  1.6  cgd 	char	t_stopc;	/* stop output */
     54  1.6  cgd 	char	t_eofc;		/* end-of-file */
     55  1.6  cgd 	char	t_brkc;		/* input delimiter (like nl) */
     56  1.6  cgd };
     57  1.6  cgd 
     58  1.6  cgd struct ltchars {
     59  1.6  cgd 	char	t_suspc;	/* stop process signal */
     60  1.6  cgd 	char	t_dsuspc;	/* delayed stop process signal */
     61  1.6  cgd 	char	t_rprntc;	/* reprint line */
     62  1.6  cgd 	char	t_flushc;	/* flush output (toggles) */
     63  1.6  cgd 	char	t_werasc;	/* word erase */
     64  1.6  cgd 	char	t_lnextc;	/* literal next character */
     65  1.6  cgd };
     66  1.6  cgd 
     67  1.6  cgd /*
     68  1.6  cgd  * Structure for TIOCGETP and TIOCSETP ioctls.
     69  1.6  cgd  */
     70  1.6  cgd #ifndef _SGTTYB_
     71  1.6  cgd #define	_SGTTYB_
     72  1.6  cgd struct sgttyb {
     73  1.6  cgd 	char	sg_ispeed;		/* input speed */
     74  1.6  cgd 	char	sg_ospeed;		/* output speed */
     75  1.6  cgd 	char	sg_erase;		/* erase character */
     76  1.6  cgd 	char	sg_kill;		/* kill character */
     77  1.6  cgd 	short	sg_flags;		/* mode flags */
     78  1.6  cgd };
     79  1.6  cgd #endif
     80  1.6  cgd 
     81  1.6  cgd #ifdef USE_OLD_TTY
     82  1.6  cgd # undef  TIOCGETD
     83  1.6  cgd # define TIOCGETD	_IOR('t', 0, int)	/* get line discipline */
     84  1.6  cgd # undef  TIOCSETD
     85  1.6  cgd # define TIOCSETD	_IOW('t', 1, int)	/* set line discipline */
     86  1.6  cgd #else
     87  1.6  cgd # define OTIOCGETD	_IOR('t', 0, int)	/* get line discipline */
     88  1.6  cgd # define OTIOCSETD	_IOW('t', 1, int)	/* set line discipline */
     89  1.6  cgd #endif
     90  1.6  cgd #define	TIOCHPCL	_IO('t', 2)		/* hang up on last close */
     91  1.6  cgd #define	TIOCGETP	_IOR('t', 8,struct sgttyb)/* get parameters -- gtty */
     92  1.6  cgd #define	TIOCSETP	_IOW('t', 9,struct sgttyb)/* set parameters -- stty */
     93  1.6  cgd #define	TIOCSETN	_IOW('t',10,struct sgttyb)/* as above, but no flushtty*/
     94  1.6  cgd #define	TIOCSETC	_IOW('t',17,struct tchars)/* set special characters */
     95  1.6  cgd #define	TIOCGETC	_IOR('t',18,struct tchars)/* get special characters */
     96  1.6  cgd #define		TANDEM		0x00000001	/* send stopc on out q full */
     97  1.6  cgd #define		CBREAK		0x00000002	/* half-cooked mode */
     98  1.6  cgd #define		LCASE		0x00000004	/* simulate lower case */
     99  1.6  cgd #define		ECHO		0x00000008	/* echo input */
    100  1.6  cgd #define		CRMOD		0x00000010	/* map \r to \r\n on output */
    101  1.6  cgd #define		RAW		0x00000020	/* no i/o processing */
    102  1.6  cgd #define		ODDP		0x00000040	/* get/send odd parity */
    103  1.6  cgd #define		EVENP		0x00000080	/* get/send even parity */
    104  1.6  cgd #define		ANYP		0x000000c0	/* get any parity/send none */
    105  1.6  cgd #define		NLDELAY		0x00000300	/* \n delay */
    106  1.6  cgd #define			NL0	0x00000000
    107  1.6  cgd #define			NL1	0x00000100	/* tty 37 */
    108  1.6  cgd #define			NL2	0x00000200	/* vt05 */
    109  1.6  cgd #define			NL3	0x00000300
    110  1.6  cgd #define		TBDELAY		0x00000c00	/* horizontal tab delay */
    111  1.6  cgd #define			TAB0	0x00000000
    112  1.6  cgd #define			TAB1	0x00000400	/* tty 37 */
    113  1.6  cgd #define			TAB2	0x00000800
    114  1.6  cgd #define		XTABS		0x00000c00	/* expand tabs on output */
    115  1.6  cgd #define		CRDELAY		0x00003000	/* \r delay */
    116  1.6  cgd #define			CR0	0x00000000
    117  1.6  cgd #define			CR1	0x00001000	/* tn 300 */
    118  1.6  cgd #define			CR2	0x00002000	/* tty 37 */
    119  1.6  cgd #define			CR3	0x00003000	/* concept 100 */
    120  1.6  cgd #define		VTDELAY		0x00004000	/* vertical tab delay */
    121  1.6  cgd #define			FF0	0x00000000
    122  1.6  cgd #define			FF1	0x00004000	/* tty 37 */
    123  1.6  cgd #define		BSDELAY		0x00008000	/* \b delay */
    124  1.6  cgd #define			BS0	0x00000000
    125  1.6  cgd #define			BS1	0x00008000
    126  1.6  cgd #define		ALLDELAY	(NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY)
    127  1.6  cgd #define		CRTBS		0x00010000	/* do backspacing for crt */
    128  1.6  cgd #define		PRTERA		0x00020000	/* \ ... / erase */
    129  1.6  cgd #define		CRTERA		0x00040000	/* " \b " to wipe out char */
    130  1.6  cgd #define		TILDE		0x00080000	/* hazeltine tilde kludge */
    131  1.6  cgd #define		MDMBUF		0x00100000	/*start/stop output on carrier*/
    132  1.6  cgd #define		LITOUT		0x00200000	/* literal output */
    133  1.6  cgd #define		TOSTOP		0x00400000	/*SIGSTOP on background output*/
    134  1.6  cgd #define		FLUSHO		0x00800000	/* flush output to terminal */
    135  1.6  cgd #define		NOHANG		0x01000000	/* (no-op) was no SIGHUP on carrier drop */
    136  1.6  cgd #define		L001000		0x02000000
    137  1.6  cgd #define		CRTKIL		0x04000000	/* kill line with " \b " */
    138  1.6  cgd #define		PASS8		0x08000000
    139  1.6  cgd #define		CTLECH		0x10000000	/* echo control chars as ^X */
    140  1.6  cgd #define		PENDIN		0x20000000	/* tp->t_rawq needs reread */
    141  1.6  cgd #define		DECCTQ		0x40000000	/* only ^Q starts after ^S */
    142  1.6  cgd #define		NOFLSH		0x80000000	/* no output flush on signal */
    143  1.6  cgd #define	TIOCLBIS	_IOW('t', 127, int)	/* bis local mode bits */
    144  1.6  cgd #define	TIOCLBIC	_IOW('t', 126, int)	/* bic local mode bits */
    145  1.6  cgd #define	TIOCLSET	_IOW('t', 125, int)	/* set entire local mode word */
    146  1.6  cgd #define	TIOCLGET	_IOR('t', 124, int)	/* get local modes */
    147  1.6  cgd #define		LCRTBS		(CRTBS>>16)
    148  1.6  cgd #define		LPRTERA		(PRTERA>>16)
    149  1.6  cgd #define		LCRTERA		(CRTERA>>16)
    150  1.6  cgd #define		LTILDE		(TILDE>>16)
    151  1.6  cgd #define		LMDMBUF		(MDMBUF>>16)
    152  1.6  cgd #define		LLITOUT		(LITOUT>>16)
    153  1.6  cgd #define		LTOSTOP		(TOSTOP>>16)
    154  1.6  cgd #define		LFLUSHO		(FLUSHO>>16)
    155  1.6  cgd #define		LNOHANG		(NOHANG>>16)
    156  1.6  cgd #define		LCRTKIL		(CRTKIL>>16)
    157  1.6  cgd #define		LPASS8		(PASS8>>16)
    158  1.6  cgd #define		LCTLECH		(CTLECH>>16)
    159  1.6  cgd #define		LPENDIN		(PENDIN>>16)
    160  1.6  cgd #define		LDECCTQ		(DECCTQ>>16)
    161  1.6  cgd #define		LNOFLSH		(NOFLSH>>16)
    162  1.6  cgd #define	TIOCSLTC	_IOW('t',117,struct ltchars)/* set local special chars*/
    163  1.6  cgd #define	TIOCGLTC	_IOR('t',116,struct ltchars)/* get local special chars*/
    164  1.6  cgd #define OTIOCCONS	_IO('t', 98)	/* for hp300 -- sans int arg */
    165  1.6  cgd #define	OTTYDISC	0
    166  1.6  cgd #define	NETLDISC	1
    167  1.6  cgd #define	NTTYDISC	2
    168  1.6  cgd 
    169  1.6  cgd #endif /* !_SYS_IOCTL_COMPAT_H_ */
    170