Source code of Windows XP (NT5)
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.

118 lines
3.8 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. ioctl.h
  5. Abstract:
  6. Environment:
  7. Kernel & user mode
  8. Revision History:
  9. 5-10-96 : created
  10. --*/
  11. #ifndef __IOCTL_H__
  12. #define __IOCTL_H__
  13. #define GET_ERROR_DEADMAN_TIMEOUT 10000 //timeout in mS
  14. #define ISOPERF_IOCTL_INDEX 0x0000
  15. #define IOCTL_ISOPERF_START_ISO_IN_TEST CTL_CODE(FILE_DEVICE_UNKNOWN, \
  16. ISOPERF_IOCTL_INDEX,\
  17. METHOD_BUFFERED, \
  18. FILE_ANY_ACCESS)
  19. #define IOCTL_ISOPERF_STOP_ISO_IN_TEST CTL_CODE(FILE_DEVICE_UNKNOWN, \
  20. ISOPERF_IOCTL_INDEX+1,\
  21. METHOD_BUFFERED, \
  22. FILE_ANY_ACCESS)
  23. #define IOCTL_ISOPERF_GET_ISO_IN_STATS CTL_CODE(FILE_DEVICE_UNKNOWN, \
  24. ISOPERF_IOCTL_INDEX+2,\
  25. METHOD_BUFFERED, \
  26. FILE_ANY_ACCESS)
  27. #define IOCTL_ISOPERF_WAIT_FOR_ERROR CTL_CODE(FILE_DEVICE_UNKNOWN, \
  28. ISOPERF_IOCTL_INDEX+3,\
  29. METHOD_BUFFERED, \
  30. FILE_ANY_ACCESS)
  31. #define IOCTL_ISOPERF_SET_DRIVER_CONFIG CTL_CODE(FILE_DEVICE_UNKNOWN, \
  32. ISOPERF_IOCTL_INDEX+4,\
  33. METHOD_BUFFERED, \
  34. FILE_ANY_ACCESS)
  35. /*
  36. // Test device types
  37. */
  38. typedef enum _device_type {
  39. Iso_In_With_Pattern,
  40. Iso_Out_With_Interrupt_Feedback,
  41. Iso_Out_Without_Feedback,
  42. Unknown_Device_Type,
  43. Max_Device_Type
  44. } dtDeviceType, *pdtDeviceType;
  45. typedef enum _erErrorType_ {
  46. NoError,
  47. DataCompareFailed,
  48. UsbdErrorInCompletion,
  49. ErrorInPostingUrb,
  50. Max_Error_Type
  51. }erErrorType, *perErrorType;
  52. typedef struct _config_and_stat_info_ {
  53. // Config Info (read at start of tests)
  54. ULONG ulNumberOfFrames;
  55. ULONG ulMax_Urbs_Per_Pipe;
  56. ULONG ulDoInOutTest;
  57. ULONG ulFrameOffset; // 0 => start ASAP
  58. ULONG ulFrameOffsetMate; // For the mate device (Iso OUT)
  59. // Info on frame numbers for Iso test app to look at
  60. ULONG ulStartingFrameNumber; //Frame number we started our transfers on...
  61. ULONG ulFrameNumberAtStart; //Frame number that the bus was on when we posted the Irp...
  62. //Stat counters
  63. ULONG ulSuccessfulIrps;
  64. ULONG ulUnSuccessfulIrps;
  65. ULONG ulBytesTransferredIn;
  66. ULONG ulBytesTransferredOut;
  67. ULONG ulUpperClockCount;
  68. ULONG ulLowerClockCount;
  69. ULONG ulUrbDeltaClockCount;
  70. // Misc info about this device
  71. ULONG ulCountDownToStop;
  72. USHORT ulMaxPacketSize_IN;
  73. USHORT Padding1;
  74. USHORT ulMaxPacketSize_OUT;
  75. USHORT Padding2;
  76. dtDeviceType DeviceType;
  77. //these are kept globally for now...but are copied into this structure when passed to user mode app
  78. ULONG ulBytesAllocated;
  79. ULONG ulBytesFreed;
  80. // Error indicators
  81. erErrorType erError; //Error type -- indicates device hit an error (0=no error)
  82. ULONG bStopped; //Stopped flag -- indicates device is stopped due to an error
  83. ULONG UrbStatusCode; //If error flag indicates UsbdError or ErrorInPostingUrb, this is the last usbd URB status code
  84. ULONG UsbdPacketStatCode; //If error flag indicates UsbdError or ErrorInPostingUrb, this is the last usbd PACKET status code
  85. ULONG bDeviceRunning; //Data transfers are happening on this device
  86. } Config_Stat_Info, * pConfig_Stat_Info ;
  87. #endif // __IOCTL_H__
  88.