1 /*++ 2 3 Copyright (c) 1989-2000 Microsoft Corporation 4 5 Module Name: 6 7 NodeType.h 8 9 Abstract: 10 11 This module defines all of the node type codes used in this development 12 shell. Every major data structure in the file system is assigned a node 13 type code that is. This code is the first CSHORT in the structure and is 14 followed by a CSHORT containing the size, in bytes, of the structure. 15 16 17 --*/ 18 19 #ifndef _FATNODETYPE_ 20 #define _FATNODETYPE_ 21 22 typedef USHORT NODE_TYPE_CODE; 23 typedef NODE_TYPE_CODE *PNODE_TYPE_CODE; 24 25 #define NTC_UNDEFINED ((NODE_TYPE_CODE)0x0000) 26 27 #define FAT_NTC_DATA_HEADER ((NODE_TYPE_CODE)0x0500) 28 #define FAT_NTC_VCB ((NODE_TYPE_CODE)0x0501) 29 #define FAT_NTC_FCB ((NODE_TYPE_CODE)0x0502) 30 #define FAT_NTC_DCB ((NODE_TYPE_CODE)0x0503) 31 #define FAT_NTC_ROOT_DCB ((NODE_TYPE_CODE)0x0504) 32 #define FAT_NTC_CCB ((NODE_TYPE_CODE)0x0507) 33 #define FAT_NTC_IRP_CONTEXT ((NODE_TYPE_CODE)0x0508) 34 35 typedef CSHORT NODE_BYTE_SIZE; 36 37 #ifndef NodeType 38 39 // 40 // So all records start with 41 // 42 // typedef struct _RECORD_NAME { 43 // NODE_TYPE_CODE NodeTypeCode; 44 // NODE_BYTE_SIZE NodeByteSize; 45 // : 46 // } RECORD_NAME; 47 // typedef RECORD_NAME *PRECORD_NAME; 48 // 49 50 #define NodeType(Ptr) (*((PNODE_TYPE_CODE)(Ptr))) 51 #endif 52 53 54 // 55 // The following definitions are used to generate meaningful blue bugcheck 56 // screens. On a bugcheck the file system can output 4 ulongs of useful 57 // information. The first ulong will have encoded in it a source file id 58 // (in the high word) and the line number of the bugcheck (in the low word). 59 // The other values can be whatever the caller of the bugcheck routine deems 60 // necessary. 61 // 62 // Each individual file that calls bugcheck needs to have defined at the 63 // start of the file a constant called BugCheckFileId with one of the 64 // FAT_BUG_CHECK_ values defined below and then use FatBugCheck to bugcheck 65 // the system. 66 // 67 68 69 #define FAT_BUG_CHECK_ACCHKSUP (0x00010000) 70 #define FAT_BUG_CHECK_ALLOCSUP (0x00020000) 71 #define FAT_BUG_CHECK_CACHESUP (0x00030000) 72 #define FAT_BUG_CHECK_CLEANUP (0x00040000) 73 #define FAT_BUG_CHECK_CLOSE (0x00050000) 74 #define FAT_BUG_CHECK_CREATE (0x00060000) 75 #define FAT_BUG_CHECK_DEVCTRL (0x00070000) 76 #define FAT_BUG_CHECK_DEVIOSUP (0x00080000) 77 #define FAT_BUG_CHECK_DIRCTRL (0x00090000) 78 #define FAT_BUG_CHECK_DIRSUP (0x000a0000) 79 #define FAT_BUG_CHECK_DUMPSUP (0x000b0000) 80 #define FAT_BUG_CHECK_EA (0x000c0000) 81 #define FAT_BUG_CHECK_EASUP (0x000d0000) 82 #define FAT_BUG_CHECK_FATDATA (0x000e0000) 83 #define FAT_BUG_CHECK_FATINIT (0x000f0000) 84 #define FAT_BUG_CHECK_FILEINFO (0x00100000) 85 #define FAT_BUG_CHECK_FILOBSUP (0x00110000) 86 #define FAT_BUG_CHECK_FLUSH (0x00120000) 87 #define FAT_BUG_CHECK_FSCTRL (0x00130000) 88 #define FAT_BUG_CHECK_FSPDISP (0x00140000) 89 #define FAT_BUG_CHECK_LOCKCTRL (0x00150000) 90 #define FAT_BUG_CHECK_NAMESUP (0x00160000) 91 #define FAT_BUG_CHECK_PNP (0x00170000) 92 #define FAT_BUG_CHECK_READ (0x00180000) 93 #define FAT_BUG_CHECK_RESRCSUP (0x00190000) 94 #define FAT_BUG_CHECK_SHUTDOWN (0x001a0000) 95 #define FAT_BUG_CHECK_SPLAYSUP (0x001b0000) 96 #define FAT_BUG_CHECK_STRUCSUP (0x001c0000) 97 #define FAT_BUG_CHECK_TIMESUP (0x001d0000) 98 #define FAT_BUG_CHECK_VERFYSUP (0x001e0000) 99 #define FAT_BUG_CHECK_VOLINFO (0x001f0000) 100 #define FAT_BUG_CHECK_WORKQUE (0x00200000) 101 #define FAT_BUG_CHECK_WRITE (0x00210000) 102 103 104 #define FatBugCheck(A,B,C) { KeBugCheckEx(FAT_FILE_SYSTEM, BugCheckFileId | __LINE__, A, B, C ); } 105 106 107 // 108 // In this module we'll also define some globally known constants 109 // 110 111 #define UCHAR_NUL 0x00 112 #define UCHAR_SOH 0x01 113 #define UCHAR_STX 0x02 114 #define UCHAR_ETX 0x03 115 #define UCHAR_EOT 0x04 116 #define UCHAR_ENQ 0x05 117 #define UCHAR_ACK 0x06 118 #define UCHAR_BEL 0x07 119 #define UCHAR_BS 0x08 120 #define UCHAR_HT 0x09 121 #define UCHAR_LF 0x0a 122 #define UCHAR_VT 0x0b 123 #define UCHAR_FF 0x0c 124 #define UCHAR_CR 0x0d 125 #define UCHAR_SO 0x0e 126 #define UCHAR_SI 0x0f 127 #define UCHAR_DLE 0x10 128 #define UCHAR_DC1 0x11 129 #define UCHAR_DC2 0x12 130 #define UCHAR_DC3 0x13 131 #define UCHAR_DC4 0x14 132 #define UCHAR_NAK 0x15 133 #define UCHAR_SYN 0x16 134 #define UCHAR_ETB 0x17 135 #define UCHAR_CAN 0x18 136 #define UCHAR_EM 0x19 137 #define UCHAR_SUB 0x1a 138 #define UCHAR_ESC 0x1b 139 #define UCHAR_FS 0x1c 140 #define UCHAR_GS 0x1d 141 #define UCHAR_RS 0x1e 142 #define UCHAR_US 0x1f 143 #define UCHAR_SP 0x20 144 145 #ifndef BUILDING_FSKDEXT 146 147 // 148 // These are the tags we use to uniquely identify pool allocations. 149 // 150 151 #define TAG_CCB 'CtaF' 152 #define TAG_FCB 'FtaF' 153 #define TAG_FCB_NONPAGED 'NtaF' 154 #define TAG_ERESOURCE 'EtaF' 155 #define TAG_IRP_CONTEXT 'ItaF' 156 157 #define TAG_BCB 'btaF' 158 #define TAG_DIRENT 'DtaF' 159 #define TAG_DIRENT_BITMAP 'TtaF' 160 #define TAG_EA_DATA 'dtaF' 161 #define TAG_EA_SET_HEADER 'etaF' 162 #define TAG_EVENT 'ttaF' 163 #define TAG_FAT_BITMAP 'BtaF' 164 #define TAG_FAT_CLOSE_CONTEXT 'xtaF' 165 #define TAG_FAT_IO_CONTEXT 'XtaF' 166 #define TAG_FAT_WINDOW 'WtaF' 167 #define TAG_FILENAME_BUFFER 'ntaF' 168 #define TAG_IO_RUNS 'itaF' 169 #define TAG_REPINNED_BCB 'RtaF' 170 #define TAG_STASHED_BPB 'StaF' 171 #define TAG_VCB_STATS 'VtaF' 172 #define TAG_DEFERRED_FLUSH_CONTEXT 'ftaF' 173 174 #define TAG_VPB 'vtaF' 175 176 #define TAG_VERIFY_BOOTSECTOR 'staF' 177 #define TAG_VERIFY_ROOTDIR 'rtaF' 178 179 #define TAG_OUTPUT_MAPPINGPAIRS 'PtaF' 180 181 #define TAG_ENTRY_LOOKUP_BUFFER 'LtaF' 182 183 #define TAG_IO_BUFFER 'OtaF' 184 #define TAG_IO_USER_BUFFER 'QtaF' 185 186 #define TAG_DYNAMIC_NAME_BUFFER 'ctaF' 187 188 #define TAG_DEFRAG_BUFFER 'GtaF' 189 190 #endif 191 192 #endif // _NODETYPE_ 193 194 195