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.

112 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. isostrm.h
  5. Abstract:
  6. Environment:
  7. Kernel mode
  8. Notes:
  9. Copyright (c) 2000 Microsoft Corporation.
  10. All Rights Reserved.
  11. --*/
  12. #ifndef _ISOUSB_STRM_H
  13. #define _ISOUSB_STRM_H
  14. #define ISOUSB_MAX_IRP 2
  15. #define ISOCH_IN_PIPE_INDEX 4
  16. #define ISOCH_OUT_PIPE_INDEX 5
  17. typedef struct _ISOUSB_STREAM_OBJECT {
  18. // number of pending irps for this stream
  19. ULONG PendingIrps;
  20. // event signaled when no irps pending
  21. KEVENT NoPendingIrpEvent;
  22. PDEVICE_OBJECT DeviceObject;
  23. PUSBD_PIPE_INFORMATION PipeInformation;
  24. struct _ISOUSB_TRANSFER_OBJECT *TransferObjectList[ISOUSB_MAX_IRP];
  25. } ISOUSB_STREAM_OBJECT, *PISOUSB_STREAM_OBJECT;
  26. typedef struct _ISOUSB_TRANSFER_OBJECT {
  27. PIRP Irp;
  28. PURB Urb;
  29. PUCHAR DataBuffer;
  30. //
  31. // statistics.
  32. //
  33. ULONG TimesRecycled;
  34. ULONG TotalPacketsProcessed;
  35. ULONG TotalBytesProcessed;
  36. ULONG ErrorPacketCount;
  37. PISOUSB_STREAM_OBJECT StreamObject;
  38. } ISOUSB_TRANSFER_OBJECT, *PISOUSB_TRANSFER_OBJECT;
  39. NTSTATUS
  40. IsoUsb_StartIsoStream(
  41. IN PDEVICE_OBJECT DeviceObject,
  42. IN PIRP Irp
  43. );
  44. NTSTATUS
  45. IsoUsb_StartTransfer(
  46. IN PDEVICE_OBJECT DeviceObject,
  47. IN PISOUSB_STREAM_OBJECT StreamObject,
  48. IN ULONG Index
  49. );
  50. NTSTATUS
  51. IsoUsb_InitializeStreamUrb(
  52. IN PDEVICE_OBJECT DeviceObject,
  53. IN PISOUSB_TRANSFER_OBJECT TransferObject
  54. );
  55. NTSTATUS
  56. IsoUsb_IsoIrp_Complete(
  57. IN PDEVICE_OBJECT DeviceObject,
  58. IN PIRP Irp,
  59. IN PVOID Context
  60. );
  61. NTSTATUS
  62. IsoUsb_ProcessTransfer(
  63. IN PISOUSB_TRANSFER_OBJECT TransferObject
  64. );
  65. NTSTATUS
  66. IsoUsb_StopIsoStream(
  67. IN PDEVICE_OBJECT DeviceObject,
  68. IN PISOUSB_STREAM_OBJECT StreamObject,
  69. IN PIRP Irp
  70. );
  71. NTSTATUS
  72. IsoUsb_StreamObjectCleanup(
  73. IN PISOUSB_STREAM_OBJECT StreamObject,
  74. IN PDEVICE_EXTENSION DeviceExtension
  75. );
  76. #endif