ReactOS 0.4.16-dev-320-g3bd9ddc
d4drvif.h
Go to the documentation of this file.
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#pragma once
24
25#define _DOT4DRVIF_H
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#define MAX_SERVICE_LENGTH 40
32
33#ifndef CTL_CODE
34
35#define CTL_CODE( DeviceType, Function, Method, Access ) ( \
36 ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
37)
38
39#define METHOD_BUFFERED 0
40#define METHOD_IN_DIRECT 1
41#define METHOD_OUT_DIRECT 2
42#define METHOD_NEITHER 3
43
44#define FILE_ANY_ACCESS 0
45#define FILE_READ_ACCESS 0x0001
46#define FILE_WRITE_ACCESS 0x0002
47
48#endif /* CTL_CODE */
49
50#define FILE_DEVICE_DOT4 0x3a
51#define IOCTL_DOT4_USER_BASE 2049
52#define IOCTL_DOT4_LAST IOCTL_DOT4_USER_BASE + 9
53
54#define IOCTL_DOT4_ADD_ACTIVITY_BROADCAST \
55 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
56
57#define IOCTL_DOT4_CLOSE_CHANNEL \
58 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
59
60#define IOCTL_DOT4_CREATE_SOCKET \
61 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 7, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
62
63#define IOCTL_DOT4_DESTROY_SOCKET \
64 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 9, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
65
66#define IOCTL_DOT4_OPEN_CHANNEL \
67 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 0, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
68
69#define IOCTL_DOT4_READ \
70 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 2, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
71
72#define IOCTL_DOT4_REMOVE_ACTIVITY_BROADCAST \
73 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
74
75#define IOCTL_DOT4_WAIT_ACTIVITY_BROADCAST \
76 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 6, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
77
78#define IOCTL_DOT4_WAIT_FOR_CHANNEL \
79 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 8, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
80
81#define IOCTL_DOT4_WRITE \
82 CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 3, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
83
84
85typedef struct _DOT4_DC_CREATE_DATA {
86 unsigned char bPsid;
88 unsigned char bType;
92 unsigned char bHsid;
94
95typedef struct _DOT4_DC_DESTROY_DATA {
96 unsigned char bHsid;
98
99typedef struct _DOT4_DC_OPEN_DATA {
100 unsigned char bHsid;
101 unsigned char fAddActivity;
104
105typedef struct _DOT4_DRIVER_CMD {
111
112#ifdef __cplusplus
113}
114#endif
struct _DOT4_DRIVER_CMD DOT4_DRIVER_CMD
struct _DOT4_DRIVER_CMD * PDOT4_DRIVER_CMD
struct _DOT4_DC_OPEN_DATA * PDOT4_DC_OPEN_DATA
struct _DOT4_DC_OPEN_DATA DOT4_DC_OPEN_DATA
#define MAX_SERVICE_LENGTH
Definition: d4drvif.h:31
struct _DOT4_DC_CREATE_DATA * PDOT4_DC_CREATE_DATA
struct _DOT4_DC_CREATE_DATA DOT4_DC_CREATE_DATA
struct _DOT4_DC_DESTROY_DATA * PDOT4_DC_DESTROY_DATA
struct _DOT4_DC_DESTROY_DATA DOT4_DC_DESTROY_DATA
unsigned short USHORT
Definition: pedump.c:61
unsigned char bType
Definition: d4drvif.h:88
USHORT usMaxHtoPPacketSize
Definition: d4drvif.h:90
unsigned char bPsid
Definition: d4drvif.h:86
USHORT usMaxPtoHPacketSize
Definition: d4drvif.h:91
CHAR pServiceName[MAX_SERVICE_LENGTH+1]
Definition: d4drvif.h:87
unsigned char bHsid
Definition: d4drvif.h:92
unsigned char bHsid
Definition: d4drvif.h:96
unsigned char fAddActivity
Definition: d4drvif.h:101
unsigned char bHsid
Definition: d4drvif.h:100
CHANNEL_HANDLE hChannelHandle
Definition: d4drvif.h:102
ULONG ulTimeout
Definition: d4drvif.h:109
ULONG ulOffset
Definition: d4drvif.h:108
CHANNEL_HANDLE hChannelHandle
Definition: d4drvif.h:106
uint32_t ULONG
Definition: typedefs.h:59
char CHAR
Definition: xmlstorage.h:175