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)
34 #define DEVICE_TYPE ULONG
36 #define FILE_DEVICE_BEEP 0x00000001
37 #define FILE_DEVICE_CD_ROM 0x00000002
38 #define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
39 #define FILE_DEVICE_CONTROLLER 0x00000004
40 #define FILE_DEVICE_DATALINK 0x00000005
41 #define FILE_DEVICE_DFS 0x00000006
42 #define FILE_DEVICE_DISK 0x00000007
43 #define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008
44 #define FILE_DEVICE_FILE_SYSTEM 0x00000009
45 #define FILE_DEVICE_INPORT_PORT 0x0000000a
46 #define FILE_DEVICE_KEYBOARD 0x0000000b
47 #define FILE_DEVICE_MAILSLOT 0x0000000c
48 #define FILE_DEVICE_MIDI_IN 0x0000000d
49 #define FILE_DEVICE_MIDI_OUT 0x0000000e
50 #define FILE_DEVICE_MOUSE 0x0000000f
51 #define FILE_DEVICE_MULTI_UNC_PROVIDER 0x00000010
52 #define FILE_DEVICE_NAMED_PIPE 0x00000011
53 #define FILE_DEVICE_NETWORK 0x00000012
54 #define FILE_DEVICE_NETWORK_BROWSER 0x00000013
55 #define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
56 #define FILE_DEVICE_NULL 0x00000015
57 #define FILE_DEVICE_PARALLEL_PORT 0x00000016
58 #define FILE_DEVICE_PHYSICAL_NETCARD 0x00000017
59 #define FILE_DEVICE_PRINTER 0x00000018
60 #define FILE_DEVICE_SCANNER 0x00000019
61 #define FILE_DEVICE_SERIAL_MOUSE_PORT 0x0000001a
62 #define FILE_DEVICE_SERIAL_PORT 0x0000001b
63 #define FILE_DEVICE_SCREEN 0x0000001c
64 #define FILE_DEVICE_SOUND 0x0000001d
65 #define FILE_DEVICE_STREAMS 0x0000001e
66 #define FILE_DEVICE_TAPE 0x0000001f
67 #define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020
68 #define FILE_DEVICE_TRANSPORT 0x00000021
69 #define FILE_DEVICE_UNKNOWN 0x00000022
70 #define FILE_DEVICE_VIDEO 0x00000023
71 #define FILE_DEVICE_VIRTUAL_DISK 0x00000024
72 #define FILE_DEVICE_WAVE_IN 0x00000025
73 #define FILE_DEVICE_WAVE_OUT 0x00000026
74 #define FILE_DEVICE_8042_PORT 0x00000027
75 #define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
76 #define FILE_DEVICE_BATTERY 0x00000029
77 #define FILE_DEVICE_BUS_EXTENDER 0x0000002a
78 #define FILE_DEVICE_MODEM 0x0000002b
79 #define FILE_DEVICE_VDM 0x0000002c
80 #define FILE_DEVICE_MASS_STORAGE 0x0000002d
82 #define CTL_CODE( DeviceType, Function, Method, Access ) ( \
83 ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
86 #define METHOD_BUFFERED 0
87 #define METHOD_IN_DIRECT 1
88 #define METHOD_OUT_DIRECT 2
89 #define METHOD_NEITHER 3
91 #define FILE_ANY_ACCESS 0
92 #define FILE_READ_ACCESS ( 0x0001 )
93 #define FILE_WRITE_ACCESS ( 0x0002 )