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.

758 lines
39 KiB

  1. #include <wanhelp.h>
  2. PSTR MediumType[] =
  3. {
  4. "NdisMedium802_3",
  5. "NdisMedium802_5",
  6. "NdisMediumFddi",
  7. "NdisMediumWan",
  8. "NdisMediumLocalTalk",
  9. "NdisMediumDix",
  10. "NdisMediumArcnetRaw",
  11. "NdisMediumArcnet878_2",
  12. "NdisMediumAtm",
  13. "NdisMediumWirelessWan",
  14. "NdisMediumIrda"
  15. };
  16. PSTR WanMediumSubtype[] =
  17. {
  18. "NdisWanMediumHub",
  19. "NdisWanMediumX_25",
  20. "NdisWanMediumIsdn",
  21. "NdisWanMediumSerial",
  22. "NdisWanMediumFrameRelay",
  23. "NdisWanMediumAtm",
  24. "NdisWanMediumSonet",
  25. "NdisWanMediumSW56K"
  26. };
  27. PSTR WanHeaderFormat[] =
  28. {
  29. "NdisWanHeaderNative", // src/dest based on subtype, followed by NLPID
  30. "NdisWanHeaderEthernet" // emulation of ethernet header
  31. };
  32. PSTR HardwareStatus[] =
  33. {
  34. "NdisHardwareStatusReady",
  35. "NdisHardwareStatusInitializing",
  36. "NdisHardwareStatusReset",
  37. "NdisHardwareStatusClosing",
  38. "NdisHardwareStatusNotReady"
  39. };
  40. PSTR LinkCBStates[] =
  41. {
  42. "LinkDown",
  43. "LinkGoingDown",
  44. "LinkUp"
  45. };
  46. PSTR BundleCBStates[] =
  47. {
  48. "BundleDown",
  49. "BundleGowingDown",
  50. "BundleUp",
  51. "BundleRouted",
  52. "BundleUnrouting"
  53. };
  54. PSTR WanQuality[] =
  55. {
  56. "NdisWanRaw",
  57. "NdisWanErrorControl",
  58. "NdisWanReliable"
  59. };
  60. PSTR DeferredQueueDesc[] =
  61. {
  62. "ReceiveIndication",
  63. "SendComplete",
  64. "StatusIndication",
  65. "Loopback"
  66. };
  67. VOID
  68. DisplayNdisWanCB(
  69. DWORD Address,
  70. PNDISWANCB NdisWanCB
  71. )
  72. {
  73. dprintf("NdisWanCB: 0x%8.8x\n\n", Address);
  74. dprintf(" Lock: 0x%8.8x Irql: 0x%8.8x\n", NdisWanCB->Lock.SpinLock, NdisWanCB->Lock.OldIrql);
  75. dprintf(" NdisWrapperHandle: 0x%8.8x\n", NdisWanCB->hNdisWrapperHandle);
  76. dprintf(" ProtocolHandle: 0x%8.8x\n", NdisWanCB->hProtocolHandle);
  77. dprintf(" NumberOfProtocols: %ld\n", NdisWanCB->ulNumberOfProtocols);
  78. dprintf(" NumberOfLinks: %ld\n", NdisWanCB->ulNumberOfLinks);
  79. dprintf(" MiniumFragmentSize: 0x%8.8x\n", NdisWanCB->ulMinFragmentSize);
  80. dprintf(" TraceLevel: 0x%8.8x\n", NdisWanCB->ulTraceLevel);
  81. dprintf(" TraceMask: 0x%8.8x\n", NdisWanCB->ulTraceMask);
  82. dprintf(" DriverObject: 0x%8.8x\n", NdisWanCB->pDriverObject);
  83. dprintf(" DeviceObject: 0x%8.8x\n", NdisWanCB->pDeviceObject);
  84. dprintf(" PacketsSent: %ld\n", NdisWanCB->SendCount);
  85. dprintf(" PacketsCompleted: %ld\n", NdisWanCB->SendCompleteCount);
  86. dprintf(" IORecvQueueEmpty: %ld\n", NdisWanCB->IORecvError1);
  87. dprintf(" IORecvBeforMap: %ld\n", NdisWanCB->IORecvError2);
  88. dprintf(" PromiscuousAdapter: 0x%8.8x\n",NdisWanCB->PromiscuousAdapter);
  89. }
  90. VOID
  91. DisplayWanAdapterCB(
  92. DWORD Address,
  93. PWAN_ADAPTERCB WanAdapterCB
  94. )
  95. {
  96. dprintf("\n\nWanAdapterCB: 0x%8.8x\n", Address);
  97. dprintf(" Linkage:\n");
  98. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  99. WanAdapterCB->Linkage.Flink, WanAdapterCB->Linkage.Blink);
  100. dprintf(" Lock: 0x%8.8x Irql: 0x%8.8x\n",
  101. WanAdapterCB->Lock.SpinLock, WanAdapterCB->Lock.OldIrql);
  102. dprintf(" FreeLinkCBList:\n");
  103. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  104. WanAdapterCB->FreeLinkCBList.Flink, WanAdapterCB->FreeLinkCBList.Blink);
  105. dprintf(" NdisBindingHandle: 0x%8.8x\n", WanAdapterCB->hNdisBindingHandle);
  106. dprintf(" WanRequest: 0x%8.8x\n", WanAdapterCB->pWanRequest);
  107. dprintf(" LastRequest: 0x%8.8x\n", WanAdapterCB->pLastWanRequest);
  108. dprintf(" MiniportName: Buffer: 0x%8.8x Length: %ld\n",
  109. WanAdapterCB->MiniportName.Buffer, WanAdapterCB->MiniportName.Length);
  110. dprintf(" MediumType: %s\n", MediumType[WanAdapterCB->MediumType]);
  111. dprintf(" MediumSubType: %s\n", WanMediumSubtype[WanAdapterCB->MediumSubType]);
  112. dprintf(" WanHeaderFormat: %s\n", WanHeaderFormat[WanAdapterCB->WanHeaderFormat]);
  113. dprintf(" MaxFrameSize: %ld\n", WanAdapterCB->WanInfo.MaxFrameSize);
  114. dprintf(" MaxTransmit: %ld\n", WanAdapterCB->WanInfo.MaxTransmit);
  115. dprintf(" HeaderPadding: %ld\n",WanAdapterCB->WanInfo.HeaderPadding);
  116. dprintf(" TailPadding: %ld\n",WanAdapterCB->WanInfo.TailPadding);
  117. dprintf(" Endpoints: %ld\n",WanAdapterCB->WanInfo.Endpoints);
  118. dprintf(" MemoryFlags: 0x%8.8x\n",WanAdapterCB->WanInfo.MemoryFlags);
  119. dprintf(" HighestAddress: 0x%8.8x 0x%8.8x\n",
  120. WanAdapterCB->WanInfo.HighestAcceptableAddress.HighPart,
  121. WanAdapterCB->WanInfo.HighestAcceptableAddress.LowPart);
  122. dprintf(" FramingBits: 0x%8.8x\n",WanAdapterCB->WanInfo.FramingBits);
  123. dprintf(" DesiredACCM: 0x%8.8x\n",WanAdapterCB->WanInfo.DesiredACCM);
  124. }
  125. VOID
  126. DisplayAdapterCB(
  127. DWORD Address,
  128. PADAPTERCB AdapterCB
  129. )
  130. {
  131. DWORD i;
  132. dprintf("\n\nAdapterCB: 0x%8.8x\n", Address);
  133. dprintf(" Linkage:\n");
  134. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  135. AdapterCB->Linkage.Flink, AdapterCB->Linkage.Blink);
  136. dprintf(" Lock: 0x%8.8x Irql: 0x%8.8x\n",
  137. AdapterCB->Lock.SpinLock, AdapterCB->Lock.OldIrql);
  138. dprintf(" ReferenceCount: %ld\n", AdapterCB->ulReferenceCount);
  139. dprintf(" MiniportAdapterHandle: 0x%8.8x\n", AdapterCB->hMiniportHandle);
  140. dprintf(" Flags: 0x%8.8x\n", AdapterCB->Flags);
  141. dprintf(" FreeDeferredQueue:\n");
  142. dprintf(" Head: 0x%8.8x\n", AdapterCB->FreeDeferredQueue.Head);
  143. dprintf(" Tail: 0x%8.8x\n", AdapterCB->FreeDeferredQueue.Tail);
  144. dprintf(" Count: %ld\n", AdapterCB->FreeDeferredQueue.Count);
  145. dprintf(" MaxCount: %ld\n", AdapterCB->FreeDeferredQueue.MaxCount);
  146. for (i = 0; i < MAX_DEFERRED_QUEUE_TYPES; i++) {
  147. dprintf(" DeferredQueue: %s\n", DeferredQueueDesc[i]);
  148. dprintf(" Head: 0x%8.8x\n", AdapterCB->DeferredQueue[i].Head);
  149. dprintf(" Tail: 0x%8.8x\n", AdapterCB->DeferredQueue[i].Tail);
  150. dprintf(" Count: %ld\n", AdapterCB->DeferredQueue[i].Count);
  151. dprintf(" MaxCount: %ld\n", AdapterCB->DeferredQueue[i].MaxCount);
  152. }
  153. dprintf(" MediumType: %s\n", MediumType[AdapterCB->MediumType]);
  154. dprintf(" HardwareStatus: %s\n", HardwareStatus[AdapterCB->HardwareStatus]);
  155. dprintf(" AdapterName: Buffer: 0x%8.8x Length: %d\n",
  156. AdapterCB->AdapterName.Buffer, AdapterCB->AdapterName.Length);
  157. dprintf(" NetworkAddress: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  158. AdapterCB->NetworkAddress[0], AdapterCB->NetworkAddress[1], AdapterCB->NetworkAddress[2],
  159. AdapterCB->NetworkAddress[3], AdapterCB->NetworkAddress[4], AdapterCB->NetworkAddress[5]);
  160. dprintf(" NumberOfProtocols: %ld\n", AdapterCB->ulNumberofProtocols);
  161. dprintf(" ProtocolType: 0x%4.4x\n", AdapterCB->ProtocolType);
  162. dprintf(" NbfBundleCB: 0x%8.8x\n", AdapterCB->NbfBundleCB);
  163. dprintf(" NbfProtocolHandle: 0x%8.8x\n", AdapterCB->NbfProtocolHandle);
  164. }
  165. VOID
  166. DisplayConnectionTable(
  167. DWORD Address,
  168. PCONNECTION_TABLE ConnectionTable
  169. )
  170. {
  171. dprintf("\n\nConnectionTable: 0x%8.8x\n", Address);
  172. dprintf(" Lock: 0x%8.8x Irql: 0x%8.8x\n",
  173. ConnectionTable->Lock.SpinLock, ConnectionTable->Lock.OldIrql);
  174. dprintf(" AllocationSize: %ld\n", ConnectionTable->ulAllocationSize);
  175. dprintf(" ArraySize: %ld\n", ConnectionTable->ulArraySize);
  176. dprintf(" Number Of Active Links: %ld\n", ConnectionTable->ulNumActiveLinks);
  177. dprintf(" Number Of Active Bundles: %ld\n", ConnectionTable->ulNumActiveBundles);
  178. dprintf(" LinkArray: 0x%8.8x\n", ConnectionTable->LinkArray);
  179. dprintf(" BundleArray: 0x%8.8x\n", ConnectionTable->BundleArray);
  180. }
  181. VOID
  182. DisplayLinkCB(
  183. DWORD Address,
  184. PLINKCB LinkCB
  185. )
  186. {
  187. dprintf("\n\nLinkCB: 0x%8.8x\n", Address);
  188. dprintf(" Linkage:\n");
  189. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  190. LinkCB->Linkage.Flink, LinkCB->Linkage.Blink);
  191. dprintf(" Handle: 0x%8.8x\n", LinkCB->hLinkHandle);
  192. dprintf(" User Context: 0x%8.8x\n", LinkCB->hLinkContext);
  193. dprintf(" ReferenceCount: %ld\n", LinkCB->ulReferenceCount);
  194. dprintf(" State: %s\n", LinkCBStates[LinkCB->State]);
  195. dprintf(" WanAdapterCB: 0x%8.8x\n", LinkCB->WanAdapterCB);
  196. dprintf(" BundleCB: 0x%8.8x\n", LinkCB->BundleCB);
  197. dprintf(" WanMiniport Lineup Context: 0x%8.8x\n", LinkCB->NdisLinkHandle);
  198. dprintf(" WanPacketPool:\n");
  199. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  200. LinkCB->WanPacketPool.Flink, LinkCB->WanPacketPool.Blink);
  201. dprintf(" WanPacketCount: %ld\n", LinkCB->ulWanPacketCount);
  202. dprintf(" OutstandingFrames: %ld\n", LinkCB->OutstandingFrames);
  203. dprintf(" LastRecvSeqNumber: 0x%8.8x\n", LinkCB->LastRecvSeqNumber);
  204. dprintf(" RecvFragmentsLost: 0x%8.8x\n", LinkCB->RecvFragmentsLost);
  205. dprintf(" LinkBandwidth: %ld\n", LinkCB->ulBandwidth);
  206. dprintf(" LinkInfo:\n");
  207. dprintf(" MaxSendFrameSize: %ld\n", LinkCB->LinkInfo.MaxSendFrameSize);
  208. dprintf(" MaxRecvFrameSize: %ld\n", LinkCB->LinkInfo.MaxRecvFrameSize);
  209. dprintf(" HeaderPadding: %ld\n", LinkCB->LinkInfo.HeaderPadding);
  210. dprintf(" TailPadding: %ld\n", LinkCB->LinkInfo.TailPadding);
  211. dprintf(" SendFramingBits: 0x%8.8x\n", LinkCB->LinkInfo.SendFramingBits);
  212. dprintf(" RecvFramingBits: 0x%8.8x\n", LinkCB->LinkInfo.RecvFramingBits);
  213. dprintf(" SendCompressionBits: 0x%8.8x\n", LinkCB->LinkInfo.SendCompressionBits);
  214. dprintf(" RecvCompressionBits: 0x%8.8x\n", LinkCB->LinkInfo.RecvCompressionBits);
  215. dprintf(" SendACCM: 0x%8.8x\n", LinkCB->LinkInfo.SendACCM);
  216. dprintf(" RecvACCM: 0x%8.8x\n", LinkCB->LinkInfo.RecvACCM);
  217. dprintf(" MaxRSendFrameSize: %ld\n", LinkCB->LinkInfo.MaxRSendFrameSize);
  218. dprintf(" MaxRRecvFrameSize: %ld\n", LinkCB->LinkInfo.MaxRRecvFrameSize);
  219. dprintf(" LineUpInfo:\n");
  220. dprintf(" LinkSpeed: %ld\n", LinkCB->LineUpInfo.LinkSpeed);
  221. dprintf(" Quality: 0x%8.8x\n", LinkCB->LineUpInfo.Quality);
  222. dprintf(" SendWindow: %d\n", LinkCB->LineUpInfo.SendWindow);
  223. dprintf(" ConnectionWrapperID: 0x%8.8x\n", LinkCB->LineUpInfo.ConnectionWrapperID);
  224. dprintf(" NdisLinkHandle: 0x%8.8x\n", LinkCB->LineUpInfo.NdisLinkHandle);
  225. dprintf(" NdisLinkContext: 0x%8.8x\n", LinkCB->LineUpInfo.NdisLinkContext);
  226. dprintf(" FriendlyName: %s\n", LinkCB->Name);
  227. dprintf(" LinkStats:\n");
  228. dprintf(" BytesTransmitted: %ld\n", LinkCB->LinkStats.BytesTransmitted);
  229. dprintf(" BytesReceived: %ld\n", LinkCB->LinkStats.BytesReceived);
  230. dprintf(" FramesTransmitted: %ld\n", LinkCB->LinkStats.FramesTransmitted);
  231. dprintf(" FramesReceived: %ld\n", LinkCB->LinkStats.FramesReceived);
  232. dprintf(" CRCErrors: %ld\n", LinkCB->LinkStats.CRCErrors);
  233. dprintf(" TimeoutErrors: %ld\n", LinkCB->LinkStats.TimeoutErrors);
  234. dprintf(" AlignmentErrors: %ld\n", LinkCB->LinkStats.AlignmentErrors);
  235. dprintf(" SerialOverrunErrors: %ld\n", LinkCB->LinkStats.SerialOverrunErrors);
  236. dprintf(" FramingErrors: %ld\n", LinkCB->LinkStats.FramingErrors);
  237. dprintf(" BufferOverrunErrors: %ld\n", LinkCB->LinkStats.BufferOverrunErrors);
  238. dprintf(" ByteTransmittedUncompressed: %ld\n", LinkCB->LinkStats.BytesTransmittedUncompressed);
  239. dprintf(" BytesReceivedUncompressed: %ld\n", LinkCB->LinkStats.BytesReceivedUncompressed);
  240. dprintf(" BytesTransmittedCompressed: %ld\n", LinkCB->LinkStats.BytesTransmittedCompressed);
  241. dprintf(" BytesReceivedCompressed: %ld\n", LinkCB->LinkStats.BytesReceivedCompressed);
  242. }
  243. VOID
  244. DisplayBundleCB(
  245. DWORD Address,
  246. PBUNDLECB BundleCB
  247. )
  248. {
  249. DWORD i;
  250. ENCRYPTION_INFO *EncryptInfo;
  251. A_SHA_CTX *SHAContext;
  252. A_SHA_COMM_CTX *SHACommon;
  253. PUCHAR LMSessionKey, UserSessionKey, Challenge;
  254. dprintf("\n\nBundleCB: 0x%8.8x\n", Address);
  255. dprintf(" Handle: 0x%8.8x\n",BundleCB->hBundleHandle);
  256. dprintf(" ReferenceCount: %ld\n",BundleCB->ulReferenceCount);
  257. dprintf(" State: %s\n",BundleCBStates[BundleCB->State]);
  258. dprintf(" LinkCBList:\n");
  259. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  260. BundleCB->LinkCBList.Flink, BundleCB->LinkCBList.Blink);
  261. dprintf(" LinkCBCount: %ld\n",BundleCB->ulLinkCBCount);
  262. dprintf(" FramingInfo:\n");
  263. dprintf(" SendFramingBits: 0x%8.8x\n", BundleCB->FramingInfo.SendFramingBits);
  264. dprintf(" RecvFramingBits: 0x%8.8x\n", BundleCB->FramingInfo.RecvFramingBits);
  265. dprintf(" MaxRSendFrameSize: %ld\n", BundleCB->FramingInfo.MaxRSendFrameSize);
  266. dprintf(" MaxRRecvFrameSize: %ld\n", BundleCB->FramingInfo.MaxRRecvFrameSize);
  267. dprintf(" NextLinkToXmit: 0x%8.8x\n",BundleCB->NextLinkToXmit);
  268. dprintf(" SendingLinks: %d\n", BundleCB->SendingLinks);
  269. dprintf(" SendPacketQueue:\n");
  270. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  271. BundleCB->SendPacketQueue.Flink, BundleCB->SendPacketQueue.Blink);
  272. dprintf(" SendSequenceNumber: 0x%8.8x\n", BundleCB->SendSeqNumber);
  273. dprintf(" SendSequenceMask: 0x%8.8x\n", BundleCB->SendSeqMask);
  274. dprintf(" SendSequenceTest: 0x%8.8x\n", BundleCB->SendSeqTest);
  275. dprintf(" Flags: 0x%8.8x\n",BundleCB->Flags);
  276. dprintf(" OutstandingFrames: %ld\n",BundleCB->OutstandingFrames);
  277. dprintf(" RecvDescPool:\n");
  278. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  279. BundleCB->RecvDescPool.Flink, BundleCB->RecvDescPool.Blink);
  280. dprintf(" RecvDesc Count: %ld\n", BundleCB->RecvDescCount);
  281. dprintf(" RecvDesc Max Count: %ld\n", BundleCB->RecvDescMax);
  282. dprintf(" RecvDescAssemblyList:\n");
  283. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  284. BundleCB->RecvDescAssemblyList.Flink, BundleCB->RecvDescAssemblyList.Blink);
  285. dprintf(" RecvDescHole: 0x%8.8x\n", BundleCB->RecvDescHole);
  286. dprintf(" MinReceivedSeqNumber: 0x%8.8x\n", BundleCB->MinReceivedSeqNumber);
  287. dprintf(" RecvSeqMask: 0x%8.8x\n", BundleCB->RecvSeqMask);
  288. dprintf(" RecvSeqTest: 0x%8.8x\n", BundleCB->RecvSeqTest);
  289. dprintf(" RecvFragmentsLost: %ld\n", BundleCB->RecvFragmentsLost);
  290. dprintf(" LastRecvNonIdleData: %ld%ld\n", BundleCB->LastRecvNonIdleData.HighPart, BundleCB->LastRecvNonIdleData.LowPart);
  291. dprintf(" ProtocolCBTable: 0x%8.8x\n",BundleCB->ProtocolCBTable);
  292. dprintf(" Number Of Routes: %ld\n",BundleCB->ulNumberOfRoutes);
  293. dprintf(" ProtocolCBList:\n");
  294. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  295. BundleCB->ProtocolCBList.Flink, BundleCB->ProtocolCBList.Blink);
  296. dprintf(" SendMask: 0x%8.8x\n",BundleCB->SendMask);
  297. dprintf(" LineUpInfo:\n");
  298. dprintf(" BundleSpeed: %ld\n", BundleCB->LineUpInfo.BundleSpeed);
  299. dprintf(" MaxSendSize: %ld\n", BundleCB->LineUpInfo.ulMaximumTotalSize);
  300. dprintf(" LinkQuality: %s\n", WanQuality[BundleCB->LineUpInfo.Quality]);
  301. dprintf(" SendWindow: %d\n", BundleCB->LineUpInfo.usSendWindow);
  302. dprintf(" SendVJInfo:\n");
  303. dprintf(" IPCompressionProtocol: 0x%4.4x\n", BundleCB->SendVJInfo.IPCompressionProtocol);
  304. dprintf(" MaxSlotID: %d\n", BundleCB->SendVJInfo.MaxSlotID);
  305. dprintf(" CompSlotID: %d\n", BundleCB->SendVJInfo.CompSlotID);
  306. dprintf(" RecvVJInfo:\n");
  307. dprintf(" IPCompressionProtocol: 0x%4.4x\n", BundleCB->RecvVJInfo.IPCompressionProtocol);
  308. dprintf(" MaxSlotID: %d\n", BundleCB->RecvVJInfo.MaxSlotID);
  309. dprintf(" CompSlotID: %d\n", BundleCB->RecvVJInfo.CompSlotID);
  310. dprintf(" VJCompress: 0x%8.8x\n", BundleCB->VJCompress);
  311. LMSessionKey = BundleCB->SendCompInfo.LMSessionKey;
  312. UserSessionKey = BundleCB->SendCompInfo.UserSessionKey;
  313. Challenge = BundleCB->SendCompInfo.Challenge;
  314. dprintf(" SendCompInfo:\n");
  315. dprintf(" MSCompType: 0x%8.8x\n", BundleCB->SendCompInfo.MSCompType);
  316. dprintf(" CompType: 0x%2.2x\n", BundleCB->SendCompInfo.CompType);
  317. dprintf(" CompLength: 0x%4.4x\n", BundleCB->SendCompInfo.CompLength);
  318. dprintf(" LMSessionKey: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  319. LMSessionKey[0], LMSessionKey[1], LMSessionKey[2], LMSessionKey[3],
  320. LMSessionKey[4], LMSessionKey[5], LMSessionKey[6], LMSessionKey[7]);
  321. dprintf(" UserSessionKey: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  322. UserSessionKey[0], UserSessionKey[1], UserSessionKey[2], UserSessionKey[3],
  323. UserSessionKey[4], UserSessionKey[5], UserSessionKey[6], UserSessionKey[7]);
  324. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  325. UserSessionKey[8], UserSessionKey[9], UserSessionKey[10], UserSessionKey[11],
  326. UserSessionKey[12], UserSessionKey[13], UserSessionKey[14], UserSessionKey[15]);
  327. dprintf(" Challenge: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  328. Challenge[0], Challenge[1], Challenge[2], Challenge[3],
  329. Challenge[4], Challenge[5], Challenge[6], Challenge[7]);
  330. dprintf(" SendCompressContext: 0x%8.8x\n", BundleCB->SendCompressContext);
  331. LMSessionKey = BundleCB->RecvCompInfo.LMSessionKey;
  332. UserSessionKey = BundleCB->RecvCompInfo.UserSessionKey;
  333. Challenge = BundleCB->RecvCompInfo.Challenge;
  334. dprintf(" RecvCompInfo:\n");
  335. dprintf(" MSCompType: 0x%8.8x\n", BundleCB->RecvCompInfo.MSCompType);
  336. dprintf(" CompType: 0x%2.2x\n", BundleCB->RecvCompInfo.CompType);
  337. dprintf(" CompLength: 0x%4.4x\n", BundleCB->RecvCompInfo.CompLength);
  338. dprintf(" LMSessionKey: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  339. LMSessionKey[0], LMSessionKey[1], LMSessionKey[2], LMSessionKey[3],
  340. LMSessionKey[4], LMSessionKey[5], LMSessionKey[6], LMSessionKey[7]);
  341. dprintf(" UserSessionKey: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  342. UserSessionKey[0], UserSessionKey[1], UserSessionKey[2], UserSessionKey[3],
  343. UserSessionKey[4], UserSessionKey[5], UserSessionKey[6], UserSessionKey[7]);
  344. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  345. UserSessionKey[8], UserSessionKey[9], UserSessionKey[10], UserSessionKey[11],
  346. UserSessionKey[12], UserSessionKey[13], UserSessionKey[14], UserSessionKey[15]);
  347. dprintf(" Challenge: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  348. Challenge[0], Challenge[1], Challenge[2], Challenge[3],
  349. Challenge[4], Challenge[5], Challenge[6], Challenge[7]);
  350. dprintf(" RecvCompressContext: 0x%8.8x\n", BundleCB->RecvCompressContext);
  351. EncryptInfo = &BundleCB->SendEncryptInfo;
  352. dprintf(" SendEncryptInfo:\n");
  353. dprintf(" StartKey : 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  354. EncryptInfo->StartKey[0],EncryptInfo->StartKey[1],
  355. EncryptInfo->StartKey[2],EncryptInfo->StartKey[3],
  356. EncryptInfo->StartKey[4],EncryptInfo->StartKey[5],
  357. EncryptInfo->StartKey[6],EncryptInfo->StartKey[7]);
  358. dprintf(" : 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  359. EncryptInfo->StartKey[8],EncryptInfo->StartKey[9],
  360. EncryptInfo->StartKey[10],EncryptInfo->StartKey[11],
  361. EncryptInfo->StartKey[12],EncryptInfo->StartKey[13],
  362. EncryptInfo->StartKey[14],EncryptInfo->StartKey[15]);
  363. dprintf(" SessionKey: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  364. EncryptInfo->SessionKey[0],EncryptInfo->SessionKey[1],
  365. EncryptInfo->SessionKey[2],EncryptInfo->SessionKey[3],
  366. EncryptInfo->SessionKey[4],EncryptInfo->SessionKey[5],
  367. EncryptInfo->SessionKey[6],EncryptInfo->SessionKey[7]);
  368. dprintf(" : 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  369. EncryptInfo->SessionKey[8], EncryptInfo->SessionKey[9],
  370. EncryptInfo->SessionKey[10],EncryptInfo->SessionKey[11],
  371. EncryptInfo->SessionKey[12],EncryptInfo->SessionKey[13],
  372. EncryptInfo->SessionKey[14],EncryptInfo->SessionKey[15]);
  373. dprintf(" SessionKeyLength: %ld\n", EncryptInfo->SessionKeyLength);
  374. #if 0
  375. SHAContext = (A_SHA_CTX*)&EncryptInfo->Context;
  376. SHACommon = &SHAContext->commonContext;
  377. dprintf(" SHAContext:\n");
  378. dprintf(" FinishFlag: 0x%8.8x\n", SHAContext->FinishFlag);
  379. dprintf(" HashVal: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  380. SHAContext->HashVal[0], SHAContext->HashVal[1], SHAContext->HashVal[2], SHAContext->HashVal[3], SHAContext->HashVal[4],
  381. SHAContext->HashVal[5], SHAContext->HashVal[6], SHAContext->HashVal[7], SHAContext->HashVal[8], SHAContext->HashVal[9]);
  382. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  383. SHAContext->HashVal[10], SHAContext->HashVal[11], SHAContext->HashVal[12], SHAContext->HashVal[13], SHAContext->HashVal[14],
  384. SHAContext->HashVal[15], SHAContext->HashVal[16], SHAContext->HashVal[17], SHAContext->HashVal[18], SHAContext->HashVal[19]);
  385. dprintf(" state: 0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x\n",
  386. SHACommon->state[0], SHACommon->state[1], SHACommon->state[2], SHACommon->state[3], SHACommon->state[4]);
  387. dprintf(" count: %ld %ld\n", SHACommon->count[0], SHACommon->count[1]);
  388. dprintf(" buffer: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  389. SHACommon->buffer[0], SHACommon->buffer[1], SHACommon->buffer[2], SHACommon->buffer[3], SHACommon->buffer[4],
  390. SHACommon->buffer[5], SHACommon->buffer[6], SHACommon->buffer[7]);
  391. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  392. SHACommon->buffer[8], SHACommon->buffer[9], SHACommon->buffer[10], SHACommon->buffer[11], SHACommon->buffer[12],
  393. SHACommon->buffer[13], SHACommon->buffer[14], SHACommon->buffer[15]);
  394. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  395. SHACommon->buffer[16], SHACommon->buffer[17], SHACommon->buffer[18], SHACommon->buffer[19], SHACommon->buffer[20],
  396. SHACommon->buffer[21], SHACommon->buffer[22], SHACommon->buffer[23]);
  397. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  398. SHACommon->buffer[24], SHACommon->buffer[25], SHACommon->buffer[26], SHACommon->buffer[27], SHACommon->buffer[28],
  399. SHACommon->buffer[29], SHACommon->buffer[30], SHACommon->buffer[31]);
  400. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  401. SHACommon->buffer[32], SHACommon->buffer[33], SHACommon->buffer[34], SHACommon->buffer[35], SHACommon->buffer[36],
  402. SHACommon->buffer[37], SHACommon->buffer[38], SHACommon->buffer[39]);
  403. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  404. SHACommon->buffer[40], SHACommon->buffer[41], SHACommon->buffer[42], SHACommon->buffer[43], SHACommon->buffer[44],
  405. SHACommon->buffer[45], SHACommon->buffer[46], SHACommon->buffer[47]);
  406. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  407. SHACommon->buffer[48], SHACommon->buffer[49], SHACommon->buffer[50], SHACommon->buffer[51], SHACommon->buffer[52],
  408. SHACommon->buffer[53], SHACommon->buffer[54], SHACommon->buffer[55]);
  409. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  410. SHACommon->buffer[56], SHACommon->buffer[57], SHACommon->buffer[58], SHACommon->buffer[59], SHACommon->buffer[60],
  411. SHACommon->buffer[61], SHACommon->buffer[62], SHACommon->buffer[63]);
  412. dprintf(" SendRC4Key: 0x%8.8x\n", BundleCB->SendRC4Key);
  413. #endif
  414. EncryptInfo = &BundleCB->RecvEncryptInfo;
  415. dprintf(" RecvEncryptInfo:\n");
  416. dprintf(" StartKey : 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  417. EncryptInfo->StartKey[0],EncryptInfo->StartKey[1],
  418. EncryptInfo->StartKey[2],EncryptInfo->StartKey[3],
  419. EncryptInfo->StartKey[4],EncryptInfo->StartKey[5],
  420. EncryptInfo->StartKey[6],EncryptInfo->StartKey[7]);
  421. dprintf(" : 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  422. EncryptInfo->StartKey[8],EncryptInfo->StartKey[9],
  423. EncryptInfo->StartKey[10],EncryptInfo->StartKey[11],
  424. EncryptInfo->StartKey[12],EncryptInfo->StartKey[13],
  425. EncryptInfo->StartKey[14],EncryptInfo->StartKey[15]);
  426. dprintf(" SessionKey: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  427. EncryptInfo->SessionKey[0],EncryptInfo->SessionKey[1],
  428. EncryptInfo->SessionKey[2],EncryptInfo->SessionKey[3],
  429. EncryptInfo->SessionKey[4],EncryptInfo->SessionKey[5],
  430. EncryptInfo->SessionKey[6],EncryptInfo->SessionKey[7]);
  431. dprintf(" : 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  432. EncryptInfo->SessionKey[8], EncryptInfo->SessionKey[9],
  433. EncryptInfo->SessionKey[10],EncryptInfo->SessionKey[11],
  434. EncryptInfo->SessionKey[12],EncryptInfo->SessionKey[13],
  435. EncryptInfo->SessionKey[14],EncryptInfo->SessionKey[15]);
  436. dprintf(" SessionKeyLength: %ld\n", EncryptInfo->SessionKeyLength);
  437. #if 0
  438. SHAContext = (A_SHA_CTX*)&EncryptInfo->Context;
  439. SHACommon = &SHAContext->commonContext;
  440. dprintf(" SHAContext:\n");
  441. dprintf(" FinishFlag: 0x%8.8x\n", SHAContext->FinishFlag);
  442. dprintf(" HashVal: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  443. SHAContext->HashVal[0], SHAContext->HashVal[1], SHAContext->HashVal[2], SHAContext->HashVal[3], SHAContext->HashVal[4],
  444. SHAContext->HashVal[5], SHAContext->HashVal[6], SHAContext->HashVal[7], SHAContext->HashVal[8], SHAContext->HashVal[9]);
  445. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  446. SHAContext->HashVal[10], SHAContext->HashVal[11], SHAContext->HashVal[12], SHAContext->HashVal[13], SHAContext->HashVal[14],
  447. SHAContext->HashVal[15], SHAContext->HashVal[16], SHAContext->HashVal[17], SHAContext->HashVal[18], SHAContext->HashVal[19]);
  448. dprintf(" state: 0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x\n",
  449. SHACommon->state[0], SHACommon->state[1], SHACommon->state[2], SHACommon->state[3], SHACommon->state[4]);
  450. dprintf(" count: %ld %ld\n", SHACommon->count[0], SHACommon->count[1]);
  451. dprintf(" buffer: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  452. SHACommon->buffer[0], SHACommon->buffer[1], SHACommon->buffer[2], SHACommon->buffer[3], SHACommon->buffer[4],
  453. SHACommon->buffer[5], SHACommon->buffer[6], SHACommon->buffer[7]);
  454. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  455. SHACommon->buffer[8], SHACommon->buffer[9], SHACommon->buffer[10], SHACommon->buffer[11], SHACommon->buffer[12],
  456. SHACommon->buffer[13], SHACommon->buffer[14], SHACommon->buffer[15]);
  457. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  458. SHACommon->buffer[16], SHACommon->buffer[17], SHACommon->buffer[18], SHACommon->buffer[19], SHACommon->buffer[20],
  459. SHACommon->buffer[21], SHACommon->buffer[22], SHACommon->buffer[23]);
  460. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  461. SHACommon->buffer[24], SHACommon->buffer[25], SHACommon->buffer[26], SHACommon->buffer[27], SHACommon->buffer[28],
  462. SHACommon->buffer[29], SHACommon->buffer[30], SHACommon->buffer[31]);
  463. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  464. SHACommon->buffer[32], SHACommon->buffer[33], SHACommon->buffer[34], SHACommon->buffer[35], SHACommon->buffer[36],
  465. SHACommon->buffer[37], SHACommon->buffer[38], SHACommon->buffer[39]);
  466. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  467. SHACommon->buffer[40], SHACommon->buffer[41], SHACommon->buffer[42], SHACommon->buffer[43], SHACommon->buffer[44],
  468. SHACommon->buffer[45], SHACommon->buffer[46], SHACommon->buffer[47]);
  469. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  470. SHACommon->buffer[48], SHACommon->buffer[49], SHACommon->buffer[50], SHACommon->buffer[51], SHACommon->buffer[52],
  471. SHACommon->buffer[53], SHACommon->buffer[54], SHACommon->buffer[55]);
  472. dprintf(" 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  473. SHACommon->buffer[56], SHACommon->buffer[57], SHACommon->buffer[58], SHACommon->buffer[59], SHACommon->buffer[60],
  474. SHACommon->buffer[61], SHACommon->buffer[62], SHACommon->buffer[63]);
  475. #endif
  476. dprintf(" RecvRC4Key: 0x%8.8x\n", BundleCB->RecvRC4Key);
  477. dprintf(" SCoherencyCounter: 0x%4.4x\n", BundleCB->SCoherencyCounter);
  478. dprintf(" RCoherencyCounter: 0x%4.4x\n", BundleCB->RCoherencyCounter);
  479. dprintf(" LastRC4Reset: 0x%4.4x\n", BundleCB->LastRC4Reset);
  480. dprintf(" CCPIdentifier: 0x%4.4x\n", BundleCB->CCPIdentifier);
  481. #ifdef BANDWIDTH_ON_DEMAND
  482. dprintf(" UpperBonDInfo:\n");
  483. dprintf(" BytesThreshold: %ld\n", BundleCB->UpperBonDInfo.ulBytesThreshold);
  484. dprintf(" PercentBandwidth: %d\n", BundleCB->UpperBonDInfo.usPercentBandwidth);
  485. dprintf(" SecondsInSamplePeriod: %ld\n", BundleCB->UpperBonDInfo.ulSecondsInSamplePeriod);
  486. dprintf(" State: 0x%8.8x\n", BundleCB->UpperBonDInfo.State);
  487. dprintf(" StartTime: 0x%8.8x%8.8x\n",
  488. BundleCB->UpperBonDInfo.StartTime.HighPart, BundleCB->UpperBonDInfo.StartTime.LowPart);
  489. dprintf(" SampleTable:\n");
  490. dprintf(" FirstIndex: %ld\n", BundleCB->UpperBonDInfo.SampleTable.ulFirstIndex);
  491. dprintf(" CurrentIndex: %ld\n", BundleCB->UpperBonDInfo.SampleTable.ulCurrentIndex);
  492. dprintf(" CurrentSampleByteCount: %ld\n", BundleCB->UpperBonDInfo.SampleTable.ulCurrentSampleByteCount);
  493. dprintf(" SampleArraySize: %ld\n", BundleCB->UpperBonDInfo.SampleTable.ulSampleArraySize);
  494. dprintf(" SampleRate: 0x%8.8x%8.8x\n",
  495. BundleCB->UpperBonDInfo.SampleTable.SampleRate.HighPart, BundleCB->UpperBonDInfo.SampleTable.SampleRate.LowPart);
  496. dprintf(" SamplePeriod: 0x%8.8x%8.8x\n",
  497. BundleCB->UpperBonDInfo.SampleTable.SamplePeriod.HighPart, BundleCB->UpperBonDInfo.SampleTable.SamplePeriod.LowPart);
  498. dprintf(" SampleTable:\n");
  499. for (i = 0; i < SAMPLE_ARRAY_SIZE; i++) {
  500. dprintf(" Sample %d:\n", i);
  501. dprintf(" BytesThisSend: %ld\n",BundleCB->UpperBonDInfo.SampleTable.SampleArray[i].ulBytesThisSend);
  502. dprintf(" ReferenceCount: %ld\n",BundleCB->UpperBonDInfo.SampleTable.SampleArray[i].ulReferenceCount);
  503. dprintf(" TimeStample: 0x%8.8x%8.8x\n",
  504. BundleCB->UpperBonDInfo.SampleTable.SampleArray[i].TimeStamp.HighPart, BundleCB->UpperBonDInfo.SampleTable.SampleArray[i].TimeStamp.LowPart);
  505. }
  506. dprintf(" LowerBonDInfo:\n");
  507. dprintf(" BytesThreshold: %ld\n", BundleCB->LowerBonDInfo.ulBytesThreshold);
  508. dprintf(" PercentBandwidth: %d\n", BundleCB->LowerBonDInfo.usPercentBandwidth);
  509. dprintf(" SecondsInSamplePeriod: %ld\n", BundleCB->LowerBonDInfo.ulSecondsInSamplePeriod);
  510. dprintf(" State: 0x%8.8x\n", BundleCB->LowerBonDInfo.State);
  511. dprintf(" StartTime: 0x%8.8x%8.8x\n",
  512. BundleCB->LowerBonDInfo.StartTime.HighPart, BundleCB->LowerBonDInfo.StartTime.LowPart);
  513. dprintf(" SampleTable:\n");
  514. dprintf(" FirstIndex: %ld\n", BundleCB->LowerBonDInfo.SampleTable.ulFirstIndex);
  515. dprintf(" CurrentIndex: %ld\n", BundleCB->LowerBonDInfo.SampleTable.ulCurrentIndex);
  516. dprintf(" CurrentSampleByteCount: %ld\n", BundleCB->LowerBonDInfo.SampleTable.ulCurrentSampleByteCount);
  517. dprintf(" SampleArraySize: %ld\n", BundleCB->LowerBonDInfo.SampleTable.ulSampleArraySize);
  518. dprintf(" SampleRate: 0x%8.8x%8.8x\n",
  519. BundleCB->LowerBonDInfo.SampleTable.SampleRate.HighPart, BundleCB->LowerBonDInfo.SampleTable.SampleRate.LowPart);
  520. dprintf(" SamplePeriod: 0x%8.8x%8.8x\n",
  521. BundleCB->LowerBonDInfo.SampleTable.SamplePeriod.HighPart, BundleCB->LowerBonDInfo.SampleTable.SamplePeriod.LowPart);
  522. dprintf(" SampleArray:\n");
  523. for (i = 0; i < SAMPLE_ARRAY_SIZE; i++) {
  524. dprintf(" Sample %d:\n", i);
  525. dprintf(" BytesThisSend: %ld\n",BundleCB->LowerBonDInfo.SampleTable.SampleArray[i].ulBytesThisSend);
  526. dprintf(" ReferenceCount: %ld\n",BundleCB->LowerBonDInfo.SampleTable.SampleArray[i].ulReferenceCount);
  527. dprintf(" TimeStample: 0x%8.8x%8.8x\n",
  528. BundleCB->LowerBonDInfo.SampleTable.SampleArray[i].TimeStamp.HighPart, BundleCB->LowerBonDInfo.SampleTable.SampleArray[i].TimeStamp.LowPart);
  529. }
  530. #endif
  531. dprintf(" FriendlyName: %s\n", BundleCB->Name);
  532. dprintf(" BundleStats:\n");
  533. dprintf(" BytesTransmitted: %ld\n", BundleCB->BundleStats.BytesTransmitted);
  534. dprintf(" BytesReceived: %ld\n", BundleCB->BundleStats.BytesReceived);
  535. dprintf(" FramesTransmitted: %ld\n", BundleCB->BundleStats.FramesTransmitted);
  536. dprintf(" FramesReceived: %ld\n", BundleCB->BundleStats.FramesReceived);
  537. dprintf(" CRCErrors: %ld\n", BundleCB->BundleStats.CRCErrors);
  538. dprintf(" TimeoutErrors: %ld\n", BundleCB->BundleStats.TimeoutErrors);
  539. dprintf(" AlignmentErrors: %ld\n", BundleCB->BundleStats.AlignmentErrors);
  540. dprintf(" SerialOverrunErrors: %ld\n", BundleCB->BundleStats.SerialOverrunErrors);
  541. dprintf(" FramingErrors: %ld\n", BundleCB->BundleStats.FramingErrors);
  542. dprintf(" BufferOverrunErrors: %ld\n", BundleCB->BundleStats.BufferOverrunErrors);
  543. dprintf(" ByteTransmittedUncompressed: %ld\n", BundleCB->BundleStats.BytesTransmittedUncompressed);
  544. dprintf(" BytesReceivedUncompressed: %ld\n", BundleCB->BundleStats.BytesReceivedUncompressed);
  545. dprintf(" BytesTransmittedCompressed: %ld\n", BundleCB->BundleStats.BytesTransmittedCompressed);
  546. dprintf(" BytesReceivedCompressed: %ld\n", BundleCB->BundleStats.BytesReceivedCompressed);
  547. }
  548. VOID
  549. DisplayProtocolCB(
  550. DWORD Address,
  551. PPROTOCOLCB ProtocolCB
  552. )
  553. {
  554. DWORD i;
  555. dprintf("\n\nProtocolCB: 0x%8.8x\n", Address);
  556. dprintf(" Linkage:\n");
  557. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  558. ProtocolCB->Linkage.Flink, ProtocolCB->Linkage.Blink);
  559. dprintf(" ProtocolHandle: 0x%8.8x\n", ProtocolCB->hProtocolHandle);
  560. dprintf(" ReferenceCount: %ld\n", ProtocolCB->ulReferenceCount);
  561. dprintf(" HeadNdisPacketQueue: 0x%8.8x\n", ProtocolCB->HeadNdisPacketQueue);
  562. dprintf(" TailNdisPacketQueue: 0x%8.8x\n", ProtocolCB->TailNdisPacketQueue);
  563. dprintf(" SendMaskBit: 0x%8.8x\n", ProtocolCB->SendMaskBit);
  564. dprintf(" AdapterCB: 0x%8.8x\n", ProtocolCB->AdapterCB);
  565. dprintf(" BundleCB: 0x%8.8x\n", ProtocolCB->BundleCB);
  566. dprintf(" Flags: 0x%8.8x\n", ProtocolCB->Flags);
  567. dprintf(" ProtocolType: 0x%4.4x\n", ProtocolCB->usProtocolType);
  568. dprintf(" PPP ProtocolID: 0x%4.4x\n", ProtocolCB->usPPPProtocolID);
  569. dprintf(" LastRecvNonIdleData: %ld%ld\n", ProtocolCB->LastRecvNonIdleData.HighPart, ProtocolCB->LastRecvNonIdleData.LowPart);
  570. dprintf(" NonIdleDetectFunc: 0x%8.8x\n", ProtocolCB->NonIdleDetectFunc);
  571. #ifdef BANDWIDTH_ON_DEMAND
  572. dprintf(" Priority: %ld\n", ProtocolCB->usPriority);
  573. dprintf(" Bytes Quota: %ld\n", ProtocolCB->ulByteQuota);
  574. dprintf(" SampleTable:\n");
  575. dprintf(" FirstIndex: %ld\n", ProtocolCB->SampleTable.ulFirstIndex);
  576. dprintf(" CurrentIndex: %ld\n", ProtocolCB->SampleTable.ulCurrentIndex);
  577. dprintf(" CurrentSampleByteCount: %ld\n", ProtocolCB->SampleTable.ulCurrentSampleByteCount);
  578. dprintf(" SampleArraySize: %ld\n", ProtocolCB->SampleTable.ulSampleArraySize);
  579. dprintf(" SampleRate: 0x%8.8x%8.8x\n",
  580. ProtocolCB->SampleTable.SampleRate.HighPart, ProtocolCB->SampleTable.SampleRate.LowPart);
  581. dprintf(" SamplePeriod: 0x%8.8x%8.8x\n",
  582. ProtocolCB->SampleTable.SamplePeriod.HighPart, ProtocolCB->SampleTable.SamplePeriod.LowPart);
  583. dprintf(" SampleArray:\n");
  584. for (i = 0; i < SAMPLE_ARRAY_SIZE; i++) {
  585. dprintf(" Sample %d:\n", i);
  586. dprintf(" BytesThisSend: %ld\n",ProtocolCB->SampleTable.SampleArray[i].ulBytesThisSend);
  587. dprintf(" ReferenceCount: %ld\n",ProtocolCB->SampleTable.SampleArray[i].ulReferenceCount);
  588. dprintf(" TimeStample: 0x%8.8x%8.8x\n",
  589. ProtocolCB->SampleTable.SampleArray[i].TimeStamp.HighPart, ProtocolCB->SampleTable.SampleArray[i].TimeStamp.LowPart);
  590. }
  591. #endif
  592. dprintf(" TransportHandle: 0x%8.8x\n", ProtocolCB->hTransportHandle);
  593. dprintf(" NdisWanAddress: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  594. ProtocolCB->NdisWanAddress[0], ProtocolCB->NdisWanAddress[1], ProtocolCB->NdisWanAddress[2],
  595. ProtocolCB->NdisWanAddress[3], ProtocolCB->NdisWanAddress[4], ProtocolCB->NdisWanAddress[5]);
  596. dprintf(" TransportAddress: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
  597. ProtocolCB->TransportAddress[0], ProtocolCB->TransportAddress[1], ProtocolCB->TransportAddress[2],
  598. ProtocolCB->TransportAddress[3], ProtocolCB->TransportAddress[4], ProtocolCB->TransportAddress[5]);
  599. dprintf(" DeviceName: Buffer: 0x%8.8x Length: %ld\n",
  600. ProtocolCB->DeviceName.Buffer, ProtocolCB->DeviceName.Length);
  601. }
  602. VOID
  603. DisplayWanPacket(
  604. DWORD Address,
  605. PNDIS_WAN_PACKET Packet
  606. )
  607. {
  608. dprintf("\n\nWanPacket: 0x%8.8x\n", Address);
  609. dprintf(" WanPacketQueue:\n");
  610. dprintf(" Flink: 0x%8.8x Blink: 0x%8.8x\n",
  611. Packet->WanPacketQueue.Flink, Packet->WanPacketQueue.Blink);
  612. dprintf(" CurrentBuffer: 0x%8.8x\n", Packet->CurrentBuffer);
  613. dprintf(" CurrentLength: %ld\n", Packet->CurrentLength);
  614. dprintf(" StartBuffer: 0x%8.8x\n", Packet->StartBuffer);
  615. dprintf(" EndBuffer: 0x%8.8x\n", Packet->EndBuffer);
  616. dprintf(" PR1 (LinkCB): 0x%8.8x\n", Packet->ProtocolReserved1);
  617. dprintf(" PR2 (NdisPacket): 0x%8.8x\n", Packet->ProtocolReserved2);
  618. dprintf(" PR3 (ProtocolCB): 0x%8.8x\n", Packet->ProtocolReserved3);
  619. dprintf(" PR4 (BytesSent): %ld\n", Packet->ProtocolReserved4);
  620. dprintf(" MR1: 0x%8.8x\n", Packet->MacReserved1);
  621. dprintf(" MR2: 0x%8.8x\n", Packet->MacReserved2);
  622. dprintf(" MR3: 0x%8.8x\n", Packet->MacReserved3);
  623. dprintf(" MR4: 0x%8.8x\n", Packet->MacReserved4);
  624. }
  625. VOID
  626. DisplayNdisPacket(
  627. DWORD Address,
  628. PNDIS_PACKET Packet
  629. )
  630. {
  631. dprintf("\n\nNdisPacket: 0x%8.8x\n", Address);
  632. dprintf(" Private:\n");
  633. dprintf(" PhysicalCount: 0x%8.8x\n", Packet->Private.PhysicalCount);
  634. dprintf(" TotalLength: %ld\n", Packet->Private.TotalLength);
  635. dprintf(" BufferHead: 0x%8.8x\n", Packet->Private.Head);
  636. dprintf(" BufferTail: 0x%8.8x\n", Packet->Private.Tail);
  637. dprintf(" Pool: 0x%8.8x\n", Packet->Private.Pool);
  638. dprintf(" Count: 0x%8.8x\n", Packet->Private.Count);
  639. dprintf(" Flags: 0x%8.8x\n", Packet->Private.Flags);
  640. dprintf(" ValidCounts: %d\n", Packet->Private.ValidCounts);
  641. dprintf(" MR1 (Next/MagicNumber): 0x%8.8x\n", *((PDWORD)&Packet->MiniportReserved[0]));
  642. dprintf(" MR2 (ReferenceCount): 0x%4.4x (Flags): 0x%4.4x\n",
  643. *((PWORD)&Packet->MiniportReserved[4]),*((PWORD)&Packet->MiniportReserved[6]));
  644. dprintf(" WR1: 0x%8.8x\n", *((PDWORD)&Packet->WrapperReserved[0]));
  645. dprintf(" WR2: 0x%8.8x\n", *((PDWORD)&Packet->WrapperReserved[4]));
  646. }
  647. #if 0
  648. VOID
  649. DisplayVJContext(
  650. DWORD Address,
  651. struct slcompress *context
  652. )
  653. {
  654. dprintf("\n\nVJ Compress: 0x%8.8x\n", Address);
  655. dprintf(" last_cs (tstate): 0x%8.8x\n", context->last_cs);
  656. dprintf(" last_recv: %d\n", context->last_recv);
  657. dprintf(" last_xmit: %d\n", context->last_xmit);
  658. dprintf(" flags: 0x%4.4x\n", context->flags);
  659. dprintf(" MaxStates: %d\n", context->MaxStates);
  660. dprintf(" OutPackets: %ld\n", context->OutPackets);
  661. dprintf(" OutCompressed: %ld\n", context->OutCompressed);
  662. dprintf(" OutMisses: %ld\n", context->OutMisses);
  663. dprintf(" InUncompressed: %ld\n", context->InUncompressed);
  664. dprintf(" InCompressed: %ld\n", context->InCompressed);
  665. dprintf(" InErrors: %ld\n", context->InErrors);
  666. dprintf(" InTossed: %ld\n", context->InTossed);
  667. dprintf(" TxStates:\n");
  668. for (i = 0; i < MAX_VJ_STATES; i++) {
  669. cstate *state = &context->tstate[i];
  670. dprintf(" next : 0x%8.x8\n", state->cs_next);
  671. dprintf(" hlen : %d\n", state->cs_hlen);
  672. dprintf(" id : %d\n", state->cs_id);
  673. dprintf(" ip_hl : %d\n", state->slcs_u.ip_hl);
  674. dprintf(" ip_tos: %d\n", state->slcs_u.ip_hl);
  675. dprintf(" ip_len: %d\n", state->slcs_u.ip_hl);
  676. dprintf(" ip_id : %d\n", state->slcs_u.ip_hl);
  677. dprintf(" ip_off: %d\n", state->slcs_u.ip_hl);
  678. dprintf(" ip_ttl: %d\n", state->slcs_u.ip_hl);
  679. dprintf(" ip_p : %d\n", state->slcs_u.ip_hl);
  680. dprintf(" ip_sum: %d\n", state->slcs_u.ip_hl);
  681. dprintf(" ip_hl : %d\n", state->slcs_u.ip_hl);
  682. dprintf(" ip_hl : %d\n", state->slcs_u.ip_hl);
  683. }
  684. }
  685. #endif