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.

172 lines
6.5 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. devext.h
  5. Abstract:
  6. This file contains all declarations
  7. used in handling device contexts.
  8. Author:
  9. Chaitanya Kodeboyina
  10. Environment:
  11. User Mode
  12. --*/
  13. #ifndef __DEVEXT_H
  14. #define __DEVEXT_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(DEVICE_CONTEXT, field)
  22. //
  23. // Helper Prototypes
  24. //
  25. UINT ReadDeviceContext(PDEVICE_CONTEXT pDevCon, ULONG proxyPtr);
  26. UINT PrintDeviceContext(PDEVICE_CONTEXT pDevCon, ULONG proxyPtr, ULONG printDetail);
  27. UINT FreeDeviceContext(PDEVICE_CONTEXT pDevCon);
  28. //
  29. // Constants
  30. //
  31. StructAccessInfo DeviceContextInfo =
  32. {
  33. "DeviceContext",
  34. {
  35. { "DeviceObject", OFFSET(DeviceObject), sizeof(DEVICE_OBJECT),
  36. PrintDeviceObject, HIG },
  37. { "State", OFFSET(State), sizeof(UCHAR), NULL, HIG },
  38. { "Type", OFFSET(Type), sizeof(CSHORT), NULL, LOW },
  39. { "Size", OFFSET(Size), sizeof(USHORT), NULL, LOW },
  40. #if DBG
  41. { "RefTypes", OFFSET(RefTypes),
  42. NUMBER_OF_DCREFS*sizeof(ULONG), NULL, LOW },
  43. #endif
  44. { "NdisBindingHandle",
  45. OFFSET(NdisBindingHandle),
  46. sizeof(NDIS_HANDLE), NULL, LOW },
  47. { "LocalAddress",
  48. OFFSET(LocalAddress),
  49. sizeof(HARDWARE_ADDRESS),
  50. NULL, LOW },
  51. { "NetBIOSAddress",
  52. OFFSET(NetBIOSAddress),
  53. sizeof(HARDWARE_ADDRESS),
  54. NULL, LOW },
  55. { "Linkage", OFFSET(Linkage), sizeof(LIST_ENTRY), NULL, LOW },
  56. { "LinkPool", OFFSET(LinkPool), sizeof(LIST_ENTRY), NULL
  57. /* PrintDlcLinkList */, LOW },
  58. { "LinkDeferred", OFFSET(LinkDeferred), sizeof(LIST_ENTRY), NULL
  59. /* PrintDlcLinkList */, LOW },
  60. { "LoopbackLinks",OFFSET(LoopbackLinks),2*sizeof(PTP_LINK), NULL, LOW },
  61. { "IndicationQueuesInUse",
  62. OFFSET(IndicationQueuesInUse),
  63. sizeof(BOOLEAN), NULL, LOW },
  64. { "AddressDatabase",
  65. OFFSET(AddressDatabase), sizeof(LIST_ENTRY),
  66. PrintAddressList, NOR },
  67. { "@", 0, 0, NULL, LOW },
  68. { "MacInfo", OFFSET(MacInfo), sizeof(NBF_NDIS_IDENTIFICATION),
  69. NULL, LOW },
  70. { "@", 0, 0, NULL, LOW },
  71. { "ReservedAddressHandle",
  72. OFFSET(ReservedAddressHandle),
  73. sizeof(HANDLE), NULL, LOW },
  74. { "ReservedNetBIOSAddress",
  75. OFFSET(ReservedNetBIOSAddress),
  76. NETBIOS_NAME_LENGTH *sizeof(CHAR), NULL, LOW },
  77. { "@", 0, 0, NULL, LOW },
  78. { "MaxConsecutiveIFrames",
  79. OFFSET(MaxConsecutiveIFrames),
  80. sizeof(UCHAR), NULL, LOW },
  81. { "TempIFramesReceived",
  82. OFFSET(TempIFramesReceived),
  83. sizeof(ULONG), NULL, LOW },
  84. { "TempIFrameBytesReceived",
  85. OFFSET(TempIFrameBytesReceived),
  86. sizeof(ULONG), NULL, LOW },
  87. { "@", 0, 0, NULL, LOW },
  88. { "SendPacketPoolDesc",
  89. OFFSET(SendPacketPoolDesc),
  90. sizeof(PNBF_POOL_LIST_DESC),
  91. PrintNbfPacketPoolListFromPtr, LOW },
  92. { "SendPacketPoolSize",
  93. OFFSET(SendPacketPoolSize),
  94. sizeof(ULONG), NULL, LOW },
  95. { "ReceivePacketPoolDesc",
  96. OFFSET(ReceivePacketPoolDesc),
  97. sizeof(PNBF_POOL_LIST_DESC),
  98. PrintNbfPacketPoolListFromPtr, LOW },
  99. { "ReceivePacketPoolSize",
  100. OFFSET(ReceivePacketPoolSize),
  101. sizeof(ULONG), NULL, LOW },
  102. { "NdisBufferPool",
  103. OFFSET(NdisBufferPool), sizeof(NDIS_HANDLE), NULL, LOW },
  104. { "@", 0, 0, NULL, LOW },
  105. { "LinkSpinLock", OFFSET(LinkSpinLock), sizeof(KSPIN_LOCK), NULL, LOW },
  106. { "LastLink", OFFSET(LastLink), sizeof(PTP_LINK), NULL, LOW },
  107. { "LinkTreeRoot", OFFSET(LinkTreeRoot), sizeof(PRTL_SPLAY_LINKS),
  108. NULL, LOW },
  109. { "LinkTreeElements",
  110. OFFSET(LinkTreeElements),
  111. sizeof(ULONG), NULL, LOW },
  112. { "LinkDeferred", OFFSET(LinkDeferred), sizeof(LIST_ENTRY), NULL, LOW },
  113. { "", 0, 0, NULL, LOW },
  114. 0
  115. }
  116. };
  117. #endif // __DEVEXT_H