1 |
27 |
unneback |
//==========================================================================
|
2 |
|
|
//
|
3 |
|
|
// include/sys/ioctl.h
|
4 |
|
|
//
|
5 |
|
|
//
|
6 |
|
|
//
|
7 |
|
|
//==========================================================================
|
8 |
|
|
//####BSDCOPYRIGHTBEGIN####
|
9 |
|
|
//
|
10 |
|
|
// -------------------------------------------
|
11 |
|
|
//
|
12 |
|
|
// Portions of this software may have been derived from OpenBSD or other sources,
|
13 |
|
|
// and are covered by the appropriate copyright disclaimers included herein.
|
14 |
|
|
//
|
15 |
|
|
// -------------------------------------------
|
16 |
|
|
//
|
17 |
|
|
//####BSDCOPYRIGHTEND####
|
18 |
|
|
//==========================================================================
|
19 |
|
|
//#####DESCRIPTIONBEGIN####
|
20 |
|
|
//
|
21 |
|
|
// Author(s): gthomas
|
22 |
|
|
// Contributors: gthomas
|
23 |
|
|
// Date: 2000-01-10
|
24 |
|
|
// Purpose:
|
25 |
|
|
// Description:
|
26 |
|
|
//
|
27 |
|
|
//
|
28 |
|
|
//####DESCRIPTIONEND####
|
29 |
|
|
//
|
30 |
|
|
//==========================================================================
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
/* $OpenBSD: ioctl.h,v 1.3 1996/03/03 12:11:50 niklas Exp $ */
|
34 |
|
|
/* $NetBSD: ioctl.h,v 1.20 1996/01/30 18:21:47 thorpej Exp $ */
|
35 |
|
|
|
36 |
|
|
/*-
|
37 |
|
|
* Copyright (c) 1982, 1986, 1990, 1993, 1994
|
38 |
|
|
* The Regents of the University of California. All rights reserved.
|
39 |
|
|
* (c) UNIX System Laboratories, Inc.
|
40 |
|
|
* All or some portions of this file are derived from material licensed
|
41 |
|
|
* to the University of California by American Telephone and Telegraph
|
42 |
|
|
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
43 |
|
|
* the permission of UNIX System Laboratories, Inc.
|
44 |
|
|
*
|
45 |
|
|
* Redistribution and use in source and binary forms, with or without
|
46 |
|
|
* modification, are permitted provided that the following conditions
|
47 |
|
|
* are met:
|
48 |
|
|
* 1. Redistributions of source code must retain the above copyright
|
49 |
|
|
* notice, this list of conditions and the following disclaimer.
|
50 |
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
51 |
|
|
* notice, this list of conditions and the following disclaimer in the
|
52 |
|
|
* documentation and/or other materials provided with the distribution.
|
53 |
|
|
* 3. All advertising materials mentioning features or use of this software
|
54 |
|
|
* must display the following acknowledgement:
|
55 |
|
|
* This product includes software developed by the University of
|
56 |
|
|
* California, Berkeley and its contributors.
|
57 |
|
|
* 4. Neither the name of the University nor the names of its contributors
|
58 |
|
|
* may be used to endorse or promote products derived from this software
|
59 |
|
|
* without specific prior written permission.
|
60 |
|
|
*
|
61 |
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
62 |
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
63 |
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
64 |
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
65 |
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
66 |
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
67 |
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
68 |
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
69 |
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
70 |
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
71 |
|
|
* SUCH DAMAGE.
|
72 |
|
|
*
|
73 |
|
|
* @(#)ioctl.h 8.6 (Berkeley) 3/28/94
|
74 |
|
|
*/
|
75 |
|
|
|
76 |
|
|
#ifndef _SYS_IOCTL_H_
|
77 |
|
|
#define _SYS_IOCTL_H_
|
78 |
|
|
|
79 |
|
|
#ifndef __ECOS
|
80 |
|
|
#include <sys/ttycom.h>
|
81 |
|
|
|
82 |
|
|
/*
|
83 |
|
|
* Pun for SunOS prior to 3.2. SunOS 3.2 and later support TIOCGWINSZ
|
84 |
|
|
* and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented
|
85 |
|
|
* nonwithstanding).
|
86 |
|
|
*/
|
87 |
|
|
struct ttysize {
|
88 |
|
|
unsigned short ts_lines;
|
89 |
|
|
unsigned short ts_cols;
|
90 |
|
|
unsigned short ts_xxx;
|
91 |
|
|
unsigned short ts_yyy;
|
92 |
|
|
};
|
93 |
|
|
#define TIOCGSIZE TIOCGWINSZ
|
94 |
|
|
#define TIOCSSIZE TIOCSWINSZ
|
95 |
|
|
#endif
|
96 |
|
|
|
97 |
|
|
#include <sys/ioccom.h>
|
98 |
|
|
|
99 |
|
|
#ifndef __ECOS
|
100 |
|
|
#include <sys/dkio.h>
|
101 |
|
|
#include <sys/filio.h>
|
102 |
|
|
#endif
|
103 |
|
|
#include <sys/sockio.h>
|
104 |
|
|
|
105 |
|
|
#ifndef _KERNEL
|
106 |
|
|
|
107 |
|
|
#include <sys/cdefs.h>
|
108 |
|
|
|
109 |
|
|
__BEGIN_DECLS
|
110 |
|
|
int ioctl __P((int, unsigned long, ...));
|
111 |
|
|
__END_DECLS
|
112 |
|
|
#endif /* !_KERNEL */
|
113 |
|
|
#endif /* !_SYS_IOCTL_H_ */
|
114 |
|
|
|
115 |
|
|
/*
|
116 |
|
|
* Keep outside _SYS_IOCTL_H_
|
117 |
|
|
* Compatability with old terminal driver
|
118 |
|
|
*
|
119 |
|
|
* Source level -> #define USE_OLD_TTY
|
120 |
|
|
* Kernel level -> options COMPAT_43 or COMPAT_SUNOS or ...
|
121 |
|
|
*/
|
122 |
|
|
#if defined(USE_OLD_TTY) || defined(COMPAT_43) || defined(COMPAT_SUNOS) || \
|
123 |
|
|
defined(COMPAT_SVR4) || defined(COMPAT_FREEBSD)
|
124 |
|
|
#include <sys/ioctl_compat.h>
|
125 |
|
|
#endif
|