Sync to trunk head(r38096)
[reactos.git] / reactos / 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 #include "d4iface.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #define FILE_DEVICE_DOT4 0x3a
33 #define IOCTL_DOT4_USER_BASE 2049
34
35 #define IOCTL_DOT4_ADD_ACTIVITY_BROADCAST \
36 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
37
38 #define IOCTL_DOT4_CLOSE_CHANNEL \
39 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
40
41 #define IOCTL_DOT4_CREATE_SOCKET \
42 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 7, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
43
44 #define IOCTL_DOT4_DESTROY_SOCKET \
45 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 9, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
46
47 #define IOCTL_DOT4_OPEN_CHANNEL \
48 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 0, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
49
50 #define IOCTL_DOT4_READ \
51 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 2, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
52
53 #define IOCTL_DOT4_REMOVE_ACTIVITY_BROADCAST \
54 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
55
56 #define IOCTL_DOT4_WAIT_ACTIVITY_BROADCAST \
57 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 6, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
58
59 #define IOCTL_DOT4_WAIT_FOR_CHANNEL \
60 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 8, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
61
62 #define IOCTL_DOT4_WRITE \
63 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 3, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
64
65
66 #define MAX_SERVICE_LENGTH 40
67
68 typedef struct _DOT4_DC_CREATE_DATA {
69 unsigned char bPsid;
70 CHAR pServiceName[MAX_SERVICE_LENGTH + 1];
71 unsigned char bType;
72 ULONG ulBufferSize;
73 USHORT usMaxHtoPPacketSize;
74 USHORT usMaxPtoHPacketSize;
75 unsigned char bHsid;
76 } DOT4_DC_CREATE_DATA, *PDOT4_DC_CREATE_DATA;
77
78 typedef struct _DOT4_DC_DESTROY_DATA {
79 unsigned char bHsid;
80 } DOT4_DC_DESTROY_DATA, *PDOT4_DC_DESTROY_DATA;
81
82 typedef struct _DOT4_DC_OPEN_DATA {
83 unsigned char bHsid;
84 unsigned char fAddActivity;
85 CHANNEL_HANDLE hChannelHandle;
86 } DOT4_DC_OPEN_DATA, *PDOT4_DC_OPEN_DATA;
87
88 typedef struct _DOT4_DRIVER_CMD {
89 CHANNEL_HANDLE hChannelHandle;
90 ULONG ulSize;
91 ULONG ulOffset;
92 ULONG ulTimeout;
93 } DOT4_DRIVER_CMD, *PDOT4_DRIVER_CMD;
94
95 #ifdef __cplusplus
96 }
97 #endif
98
99 #endif /* __D4DRVIF_H */