]> git.saurik.com Git - apple/security.git/blob - AppleDL/FORMAT
Security-29.tar.gz
[apple/security.git] / AppleDL / FORMAT
1 Some notes of the format of DL files:
2
3
4
5 DL file format:
6
7 All offsets are relative to the start of the section they are in.
8 All fileds are uint32 (4 bytes) unless otherwise specified. All other fields are aligned on 4 bytes boundries.
9
10 Header Section
11 Magic
12 File Format Version Number
13 Auth Section Offset
14 Schema Section Offset
15
16 Auth Section
17 Auth Info Size
18 Auth Info Data
19
20 Schema Section # This section is always read entirely into memory
21 Schema Section Size (uint32)
22 Tables
23 Table Count (uint32)
24 Table Offset 0 # Relative to start of Schema Section
25 Table Offset 1
26 ...
27 Table Offset N
28
29 # Information about parsing modules is read directly from the meta tables
30 Table Section
31 Table Section Size
32 Table ID (uint32)
33 Records Count # Number of Records in record section.
34 Record 0 Offset # Relative to start of Table Section.
35 Index SubSection Offset # Relative to start of Table Section
36 Head of Free List # Table Section relative first free
37 # recordNumber slot (with bit 0 set)
38 # Or 0 if there are no free records
39 Record Number Count # Start of range of unused record numbers
40 Record 0 offset # Relative to start of Table Section.
41 Record 1 offset
42 Record 2 freelist # If Bit zero is set this is Table Section
43 # relative offset to next free recordNumber
44 # 0 indicates the last free record slot.
45 ...
46 Record n offset
47 Record
48 Record Size # Rounded up to nearest mulitple of 4
49 Record Number
50 Creation File Version
51 Record Version
52 Data Size
53 SemanticInformation
54 Attribute 0 Offset
55 Attribute 1 Offset
56 Attribute 2 Offset
57 ...
58 Attribute m Offset
59 Data
60 Data
61 Attribute 0
62 Size
63 Data
64 Attribute 1
65 Value
66 ...
67 Attribute m
68 Value Count
69 Value 0
70 Value 1
71 ...
72 Value p
73 Record
74 ...
75 Record
76 Index SubSection
77 Index SubSection Size
78 Index TOC # This is part of the Schema
79 Record Type
80 Attribute Type
81 Index Offset
82 Index 1
83 Index Size
84 Index Offsets
85 Index Offset Count
86 Index Data 1 Offset
87 Index Data 2 Offset
88 ...
89 Index Data m OFFSET
90 Index Data
91 Index Data 1
92 Record Offset
93 Attribute Size
94 Attribute Data
95 Index Data 2
96 ...
97 Index Data N
98 Index 2
99 ...
100 Index n
101
102 Version Section # Maintained by AtomicFile code
103 4 byte version number
104
105 old Schema Section # This section is always read entirely into memory
106 Schema Section Size (uint32)
107 Releations
108 Relation Count (uint32)
109 Relation
110 Relation ID (uint32)
111 Record Section Offset
112 Relation Name Size
113 Relation Name Data
114 Attributes
115 Attribute Count (uint32)
116 Attribute
117 Releation ID (uint32)
118 Attribute ID (uint32)
119 Attribute Format (uint32)
120 Attribute Name Format (uint32)
121 Attribute Name Size
122 Attribute Name Data
123 Attribute Name ID Size
124 Attribute Name ID Data
125 ParsingModule
126 Parsion Module Present (bool)
127 Module ID (GUID)
128 SSID (uint32)
129 SubService Type (uint32)
130 Addin Version Major (uint32)
131 Addin Version Minor (uint32)
132 Attribute
133 ...
134 Attribute
135 Indexes
136 Index Count (uint32)
137 Index
138 Relation ID (uint32)
139 Index ID (uint32)
140 Index Type (uint32)
141 Indexed Data Location (uint32)
142 Index Attribute Count (uint32)
143 Attribute ID (uint32)
144 Attribute ID (uint32)
145 ...
146 Attribute ID (uint32)
147 Index
148 ...
149 Index
150 Relation
151 ...
152 Relation
153