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.

129 lines
3.5 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. COMMON.H
  5. Abstract:
  6. This module contains the common public declarations for the new and
  7. modified sample test bus (we added an IOCTL interface to the driver
  8. so we can fake PCI resources).
  9. Author:
  10. Bogdan Andreiu (bogdana)
  11. Environment:
  12. Kernel and user mode.
  13. Notes:
  14. Revision History:
  15. 24-11-1997 - bogdana - created from stack\common.h
  16. 18-09-1998 - bogdana - completely changed to match sample.sys' requirements
  17. 25-04-2002 - bogdana - one more reuse dor IoCreateDeviceSecureTest
  18. --*/
  19. #ifndef __WDMSECTEST_COMMON_H
  20. #define __WDMSECTEST_COMMON_H
  21. //
  22. // Define an Interface Guid
  23. //
  24. #undef FAR
  25. #define FAR
  26. #undef PHYSICAL_ADDRESS
  27. #define PHYSICAL_ADDRESS LARGE_INTEGER
  28. DEFINE_GUID (GUID_WDMSECTEST_REPORT_DEVICE, 0xbd8d31e4, 0x799d, 0x4490, 0x82, 0x42, 0xd8, 0x2f, 0xcd, 0x63, 0x80, 0x00);
  29. // bd8d31e4-799d-4490-8242-d82fcd638000
  30. // ***************************************************************************
  31. // IOCTL interface
  32. //
  33. // ***************************************************************************
  34. #define WDMSECTEST_IOCTL(_index_) \
  35. CTL_CODE (FILE_DEVICE_BUS_EXTENDER, _index_, METHOD_BUFFERED, FILE_ANY_ACCESS)
  36. #define IOCTL_TEST_NAME WDMSECTEST_IOCTL (0x10)
  37. #define IOCTL_TEST_NO_GUID WDMSECTEST_IOCTL (0x11)
  38. #define IOCTL_TEST_GUID WDMSECTEST_IOCTL (0x12)
  39. #define IOCTL_TEST_CREATE_OBJECT WDMSECTEST_IOCTL (0x13)
  40. #define IOCTL_TEST_GET_SECURITY WDMSECTEST_IOCTL (0x14)
  41. #define IOCTL_TEST_DESTROY_OBJECT WDMSECTEST_IOCTL (0x15)
  42. //
  43. // Data structures for various tests
  44. // (WST stands for WDMSecTest)
  45. //
  46. typedef struct _WST_CREATE_NO_GUID {
  47. WCHAR InSDDL [256]; // what we pass in
  48. NTSTATUS Status; // status after IoCreateDeviceSecure
  49. ULONG SecDescLength;
  50. SECURITY_INFORMATION SecInfo;
  51. UCHAR SecurityDescriptor[512];
  52. } WST_CREATE_NO_GUID, *PWST_CREATE_NO_GUID;
  53. //
  54. // Mask that describes what settings (beside
  55. // security descriptor) to set and check
  56. //
  57. #define SET_DEVICE_TYPE 1
  58. #define SET_DEVICE_CHARACTERISTICS 2
  59. #define SET_EXCLUSIVITY 4
  60. typedef struct _WST_CREATE_WITH_GUID {
  61. GUID DeviceClassGuid; // what we pass in
  62. WCHAR InSDDL [256]; // what we pass in
  63. NTSTATUS Status; // status after IoCreateDeviceSecure
  64. ULONG SettingsMask; // combination of the 3 flags above
  65. DEVICE_TYPE DeviceType; // what is the class override. Valid only if corresponding bit (0) is set.
  66. ULONG Characteristics; // what is the class override. Valid only if corresponding bit (1) is set.
  67. BOOLEAN Exclusivity; // what is the class override. Valid only if corresponding bit (2) is set.
  68. ULONG SecDescLength;
  69. SECURITY_INFORMATION SecInfo;
  70. UCHAR SecurityDescriptor[512];
  71. } WST_CREATE_WITH_GUID, *PWST_CREATE_WITH_GUID;
  72. typedef struct _WST_CREATE_OBJECT {
  73. OUT WCHAR Name[80];
  74. OUT PVOID DevObj;
  75. } WST_CREATE_OBJECT, *PWST_CREATE_OBJECT;
  76. typedef struct _WST_GET_SECURITY {
  77. IN PVOID DevObj;
  78. IN SECURITY_INFORMATION SecurityInformation;
  79. OUT ULONG Length;
  80. OUT UCHAR SecurityDescriptor[512];
  81. } WST_GET_SECURITY, *PWST_GET_SECURITY;
  82. typedef struct _WST_DESTROY_OBJECT {
  83. IN PVOID DevObj;
  84. } WST_DESTROY_OBJECT, *PWST_DESTROY_OBJECT;
  85. #endif // __SAMPLE_COMMON_H