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.

104 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. pktext.h
  5. Abstract:
  6. This file contains all declarations
  7. used in handling NBF packets.
  8. Author:
  9. Chaitanya Kodeboyina
  10. Environment:
  11. User Mode
  12. --*/
  13. #ifndef __PKTEXT_H
  14. #define __PKTEXT_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_PACKET, field)
  22. //
  23. // Helper Prototypes
  24. //
  25. UINT ReadPacket(PTP_PACKET pPkt, ULONG proxyPtr);
  26. UINT PrintPacket(PTP_PACKET pPkt, ULONG proxyPtr, ULONG printDetail);
  27. UINT FreePacket(PTP_PACKET pPkt);
  28. VOID PrintPacketList(PVOID ListEntryPointer, ULONG ListEntryProxy, ULONG printDetail);
  29. //
  30. // Constants
  31. //
  32. StructAccessInfo PacketInfo =
  33. {
  34. "Packet",
  35. {
  36. { "NdisPacket", OFFSET(NdisPacket), sizeof(PNDIS_PACKET), NULL, LOW },
  37. { "NdisIFrameLength",
  38. OFFSET(NdisIFrameLength),
  39. sizeof(ULONG), NULL, LOW },
  40. { "Owner", OFFSET(Owner), 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. { "PacketSent", OFFSET(PacketSent), sizeof(BOOLEAN), NULL, LOW },
  47. { "PacketNoNdisBuffer",
  48. OFFSET(PacketNoNdisBuffer),
  49. sizeof(BOOLEAN), NULL, LOW },
  50. { "Action", OFFSET(Action), sizeof(UCHAR), NULL, LOW },
  51. { "PacketizeConnection",
  52. OFFSET(PacketizeConnection),
  53. sizeof(BOOLEAN), NULL, LOW },
  54. { "Link", OFFSET(Link), sizeof(PTP_LINK), NULL, LOW },
  55. { "DeviceContext",
  56. OFFSET(Provider), sizeof(PDEVICE_CONTEXT),NULL, LOW },
  57. { "ProviderInterlock",
  58. OFFSET(ProviderInterlock),
  59. sizeof(PKSPIN_LOCK), NULL, LOW },
  60. { "Header", OFFSET(Header), sizeof(UCHAR), NULL, LOW },
  61. { "", 0, 0, NULL, LOW },
  62. 0
  63. }
  64. };
  65. #endif // __PKTEXT_H