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.

131 lines
1.8 KiB

  1. //#define DEBUGIT
  2. typedef union _SIG {
  3. UCHAR c[4];
  4. ULONG l;
  5. } SIG, *PSIG;
  6. typedef struct _FLAG_TABLE {
  7. PUCHAR Name;
  8. ULONG Mask;
  9. } FLAG_TABLE, *PFLAG_TABLE;
  10. #define GETMEMLOC(base, typ, field) \
  11. ((base) + FIELD_OFFSET(typ, field))
  12. typedef ULONG64 MEMLOC, *PMEMLOC;
  13. typedef struct _STRUC_ENTRY {
  14. PUCHAR FieldName;
  15. ULONG FieldType;
  16. } STRUC_ENTRY, *PSTRUC_ENTRY;
  17. #define FT_ULONG 1
  18. #define FT_UCHAR 2
  19. #define FT_USHORT 3
  20. #define FT_PTR 4
  21. #define FT_SIG 5
  22. #define FT_DEVSPEED 6
  23. #define FT_ULONG64 7
  24. ULONG
  25. CheckSym();
  26. #define CHECKSYM()\
  27. {\
  28. ULONG n;\
  29. if ((n=CheckSym()) != S_OK) {\
  30. return n;\
  31. }\
  32. }
  33. CPPMOD
  34. ScanfMemLoc(
  35. PMEMLOC MemLoc,
  36. PCSTR args
  37. );
  38. VOID
  39. PrintfMemLoc(
  40. PUCHAR Str1,
  41. MEMLOC MemLoc,
  42. PUCHAR Str2
  43. );
  44. VOID
  45. BadMemLoc(
  46. ULONG MemLoc
  47. );
  48. VOID
  49. BadSig(
  50. ULONG Sig,
  51. ULONG ExpectedSig
  52. );
  53. VOID
  54. DumpIPipe(
  55. MEMLOC MEmLoc
  56. );
  57. PCHAR
  58. ListEmpty(
  59. MEMLOC HeadMemLoc
  60. );
  61. VOID
  62. DumpUnicodeString(
  63. UNICODE_STRING uniString
  64. );
  65. VOID
  66. Sig(
  67. ULONG Sig,
  68. PUCHAR p
  69. );
  70. ULONG
  71. UsbFieldOffset(
  72. IN LPSTR Type,
  73. IN LPSTR Field
  74. );
  75. MEMLOC
  76. UsbReadFieldPtr(
  77. IN ULONG64 Addr,
  78. IN LPSTR Type,
  79. IN LPSTR Field
  80. );
  81. ULONG
  82. UsbReadFieldUlong(
  83. IN ULONG64 Addr,
  84. IN LPSTR Type,
  85. IN LPSTR Field
  86. );
  87. UCHAR
  88. UsbReadFieldUchar(
  89. IN ULONG64 Addr,
  90. IN LPSTR Type,
  91. IN LPSTR Field
  92. );
  93. USHORT
  94. UsbReadFieldUshort(
  95. IN ULONG64 Addr,
  96. IN LPSTR Type,
  97. IN LPSTR Field
  98. );
  99. VOID
  100. DumpEHCI_StaticQHs(
  101. MEMLOC MemLoc
  102. );