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.

113 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. adrext.h
  5. Abstract:
  6. This file contains all declarations
  7. used in handling NBF addresses.
  8. Author:
  9. Chaitanya Kodeboyina
  10. Environment:
  11. User Mode
  12. --*/
  13. #ifndef __ADREXT_H
  14. #define __ADREXT_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_ADDRESS, field)
  22. //
  23. // Helper Prototypes
  24. //
  25. UINT ReadAddress(PTP_ADDRESS pAddr, ULONG proxyPtr);
  26. UINT PrintAddress(PTP_ADDRESS pAddr, ULONG proxyPtr, ULONG printDetail);
  27. UINT FreeAddress(PTP_ADDRESS pAddr);
  28. VOID PrintAddressList(PVOID ListEntryPointer, ULONG ListEntryProxy, ULONG printDetail);
  29. //
  30. // Constants
  31. //
  32. StructAccessInfo AddressInfo =
  33. {
  34. "Address",
  35. {
  36. { "NetworkName", OFFSET(NetworkName),
  37. sizeof(PNBF_NETBIOS_ADDRESS),
  38. PrintNbfNetbiosAddressFromPtr, LOW },
  39. { "Type", OFFSET(Type), sizeof(CSHORT), NULL, LOW },
  40. { "Size", OFFSET(Size), sizeof(USHORT), NULL, LOW },
  41. { "Linkage", OFFSET(Linkage), sizeof(LIST_ENTRY), NULL, LOW },
  42. { "ReferenceCount",
  43. OFFSET(ReferenceCount), sizeof(ULONG), NULL, LOW },
  44. #if DBG
  45. { "RefTypes", OFFSET(RefTypes),
  46. NUMBER_OF_AREFS*sizeof(ULONG), NULL, LOW },
  47. #endif
  48. { "SpinLock", OFFSET(SpinLock), sizeof(KSPIN_LOCK), NULL, LOW },
  49. { "Flags", OFFSET(Flags), sizeof(ULONG), NULL, LOW },
  50. { "DeviceContext",
  51. OFFSET(Provider), sizeof(PDEVICE_CONTEXT),NULL, LOW },
  52. { "UIFramePoolHandle",
  53. OFFSET(UIFramePoolHandle),
  54. sizeof(NDIS_HANDLE), NULL, LOW },
  55. { "UIFrame", OFFSET(UIFrame), sizeof(PTP_UI_FRAME), NULL, LOW },
  56. { "AddressFileDatabase",
  57. OFFSET(AddressFileDatabase),
  58. sizeof(LIST_ENTRY),
  59. PrintAddressFileList, NOR },
  60. { "ConnectionDatabase",
  61. OFFSET(ConnectionDatabase),
  62. sizeof(LIST_ENTRY), NULL,
  63. /*PrintConnectionListOnAddress,*/ NOR },
  64. { "SendFlags", OFFSET(SendFlags), sizeof(ULONG), NULL, LOW },
  65. { "SendDatagramQueue",
  66. OFFSET(SendDatagramQueue),
  67. sizeof(LIST_ENTRY),
  68. PrintIRPListFromListEntry, LOW },
  69. { "", 0, 0, NULL, LOW },
  70. 0
  71. }
  72. };
  73. #endif // __ADREXT_H