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