-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdumper.h
137 lines (114 loc) · 3.92 KB
/
dumper.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
/* 5 bytes per 36-bit word */
/* 518 word logical blocks */
#define TAPEBLK 518*5*15
/* Checksum is first word */
#define WdoffChecksum 0
#define BtoffChecksum 0
#define BtlenChecksum 36
/* Page access bits is second word */
#define WdoffAccess 1
#define BtoffAccess 0
#define BtlenAccess 36
/* SCD, first 3 bits in next word */
#define WdoffSCD 2
#define BtoffSCD 0
#define BtlenSCD 3
/* Number of saveset on tape */
#define WdoffSaveSetNum 2
#define BtoffSaveSetNum 3
#define BtlenSaveSetNum 15
/* Tape number of dump */
#define WdoffTapeNum 2
#define BtoffTapeNum 18
#define BtlenTapeNum 18
/* F1, F2 Flag bits */
#define WdoffF1F2 3
#define BtoffF1F2 0
#define BtlenF1F2 2
/* File Number in Set (new format only) */
#define WdoffFileNum 3
#define BtoffFileNum 2
#define BtlenFileNum 16
/* Page Number in file */
#define WdoffPageNum 3
#define BtoffPageNum 18
#define BtlenPageNum 18
/* Record type (2's complement) */
#define WdoffRectype 4
#define BtoffRectype 0
#define BtlenRectype 36
/* Record sequence number */
#define WdoffRecseq 5
#define BtoffRecseq 0
#define BtlenRecseq 36
/* SCD Values */
#define SCDNormal 0
#define SCDCollection 1
#define SCDArchive 2
#define SCDMigration 3
/* F1, F2 Values */
#define F1F2Old 0
#define F1F2OldContinue 3
#define F1F2New 1
#define F1F2NewContinue 2
/* Record type values */
#define RectypeData 0
#define RectypeTphd 1
#define RectypeFlhd 2
#define RectypeFltr 3
#define RectypeTptr 4
#define RectypeUsr 5
#define RectypeCtph 6
#define RectypeFill 7
char *rectypes[] = {
"DATA",
"ISSH",
"FLHD",
"FLTR",
"TPTR",
"UDIR",
"CSSH",
"FILL",
};
#define BtoffWord 0
#define BtlenWord 36
#define WdoffSSstart 6 /* Start of saveset data */
#define WdoffSSFmt 6 /* Format of tape */
#define WdoffSSPtr 7 /* Pointer to saveset name (or 3 or 020 depending on format) */
#define WdoffSSDate 8 /* Saveset date offset (type 1, 6) */
#define WdoffSSName 9 /* Saveset name offset (type 1, 6) */
#define WdoffFLName 6 /* Filename offset (type 2) */
#define WdoffSSMsg (020+WdoffSSstart) /* Saveset name (unless SSPtr set) */
#define WdoffFDB 134 /* FDB offset (type 2) */
#define WdoffFDB_CTL 01+WdoffFDB /* Control word .FBCTL */
#define BtoffFDB_Arc 11 /* archived */
#define BtlenFDB_Arc 1
#define BtoffFDB_Inv 12 /* invisible */
#define BtlenFDB_Inv 1
#define BtoffFDB_Off 13 /* offline */
#define BtlenFDB_Off 1
#define WdoffFDB_PRT 04+WdoffFDB /* protection */
#define BtoffFDB_PRT 18
#define BtlenFDB_PRT 18
#define WdoffFDB_BSZ 011+WdoffFDB /* Number of bits per byte */
#define BtoffFDB_BSZ 6
#define BtlenFDB_BSZ 6
#define WdoffFDB_PGC 011+WdoffFDB /* Number of pages in the file */
#define BtoffFDB_PGC 18
#define BtlenFDB_PGC 18
#define WdoffFDB_Size 012+WdoffFDB /* Number of bytes in the file */
#define BtoffFDB_Size 0
#define BtlenFDB_Size 36
#define WdoffFDB_Wrt 014+WdoffFDB /* Date of last write to file */
#define WdoffFDB_Ref 015+WdoffFDB /* read time */
#define WdoffFDB_PGC_A 022+WdoffFDB /* Pagecount before archive */
#define WdoffFDB_TP1 033+WdoffFDB /* Tape ID for archive run 1 */
#define WdoffFDB_SS1 034+WdoffFDB /* Saveset # for archive run 1 */
#define BtoffFDB_SS 0
#define BtlenFDB_SS 18
#define WdoffFDB_TF1 034+WdoffFDB /* Tape file # for archive run 1 */
#define BtoffFDB_TF 18
#define BtlenFDB_TF 18
#define WdoffFDB_TP2 035+WdoffFDB /* Tape ID for archive run 2 */
#define WdoffFDB_SS2 036+WdoffFDB /* Saveset # for archive run 2 */
#define WdoffFDB_TF2 036+WdoffFDB /* Tape file # for archive run 2 */