ReactOS  0.4.13-dev-464-g6b95727
fieldoff.c
Go to the documentation of this file.
1 #include "cdprocs.h"
2 #include <stdio.h>
3 
4 #define doit(a,b) { printf("%s %04lx %4lx %s\n", #a, FIELD_OFFSET(a,b), sizeof(d.b), #b); }
5 
6 VOID
9  int argc;
10  char *argv[];
11 {
12  printf("<Record> <offset> <size> <field>\n\n");
13  {
14  CD_MCB d;
15  doit( CD_MCB, MaximumEntryCount );
16  doit( CD_MCB, CurrentEntryCount );
17  doit( CD_MCB, McbArray );
18  }
19  printf("\n");
20  {
25  doit( CD_MCB_ENTRY, DataBlockByteCount );
26  doit( CD_MCB_ENTRY, TotalBlockByteCount );
27  }
28  printf("\n");
29  {
30  CD_NAME d;
31  doit( CD_NAME, FileName );
32  doit( CD_NAME, VersionString );
33  }
34  printf("\n");
35  {
36  NAME_LINK d;
37  doit( NAME_LINK, Links );
39  }
40  printf("\n");
41  {
43  doit( PREFIX_ENTRY, Fcb );
44  doit( PREFIX_ENTRY, PrefixFlags );
45  doit( PREFIX_ENTRY, ExactCaseName );
46  doit( PREFIX_ENTRY, IgnoreCaseName );
48  }
49  printf("\n");
50  {
51  CD_DATA d;
52  doit( CD_DATA, NodeTypeCode );
53  doit( CD_DATA, NodeByteSize );
55  doit( CD_DATA, VcbQueue );
56  doit( CD_DATA, IrpContextDepth );
57  doit( CD_DATA, IrpContextMaxDepth );
58  doit( CD_DATA, IrpContextList );
59  doit( CD_DATA, FileSystemDeviceObject );
60  doit( CD_DATA, AsyncCloseQueue );
61  doit( CD_DATA, AsyncCloseCount );
62  doit( CD_DATA, FspCloseActive );
63  doit( CD_DATA, ReduceDelayedClose );
64  doit( CD_DATA, PadUshort );
65  doit( CD_DATA, DelayedCloseQueue );
66  doit( CD_DATA, DelayedCloseCount );
67  doit( CD_DATA, MinDelayedCloseCount );
68  doit( CD_DATA, MaxDelayedCloseCount );
69  doit( CD_DATA, CdDataLockThread );
70  doit( CD_DATA, CdDataMutex );
71  doit( CD_DATA, DataResource );
72  doit( CD_DATA, CacheManagerCallbacks );
73  doit( CD_DATA, CacheManagerVolumeCallbacks );
74  doit( CD_DATA, CloseItem );
75  }
76  printf("\n");
77  {
78  VCB d;
79  doit( VCB, NodeTypeCode );
80  doit( VCB, NodeByteSize );
81  doit( VCB, Vpb );
83  doit( VCB, VolumeLockFileObject );
84  doit( VCB, VcbLinks );
85  doit( VCB, VcbState );
86  doit( VCB, VcbCondition );
87  doit( VCB, VcbCleanup );
88  doit( VCB, VcbReference );
89  doit( VCB, VcbUserReference );
90  doit( VCB, VolumeDasdFcb );
91  doit( VCB, RootIndexFcb );
92  doit( VCB, PathTableFcb );
93  doit( VCB, BaseSector );
94  doit( VCB, VdSectorOffset );
95  doit( VCB, PrimaryVdSectorOffset );
96  doit( VCB, XASector );
97  doit( VCB, XADiskOffset );
98  doit( VCB, VcbResource );
99  doit( VCB, FileResource );
100  doit( VCB, VcbMutex );
101  doit( VCB, VcbLockThread );
102  doit( VCB, NotifySync );
103  doit( VCB, DirNotifyList );
104  doit( VCB, BlockSize );
105  doit( VCB, BlockToSectorShift );
106  doit( VCB, BlockToByteShift );
107  doit( VCB, BlocksPerSector );
108  doit( VCB, BlockMask );
109  doit( VCB, BlockInverseMask );
110  doit( VCB, FcbTable );
111  doit( VCB, CdromToc );
112  doit( VCB, TocLength );
113  doit( VCB, TrackCount );
114  doit( VCB, DiskFlags );
115  doit( VCB, BlockFactor );
116  }
117  printf("\n");
118  {
121  doit( VOLUME_DEVICE_OBJECT, PostedRequestCount );
122  doit( VOLUME_DEVICE_OBJECT, OverflowQueueCount );
123  doit( VOLUME_DEVICE_OBJECT, OverflowQueue );
124  doit( VOLUME_DEVICE_OBJECT, OverflowQueueSpinLock );
126  }
127  printf("\n");
128  {
129  FCB_DATA d;
130  doit( FCB_DATA, FileLock );
131  }
132  printf("\n");
133  {
134  FCB_INDEX d;
136  doit( FCB_INDEX, StreamOffset );
137  doit( FCB_INDEX, FcbQueue );
138  doit( FCB_INDEX, Ordinal );
139  doit( FCB_INDEX, ChildPathTableOffset );
140  doit( FCB_INDEX, ChildOrdinal );
141  doit( FCB_INDEX, ExactCaseRoot );
142  doit( FCB_INDEX, IgnoreCaseRoot );
143  }
144  printf("\n");
145  {
146  FCB_NONPAGED d;
147  doit( FCB_NONPAGED, NodeTypeCode );
148  doit( FCB_NONPAGED, NodeByteSize );
149  doit( FCB_NONPAGED, SegmentObject );
150  doit( FCB_NONPAGED, FcbResource );
151  doit( FCB_NONPAGED, FcbMutex );
152  }
153  printf("\n");
154  {
155  FCB d;
156  doit( FCB, Header );
157  doit( FCB, Vcb );
158  doit( FCB, ParentFcb );
159  doit( FCB, FcbLinks );
160  doit( FCB, FileId );
161  doit( FCB, FcbCleanup );
162  doit( FCB, FcbReference );
163  doit( FCB, FcbUserReference );
164  doit( FCB, FcbState );
165  doit( FCB, FileAttributes );
166  doit( FCB, XAAttributes );
167  doit( FCB, XAFileNumber );
168  doit( FCB, FcbLockThread );
169  doit( FCB, FcbLockCount );
170  doit( FCB, FcbNonpaged );
171  doit( FCB, ShareAccess );
172  doit( FCB, McbEntry );
173  doit( FCB, Mcb );
174  doit( FCB, ShortNamePrefix );
175  doit( FCB, FileNamePrefix );
176  doit( FCB, CreationTime );
177  doit( FCB, FcbType );
178  }
179  printf("\n");
180  {
181  CCB d;
182  doit( CCB, NodeTypeCode );
183  doit( CCB, NodeByteSize );
184  doit( CCB, Flags );
185  doit( CCB, Fcb );
186  doit( CCB, CurrentDirentOffset );
187  doit( CCB, SearchExpression );
188  }
189  printf("\n");
190  {
191  IRP_CONTEXT d;
192  doit( IRP_CONTEXT, NodeTypeCode );
193  doit( IRP_CONTEXT, NodeByteSize );
194  doit( IRP_CONTEXT, Irp );
195  doit( IRP_CONTEXT, Vcb );
196  doit( IRP_CONTEXT, ExceptionStatus );
197  doit( IRP_CONTEXT, Flags );
198  doit( IRP_CONTEXT, RealDevice );
199  doit( IRP_CONTEXT, IoContext );
200  doit( IRP_CONTEXT, TeardownFcb );
202  doit( IRP_CONTEXT, MajorFunction );
204  doit( IRP_CONTEXT, ThreadContext );
205  doit( IRP_CONTEXT, WorkQueueItem );
206  }
207  printf("\n");
208  {
210  doit( IRP_CONTEXT_LITE, NodeTypeCode );
211  doit( IRP_CONTEXT_LITE, NodeByteSize );
213  doit( IRP_CONTEXT_LITE, DelayedCloseLinks );
214  doit( IRP_CONTEXT_LITE, UserReference );
215  doit( IRP_CONTEXT_LITE, RealDevice );
216  }
217  printf("\n");
218  {
220  doit( CD_IO_CONTEXT, IrpCount );
221  doit( CD_IO_CONTEXT, MasterIrp );
223  doit( CD_IO_CONTEXT, AllocatedContext );
226  doit( CD_IO_CONTEXT, SyncEvent );
227  }
228  printf("\n");
229  {
231  doit( THREAD_CONTEXT, Cdfs );
232  doit( THREAD_CONTEXT, SavedTopLevelIrp );
233  doit( THREAD_CONTEXT, TopLevelIrpContext );
234  }
235  printf("\n");
236  {
239  doit( PATH_ENUM_CONTEXT, BaseOffset );
242  doit( PATH_ENUM_CONTEXT, DataOffset );
243  doit( PATH_ENUM_CONTEXT, AllocatedData );
244  doit( PATH_ENUM_CONTEXT, LastDataBlock );
245  }
246  printf("\n");
247  {
248  PATH_ENTRY d;
249  doit( PATH_ENTRY, Ordinal );
250  doit( PATH_ENTRY, PathTableOffset );
252  doit( PATH_ENTRY, PathEntryLength );
253  doit( PATH_ENTRY, ParentOrdinal );
254  doit( PATH_ENTRY, DirNameLen );
255  doit( PATH_ENTRY, DirName );
256  doit( PATH_ENTRY, Flags );
257  doit( PATH_ENTRY, CdDirName );
258  doit( PATH_ENTRY, CdCaseDirName );
259  doit( PATH_ENTRY, NameBuffer );
260  }
261  printf("\n");
262  {
264  doit( COMPOUND_PATH_ENTRY, PathContext );
265  doit( COMPOUND_PATH_ENTRY, PathEntry );
266  }
267  printf("\n");
268  {
270  doit( DIRENT_ENUM_CONTEXT, Sector );
271  doit( DIRENT_ENUM_CONTEXT, BaseOffset );
275  doit( DIRENT_ENUM_CONTEXT, NextDirentOffset );
276  }
277  printf("\n");
278  {
279  DIRENT d;
283  doit( DIRENT, DataLength );
284  doit( DIRENT, CdTime );
285  doit( DIRENT, DirentFlags );
286  doit( DIRENT, Flags );
288  doit( DIRENT, InterleaveGapSize );
292  doit( DIRENT, FileNameLen );
293  doit( DIRENT, FileName );
294  doit( DIRENT, CdFileName );
295  doit( DIRENT, CdCaseFileName );
296  doit( DIRENT, ExtentType );
297  doit( DIRENT, NameBuffer );
298  }
299  printf("\n");
300  {
304  }
305  printf("\n");
306  {
308  doit( FILE_ENUM_CONTEXT, PriorDirent );
309  doit( FILE_ENUM_CONTEXT, InitialDirent );
310  doit( FILE_ENUM_CONTEXT, CurrentDirent );
314  doit( FILE_ENUM_CONTEXT, ShortNameBuffer );
315  doit( FILE_ENUM_CONTEXT, Dirents );
316  }
317  printf("\n");
318  {
319  RIFF_HEADER d;
320  doit( RIFF_HEADER, ChunkId );
322  doit( RIFF_HEADER, SignatureCDXA );
323  doit( RIFF_HEADER, SignatureFMT );
324  doit( RIFF_HEADER, XAChunkSize );
327  doit( RIFF_HEADER, SignatureXA );
328  doit( RIFF_HEADER, FileNumber );
330  doit( RIFF_HEADER, SignatureData );
331  doit( RIFF_HEADER, RawSectors );
332  }
333  printf("\n");
334  {
336  doit( AUDIO_PLAY_HEADER, Chunk );
338  doit( AUDIO_PLAY_HEADER, SignatureCDDA );
339  doit( AUDIO_PLAY_HEADER, SignatureFMT );
340  doit( AUDIO_PLAY_HEADER, FMTChunkSize );
341  doit( AUDIO_PLAY_HEADER, FormatTag );
342  doit( AUDIO_PLAY_HEADER, TrackNumber );
343  doit( AUDIO_PLAY_HEADER, DiskID );
344  doit( AUDIO_PLAY_HEADER, StartingSector );
346  doit( AUDIO_PLAY_HEADER, TrackAddress );
347  doit( AUDIO_PLAY_HEADER, TrackLength );
348  }
349  printf("\n");
350  {
351  RAW_ISO_VD d;
352  doit( RAW_ISO_VD, DescType );
353  doit( RAW_ISO_VD, StandardId );
354  doit( RAW_ISO_VD, Version );
355  doit( RAW_ISO_VD, VolumeFlags );
356  doit( RAW_ISO_VD, SystemId );
357  doit( RAW_ISO_VD, VolumeId );
359  doit( RAW_ISO_VD, VolSpaceI );
360  doit( RAW_ISO_VD, VolSpaceM );
361  doit( RAW_ISO_VD, CharSet );
362  doit( RAW_ISO_VD, VolSetSizeI );
363  doit( RAW_ISO_VD, VolSetSizeM );
364  doit( RAW_ISO_VD, VolSeqNumI );
365  doit( RAW_ISO_VD, VolSeqNumM );
366  doit( RAW_ISO_VD, LogicalBlkSzI );
367  doit( RAW_ISO_VD, LogicalBlkSzM );
368  doit( RAW_ISO_VD, PathTableSzI );
369  doit( RAW_ISO_VD, PathTableSzM );
370  doit( RAW_ISO_VD, PathTabLocI );
371  doit( RAW_ISO_VD, PathTabLocM );
372  doit( RAW_ISO_VD, RootDe );
373  doit( RAW_ISO_VD, VolSetId );
374  doit( RAW_ISO_VD, PublId );
375  doit( RAW_ISO_VD, PreparerId );
376  doit( RAW_ISO_VD, AppId );
377  doit( RAW_ISO_VD, Copyright );
378  doit( RAW_ISO_VD, Abstract );
379  doit( RAW_ISO_VD, Bibliograph );
380  doit( RAW_ISO_VD, CreateDate );
381  doit( RAW_ISO_VD, ModDate );
382  doit( RAW_ISO_VD, ExpireDate );
383  doit( RAW_ISO_VD, EffectDate );
384  doit( RAW_ISO_VD, FileStructVer );
386  doit( RAW_ISO_VD, ResApp );
388  }
389  printf("\n");
390  {
391  RAW_HSG_VD d;
392  doit( RAW_HSG_VD, BlkNumI );
393  doit( RAW_HSG_VD, BlkNumM );
394  doit( RAW_HSG_VD, DescType );
395  doit( RAW_HSG_VD, StandardId );
396  doit( RAW_HSG_VD, Version );
397  doit( RAW_HSG_VD, VolumeFlags );
398  doit( RAW_HSG_VD, SystemId );
399  doit( RAW_HSG_VD, VolumeId );
401  doit( RAW_HSG_VD, VolSpaceI );
402  doit( RAW_HSG_VD, VolSpaceM );
403  doit( RAW_HSG_VD, CharSet );
404  doit( RAW_HSG_VD, VolSetSizeI );
405  doit( RAW_HSG_VD, VolSetSizeM );
406  doit( RAW_HSG_VD, VolSeqNumI );
407  doit( RAW_HSG_VD, VolSeqNumM );
408  doit( RAW_HSG_VD, LogicalBlkSzI );
409  doit( RAW_HSG_VD, LogicalBlkSzM );
410  doit( RAW_HSG_VD, PathTableSzI );
411  doit( RAW_HSG_VD, PathTableSzM );
412  doit( RAW_HSG_VD, PathTabLocI );
413  doit( RAW_HSG_VD, PathTabLocM );
414  doit( RAW_HSG_VD, RootDe );
415  doit( RAW_HSG_VD, VolSetId );
416  doit( RAW_HSG_VD, PublId );
417  doit( RAW_HSG_VD, PreparerId );
418  doit( RAW_HSG_VD, AppId );
419  doit( RAW_HSG_VD, Copyright );
420  doit( RAW_HSG_VD, Abstract );
421  doit( RAW_HSG_VD, CreateDate );
422  doit( RAW_HSG_VD, ModDate );
423  doit( RAW_HSG_VD, ExpireDate );
424  doit( RAW_HSG_VD, EffectDate );
425  doit( RAW_HSG_VD, FileStructVer );
427  doit( RAW_HSG_VD, ResApp );
429  }
430  printf("\n");
431  {
432  RAW_DIRENT d;
433  doit( RAW_DIRENT, DirLen );
434  doit( RAW_DIRENT, XarLen );
435  doit( RAW_DIRENT, FileLoc );
436  doit( RAW_DIRENT, FileLocMot );
437  doit( RAW_DIRENT, DataLen );
438  doit( RAW_DIRENT, DataLenMot );
439  doit( RAW_DIRENT, RecordTime );
440  doit( RAW_DIRENT, FlagsHSG );
441  doit( RAW_DIRENT, FlagsISO );
442  doit( RAW_DIRENT, IntLeaveSize );
443  doit( RAW_DIRENT, IntLeaveSkip );
444  doit( RAW_DIRENT, Vssn );
445  doit( RAW_DIRENT, VssnMot );
446  doit( RAW_DIRENT, FileIdLen );
447  doit( RAW_DIRENT, FileId );
448  }
449  printf("\n");
450  {
451  RAW_PATH_ISO d;
452  doit( RAW_PATH_ISO, DirIdLen );
453  doit( RAW_PATH_ISO, XarLen );
454  doit( RAW_PATH_ISO, DirLoc );
455  doit( RAW_PATH_ISO, ParentNum );
456  doit( RAW_PATH_ISO, DirId );
457  }
458  printf("\n");
459  {
460  RAW_PATH_HSG d;
461  doit( RAW_PATH_HSG, DirLoc );
462  doit( RAW_PATH_HSG, XarLen );
463  doit( RAW_PATH_HSG, DirIdLen );
464  doit( RAW_PATH_HSG, ParentNum );
465  doit( RAW_PATH_HSG, DirId );
466  }
467  printf("\n");
468  {
473  doit( SYSTEM_USE_XA, FileNumber );
475  }
476 }
IN PDCB IN POEM_STRING IN PUNICODE_STRING IN OUT POEM_STRING ShortName
Definition: fatprocs.h:1294
static int argc
Definition: ServiceArgs.c:12
_In_ PFCB _In_ LONGLONG _Out_ PLONGLONG DiskOffset
Definition: cdprocs.h:151
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
VOID __cdecl main(int argc, argv)
Definition: fieldoff.c:8
Dirent ExtentType
Definition: dirsup.c:520
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
_In_ PFCB _In_ LONGLONG StartingOffset
Definition: cdprocs.h:282
#define __cdecl
Definition: accygwin.h:79
_In_ PIRP Irp
Definition: csq.h:116
Definition: cdstruc.h:908
Definition: cdstruc.h:1073
Dirent DirentOffset
Definition: dirsup.c:444
Dirent XAAttributes
Definition: dirsup.c:518
Definition: cdstruc.h:504
Dirent CdTime
Definition: dirsup.c:471
#define argv
Definition: mplay32.c:18
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK _In_ USHORT ShareAccess
Definition: create.c:4157
static void CharSet(RTF_Info *info)
Definition: reader.c:2420
IN PFCB IN PCCB IN TYPE_OF_OPEN IN BOOLEAN IN BOOLEAN TopLevel
Definition: fatprocs.h:2401
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
Definition: cdprocs.h:848
Definition: Header.h:8
_Inout_ PUCHAR _In_ PUCHAR _Out_ PUCHAR _Out_ PULONG ChunkSize
Definition: rtlfuncs.h:2276
#define SectorOffset(L)
Definition: cdprocs.h:1632
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE _In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG FileAttributes
Definition: fltkernel.h:1230
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
Dirent SystemUseOffset
Definition: dirsup.c:521
Dirent XAFileNumber
Definition: dirsup.c:519
Definition: cdstruc.h:281
Dirent FileNameLen
Definition: dirsup.c:506
#define d
Definition: ke_i.h:81
#define doit(a, b)
Definition: fieldoff.c:4
#define Vcb
Definition: cdprocs.h:1425
_In_ PFCB _In_ PDIRENT_ENUM_CONTEXT DirContext
Definition: cdprocs.h:429
_In_ PFCB ParentFcb
Definition: cdprocs.h:741
_In_ ERESOURCE_THREAD ResourceThreadId
Definition: exfuncs.h:844
Dirent DirentLength
Definition: dirsup.c:450
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
Definition: fsrtlfuncs.h:108
ULONG SectorCount
Definition: part_xbox.c:32
_In_ UCHAR MinorFunction
Definition: pofuncs.h:42
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
Definition: iotypes.h:1060
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
Definition: cdstruc.h:1466
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES Attributes
Definition: hidpi.h:348
Definition: cdstruc.h:1531
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:334
Dirent DirentFlags
Definition: dirsup.c:477
WCHAR FileNameBuffer[_MAX_PATH]
Definition: framewnd.c:239
Definition: cdstruc.h:206
_In_ PFCB _In_ PDIRENT_ENUM_CONTEXT _Inout_ PDIRENT Dirent
Definition: cdprocs.h:429
_In_ PFCB _In_ PCD_NAME DirName
Definition: cdprocs.h:741
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG DataLength
Definition: hidpi.h:333
_In_ PFCB Fcb
Definition: cdprocs.h:151
_Must_inspect_result_ _In_opt_ PVOID OwnerId
Definition: fsrtlfuncs.h:907
IN OUT PVCB IN PDEVICE_OBJECT TargetDeviceObject
Definition: fatprocs.h:1664
static const WCHAR Signature[]
Definition: parser.c:141
Dirent FileUnitSize
Definition: dirsup.c:484
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
Definition: fatprocs.h:1664
#define printf
Definition: config.h:203