Naveen Neel / shedskin
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers d4drvif.h Source File

d4drvif.h

00001 /*
00002  * d4drvif.h
00003  *
00004  * DOT4 driver IOCTL interface
00005  *
00006  * This file is part of the w32api package.
00007  *
00008  * Contributors:
00009  *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
00010  *
00011  * THIS SOFTWARE IS NOT COPYRIGHTED
00012  *
00013  * This source code is offered for use in the public domain. You may
00014  * use, modify or distribute it freely.
00015  *
00016  * This code is distributed in the hope that it will be useful but
00017  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
00018  * DISCLAIMED. This includes but is not limited to warranties of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00020  *
00021  */
00022 
00023 #ifndef __D4DRVIF_H
00024 #define __D4DRVIF_H
00025 
00026 #if __GNUC__ >=3
00027 #pragma GCC system_header
00028 #endif
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 #include "ntddk.h"
00035 #include "d4iface.h"
00036 
00037 #define FILE_DEVICE_DOT4                  0x3a
00038 #define IOCTL_DOT4_USER_BASE              2049
00039 
00040 #define IOCTL_DOT4_ADD_ACTIVITY_BROADCAST \
00041   CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
00042 
00043 #define IOCTL_DOT4_CLOSE_CHANNEL \
00044   CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
00045 
00046 #define IOCTL_DOT4_CREATE_SOCKET \
00047   CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 7, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
00048 
00049 #define IOCTL_DOT4_DESTROY_SOCKET \
00050   CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 9, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
00051 
00052 #define IOCTL_DOT4_OPEN_CHANNEL \
00053   CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 0, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
00054 
00055 #define IOCTL_DOT4_READ \
00056   CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 2, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
00057 
00058 #define IOCTL_DOT4_REMOVE_ACTIVITY_BROADCAST \
00059   CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
00060 
00061 #define IOCTL_DOT4_WAIT_ACTIVITY_BROADCAST \
00062   CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 6, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
00063 
00064 #define IOCTL_DOT4_WAIT_FOR_CHANNEL \
00065   CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 8, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
00066 
00067 #define IOCTL_DOT4_WRITE \
00068   CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 3, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
00069 
00070 
00071 #define MAX_SERVICE_LENGTH                40
00072 
00073 typedef struct _DOT4_DC_CREATE_DATA {
00074   unsigned char  bPsid;
00075   CHAR  pServiceName[MAX_SERVICE_LENGTH + 1];
00076   unsigned char  bType;
00077   ULONG  ulBufferSize;
00078   USHORT  usMaxHtoPPacketSize;
00079   USHORT  usMaxPtoHPacketSize;
00080   unsigned char bHsid;
00081 } DOT4_DC_CREATE_DATA, *PDOT4_DC_CREATE_DATA;
00082 
00083 typedef struct _DOT4_DC_DESTROY_DATA {
00084     unsigned char  bHsid;
00085 } DOT4_DC_DESTROY_DATA, *PDOT4_DC_DESTROY_DATA;
00086 
00087 typedef struct _DOT4_DC_OPEN_DATA {
00088   unsigned char  bHsid;
00089   unsigned char  fAddActivity;
00090   CHANNEL_HANDLE  hChannelHandle;
00091 } DOT4_DC_OPEN_DATA, *PDOT4_DC_OPEN_DATA;
00092 
00093 typedef struct _DOT4_DRIVER_CMD {
00094   CHANNEL_HANDLE  hChannelHandle;
00095   ULONG  ulSize;
00096   ULONG  ulOffset;
00097   ULONG  ulTimeout;
00098 } DOT4_DRIVER_CMD, *PDOT4_DRIVER_CMD;
00099 
00100 #ifdef __cplusplus
00101 }
00102 #endif
00103 
00104 #endif /* __D4DRVIF_H */