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.

207 lines
7.5 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. conext.h
  5. Abstract:
  6. This file contains all declarations
  7. used in handling NBF connections.
  8. Author:
  9. Chaitanya Kodeboyina
  10. Environment:
  11. User Mode
  12. --*/
  13. #ifndef __CONEXT_H
  14. #define __CONEXT_H
  15. //
  16. // Constants
  17. //
  18. // Linkage Type
  19. #define LINKAGE 0
  20. #define ADDRESS 1
  21. #define ADDFILE 2
  22. //
  23. // Macros
  24. //
  25. #ifndef FIELD_OFFSET
  26. #define FIELD_OFFSET(type, field) ((LONG)&(((type *)0)->field))
  27. #endif//FIELD_OFFSET
  28. #define OFFSET(field) FIELD_OFFSET(TP_CONNECTION, field)
  29. //
  30. // Helper Prototypes
  31. //
  32. UINT ReadConnection(PTP_CONNECTION pConnection, ULONG proxyPtr);
  33. UINT PrintConnection(PTP_CONNECTION pConnection, ULONG proxyPtr, ULONG printDetail);
  34. UINT FreeConnection(PTP_CONNECTION pConnection);
  35. VOID PrintConnectionListOnAddress(PVOID ListEntryPointer, ULONG ListEntryProxy, ULONG printDetail);
  36. VOID PrintConnectionListOnAddrFile(PVOID ListEntryPointer, ULONG ListEntryProxy, ULONG printDetail);
  37. //
  38. // Constants
  39. //
  40. StructAccessInfo ConnectionInfo =
  41. {
  42. "Connection",
  43. {
  44. { "Type", OFFSET(Type), sizeof(CSHORT), NULL, LOW },
  45. { "Size", OFFSET(Size), sizeof(USHORT), NULL, LOW },
  46. { "ReferenceCount",
  47. OFFSET(ReferenceCount), sizeof(ULONG), NULL, LOW },
  48. { "SpecialRefCount",
  49. OFFSET(SpecialRefCount),sizeof(ULONG), NULL, LOW },
  50. #if DBG
  51. { "RefTypes", OFFSET(RefTypes),
  52. NUMBER_OF_CREFS*sizeof(ULONG), NULL, LOW },
  53. #endif
  54. { "Flags", OFFSET(Flags), sizeof(ULONG), NULL, NOR },
  55. { "Flags2", OFFSET(Flags2), sizeof(ULONG), NULL, NOR },
  56. { "Link", OFFSET(Link), sizeof(PTP_LINK),
  57. PrintDlcLinkFromPtr , NOR },
  58. { "AddressFile", OFFSET(AddressFile), sizeof(PTP_ADDRESS_FILE),
  59. NULL, LOW },
  60. { "Device Context",
  61. OFFSET(Provider), sizeof(PDEVICE_CONTEXT),NULL, LOW },
  62. { "@", 0, 0, NULL, LOW },
  63. { "FileObject", OFFSET(FileObject), sizeof(PFILE_OBJECT), NULL, NOR },
  64. { "@", 0, 0, NULL, LOW },
  65. { "Context", OFFSET(Context), sizeof(CONNECTION_CONTEXT),
  66. NULL, LOW },
  67. { "ConnectionId", OFFSET(ConnectionId), sizeof(USHORT), NULL, LOW },
  68. { "SessionNumber",OFFSET(SessionNumber), sizeof(UCHAR), NULL, LOW },
  69. { "CalledAddress",
  70. OFFSET(CalledAddress), sizeof(NBF_NETBIOS_ADDRESS),
  71. PrintNbfNetbiosAddress, LOW },
  72. { "RemoteName", OFFSET(RemoteName), sizeof(CHAR *),
  73. PrintStringofLenN, LOW },
  74. { "InProgressRequest",
  75. OFFSET(InProgressRequest),
  76. sizeof(LIST_ENTRY),
  77. PrintRequestList, LOW },
  78. { "ConsecutiveReceives",
  79. OFFSET(ConsecutiveReceives),
  80. sizeof(ULONG), NULL, LOW },
  81. { "IndicationInProgress",
  82. OFFSET(IndicationInProgress),
  83. sizeof(UINT), NULL, LOW },
  84. { "SpecialReceiveIrp",
  85. OFFSET(SpecialReceiveIrp),
  86. sizeof(PIRP), NULL, LOW },
  87. { "CurrentReceiveIrp",
  88. OFFSET(CurrentReceiveIrp),
  89. sizeof(PIRP), NULL, LOW },
  90. { "CurrentReceiveMdl",
  91. OFFSET(CurrentReceiveMdl),
  92. sizeof(PMDL), NULL, LOW },
  93. { "MessageBytesReceived",
  94. OFFSET(MessageBytesReceived),
  95. sizeof(ULONG), NULL, LOW },
  96. { "MessageBytesAcked",
  97. OFFSET(MessageBytesAcked),
  98. sizeof(ULONG), NULL, LOW },
  99. { "MessageInitAccepted",
  100. OFFSET(MessageInitAccepted),
  101. sizeof(ULONG), NULL, LOW },
  102. { "ReceiveByteOffset",
  103. OFFSET(ReceiveByteOffset),
  104. sizeof(ULONG), NULL, LOW },
  105. { "ReceiveLength",
  106. OFFSET(ReceiveLength),
  107. sizeof(ULONG), NULL, LOW },
  108. { "ReceiveBytesUnaccepted",
  109. OFFSET(ReceiveBytesUnaccepted),
  110. sizeof(ULONG), NULL, LOW },
  111. { "ReceiveQueue",
  112. OFFSET(ReceiveQueue),
  113. sizeof(LIST_ENTRY), NULL, LOW },
  114. { "@", 0, 0, NULL, LOW },
  115. { "ConsecutiveSends",
  116. OFFSET(ConsecutiveSends),
  117. sizeof(ULONG), NULL, LOW },
  118. { "OnPacketWaitQueue",
  119. OFFSET(OnPacketWaitQueue),
  120. sizeof(UINT), NULL, LOW },
  121. { "PacketWaitLinkage",
  122. OFFSET(PacketWaitLinkage),
  123. sizeof(LIST_ENTRY), NULL, LOW },
  124. { "CloseIrp",
  125. OFFSET(CloseIrp),
  126. sizeof(PIRP), NULL, LOW },
  127. { "@", 0, 0, NULL, LOW },
  128. #if PKT_LOG
  129. { "LastNRecvs", OFFSET(LastNRecvs), sizeof(PKT_LOG_QUE),
  130. PrintPktLogQue, LOW },
  131. { "LastNSends", OFFSET(LastNSends), sizeof(PKT_LOG_QUE),
  132. PrintPktLogQue, LOW },
  133. { "LastNIndcs", OFFSET(LastNIndcs), sizeof(PKT_IND_QUE),
  134. PrintPktIndQue, LOW },
  135. #endif
  136. { "", 0, 0, NULL, LOW },
  137. 0
  138. }
  139. };
  140. #endif // __CONEXT_H