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