summaryrefslogblamecommitdiffstats
path: root/private/ntos/ndis/ndiswan/kdexts/display.c
blob: cf412c0e93d569b7f4ef02e74bbbc2072e1009e9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543






























































































































































































































































































































































































































































































































































                                                                                                                                                             
#include <wanhelp.h>

PSTR MediumType[] =
{
	"NdisMedium802_3",
	"NdisMedium802_5",
	"NdisMediumFddi",
	"NdisMediumWan",
	"NdisMediumLocalTalk",
	"NdisMediumDix",
	"NdisMediumArcnetRaw",
	"NdisMediumArcnet878_2",
	"NdisMediumAtm",
	"NdisMediumWirelessWan",
	"NdisMediumIrda"
};

PSTR WanMediumSubtype[] =
{
    "NdisWanMediumHub",
    "NdisWanMediumX_25",
    "NdisWanMediumIsdn",
    "NdisWanMediumSerial",
    "NdisWanMediumFrameRelay",
    "NdisWanMediumAtm",
    "NdisWanMediumSonet",
    "NdisWanMediumSW56K"
};

PSTR WanHeaderFormat[] =
{
	"NdisWanHeaderNative",       // src/dest based on subtype, followed by NLPID
	"NdisWanHeaderEthernet"      // emulation of ethernet header
};

PSTR HardwareStatus[] =
{
    "NdisHardwareStatusReady",
    "NdisHardwareStatusInitializing",
    "NdisHardwareStatusReset",
    "NdisHardwareStatusClosing",
    "NdisHardwareStatusNotReady"
};

PSTR LinkCBStates[] =
{
	"LinkDown",
	"LinkGoingDown",
	"LinkUp"
};

PSTR BundleCBStates[] =
{
	"BundleDown",
	"BundleGowingDown",
	"BundleUp",
	"BundleRouted",
	"BundleUnrouting"
};

PSTR WanQuality[] =
{
	"NdisWanRaw",
	"NdisWanErrorControl",
	"NdisWanReliable"
};

PSTR DeferredQueueDesc[] =
{
	"ReceiveIndication",
	"SendComplete",
	"StatusIndication",
	"Loopback"
};

VOID
DisplayNdisWanCB(
	DWORD	Address,
	PNDISWANCB	NdisWanCB
	)
{
	dprintf("NdisWanCB: 0x%8.8x\n\n", Address);
	dprintf("   Lock: 0x%8.8x Irql: 0x%8.8x\n", NdisWanCB->Lock.SpinLock, NdisWanCB->Lock.OldIrql);
	dprintf("   NdisWrapperHandle: 0x%8.8x\n", NdisWanCB->hNdisWrapperHandle);
	dprintf("   ProtocolHandle: 0x%8.8x\n", NdisWanCB->hProtocolHandle);
	dprintf("   NumberOfProtocols: %ld\n", NdisWanCB->ulNumberOfProtocols);
	dprintf("   NumberOfLinks: %ld\n", NdisWanCB->ulNumberOfLinks);
	dprintf("   MiniumFragmentSize: 0x%8.8x\n", NdisWanCB->ulMinFragmentSize);
	dprintf("   TraceLevel: 0x%8.8x\n", NdisWanCB->ulTraceLevel);
	dprintf("   TraceMask: 0x%8.8x\n", NdisWanCB->ulTraceMask);
	dprintf("   DriverObject: 0x%8.8x\n", NdisWanCB->pDriverObject);
	dprintf("   DeviceObject: 0x%8.8x\n", NdisWanCB->pDeviceObject);
	dprintf("   PacketsSent: %ld\n", NdisWanCB->SendCount);
	dprintf("   PacketsCompleted: %ld\n", NdisWanCB->SendCompleteCount);
	dprintf("   IORecvQueueEmpty: %ld\n", NdisWanCB->IORecvError1);
	dprintf("   IORecvBeforMap: %ld\n", NdisWanCB->IORecvError2);
	dprintf("   PromiscuousAdapter: 0x%8.8x\n",NdisWanCB->PromiscuousAdapter);
}

VOID
DisplayWanAdapterCB(
	DWORD	Address,
	PWAN_ADAPTERCB	WanAdapterCB
	)
{
	dprintf("\n\nWanAdapterCB: 0x%8.8x\n", Address);

	dprintf("   Linkage:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
			WanAdapterCB->Linkage.Flink, WanAdapterCB->Linkage.Blink);

	dprintf("   Lock: 0x%8.8x Irql: 0x%8.8x\n",
			WanAdapterCB->Lock.SpinLock, WanAdapterCB->Lock.OldIrql);

	dprintf("   FreeLinkCBList:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
			WanAdapterCB->FreeLinkCBList.Flink, WanAdapterCB->FreeLinkCBList.Blink);

	dprintf("   NdisBindingHandle: 0x%8.8x\n", WanAdapterCB->hNdisBindingHandle);

	dprintf("   WanRequest: 0x%8.8x\n", WanAdapterCB->pWanRequest);
	dprintf("   LastRequest: 0x%8.8x\n", WanAdapterCB->pLastWanRequest);

	dprintf("   MiniportName: Buffer: 0x%8.8x Length: %ld\n",
			WanAdapterCB->MiniportName.Buffer, WanAdapterCB->MiniportName.Length);

	dprintf("   MediumType: %s\n", MediumType[WanAdapterCB->MediumType]);

	dprintf("   MediumSubType: %s\n", WanMediumSubtype[WanAdapterCB->MediumSubType]);

	dprintf("   WanHeaderFormat: %s\n", WanHeaderFormat[WanAdapterCB->WanHeaderFormat]);

	dprintf("   MaxFrameSize: %ld\n", WanAdapterCB->WanInfo.MaxFrameSize);

	dprintf("   MaxTransmit: %ld\n", WanAdapterCB->WanInfo.MaxTransmit);

	dprintf("   HeaderPadding: %ld\n",WanAdapterCB->WanInfo.HeaderPadding);

	dprintf("   TailPadding: %ld\n",WanAdapterCB->WanInfo.TailPadding);

	dprintf("   Endpoints: %ld\n",WanAdapterCB->WanInfo.Endpoints);

	dprintf("   MemoryFlags: 0x%8.8x\n",WanAdapterCB->WanInfo.MemoryFlags);

	dprintf("   HighestAddress: 0x%8.8x 0x%8.8x\n",
				WanAdapterCB->WanInfo.HighestAcceptableAddress.HighPart,
				WanAdapterCB->WanInfo.HighestAcceptableAddress.LowPart);

	dprintf("   FramingBits: 0x%8.8x\n",WanAdapterCB->WanInfo.FramingBits);

	dprintf("   DesiredACCM: 0x%8.8x\n",WanAdapterCB->WanInfo.DesiredACCM);
}

VOID
DisplayAdapterCB(
	DWORD	Address,
	PADAPTERCB	AdapterCB
	)
{
	DWORD	i;

	dprintf("\n\nAdapterCB: 0x%8.8x\n", Address);

	dprintf("   Linkage:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
			AdapterCB->Linkage.Flink, AdapterCB->Linkage.Blink);

	dprintf("   Lock: 0x%8.8x Irql: 0x%8.8x\n",
			AdapterCB->Lock.SpinLock, AdapterCB->Lock.OldIrql);

	dprintf("   ReferenceCount: %ld\n", AdapterCB->ulReferenceCount);

	dprintf("   MiniportAdapterHandle: 0x%8.8x\n", AdapterCB->hMiniportHandle);

	dprintf("   Flags: 0x%8.8x\n", AdapterCB->Flags);

	dprintf("   FreeDeferredQueue:\n");
	dprintf("      Head: 0x%8.8x\n", AdapterCB->FreeDeferredQueue.Head);
	dprintf("      Tail: 0x%8.8x\n", AdapterCB->FreeDeferredQueue.Tail);
	dprintf("      Count: %ld\n", AdapterCB->FreeDeferredQueue.Count);
	dprintf("      MaxCount: %ld\n", AdapterCB->FreeDeferredQueue.MaxCount);
	for (i = 0; i < MAX_DEFERRED_QUEUE_TYPES; i++) {
		dprintf("   DeferredQueue: %s\n", DeferredQueueDesc[i]);
		dprintf("      Head: 0x%8.8x\n", AdapterCB->DeferredQueue[i].Head);
		dprintf("      Tail: 0x%8.8x\n", AdapterCB->DeferredQueue[i].Tail);
		dprintf("      Count: %ld\n", AdapterCB->DeferredQueue[i].Count);
		dprintf("      MaxCount: %ld\n", AdapterCB->DeferredQueue[i].MaxCount);
	}

	dprintf("   MediumType: %s\n", MediumType[AdapterCB->MediumType]);

	dprintf("   HardwareStatus: %s\n", HardwareStatus[AdapterCB->HardwareStatus]);

	dprintf("   AdapterName: Buffer: 0x%8.8x Length: %d\n",
			AdapterCB->AdapterName.Buffer, AdapterCB->AdapterName.Length);

	dprintf("   NetworkAddress: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
			AdapterCB->NetworkAddress[0], AdapterCB->NetworkAddress[1], AdapterCB->NetworkAddress[2],
			AdapterCB->NetworkAddress[3], AdapterCB->NetworkAddress[4], AdapterCB->NetworkAddress[5]);

	dprintf("   NumberOfProtocols: %ld\n", AdapterCB->ulNumberofProtocols);

	dprintf("   ProtocolType: 0x%4.4x\n", AdapterCB->ProtocolType);

	dprintf("   NbfBundleCB: 0x%8.8x\n", AdapterCB->NbfBundleCB);
	dprintf("   NbfProtocolHandle: 0x%8.8x\n", AdapterCB->NbfProtocolHandle);

}

VOID
DisplayConnectionTable(
	DWORD	Address,
	PCONNECTION_TABLE	ConnectionTable
	)
{
	dprintf("\n\nConnectionTable: 0x%8.8x\n", Address);
	dprintf("   Lock: 0x%8.8x Irql: 0x%8.8x\n",
			ConnectionTable->Lock.SpinLock, ConnectionTable->Lock.OldIrql);
	dprintf("   AllocationSize: %ld\n", ConnectionTable->ulAllocationSize);
	dprintf("   ArraySize: %ld\n", ConnectionTable->ulArraySize);
	dprintf("   Number Of Active Links: %ld\n", ConnectionTable->ulNumActiveLinks);
	dprintf("   Number Of Active Bundles: %ld\n", ConnectionTable->ulNumActiveBundles);
	dprintf("   LinkArray: 0x%8.8x\n", ConnectionTable->LinkArray);
	dprintf("   BundleArray: 0x%8.8x\n", ConnectionTable->BundleArray);
}

VOID
DisplayLinkCB(
	DWORD	Address,
	PLINKCB	LinkCB
	)
{
	dprintf("\n\nLinkCB: 0x%8.8x\n", Address);
	dprintf("   Linkage:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
	LinkCB->Linkage.Flink, LinkCB->Linkage.Blink);
	dprintf("   Handle: 0x%8.8x\n", LinkCB->hLinkHandle);
	dprintf("   User Context: 0x%8.8x\n", LinkCB->hLinkContext);
	dprintf("   ReferenceCount: %ld\n", LinkCB->ulReferenceCount);
	dprintf("   State: %s\n", LinkCBStates[LinkCB->State]);
	dprintf("   WanAdapterCB: 0x%8.8x\n", LinkCB->WanAdapterCB);
	dprintf("   BundleCB: 0x%8.8x\n", LinkCB->BundleCB);
	dprintf("   WanMiniport Lineup Context: 0x%8.8x\n", LinkCB->NdisLinkHandle);
	dprintf("   WanPacketPool:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
	LinkCB->WanPacketPool.Flink, LinkCB->WanPacketPool.Blink);
	dprintf("   WanPacketCount: %ld\n", LinkCB->ulWanPacketCount);
	dprintf("   OutstandingFrames: %ld\n", LinkCB->OutstandingFrames);
	dprintf("   LinkBandwidth: %ld\n", LinkCB->ulBandwidth);
	dprintf("   LinkInfo:\n");
	dprintf("      MaxSendFrameSize: %ld\n", LinkCB->LinkInfo.MaxSendFrameSize);
	dprintf("      MaxRecvFrameSize: %ld\n", LinkCB->LinkInfo.MaxRecvFrameSize);
	dprintf("      HeaderPadding: %ld\n", LinkCB->LinkInfo.HeaderPadding);
	dprintf("      TailPadding: %ld\n", LinkCB->LinkInfo.TailPadding);
	dprintf("      SendFramingBits: 0x%8.8x\n", LinkCB->LinkInfo.SendFramingBits);
	dprintf("      RecvFramingBits: 0x%8.8x\n", LinkCB->LinkInfo.RecvFramingBits);
	dprintf("      SendCompressionBits: 0x%8.8x\n", LinkCB->LinkInfo.SendCompressionBits);
	dprintf("      RecvCompressionBits: 0x%8.8x\n", LinkCB->LinkInfo.RecvCompressionBits);
	dprintf("      SendACCM: 0x%8.8x\n", LinkCB->LinkInfo.SendACCM);
	dprintf("      RecvACCM: 0x%8.8x\n", LinkCB->LinkInfo.RecvACCM);
	dprintf("      MaxRSendFrameSize: %ld\n", LinkCB->LinkInfo.MaxRSendFrameSize);
	dprintf("      MaxRRecvFrameSize: %ld\n", LinkCB->LinkInfo.MaxRRecvFrameSize);
	dprintf("   LineUpInfo:\n");
	dprintf("      LinkSpeed: %ld\n", LinkCB->LineUpInfo.LinkSpeed);
	dprintf("      Quality: 0x%8.8x\n", LinkCB->LineUpInfo.Quality);
	dprintf("      SendWindow: %d\n", LinkCB->LineUpInfo.SendWindow);
	dprintf("      ConnectionWrapperID: 0x%8.8x\n", LinkCB->LineUpInfo.ConnectionWrapperID);
	dprintf("      NdisLinkHandle: 0x%8.8x\n", LinkCB->LineUpInfo.NdisLinkHandle);
	dprintf("      NdisLinkContext: 0x%8.8x\n", LinkCB->LineUpInfo.NdisLinkContext);
	dprintf("   FriendlyName: %s\n", LinkCB->Name);
	dprintf("   LinkStats:\n");
	dprintf("      BytesTransmitted: %ld\n", LinkCB->LinkStats.BytesTransmitted);
	dprintf("      BytesReceived: %ld\n", LinkCB->LinkStats.BytesReceived);
	dprintf("      FramesTransmitted: %ld\n", LinkCB->LinkStats.FramesTransmitted);
	dprintf("      FramesReceived: %ld\n", LinkCB->LinkStats.FramesReceived);

	dprintf("      CRCErrors: %ld\n", LinkCB->LinkStats.CRCErrors);
	dprintf("      TimeoutErrors: %ld\n", LinkCB->LinkStats.TimeoutErrors);
	dprintf("      AlignmentErrors: %ld\n", LinkCB->LinkStats.AlignmentErrors);
	dprintf("      SerialOverrunErrors: %ld\n", LinkCB->LinkStats.SerialOverrunErrors);
	dprintf("      FramingErrors: %ld\n", LinkCB->LinkStats.FramingErrors);
	dprintf("      BufferOverrunErrors: %ld\n", LinkCB->LinkStats.BufferOverrunErrors);
	dprintf("      ByteTransmittedUncompressed: %ld\n", LinkCB->LinkStats.BytesTransmittedUncompressed);
	dprintf("      BytesReceivedUncompressed: %ld\n", LinkCB->LinkStats.BytesReceivedUncompressed);
	dprintf("      BytesTransmittedCompressed: %ld\n", LinkCB->LinkStats.BytesTransmittedCompressed);
	dprintf("      BytesReceivedCompressed: %ld\n", LinkCB->LinkStats.BytesReceivedCompressed);
}

VOID
DisplayBundleCB(
	DWORD	Address,
	PBUNDLECB	BundleCB
	)
{
	DWORD	i;

	dprintf("\n\nBundleCB: 0x%8.8x\n", Address);
	dprintf("   Handle: 0x%8.8x\n",BundleCB->hBundleHandle);
	dprintf("   ReferenceCount: %ld\n",BundleCB->ulReferenceCount);
	dprintf("   State: %s\n",BundleCBStates[BundleCB->State]);
	dprintf("   LinkCBList:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
	BundleCB->LinkCBList.Flink, BundleCB->LinkCBList.Blink);
	dprintf("   LinkCBCount: %ld\n",BundleCB->ulLinkCBCount);
	dprintf("   FramingInfo:\n");
	dprintf("      SendFramingBits: 0x%8.8x\n", BundleCB->FramingInfo.SendFramingBits);
	dprintf("      RecvFramingBits: 0x%8.8x\n", BundleCB->FramingInfo.RecvFramingBits);
	dprintf("      MaxRSendFrameSize: %ld\n", BundleCB->FramingInfo.MaxRSendFrameSize);
	dprintf("      MaxRRecvFrameSize: %ld\n", BundleCB->FramingInfo.MaxRRecvFrameSize);
	dprintf("   NextLinkToXmit: 0x%8.8x\n",BundleCB->NextLinkToXmit);
	dprintf("   SendingLinks: %d\n", BundleCB->SendingLinks);
	dprintf("   SendPacketQueue:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
	BundleCB->SendPacketQueue.Flink, BundleCB->SendPacketQueue.Blink);
	dprintf("   SendSequenceNumber: 0x%8.8x\n", BundleCB->SendSeqNumber);
	dprintf("   MaxSendSequenceNumber: 0x%8.8x\n", BundleCB->MaxSendSeqNumber);
	dprintf("   SendSequenceMask: 0x%8.8x\n", BundleCB->SendSeqMask);
	dprintf("   Flags: 0x%8.8x\n",BundleCB->Flags);
	dprintf("   OutstandingFrames: %ld\n",BundleCB->OutstandingFrames);
	dprintf("   RecvDescPool:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
	BundleCB->RecvDescPool.Flink, BundleCB->RecvDescPool.Blink);
	dprintf("   RecvDesc Count: %ld\n", BundleCB->RecvDescCount);
	dprintf("   RecvDesc Max Count: %ld\n", BundleCB->RecvDescMax);
	dprintf("   RecvDescAssemblyList:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
	BundleCB->RecvDescAssemblyList.Flink, BundleCB->RecvDescAssemblyList.Blink);
	dprintf("   RecvDescHole: 0x%8.8x\n", BundleCB->RecvDescHole);
	dprintf("   MaxRecvSeqNumber: 0x%8.8x\n", BundleCB->MaxRecvSeqNumber);
	dprintf("   RecvSeqMask: 0x%8.8x\n", BundleCB->RecvSeqMask);
	dprintf("   TimeToLive: %ld\n", BundleCB->TimeToLive);
	dprintf("   RecvFragmentsLost: %ld\n", BundleCB->RecvFragmentsLost);
	dprintf("   ProtocolCBTable: 0x%8.8x\n",BundleCB->ProtocolCBTable);
	dprintf("   Number Of Routes: %ld\n",BundleCB->ulNumberOfRoutes);
	dprintf("   ProtocolCBList:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
	BundleCB->ProtocolCBList.Flink, BundleCB->ProtocolCBList.Blink);
	dprintf("   SendMask: 0x%8.8x\n",BundleCB->SendMask);
	dprintf("   LineUpInfo:\n");
	dprintf("      BundleSpeed: %ld\n", BundleCB->LineUpInfo.BundleSpeed);
	dprintf("      MaxSendSize: %ld\n", BundleCB->LineUpInfo.ulMaximumTotalSize);
	dprintf("      LinkQuality: %s\n", WanQuality[BundleCB->LineUpInfo.Quality]);
	dprintf("      SendWindow: %d\n", BundleCB->LineUpInfo.usSendWindow);
	dprintf("   SendVJInfo:\n");
	dprintf("      IPCompressionProtocol: 0x%4.4x\n", BundleCB->SendVJInfo.IPCompressionProtocol);
	dprintf("      MaxSlotID: %d\n", BundleCB->SendVJInfo.MaxSlotID);
	dprintf("      CompSlotID: %d\n", BundleCB->SendVJInfo.CompSlotID);
	dprintf("      VJCompress: 0x%8.8x\n", BundleCB->SendVJCompress);
	dprintf("   RecvVJInfo:\n");
	dprintf("      IPCompressionProtocol: 0x%4.4x\n", BundleCB->RecvVJInfo.IPCompressionProtocol);
	dprintf("      MaxSlotID: %d\n", BundleCB->RecvVJInfo.MaxSlotID);
	dprintf("      CompSlotID: %d\n", BundleCB->RecvVJInfo.CompSlotID);
	dprintf("      VJCompress: 0x%8.8x\n", BundleCB->RecvVJCompress);
	dprintf("   SendCompInfo:\n");
	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",
	BundleCB->SendCompInfo.SessionKey[0],BundleCB->SendCompInfo.SessionKey[1],
	BundleCB->SendCompInfo.SessionKey[2],BundleCB->SendCompInfo.SessionKey[3],
	BundleCB->SendCompInfo.SessionKey[4],BundleCB->SendCompInfo.SessionKey[5],
	BundleCB->SendCompInfo.SessionKey[6],BundleCB->SendCompInfo.SessionKey[7]);
	dprintf("      MSCompType: 0x%8.8x\n", BundleCB->SendCompInfo.MSCompType);
	dprintf("   SendCompressContext: 0x%8.8x\n", BundleCB->SendCompressContext);
	dprintf("   RecvCompInfo:\n");
	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",
	BundleCB->RecvCompInfo.SessionKey[0],BundleCB->RecvCompInfo.SessionKey[1],
	BundleCB->RecvCompInfo.SessionKey[2],BundleCB->RecvCompInfo.SessionKey[3],
	BundleCB->RecvCompInfo.SessionKey[4],BundleCB->RecvCompInfo.SessionKey[5],
	BundleCB->RecvCompInfo.SessionKey[6],BundleCB->RecvCompInfo.SessionKey[7]);
	dprintf("      MSCompType: 0x%8.8x\n", BundleCB->RecvCompInfo.MSCompType);
	dprintf("   RecvCompressContext: 0x%8.8x\n", BundleCB->RecvCompressContext);
	dprintf("   SendRC4Key: 0x%8.8x\n", BundleCB->SendRC4Key);
	dprintf("   RecvRC4Key: 0x%8.8x\n", BundleCB->RecvRC4Key);
	dprintf("   SCoherencyCounter: 0x%4.4x\n", BundleCB->SCoherencyCounter);
	dprintf("   RCoherencyCounter: 0x%4.4x\n", BundleCB->RCoherencyCounter);
	dprintf("   LastRC4Reset: 0x%4.4x\n", BundleCB->LastRC4Reset);
	dprintf("   CCPIdentifier: 0x%4.4x\n", BundleCB->CCPIdentifier);
	dprintf("   UpperBonDInfo:\n");
	dprintf("      BytesThreshold: %ld\n", BundleCB->UpperBonDInfo.ulBytesThreshold);
	dprintf("      PercentBandwidth: %d\n", BundleCB->UpperBonDInfo.usPercentBandwidth);
	dprintf("      SecondsInSamplePeriod: %ld\n", BundleCB->UpperBonDInfo.ulSecondsInSamplePeriod);
	dprintf("      State: 0x%8.8x\n", BundleCB->UpperBonDInfo.State);
	dprintf("      StartTime: 0x%8.8x%8.8x\n",
	BundleCB->UpperBonDInfo.StartTime.HighPart, BundleCB->UpperBonDInfo.StartTime.LowPart);
	dprintf("      SampleTable:\n");
	dprintf("         FirstIndex: %ld\n", BundleCB->UpperBonDInfo.SampleTable.ulFirstIndex);
	dprintf("         CurrentIndex: %ld\n", BundleCB->UpperBonDInfo.SampleTable.ulCurrentIndex);
	dprintf("         CurrentSampleByteCount: %ld\n", BundleCB->UpperBonDInfo.SampleTable.ulCurrentSampleByteCount);
	dprintf("         SampleArraySize: %ld\n", BundleCB->UpperBonDInfo.SampleTable.ulSampleArraySize);
	dprintf("         SampleRate: 0x%8.8x%8.8x\n",
	BundleCB->UpperBonDInfo.SampleTable.SampleRate.HighPart, BundleCB->UpperBonDInfo.SampleTable.SampleRate.LowPart);
	dprintf("         SamplePeriod: 0x%8.8x%8.8x\n",
	BundleCB->UpperBonDInfo.SampleTable.SamplePeriod.HighPart, BundleCB->UpperBonDInfo.SampleTable.SamplePeriod.LowPart);
	dprintf("         SampleTable:\n");
	for (i = 0; i < SAMPLE_ARRAY_SIZE; i++) {
		dprintf("         Sample %d:\n", i);
		dprintf("            BytesThisSend: %ld\n",BundleCB->UpperBonDInfo.SampleTable.SampleArray[i].ulBytesThisSend);
		dprintf("            ReferenceCount: %ld\n",BundleCB->UpperBonDInfo.SampleTable.SampleArray[i].ulReferenceCount);
		dprintf("            TimeStample: 0x%8.8x%8.8x\n",
		BundleCB->UpperBonDInfo.SampleTable.SampleArray[i].TimeStamp.HighPart, BundleCB->UpperBonDInfo.SampleTable.SampleArray[i].TimeStamp.LowPart);
	}
	dprintf("   LowerBonDInfo:\n");
	dprintf("      BytesThreshold: %ld\n", BundleCB->LowerBonDInfo.ulBytesThreshold);
	dprintf("      PercentBandwidth: %d\n", BundleCB->LowerBonDInfo.usPercentBandwidth);
	dprintf("      SecondsInSamplePeriod: %ld\n", BundleCB->LowerBonDInfo.ulSecondsInSamplePeriod);
	dprintf("      State: 0x%8.8x\n", BundleCB->LowerBonDInfo.State);
	dprintf("      StartTime: 0x%8.8x%8.8x\n",
	BundleCB->LowerBonDInfo.StartTime.HighPart, BundleCB->LowerBonDInfo.StartTime.LowPart);
	dprintf("      SampleTable:\n");
	dprintf("         FirstIndex: %ld\n", BundleCB->LowerBonDInfo.SampleTable.ulFirstIndex);
	dprintf("         CurrentIndex: %ld\n", BundleCB->LowerBonDInfo.SampleTable.ulCurrentIndex);
	dprintf("         CurrentSampleByteCount: %ld\n", BundleCB->LowerBonDInfo.SampleTable.ulCurrentSampleByteCount);
	dprintf("         SampleArraySize: %ld\n", BundleCB->LowerBonDInfo.SampleTable.ulSampleArraySize);
	dprintf("         SampleRate: 0x%8.8x%8.8x\n",
	BundleCB->LowerBonDInfo.SampleTable.SampleRate.HighPart, BundleCB->LowerBonDInfo.SampleTable.SampleRate.LowPart);
	dprintf("         SamplePeriod: 0x%8.8x%8.8x\n",
	BundleCB->LowerBonDInfo.SampleTable.SamplePeriod.HighPart, BundleCB->LowerBonDInfo.SampleTable.SamplePeriod.LowPart);
	dprintf("         SampleArray:\n");
	for (i = 0; i < SAMPLE_ARRAY_SIZE; i++) {
		dprintf("         Sample %d:\n", i);
		dprintf("            BytesThisSend: %ld\n",BundleCB->LowerBonDInfo.SampleTable.SampleArray[i].ulBytesThisSend);
		dprintf("            ReferenceCount: %ld\n",BundleCB->LowerBonDInfo.SampleTable.SampleArray[i].ulReferenceCount);
		dprintf("            TimeStample: 0x%8.8x%8.8x\n",
		BundleCB->LowerBonDInfo.SampleTable.SampleArray[i].TimeStamp.HighPart, BundleCB->LowerBonDInfo.SampleTable.SampleArray[i].TimeStamp.LowPart);
	}
	dprintf("   FriendlyName: %s\n", BundleCB->Name);
	dprintf("   BundleStats:\n");
	dprintf("      BytesTransmitted: %ld\n", BundleCB->BundleStats.BytesTransmitted);
	dprintf("      BytesReceived: %ld\n", BundleCB->BundleStats.BytesReceived);
	dprintf("      FramesTransmitted: %ld\n", BundleCB->BundleStats.FramesTransmitted);
	dprintf("      FramesReceived: %ld\n", BundleCB->BundleStats.FramesReceived);

	dprintf("      CRCErrors: %ld\n", BundleCB->BundleStats.CRCErrors);
	dprintf("      TimeoutErrors: %ld\n", BundleCB->BundleStats.TimeoutErrors);
	dprintf("      AlignmentErrors: %ld\n", BundleCB->BundleStats.AlignmentErrors);
	dprintf("      SerialOverrunErrors: %ld\n", BundleCB->BundleStats.SerialOverrunErrors);
	dprintf("      FramingErrors: %ld\n", BundleCB->BundleStats.FramingErrors);
	dprintf("      BufferOverrunErrors: %ld\n", BundleCB->BundleStats.BufferOverrunErrors);
	dprintf("      ByteTransmittedUncompressed: %ld\n", BundleCB->BundleStats.BytesTransmittedUncompressed);
	dprintf("      BytesReceivedUncompressed: %ld\n", BundleCB->BundleStats.BytesReceivedUncompressed);
	dprintf("      BytesTransmittedCompressed: %ld\n", BundleCB->BundleStats.BytesTransmittedCompressed);
	dprintf("      BytesReceivedCompressed: %ld\n", BundleCB->BundleStats.BytesReceivedCompressed);
}

VOID
DisplayProtocolCB(
	DWORD	Address,
	PPROTOCOLCB	ProtocolCB
	)
{
	DWORD	i;

	dprintf("\n\nProtocolCB: 0x%8.8x\n", Address);
	dprintf("   Linkage:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
	ProtocolCB->Linkage.Flink, ProtocolCB->Linkage.Blink);
	dprintf("   ProtocolHandle: 0x%8.8x\n", ProtocolCB->hProtocolHandle);
	dprintf("   ReferenceCount: %ld\n", ProtocolCB->ulReferenceCount);
	dprintf("   HeadNdisPacketQueue: 0x%8.8x\n", ProtocolCB->HeadNdisPacketQueue);
	dprintf("   TailNdisPacketQueue: 0x%8.8x\n", ProtocolCB->TailNdisPacketQueue);
	dprintf("   SendMaskBit: 0x%8.8x\n", ProtocolCB->SendMaskBit);
	dprintf("   AdapterCB: 0x%8.8x\n", ProtocolCB->AdapterCB);
	dprintf("   BundleCB: 0x%8.8x\n", ProtocolCB->BundleCB);
	dprintf("   Flags: 0x%8.8x\n", ProtocolCB->Flags);
	dprintf("   ProtocolType: 0x%4.4x\n", ProtocolCB->usProtocolType);
	dprintf("   PPP ProtocolID: 0x%4.4x\n", ProtocolCB->usPPPProtocolID);
	dprintf("   Priority: %ld\n", ProtocolCB->usPriority);
	dprintf("   Bytes Quota: %ld\n", ProtocolCB->ulByteQuota);
	dprintf("      SampleTable:\n");
	dprintf("         FirstIndex: %ld\n", ProtocolCB->SampleTable.ulFirstIndex);
	dprintf("         CurrentIndex: %ld\n", ProtocolCB->SampleTable.ulCurrentIndex);
	dprintf("         CurrentSampleByteCount: %ld\n", ProtocolCB->SampleTable.ulCurrentSampleByteCount);
	dprintf("         SampleArraySize: %ld\n", ProtocolCB->SampleTable.ulSampleArraySize);
	dprintf("         SampleRate: 0x%8.8x%8.8x\n",
	ProtocolCB->SampleTable.SampleRate.HighPart, ProtocolCB->SampleTable.SampleRate.LowPart);
	dprintf("         SamplePeriod: 0x%8.8x%8.8x\n",
	ProtocolCB->SampleTable.SamplePeriod.HighPart, ProtocolCB->SampleTable.SamplePeriod.LowPart);
	dprintf("         SampleArray:\n");
	for (i = 0; i < SAMPLE_ARRAY_SIZE; i++) {
		dprintf("         Sample %d:\n", i);
		dprintf("            BytesThisSend: %ld\n",ProtocolCB->SampleTable.SampleArray[i].ulBytesThisSend);
		dprintf("            ReferenceCount: %ld\n",ProtocolCB->SampleTable.SampleArray[i].ulReferenceCount);
		dprintf("            TimeStample: 0x%8.8x%8.8x\n",
		ProtocolCB->SampleTable.SampleArray[i].TimeStamp.HighPart, ProtocolCB->SampleTable.SampleArray[i].TimeStamp.LowPart);
	}
	dprintf("   TransportHandle: 0x%8.8x\n", ProtocolCB->hTransportHandle);
	dprintf("   NdisWanAddress: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
			ProtocolCB->NdisWanAddress[0], ProtocolCB->NdisWanAddress[1], ProtocolCB->NdisWanAddress[2],
			ProtocolCB->NdisWanAddress[3], ProtocolCB->NdisWanAddress[4], ProtocolCB->NdisWanAddress[5]);
	dprintf("   TransportAddress: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n",
			ProtocolCB->TransportAddress[0], ProtocolCB->TransportAddress[1], ProtocolCB->TransportAddress[2],
			ProtocolCB->TransportAddress[3], ProtocolCB->TransportAddress[4], ProtocolCB->TransportAddress[5]);
	dprintf("   DeviceName: Buffer: 0x%8.8x Length: %ld\n",
			ProtocolCB->DeviceName.Buffer, ProtocolCB->DeviceName.Length);
}

VOID
DisplayWanPacket(
	DWORD	Address,
	PNDIS_WAN_PACKET	Packet
	)
{

	dprintf("\n\nWanPacket: 0x%8.8x\n", Address);
	dprintf("   WanPacketQueue:\n");
	dprintf("      Flink: 0x%8.8x Blink: 0x%8.8x\n",
	Packet->WanPacketQueue.Flink, Packet->WanPacketQueue.Blink);
	dprintf("   CurrentBuffer: 0x%8.8x\n", Packet->CurrentBuffer);
	dprintf("   CurrentLength: %ld\n", Packet->CurrentLength);
	dprintf("   StartBuffer: 0x%8.8x\n", Packet->StartBuffer);
	dprintf("   EndBuffer: 0x%8.8x\n", Packet->EndBuffer);
	dprintf("   PR1 (LinkCB): 0x%8.8x\n", Packet->ProtocolReserved1);
	dprintf("   PR2 (NdisPacket): 0x%8.8x\n", Packet->ProtocolReserved2);
	dprintf("   PR3 (ProtocolCB): 0x%8.8x\n", Packet->ProtocolReserved3);
	dprintf("   PR4 (BytesSent): %ld\n", Packet->ProtocolReserved4);
	dprintf("   MR1: 0x%8.8x\n", Packet->MacReserved1);
	dprintf("   MR2: 0x%8.8x\n", Packet->MacReserved2);
	dprintf("   MR3: 0x%8.8x\n", Packet->MacReserved3);
	dprintf("   MR4: 0x%8.8x\n", Packet->MacReserved4);
}

VOID
DisplayNdisPacket(
	DWORD	Address,
	PNDIS_PACKET	Packet
	)
{

	dprintf("\n\nNdisPacket: 0x%8.8x\n", Address);
	dprintf("   Private:\n");
	dprintf("      PhysicalCount: 0x%8.8x\n", Packet->Private.PhysicalCount);
	dprintf("      TotalLength: %ld\n", Packet->Private.TotalLength);
	dprintf("      BufferHead: 0x%8.8x\n", Packet->Private.Head);
	dprintf("      BufferTail: 0x%8.8x\n", Packet->Private.Tail);
	dprintf("      Pool: 0x%8.8x\n", Packet->Private.Pool);
	dprintf("      Count: 0x%8.8x\n", Packet->Private.Count);
	dprintf("      Flags: 0x%8.8x\n", Packet->Private.Flags);
	dprintf("      ValidCounts: %d\n", Packet->Private.ValidCounts);
	dprintf("   MR1 (Next/MagicNumber): 0x%8.8x\n", *((PDWORD)&Packet->MiniportReserved[0]));
	dprintf("   MR2 (ReferenceCount): 0x%4.4x (Flags): 0x%4.4x\n",
	*((PWORD)&Packet->MiniportReserved[4]),*((PWORD)&Packet->MiniportReserved[6]));
	dprintf("   WR1: 0x%8.8x\n", *((PDWORD)&Packet->WrapperReserved[0]));
	dprintf("   WR2: 0x%8.8x\n", *((PDWORD)&Packet->WrapperReserved[4]));
}