-
Notifications
You must be signed in to change notification settings - Fork 9
/
StringTableTestGlue.h
705 lines (593 loc) · 20.8 KB
/
StringTableTestGlue.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
/*++
Copyright (c) 2016 Trent Nelson <trent@trent.me>
Module Name:
StringTableTestGlue.h
Abstract:
This module provides various structures, constructs and type definitions
that can be useful when writing unit tests or custom load generators for
performance profiling.
--*/
#pragma once
#include "stdafx.h"
#ifdef __cplusplus
extern "C" {
#endif
////////////////////////////////////////////////////////////////////////////////
// Structures
////////////////////////////////////////////////////////////////////////////////
//
// The following STRING_ARRAY structures are useful for creating static arrays
// of a given size. They also allow the member strings to be viewed easier
// whilst debugging as the 'STRING Strings[]' array is sized accordingly.
//
typedef struct _STRING_ARRAY2 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[2];
} STRING_ARRAY2, *PSTRING_ARRAY2, **PPSTRING_ARRAY2;
typedef struct _STRING_ARRAY3 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[3];
} STRING_ARRAY3, *PSTRING_ARRAY3, **PPSTRING_ARRAY3;
typedef struct _STRING_ARRAY4 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[4];
} STRING_ARRAY4, *PSTRING_ARRAY4, **PPSTRING_ARRAY4;
typedef struct _STRING_ARRAY5 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[5];
} STRING_ARRAY5, *PSTRING_ARRAY5, **PPSTRING_ARRAY5;
typedef struct _STRING_ARRAY6 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[6];
} STRING_ARRAY6, *PSTRING_ARRAY6, **PPSTRING_ARRAY6;
typedef struct _STRING_ARRAY7 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[7];
} STRING_ARRAY7, *PSTRING_ARRAY7, **PPSTRING_ARRAY7;
typedef struct _STRING_ARRAY8 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[8];
} STRING_ARRAY8, *PSTRING_ARRAY8, **PPSTRING_ARRAY8;
typedef struct _STRING_ARRAY9 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[9];
} STRING_ARRAY9, *PSTRING_ARRAY9, **PPSTRING_ARRAY9;
typedef struct _STRING_ARRAY10 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[10];
} STRING_ARRAY10, *PSTRING_ARRAY10, **PPSTRING_ARRAY10;
typedef struct _STRING_ARRAY11 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[11];
} STRING_ARRAY11, *PSTRING_ARRAY11, **PPSTRING_ARRAY11;
typedef struct _STRING_ARRAY12 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[12];
} STRING_ARRAY12, *PSTRING_ARRAY12, **PPSTRING_ARRAY12;
typedef struct _STRING_ARRAY13 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[13];
} STRING_ARRAY13, *PSTRING_ARRAY13, **PPSTRING_ARRAY13;
typedef struct _STRING_ARRAY14 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[14];
} STRING_ARRAY14, *PSTRING_ARRAY14, **PPSTRING_ARRAY14;
typedef struct _STRING_ARRAY15 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[15];
} STRING_ARRAY15, *PSTRING_ARRAY15, **PPSTRING_ARRAY15;
typedef struct _STRING_ARRAY16 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[16];
} STRING_ARRAY16, *PSTRING_ARRAY16, **PPSTRING_ARRAY16;
typedef struct _STRING_ARRAY17 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[17];
} STRING_ARRAY17, *PSTRING_ARRAY17, **PPSTRING_ARRAY17;
typedef struct _STRING_ARRAY18 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[18];
} STRING_ARRAY18, *PSTRING_ARRAY18, **PPSTRING_ARRAY18;
typedef struct _STRING_ARRAY19 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[19];
} STRING_ARRAY19, *PSTRING_ARRAY19, **PPSTRING_ARRAY19;
typedef struct _STRING_ARRAY20 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[20];
} STRING_ARRAY20, *PSTRING_ARRAY20, **PPSTRING_ARRAY20;
typedef struct _STRING_ARRAY21 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[21];
} STRING_ARRAY21, *PSTRING_ARRAY21, **PPSTRING_ARRAY21;
typedef struct _STRING_ARRAY22 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[22];
} STRING_ARRAY22, *PSTRING_ARRAY22, **PPSTRING_ARRAY22;
typedef struct _STRING_ARRAY23 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[23];
} STRING_ARRAY23, *PSTRING_ARRAY23, **PPSTRING_ARRAY23;
typedef struct _STRING_ARRAY24 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[24];
} STRING_ARRAY24, *PSTRING_ARRAY24, **PPSTRING_ARRAY24;
typedef struct _STRING_ARRAY25 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[25];
} STRING_ARRAY25, *PSTRING_ARRAY25, **PPSTRING_ARRAY25;
typedef struct _STRING_ARRAY26 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[26];
} STRING_ARRAY26, *PSTRING_ARRAY26, **PPSTRING_ARRAY26;
typedef struct _STRING_ARRAY27 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[27];
} STRING_ARRAY27, *PSTRING_ARRAY27, **PPSTRING_ARRAY27;
typedef struct _STRING_ARRAY28 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[28];
} STRING_ARRAY28, *PSTRING_ARRAY28, **PPSTRING_ARRAY28;
typedef struct _STRING_ARRAY29 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[29];
} STRING_ARRAY29, *PSTRING_ARRAY29, **PPSTRING_ARRAY29;
typedef struct _STRING_ARRAY30 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[30];
} STRING_ARRAY30, *PSTRING_ARRAY30, **PPSTRING_ARRAY30;
typedef struct _STRING_ARRAY31 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[31];
} STRING_ARRAY31, *PSTRING_ARRAY31, **PPSTRING_ARRAY31;
typedef struct _STRING_ARRAY32 {
USHORT SizeInQuadwords;
USHORT NumberOfElements;
USHORT MinimumLength;
USHORT MaximumLength;
struct _STRING_TABLE *StringTable;
STRING Strings[32];
} STRING_ARRAY32, *PSTRING_ARRAY32, **PPSTRING_ARRAY32;
////////////////////////////////////////////////////////////////////////////////
// Macros
////////////////////////////////////////////////////////////////////////////////
#define INIT_ALLOCATOR(Allocator) RtlInitializeHeapAllocator(Allocator)
#define DESTROY_ALLOCATOR(Allocator) RtlDestroyHeapAllocator(Allocator)
#define MAKE_STRING(Name) STRING Name = RTL_CONSTANT_STRING(#Name)
#define DECLARE_STRING(Name) extern STRING Name
#define MAKE_TABLE(Array) \
Api->CreateStringTable(Rtl, \
(PALLOCATOR)Allocator, \
(PALLOCATOR)Allocator, \
(PSTRING_ARRAY)(Array), \
TRUE)
#define DESTROY_TABLE(StringTable) \
Api->DestroyStringTable( \
Allocator, \
Allocator, \
StringTable \
); \
StringTable = NULL
#define CONSTANT_STRING_ARRAY(S1) { \
0, 1, 0, 0, NULL, { S1 } \
}
#define CONSTANT_STRING_ARRAY2(S1, S2) { \
0, 2, 0, 0, NULL, { S1, S2 } \
}
#define CONSTANT_STRING_ARRAY3(S1, S2, S3) { \
0, 3, 0, 0, NULL, { S1, S2, S3 } \
}
#define CONSTANT_STRING_ARRAY5(S1, S2, S3, S4, S5) { \
0, 5, 0, 0, NULL, { S1, S2, S3, S4, S5 } \
}
#define CONSTANT_STRING_ARRAY6(S1, S2, S3, S4, S5, S6) { \
0, 6, 0, 0, NULL, { S1, S2, S3, S4, S5, S6 } \
}
#define CONSTANT_STRING_ARRAY7(S1, S2, S3, S4, S5, S6, S7) { \
0, 7, 0, 0, NULL, { S1, S2, S3, S4, S5, S6, S7 } \
}
#define CONSTANT_STRING_ARRAY8(S1, S2, S3, S4, S5, S6, S7, S8) { \
0, 8, 0, 0, NULL, { S1, S2, S3, S4, S5, S6, S7, S8 } \
}
#define CONSTANT_STRING_ARRAY9(S1, S2, S3, S4, S5, S6, S7, S8, S9) { \
0, 9, 0, 0, NULL, { S1, S2, S3, S4, S5, S6, S7, S8, S9 } \
}
#define CONSTANT_STRING_ARRAY16(S1, S2, S3, S4, S5, S6, S7, S8, S9, \
S10, S11, S12, S13, S14, S15, S16) { \
0, 16, 0, 0, NULL, { \
S1, S2, S3, S4, S5, S6, S7, S8, S9, \
S10, S11, S12, S13, S14, S15, S16 \
} \
}
#define CONSTANT_STRING_ARRAY18(S1, S2, S3, S4, S5, S6, S7, S8, S9, \
S10, S11, S12, S13, S14, S15, S16, S17, S18) { \
0, 18, 0, 0, NULL, { \
S1, S2, S3, S4, S5, S6, S7, S8, S9, \
S10, S11, S12, S13, S14, S15, S16, S17, S18 \
} \
}
////////////////////////////////////////////////////////////////////////////////
// Dummy Test Strings
////////////////////////////////////////////////////////////////////////////////
DECLARE_STRING(falcon);
DECLARE_STRING(tomcat);
DECLARE_STRING(warthog);
DECLARE_STRING(viper);
DECLARE_STRING(fox);
DECLARE_STRING(fox1);
DECLARE_STRING(fox2);
DECLARE_STRING(lightning_storm);
DECLARE_STRING(really_bad_lightning_storm);
DECLARE_STRING(a);
DECLARE_STRING(ab);
DECLARE_STRING(abc);
DECLARE_STRING(abcd);
DECLARE_STRING(abcde);
DECLARE_STRING(abcdef);
DECLARE_STRING(abcdefg);
DECLARE_STRING(abcdefgh);
DECLARE_STRING(abcdefghi);
DECLARE_STRING(abcdefghij);
DECLARE_STRING(abcdefghijk);
DECLARE_STRING(abcdefghijkl);
DECLARE_STRING(abcdefghijklm);
DECLARE_STRING(abcdefghijklmn);
DECLARE_STRING(abcdefghijklmno);
DECLARE_STRING(abcdefghijklmnop);
DECLARE_STRING(abcdefghijklmnopq);
DECLARE_STRING(abcdefghijklmnopqr);
DECLARE_STRING(abcdefghijklmnopqrs);
DECLARE_STRING(abcdefghijklmnopqrst);
DECLARE_STRING(abcdefghijklmnopqrstu);
DECLARE_STRING(abcdefghijklmnopqrstuv);
DECLARE_STRING(abcdefghijklmnopqrstuvw);
DECLARE_STRING(abcdefghijklmnopqrstuvwy);
DECLARE_STRING(abcdefghijklmnopqrstuvwyx);
DECLARE_STRING(abcdefghijklmnopqrstuvwyxz);
DECLARE_STRING(abcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghij);
DECLARE_STRING(abcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghijklm);
DECLARE_STRING(abcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghijklmn);
DECLARE_STRING(bcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghij);
DECLARE_STRING(bcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghijklmn);
DECLARE_STRING(bcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghijklmno);
#define ABC_LONG \
abcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghij
#define ABCD_LONG \
abcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghijklm
#define ABCD_LONGEST \
abcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghijklmn
#define BCD_LONG \
bcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghij
#define BCDE_LONG \
bcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghijklmn
#define BCDE_LONGEST \
bcdefghijklmnopqrstuvwyxzabcdefghijklmnopqrstuvwyxzabcdefghijklmno
DECLARE_STRING(bcdefgefh);
DECLARE_STRING(efghijklmn);
DECLARE_STRING(ghibdefjf);
DECLARE_STRING(jklmnopqrst);
DECLARE_STRING(klmn);
DECLARE_STRING(klmnopqrstu);
DECLARE_STRING(lmnopqrstuv);
DECLARE_STRING(lmnopqr);
DECLARE_STRING(lmno);
DECLARE_STRING(mnopqrstu);
DECLARE_STRING(mnopqrstuvw);
DECLARE_STRING(nop);
DECLARE_STRING(nopqrstuvwy);
DECLARE_STRING(fourteen141414);
DECLARE_STRING(fifteen15151515);
DECLARE_STRING(sixteen161616161);
DECLARE_STRING(seventeen17171717);
DECLARE_STRING(eighteen1818181818);
////////////////////////////////////////////////////////////////////////////////
// Example Data
////////////////////////////////////////////////////////////////////////////////
#undef DSTR
#define DSTR(String) String ";"
extern const CHAR StringTableDelimiter;
extern const STRING NtfsReservedNames;
extern const PCSZ NtfsReservedNamesCStrings[];
#define DECLARE_NTFS1(Id, Value) extern const STRING Ntfs##Id##Name
#define MAKE_NTFS1(Id, Value) \
const STRING Ntfs##Id##Name = RTL_CONSTANT_STRING(Value)
DECLARE_NTFS1(AttrDef, "$AttrDef");
DECLARE_NTFS1(BadClus, "$BadClus");
DECLARE_NTFS1(Bitmap, "$Bitmap");
DECLARE_NTFS1(Boot, "$Boot");
DECLARE_NTFS1(Extend, "$Extend");
DECLARE_NTFS1(LogFile, "$LogFile");
DECLARE_NTFS1(MftMirr, "$MftMirr");
DECLARE_NTFS1(Mft, "$Mft");
DECLARE_NTFS1(Secure, "$Secure");
DECLARE_NTFS1(UpCase, "$UpCase");
DECLARE_NTFS1(Volume, "$Volume");
DECLARE_NTFS1(Cairo, "$Cairo");
DECLARE_NTFS1(IndexAllocation, "$INDEX_ALLOCATION");
DECLARE_NTFS1(Data, "$DATA");
DECLARE_NTFS1(Unknown, "????");
DECLARE_NTFS1(Dot, ".");
DECLARE_NTFS1(WorstCase, "$Bai123456789012");
#define NTFS_WORST_CASE_TEST_INPUT() { -1, (PSTRING)&NtfsWorstCaseName }
typedef enum _NTFS_RESERVED_NAME_ID {
NotNtfsReservedName = -1,
NtfsAttrDef = 0,
NtfsBadClus,
NtfsBitmap,
NtfsBoot,
NtfsExtend,
NtfsLogFile,
NtfsMftMirr,
NtfsMft,
NtfsSecure,
NtfsUpCase,
NtfsVolume,
NtfsCairo,
NtfsIndexAllocation,
NtfsData,
NtfsUnknown,
NtfsDot,
} NTFS_RESERVED_NAME_ID;
//
// Slight twist with lots of $MftMirr variants.
//
extern const STRING Ntfs2ReservedNames;
#define DECLARE_NTFS2(Id, Value) extern const STRING Ntfs2##Id##Name
#define MAKE_NTFS2(Id, Value) \
const STRING Ntfs2##Id##Name = RTL_CONSTANT_STRING(Value)
DECLARE_NTFS2(MftMirr1234567890, "$MftMirr1234567890");
DECLARE_NTFS2(MftMirr123456789, "$MftMirr123456789");
DECLARE_NTFS2(MftMirr12345678, "$MftMirr12345678");
DECLARE_NTFS2(MftMirr1234567, "$MftMirr1234567");
DECLARE_NTFS2(MftMirr123456, "$MftMirr123456");
DECLARE_NTFS2(MftMirr12345, "$MftMirr12345");
DECLARE_NTFS2(MftMirr1234, "$MftMirr1234");
DECLARE_NTFS2(MftMirr123, "$MftMirr123");
DECLARE_NTFS2(MftMirr12, "$MftMirr12");
DECLARE_NTFS2(MftMirr1, "$MftMirr1");
DECLARE_NTFS2(MftMirr, "$MftMirr");
DECLARE_NTFS2(Mft, "$Mft");
DECLARE_NTFS2(IndexAllocation, "$INDEX_ALLOCATION");
DECLARE_NTFS2(Data, "$DATA");
DECLARE_NTFS2(Unknown, "????");
DECLARE_NTFS2(Dot, ".");
typedef enum _NTFS2_RESERVED_NAME_ID {
NotNtfs2ReservedName = -1,
Ntfs2MftMirr1234567890 = 0,
Ntfs2MftMirr123456789,
Ntfs2MftMirr12345678,
Ntfs2MftMirr1234567,
Ntfs2MftMirr123456,
Ntfs2MftMirr12345,
Ntfs2MftMirr1234,
Ntfs2MftMirr123,
Ntfs2MftMirr12,
Ntfs2MftMirr1,
Ntfs2MftMirr,
Ntfs2Mft,
Ntfs2IndexAllocation,
Ntfs2Data,
Ntfs2Unknown,
Ntfs2Dot,
} NTFS2_RESERVED_NAME_ID;
//
// Another twist with exclusively $MftMirr variants..
//
extern const STRING Ntfs3ReservedNames;
#define DECLARE_NTFS3(Id, Value) extern const STRING Ntfs3##Id##Name
#define MAKE_NTFS3(Id, Value) \
const STRING Ntfs3##Id##Name = RTL_CONSTANT_STRING(Value)
DECLARE_NTFS3(MftMirr1334567890123456789012, "$MftMirr1334567890123456789012");
DECLARE_NTFS3(MftMirr1334567890123456789, "$MftMirr1334567890123456789");
DECLARE_NTFS3(MftMirr1334567890123456, "$MftMirr1334567890123456");
DECLARE_NTFS3(MftMirr133456789012345, "$MftMirr133456789012345");
DECLARE_NTFS3(MftMirr13345678901234, "$MftMirr13345678901234");
DECLARE_NTFS3(MftMirr1334567890123, "$MftMirr1334567890123");
DECLARE_NTFS3(MftMirr133456789012, "$MftMirr133456789012");
DECLARE_NTFS3(MftMirr1334567890, "$MftMirr1334567890");
DECLARE_NTFS3(MftMirr133456789, "$MftMirr133456789");
DECLARE_NTFS3(MftMirr13345678, "$MftMirr13345678");
DECLARE_NTFS3(MftMirr1334567, "$MftMirr1334567");
DECLARE_NTFS3(MftMirr133456, "$MftMirr133456");
DECLARE_NTFS3(MftMirr13345, "$MftMirr13345");
DECLARE_NTFS3(MftMirr1334, "$MftMirr1334");
DECLARE_NTFS3(MftMirr133, "$MftMirr133");
DECLARE_NTFS3(MftMirr13, "$MftMirr13");
typedef enum _NTFS3_RESERVED_NAME_ID {
NotNtfs3ReservedName = -1,
Ntfs3MftMirr1334567890123456789012 = 0,
Ntfs3MftMirr1334567890123456789,
Ntfs3MftMirr1334567890123456,
Ntfs3MftMirr133456789012345,
Ntfs3MftMirr13345678901234,
Ntfs3MftMirr1334567890123,
Ntfs3MftMirr133456789012,
Ntfs3MftMirr1334567890,
Ntfs3MftMirr133456789,
Ntfs3MftMirr13345678,
Ntfs3MftMirr1334567,
Ntfs3MftMirr133456,
Ntfs3MftMirr13345,
Ntfs3MftMirr1334,
Ntfs3MftMirr133,
Ntfs3MftMirr13,
} NTFS3_RESERVED_NAME_ID;
//
// Miscellaneous Test Inputs.
//
extern const STRING Misc1ReservedNames;
#define DECLARE_MISC1(Id, Value) extern const STRING Misc1##Id##Name
#define MAKE_MISC1(Id, Value) \
const STRING Misc1##Id##Name = RTL_CONSTANT_STRING(Value)
DECLARE_MISC1(abcdefghijklmnopqrstuvw, "abcdefghijklmnopqrstuvw");
DECLARE_MISC1(nop, "nop");
DECLARE_MISC1(fox1, "fox1");
DECLARE_MISC1(klmnopqrstu, "klmnopqrstu");
DECLARE_MISC1(abcdefghijk, "abcdefghijk");
DECLARE_MISC1(lmnopqr, "lmnopqr");
typedef enum _MISC1_NAME_ID {
NotMisc1Name = -1,
Misc1abcdefghijklmnopqrstuvw = 0,
Misc1nop,
Misc1fox1,
Misc1klmnopqrstu,
Misc1abcdefghijk,
Misc1lmnopqr,
} MISC1_NAME_ID;
//
// Declare various constants defined in StringTableTestGlue.c.
//
extern const STRING_TABLE_FUNCTION_OFFSET IsPrefixFunctions[];
extern const ULONG NumberOfIsPrefixFunctions;
//
// Ntfs Test Inputs
//
#define NTFS_TEST_INPUT(N) { Ntfs##N, (PSTRING)&Ntfs##N##Name }
extern const STRING_TABLE_TEST_INPUT NtfsTestInputs[];
extern const ULONG NumberOfNtfsTestInputs;
extern STRING_ARRAY16 NtfsStringArray16;
//
// Ntfs2 Test Inputs
//
#define NTFS2_TEST_INPUT(N) { Ntfs2##N, (PSTRING)&Ntfs2##N##Name }
extern const STRING_TABLE_TEST_INPUT Ntfs2TestInputs[];
extern const ULONG NumberOfNtfs2TestInputs;
extern STRING_ARRAY16 Ntfs2StringArray16;
//
// Ntfs3 Test Inputs
//
#define NTFS3_TEST_INPUT(N) { Ntfs3##N, (PSTRING)&Ntfs3##N##Name }
extern const STRING_TABLE_TEST_INPUT Ntfs3TestInputs[];
extern const ULONG NumberOfNtfs3TestInputs;
extern STRING_ARRAY16 Ntfs3StringArray16;
//
// Miscellaneous Test Inputs.
//
#define MISC1_TEST_INPUT(N) { Misc1##N, (PSTRING)&Misc1##N##Name }
extern const STRING_TABLE_TEST_INPUT Misc1TestInputs[];
extern const ULONG NumberOfMisc1TestInputs;
extern STRING_ARRAY16 Misc1StringArray16;
#ifdef __cplusplus
} // extern "C"
#endif
// vim:set ts=8 sw=4 sts=4 tw=80 expandtab :