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.

93 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. reqext.h
  5. Abstract:
  6. This file contains all declarations
  7. used in handling NBF requests.
  8. Author:
  9. Chaitanya Kodeboyina
  10. Environment:
  11. User Mode
  12. --*/
  13. #ifndef __REQEXT_H
  14. #define __REQEXT_H
  15. //
  16. // Macros
  17. //
  18. #ifndef FIELD_OFFSET
  19. #define FIELD_OFFSET(type, field) ((LONG)&(((type *)0)->field))
  20. #endif//FIELD_OFFSET
  21. #define OFFSET(field) FIELD_OFFSET(TP_REQUEST, field)
  22. //
  23. // Helper Prototypes
  24. //
  25. UINT ReadRequest(PTP_REQUEST pReq, ULONG proxyPtr);
  26. UINT PrintRequest(PTP_REQUEST pReq, ULONG proxyPtr, ULONG printDetail);
  27. UINT FreeRequest(PTP_REQUEST pReq);
  28. VOID PrintRequestList(PVOID ListEntryPointer, ULONG ListEntryProxy, ULONG printDetail);
  29. //
  30. // Constants
  31. //
  32. StructAccessInfo RequestInfo =
  33. {
  34. "Request",
  35. {
  36. { "IoRequestPacket",
  37. OFFSET(IoRequestPacket),
  38. sizeof(PIRP), NULL, LOW },
  39. { "Owner", OFFSET(Owner), sizeof(REQUEST_OWNER), NULL, LOW },
  40. { "Context", OFFSET(Context), sizeof(PVOID), NULL, LOW },
  41. { "Type", OFFSET(Type), sizeof(CSHORT), NULL, LOW },
  42. { "Size", OFFSET(Size), sizeof(USHORT), NULL, LOW },
  43. { "Linkage", OFFSET(Linkage), sizeof(LIST_ENTRY), NULL, LOW },
  44. { "ReferenceCount",
  45. OFFSET(ReferenceCount), sizeof(ULONG), NULL, LOW },
  46. #if DBG
  47. { "RefTypes", OFFSET(RefTypes),
  48. NUMBER_OF_RREFS*sizeof(ULONG), NULL, LOW },
  49. #endif
  50. { "SpinLock", OFFSET(SpinLock), sizeof(KSPIN_LOCK), NULL, LOW },
  51. { "Flags", OFFSET(Flags), sizeof(ULONG), NULL, LOW },
  52. { "DeviceContext",
  53. OFFSET(Provider), sizeof(PDEVICE_CONTEXT),NULL, LOW },
  54. { "", 0, 0, NULL, LOW },
  55. 0
  56. }
  57. };
  58. #endif // __REQEXT_H