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.

111 lines
4.0 KiB

  1. /*++
  2. Copyright (c) 1989-2000 Microsoft Corporation
  3. Module Name:
  4. NodeType.h
  5. Abstract:
  6. This module defines all of the node type codes used in this development
  7. shell. Every major data structure in the file system is assigned a node
  8. type code that is. This code is the first CSHORT in the structure and is
  9. followed by a CSHORT containing the size, in bytes, of the structure.
  10. // @@BEGIN_DDKSPLIT
  11. Author:
  12. Brian Andrew [BrianAn] 01-July-1995
  13. Revision History:
  14. // @@END_DDKSPLIT
  15. --*/
  16. #ifndef _CDNODETYPE_
  17. #define _CDNODETYPE_
  18. typedef CSHORT NODE_TYPE_CODE;
  19. typedef NODE_TYPE_CODE *PNODE_TYPE_CODE;
  20. #define NTC_UNDEFINED ((NODE_TYPE_CODE)0x0000)
  21. #define CDFS_NTC_DATA_HEADER ((NODE_TYPE_CODE)0x0301)
  22. #define CDFS_NTC_VCB ((NODE_TYPE_CODE)0x0302)
  23. #define CDFS_NTC_FCB_PATH_TABLE ((NODE_TYPE_CODE)0x0303)
  24. #define CDFS_NTC_FCB_INDEX ((NODE_TYPE_CODE)0x0304)
  25. #define CDFS_NTC_FCB_DATA ((NODE_TYPE_CODE)0x0305)
  26. #define CDFS_NTC_FCB_NONPAGED ((NODE_TYPE_CODE)0x0306)
  27. #define CDFS_NTC_CCB ((NODE_TYPE_CODE)0x0307)
  28. #define CDFS_NTC_IRP_CONTEXT ((NODE_TYPE_CODE)0x0308)
  29. #define CDFS_NTC_IRP_CONTEXT_LITE ((NODE_TYPE_CODE)0x0309)
  30. typedef CSHORT NODE_BYTE_SIZE;
  31. //
  32. // So all records start with
  33. //
  34. // typedef struct _RECORD_NAME {
  35. // NODE_TYPE_CODE NodeTypeCode;
  36. // NODE_BYTE_SIZE NodeByteSize;
  37. // :
  38. // } RECORD_NAME;
  39. // typedef RECORD_NAME *PRECORD_NAME;
  40. //
  41. #ifndef NodeType
  42. #define NodeType(P) ((P) != NULL ? (*((PNODE_TYPE_CODE)(P))) : NTC_UNDEFINED)
  43. #endif
  44. #ifndef SafeNodeType
  45. #define SafeNodeType(Ptr) (*((PNODE_TYPE_CODE)(Ptr)))
  46. #endif
  47. //
  48. // The following definitions are used to generate meaningful blue bugcheck
  49. // screens. On a bugcheck the file system can output 4 ulongs of useful
  50. // information. The first ulong will have encoded in it a source file id
  51. // (in the high word) and the line number of the bugcheck (in the low word).
  52. // The other values can be whatever the caller of the bugcheck routine deems
  53. // necessary.
  54. //
  55. // Each individual file that calls bugcheck needs to have defined at the
  56. // start of the file a constant called BugCheckFileId with one of the
  57. // CDFS_BUG_CHECK_ values defined below and then use CdBugCheck to bugcheck
  58. // the system.
  59. //
  60. #define CDFS_BUG_CHECK_ACCHKSUP (0x00010000)
  61. #define CDFS_BUG_CHECK_ALLOCSUP (0x00020000)
  62. #define CDFS_BUG_CHECK_CACHESUP (0x00030000)
  63. #define CDFS_BUG_CHECK_CDDATA (0x00040000)
  64. #define CDFS_BUG_CHECK_CDINIT (0x00050000)
  65. #define CDFS_BUG_CHECK_CLEANUP (0x00060000)
  66. #define CDFS_BUG_CHECK_CLOSE (0x00070000)
  67. #define CDFS_BUG_CHECK_CREATE (0x00080000)
  68. #define CDFS_BUG_CHECK_DEVCTRL (0x00090000)
  69. #define CDFS_BUG_CHECK_DEVIOSUP (0x000a0000)
  70. #define CDFS_BUG_CHECK_DIRCTRL (0x000b0000)
  71. #define CDFS_BUG_CHECK_DIRSUP (0x000c0000)
  72. #define CDFS_BUG_CHECK_FILEINFO (0x000d0000)
  73. #define CDFS_BUG_CHECK_FILOBSUP (0x000e0000)
  74. #define CDFS_BUG_CHECK_FSCTRL (0x000f0000)
  75. #define CDFS_BUG_CHECK_FSPDISP (0x00100000)
  76. #define CDFS_BUG_CHECK_LOCKCTRL (0x00110000)
  77. #define CDFS_BUG_CHECK_NAMESUP (0x00120000)
  78. #define CDFS_BUG_CHECK_PATHSUP (0x00130000)
  79. #define CDFS_BUG_CHECK_PNP (0x00140000)
  80. #define CDFS_BUG_CHECK_PREFXSUP (0x00150000)
  81. #define CDFS_BUG_CHECK_READ (0x00160000)
  82. #define CDFS_BUG_CHECK_RESRCSUP (0x00170000)
  83. #define CDFS_BUG_CHECK_STRUCSUP (0x00180000)
  84. #define CDFS_BUG_CHECK_TIMESUP (0x00190000)
  85. #define CDFS_BUG_CHECK_VERFYSUP (0x001a0000)
  86. #define CDFS_BUG_CHECK_VOLINFO (0x001b0000)
  87. #define CDFS_BUG_CHECK_WORKQUE (0x001c0000)
  88. #define CdBugCheck(A,B,C) { KeBugCheckEx(CDFS_FILE_SYSTEM, BugCheckFileId | __LINE__, A, B, C ); }
  89. #endif // _NODETYPE_