Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
5.0 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Filename: ntddppdt.h
  4. //
  5. //
  6. //
  7. // Description
  8. //
  9. //
  10. //
  11. //
  12. // Author
  13. //
  14. // Steve Hines
  15. //
  16. //
  17. // Revisions
  18. //
  19. // 7/22/98 - Originated
  20. //
  21. //
  22. //////////////////////////////////////////////////////////////////////////////
  23. #ifndef _DOT4DRVIF_H
  24. #define _DOT4DRVIF_H
  25. //////////////////////////////////////////////////////////////////////////////
  26. // Includes
  27. //////////////////////////////////////////////////////////////////////////////
  28. //#include "d4iface.h"
  29. //////////////////////////////////////////////////////////////////////////////
  30. // Defines
  31. //////////////////////////////////////////////////////////////////////////////
  32. #define MAX_SERVICE_LENGTH 40
  33. #ifndef CTL_CODE
  34. //
  35. // Macro definition for defining IOCTL and FSCTL function control codes. Note
  36. // that function codes 0-2047 are reserved for Microsoft Corporation, and
  37. // 2048-4095 are reserved for customers.
  38. //
  39. #define CTL_CODE( DeviceType, Function, Method, Access ) ( \
  40. ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
  41. )
  42. //
  43. // Define the method codes for how buffers are passed for I/O and FS controls
  44. //
  45. #define METHOD_BUFFERED 0
  46. #define METHOD_IN_DIRECT 1
  47. #define METHOD_OUT_DIRECT 2
  48. #define METHOD_NEITHER 3
  49. //
  50. // Define the access check value for any access
  51. //
  52. //
  53. // The FILE_READ_ACCESS and FILE_WRITE_ACCESS constants are also defined in
  54. // ntioapi.h as FILE_READ_DATA and FILE_WRITE_DATA. The values for these
  55. // constants *MUST* always be in sync.
  56. //
  57. #define FILE_ANY_ACCESS 0
  58. #define FILE_READ_ACCESS ( 0x0001 ) // file & pipe
  59. #define FILE_WRITE_ACCESS ( 0x0002 ) // file & pipe
  60. #endif
  61. #define FILE_DEVICE_DOT4 0x3a
  62. #define IOCTL_DOT4_USER_BASE 2049
  63. #define IOCTL_DOT4_LAST IOCTL_DOT4_USER_BASE + 9
  64. #define IOCTL_DOT4_CREATE_SOCKET CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 7, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
  65. #define IOCTL_DOT4_DESTROY_SOCKET CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 9, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
  66. #define IOCTL_DOT4_WAIT_FOR_CHANNEL CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 8, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
  67. #define IOCTL_DOT4_OPEN_CHANNEL CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 0, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
  68. #define IOCTL_DOT4_CLOSE_CHANNEL CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
  69. #define IOCTL_DOT4_READ CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 2, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
  70. #define IOCTL_DOT4_WRITE CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 3, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
  71. #define IOCTL_DOT4_ADD_ACTIVITY_BROADCAST CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
  72. #define IOCTL_DOT4_REMOVE_ACTIVITY_BROADCAST CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
  73. #define IOCTL_DOT4_WAIT_ACTIVITY_BROADCAST CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 6, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
  74. //////////////////////////////////////////////////////////////////////////////
  75. // Types
  76. //////////////////////////////////////////////////////////////////////////////
  77. typedef struct _DOT4_DRIVER_CMD
  78. {
  79. // Handle to channel
  80. CHANNEL_HANDLE hChannelHandle;
  81. // Length of request
  82. ULONG ulSize;
  83. // Offset into buffer
  84. ULONG ulOffset;
  85. // Timeout of operation. Can be INFINITE.
  86. ULONG ulTimeout;
  87. } DOT4_DRIVER_CMD, *PDOT4_DRIVER_CMD;
  88. typedef struct _DOT4_DC_OPEN_DATA
  89. {
  90. // Host socket created by CREATE_SOCKET
  91. unsigned char bHsid;
  92. // TRUE to immediately add activity broadcast upon creation
  93. unsigned char fAddActivity;
  94. // Handle to channel returned
  95. CHANNEL_HANDLE hChannelHandle;
  96. } DOT4_DC_OPEN_DATA, *PDOT4_DC_OPEN_DATA;
  97. typedef struct _DOT4_DC_CREATE_DATA
  98. {
  99. // This or service name sent
  100. unsigned char bPsid;
  101. CHAR pServiceName[MAX_SERVICE_LENGTH + 1];
  102. // Type (stream or packet) of channels on socket
  103. unsigned char bType;
  104. // Size of read buffer for channels on socket
  105. ULONG ulBufferSize;
  106. USHORT usMaxHtoPPacketSize;
  107. USHORT usMaxPtoHPacketSize;
  108. // Host socket id returned
  109. unsigned char bHsid;
  110. } DOT4_DC_CREATE_DATA, *PDOT4_DC_CREATE_DATA;
  111. typedef struct _DOT4_DC_DESTROY_DATA
  112. {
  113. // Host socket created by CREATE_SOCKET
  114. unsigned char bHsid;
  115. } DOT4_DC_DESTROY_DATA, *PDOT4_DC_DESTROY_DATA;
  116. //////////////////////////////////////////////////////////////////////////////
  117. // Prototypes
  118. //////////////////////////////////////////////////////////////////////////////
  119. #endif