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.

88 lines
3.4 KiB

  1. #
  2. # Default types for WPP
  3. #
  4. # our basic arithmetic types
  5. DEFINE_SIMPLE_TYPE( SBYTE, signed char, ItemChar, "d");
  6. DEFINE_SIMPLE_TYPE( SSHORT, signed short, ItemShort, "hd");
  7. DEFINE_SIMPLE_TYPE( SINT, signed int, ItemInt, "d");
  8. DEFINE_SIMPLE_TYPE( SLONG, signed long, ItemLong, "ld");
  9. DEFINE_SIMPLE_TYPE( SINT64, signed _int64, ItemLongLong, "I64d");
  10. DEFINE_FLAVOR( UCHAR, SBYTE, ItemUChar, "c" );
  11. DEFINE_FLAVOR( SCHAR, SBYTE, ItemChar, "c" );
  12. DEFINE_FLAVOR( BOOLEAN, SBYTE, ItemListByte(FALSE,TRUE), "s");
  13. # arch dependent types
  14. DEFINE_SIMPLE_TYPE( SLONGPTR, void*, ItemPtr, "p");
  15. DEFINE_SIMPLE_TYPE( PTR, void*, ItemPtr, "p");
  16. DEFINE_SIMPLE_TYPE( HANDLE, void*, ItemPtr, "p");
  17. # all strings require custom processing
  18. DEFINE_CPLX_TYPE(ASTR, WPP_LOGASTR, ItemString, "s");
  19. DEFINE_CPLX_TYPE(ARSTR, WPP_LOGASTR, ItemRString, "s");
  20. DEFINE_CPLX_TYPE(WSTR, WPP_LOGWSTR, ItemWString, "s");
  21. DEFINE_CPLX_TYPE(CSTR, WPP_LOGCSTR, ItemPString, "s");
  22. DEFINE_CPLX_TYPE(USTR, WPP_LOGUSTR, ItemPWString, "s");
  23. # default formats for those who don't care to provide their own strings
  24. DEFINE_FLAVOR(UBYTE, SBYTE,, "u");
  25. DEFINE_FLAVOR(XBYTE, SBYTE,, "02x");
  26. DEFINE_FLAVOR(OBYTE, SBYTE,, "o");
  27. DEFINE_FLAVOR(USHORT, SSHORT, ItemUShort, "hu");
  28. DEFINE_FLAVOR(XSHORT, SSHORT,, "04hX");
  29. DEFINE_FLAVOR(OSHORT, SSHORT,, "ho");
  30. DEFINE_FLAVOR(UINT, SINT, ItemUInt, "u");
  31. DEFINE_FLAVOR(XINT, SINT,, "08x");
  32. DEFINE_FLAVOR(OINT, SINT,, "o");
  33. DEFINE_FLAVOR(ULONG, SLONG, ItemULong, "lu");
  34. DEFINE_FLAVOR(XLONG, SLONG,, "08lX");
  35. DEFINE_FLAVOR(OLONG, SLONG,, "lo");
  36. DEFINE_FLAVOR(UINT64, SINT64,, "i64u");
  37. DEFINE_FLAVOR(XINT64, SINT64,, "08i64X");
  38. DEFINE_FLAVOR(OINT64, SINT64,, "i64o");
  39. DEFINE_FLAVOR(ULONGPTR, SLONGPTR,,);
  40. DEFINE_FLAVOR(XLONGPTR, SLONGPTR,,);
  41. DEFINE_FLAVOR(OLONGPTR, SLONGPTR,,);
  42. # special formats
  43. DEFINE_FLAVOR(IPADDR, UINT, ItemIPAddr, "s");
  44. DEFINE_FLAVOR(PORT, USHORT, ItemPort, "s");
  45. DEFINE_FLAVOR(STATUS, UINT, ItemNTSTATUS, "s");
  46. DEFINE_FLAVOR(WINERROR, UINT, ItemWINERROR, "s");
  47. DEFINE_FLAVOR(PORT, USHORT, ItemPort, "s");
  48. DEFINE_SIMPLE_TYPE(GUID, GUID, ItemGuid, "s");
  49. # time related stuff
  50. DEFINE_FLAVOR(TIMESTAMP, SINT64, ItemTimestamp, "s");
  51. DEFINE_FLAVOR(TIME, SINT64, ItemTimestamp, "s");
  52. DEFINE_FLAVOR(DATE, SINT64, ItemTimestamp, "s");
  53. DEFINE_FLAVOR(WAITTIME, SINT64, ItemTimestamp, "s");
  54. DEFINE_FLAVOR(TIMEDELTA, SINT64, ItemTimestamp, "s");
  55. # enumeration types
  56. DEFINE_FLAVOR(ItemListByte, SBYTE, ItemListByte, "s");
  57. DEFINE_FLAVOR(ItemListShort, SSHORT, ItemListShort,"s");
  58. DEFINE_FLAVOR(ItemListLong, SLONG, ItemListLong, "s");
  59. CUSTOM_TYPE(IRQL, ItemListByte(Low,APC,DPC) );
  60. CUSTOM_TYPE(PNPMN, ItemListByte(IRP_MN_START_DEVICE,IRP_MN_QUERY_REMOVE_DEVICE,IRP_MN_REMOVE_DEVICE,IRP_MN_CANCEL_REMOVE_DEVICE,IRP_MN_STOP_DEVICE,IRP_MN_QUERY_STOP_DEVICE,IRP_MN_CANCEL_STOP_DEVICE,IRP_MN_QUERY_DEVICE_RELATIONS,IRP_MN_QUERY_INTERFACE,IRP_MN_QUERY_CAPABILITIES,IRP_MN_QUERY_RESOURCES,IRP_MN_QUERY_RESOURCE_REQUIREMENTS,IRP_MN_QUERY_DEVICE_TEXT,IRP_MN_FILTER_RESOURCE_REQUIREMENTS,IRP_MN_PNP_14,IRP_MN_READ_CONFIG,IRP_MN_WRITE_CONFIG,IRP_MN_EJECT,IRP_MN_SET_LOCK,IRP_MN_QUERY_ID,IRP_MN_QUERY_PNP_DEVICE_STATE,IRP_MN_QUERY_BUS_INFORMATION,IRP_MN_DEVICE_USAGE_NOTIFICATION,IRP_MN_SURPRISE_REMOVAL) );
  61. # default tracing macro
  62. SimpleTrace(MSG,ARG);
  63. SimpleTraceEx(GRP,MSG,ARG);
  64. USEPREFIX(*, "[%9!x!].%3!03x!::%4 [%1] ");