Copy w32api 2.5 to trunk
[reactos.git] / reactos / w32api / include / ddk / d4drvif.h
1 /*
2 * d4drvif.h
3 *
4 * DOT4 driver IOCTL interface
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23 #ifndef __D4DRVIF_H
24 #define __D4DRVIF_H
25
26 #if __GNUC__ >=3
27 #pragma GCC system_header
28 #endif
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #pragma pack(push,4)
35
36 #include "ntddk.h"
37 #include "d4iface.h"
38
39 #define FILE_DEVICE_DOT4 0x3a
40 #define IOCTL_DOT4_USER_BASE 2049
41
42 #define IOCTL_DOT4_ADD_ACTIVITY_BROADCAST \
43 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
44
45 #define IOCTL_DOT4_CLOSE_CHANNEL \
46 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
47
48 #define IOCTL_DOT4_CREATE_SOCKET \
49 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 7, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
50
51 #define IOCTL_DOT4_DESTROY_SOCKET \
52 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 9, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
53
54 #define IOCTL_DOT4_OPEN_CHANNEL \
55 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 0, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
56
57 #define IOCTL_DOT4_READ \
58 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 2, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
59
60 #define IOCTL_DOT4_REMOVE_ACTIVITY_BROADCAST \
61 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
62
63 #define IOCTL_DOT4_WAIT_ACTIVITY_BROADCAST \
64 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 6, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
65
66 #define IOCTL_DOT4_WAIT_FOR_CHANNEL \
67 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 8, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
68
69 #define IOCTL_DOT4_WRITE \
70 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 3, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
71
72
73 #define MAX_SERVICE_LENGTH 40
74
75 typedef struct _DOT4_DC_CREATE_DATA {
76 unsigned char bPsid;
77 CHAR pServiceName[MAX_SERVICE_LENGTH + 1];
78 unsigned char bType;
79 ULONG ulBufferSize;
80 USHORT usMaxHtoPPacketSize;
81 USHORT usMaxPtoHPacketSize;
82 unsigned char bHsid;
83 } DOT4_DC_CREATE_DATA, *PDOT4_DC_CREATE_DATA;
84
85 typedef struct _DOT4_DC_DESTROY_DATA {
86 unsigned char bHsid;
87 } DOT4_DC_DESTROY_DATA, *PDOT4_DC_DESTROY_DATA;
88
89 typedef struct _DOT4_DC_OPEN_DATA {
90 unsigned char bHsid;
91 unsigned char fAddActivity;
92 CHANNEL_HANDLE hChannelHandle;
93 } DOT4_DC_OPEN_DATA, *PDOT4_DC_OPEN_DATA;
94
95 typedef struct _DOT4_DRIVER_CMD {
96 CHANNEL_HANDLE hChannelHandle;
97 ULONG ulSize;
98 ULONG ulOffset;
99 ULONG ulTimeout;
100 } DOT4_DRIVER_CMD, *PDOT4_DRIVER_CMD;
101
102 #pragma pack(pop)
103
104 #ifdef __cplusplus
105 }
106 #endif
107
108 #endif /* __D4DRVIF_H */