1 /**********************************************************************
3 * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful but, except
10 * as otherwise stated in writing, without any warranty; without even the
11 * implied warranty of merchantability or fitness for a particular purpose.
12 * See the GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18 * The full GNU General Public License is included in this distribution in
19 * the file called "COPYING".
21 * Contact Information:
22 * Imagination Technologies Ltd. <gpl-support@imgtec.com>
23 * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
25 ******************************************************************************/
27 #ifndef __IOCTLDEF_H__
28 #define __IOCTLDEF_H__
30 #define MAKEIOCTLINDEX(i) (((i) >> 2) & 0xFFF)
32 #define DEVICE_TYPE ULONG
34 #define FILE_DEVICE_BEEP 0x00000001
35 #define FILE_DEVICE_CD_ROM 0x00000002
36 #define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
37 #define FILE_DEVICE_CONTROLLER 0x00000004
38 #define FILE_DEVICE_DATALINK 0x00000005
39 #define FILE_DEVICE_DFS 0x00000006
40 #define FILE_DEVICE_DISK 0x00000007
41 #define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008
42 #define FILE_DEVICE_FILE_SYSTEM 0x00000009
43 #define FILE_DEVICE_INPORT_PORT 0x0000000a
44 #define FILE_DEVICE_KEYBOARD 0x0000000b
45 #define FILE_DEVICE_MAILSLOT 0x0000000c
46 #define FILE_DEVICE_MIDI_IN 0x0000000d
47 #define FILE_DEVICE_MIDI_OUT 0x0000000e
48 #define FILE_DEVICE_MOUSE 0x0000000f
49 #define FILE_DEVICE_MULTI_UNC_PROVIDER 0x00000010
50 #define FILE_DEVICE_NAMED_PIPE 0x00000011
51 #define FILE_DEVICE_NETWORK 0x00000012
52 #define FILE_DEVICE_NETWORK_BROWSER 0x00000013
53 #define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
54 #define FILE_DEVICE_NULL 0x00000015
55 #define FILE_DEVICE_PARALLEL_PORT 0x00000016
56 #define FILE_DEVICE_PHYSICAL_NETCARD 0x00000017
57 #define FILE_DEVICE_PRINTER 0x00000018
58 #define FILE_DEVICE_SCANNER 0x00000019
59 #define FILE_DEVICE_SERIAL_MOUSE_PORT 0x0000001a
60 #define FILE_DEVICE_SERIAL_PORT 0x0000001b
61 #define FILE_DEVICE_SCREEN 0x0000001c
62 #define FILE_DEVICE_SOUND 0x0000001d
63 #define FILE_DEVICE_STREAMS 0x0000001e
64 #define FILE_DEVICE_TAPE 0x0000001f
65 #define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020
66 #define FILE_DEVICE_TRANSPORT 0x00000021
67 #define FILE_DEVICE_UNKNOWN 0x00000022
68 #define FILE_DEVICE_VIDEO 0x00000023
69 #define FILE_DEVICE_VIRTUAL_DISK 0x00000024
70 #define FILE_DEVICE_WAVE_IN 0x00000025
71 #define FILE_DEVICE_WAVE_OUT 0x00000026
72 #define FILE_DEVICE_8042_PORT 0x00000027
73 #define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
74 #define FILE_DEVICE_BATTERY 0x00000029
75 #define FILE_DEVICE_BUS_EXTENDER 0x0000002a
76 #define FILE_DEVICE_MODEM 0x0000002b
77 #define FILE_DEVICE_VDM 0x0000002c
78 #define FILE_DEVICE_MASS_STORAGE 0x0000002d
80 #define CTL_CODE( DeviceType, Function, Method, Access) ( \
81 ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
84 #define METHOD_BUFFERED 0
85 #define METHOD_IN_DIRECT 1
86 #define METHOD_OUT_DIRECT 2
87 #define METHOD_NEITHER 3
89 #define FILE_ANY_ACCESS 0
90 #define FILE_READ_ACCESS 0x0001
91 #define FILE_WRITE_ACCESS 0x0002