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.

70 lines
1.8 KiB

  1. //
  2. // Copyright (c) 1998-1999, Microsoft Corporation, all rights reserved
  3. //
  4. // pktlog.c
  5. //
  6. // IEEE1394 mini-port/call-manager driver
  7. //
  8. // Packet logging utilities.
  9. //
  10. // 10/12/1999 JosephJ Created
  11. //
  12. #define N1394_PKTLOG_DATA_SIZE 64 // Amount of data logged per packet.
  13. #define N1394_NUM_PKTLOG_ENTRIES 1000 // Size of log (circular buffer)
  14. //----------------------------------------------------------------------
  15. // P A C K E T L O G G I N G
  16. //----------------------------------------------------------------------
  17. // One (fixed-size) log entry.
  18. //
  19. typedef struct
  20. {
  21. ULONG Flags; // User-defined flags
  22. ULONG SequenceNo; // Sequence number of this entry
  23. LARGE_INTEGER TimeStamp; // Timestamp (KeQueryPerformanceCounter)
  24. ULONG SourceID;
  25. ULONG DestID;
  26. ULONG OriginalDataSize;
  27. ULONG Reserved;
  28. UCHAR Data[N1394_PKTLOG_DATA_SIZE];
  29. } N1394_PKTLOG_ENTRY, *PN1394_PKTLOG_ENTRY;
  30. typedef struct
  31. {
  32. LARGE_INTEGER InitialTimestamp; // In 100-nanoseconds.
  33. LARGE_INTEGER PerformanceFrequency; // In Hz.
  34. ULONG SequenceNo; // Current sequence number
  35. ULONG EntrySize; // sizeof(N1394_PKTLOG_ENTRY)
  36. ULONG NumEntries; // N1394_NUM_PKTLOG_ENTRIES
  37. N1394_PKTLOG_ENTRY Entries[N1394_NUM_PKTLOG_ENTRIES];
  38. } NIC1394_PKTLOG, *PNIC1394_PKTLOG;
  39. VOID
  40. nic1394InitPktLog(
  41. PNIC1394_PKTLOG pPktLog
  42. );
  43. VOID
  44. Nic1394LogPkt (
  45. PNIC1394_PKTLOG pPktLog,
  46. ULONG Flags,
  47. ULONG SourceID,
  48. ULONG DestID,
  49. PVOID pvData,
  50. ULONG cbData
  51. );