c4a03f41d5d4bcbe29648ea3cd74dbd216827b5b
[dragonfly.git] / contrib / file / magic / Magdir / database
1
2 #------------------------------------------------------------------------------
3 # $File: database,v 1.24 2009/09/19 16:28:08 christos Exp $
4 # database:  file(1) magic for various databases
5 #
6 # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
7 #
8 #
9 # GDBM magic numbers
10 #  Will be maintained as part of the GDBM distribution in the future.
11 #  <downsj@teeny.org>
12 0       belong  0x13579ace      GNU dbm 1.x or ndbm database, big endian
13 !:mime  application/x-gdbm
14 0       lelong  0x13579ace      GNU dbm 1.x or ndbm database, little endian
15 !:mime  application/x-gdbm
16 0       string  GDBM            GNU dbm 2.x database
17 !:mime  application/x-gdbm
18 #
19 # Berkeley DB
20 #
21 # Ian Darwin's file /etc/magic files: big/little-endian version.
22 #
23 # Hash 1.85/1.86 databases store metadata in network byte order.
24 # Btree 1.85/1.86 databases store the metadata in host byte order.
25 # Hash and Btree 2.X and later databases store the metadata in host byte order.
26
27 0       long    0x00061561      Berkeley DB
28 !:mime  application/x-dbm
29 >8      belong  4321
30 >>4     belong  >2              1.86
31 >>4     belong  <3              1.85
32 >>4     belong  >0              (Hash, version %d, native byte-order)
33 >8      belong  1234
34 >>4     belong  >2              1.86
35 >>4     belong  <3              1.85
36 >>4     belong  >0              (Hash, version %d, little-endian)
37
38 0       belong  0x00061561      Berkeley DB
39 >8      belong  4321
40 >>4     belong  >2              1.86
41 >>4     belong  <3              1.85
42 >>4     belong  >0              (Hash, version %d, big-endian)
43 >8      belong  1234
44 >>4     belong  >2              1.86
45 >>4     belong  <3              1.85
46 >>4     belong  >0              (Hash, version %d, native byte-order)
47
48 0       long    0x00053162      Berkeley DB 1.85/1.86
49 >4      long    >0              (Btree, version %d, native byte-order)
50 0       belong  0x00053162      Berkeley DB 1.85/1.86
51 >4      belong  >0              (Btree, version %d, big-endian)
52 0       lelong  0x00053162      Berkeley DB 1.85/1.86
53 >4      lelong  >0              (Btree, version %d, little-endian)
54
55 12      long    0x00061561      Berkeley DB
56 >16     long    >0              (Hash, version %d, native byte-order)
57 12      belong  0x00061561      Berkeley DB
58 >16     belong  >0              (Hash, version %d, big-endian)
59 12      lelong  0x00061561      Berkeley DB
60 >16     lelong  >0              (Hash, version %d, little-endian)
61
62 12      long    0x00053162      Berkeley DB
63 >16     long    >0              (Btree, version %d, native byte-order)
64 12      belong  0x00053162      Berkeley DB
65 >16     belong  >0              (Btree, version %d, big-endian)
66 12      lelong  0x00053162      Berkeley DB
67 >16     lelong  >0              (Btree, version %d, little-endian)
68
69 12      long    0x00042253      Berkeley DB
70 >16     long    >0              (Queue, version %d, native byte-order)
71 12      belong  0x00042253      Berkeley DB
72 >16     belong  >0              (Queue, version %d, big-endian)
73 12      lelong  0x00042253      Berkeley DB
74 >16     lelong  >0              (Queue, version %d, little-endian)
75
76 # From Max Bowsher.
77 12      long    0x00040988      Berkeley DB
78 >16     long    >0              (Log, version %d, native byte-order)
79 12      belong  0x00040988      Berkeley DB 
80 >16     belong  >0              (Log, version %d, big-endian)
81 12      lelong  0x00040988      Berkeley DB
82 >16     lelong  >0              (Log, version %d, little-endian)
83
84 #
85 #
86 # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
87 0       string  RRD             RRDTool DB
88 >4      string  x               version %s
89 #----------------------------------------------------------------------
90 # ROOT: file(1) magic for ROOT databases
91 #
92 0       string  root\0  ROOT file
93 >4      belong  x       Version %d
94 >33     belong  x       (Compression: %d)
95
96 # XXX: Weak magic.
97 # Alex Ott <ott@jet.msk.su>
98 ## Paradox file formats
99 #2        leshort       0x0800  Paradox 
100 #>0x39    byte          3       v. 3.0 
101 #>0x39    byte          4       v. 3.5 
102 #>0x39    byte          9       v. 4.x 
103 #>0x39    byte          10      v. 5.x 
104 #>0x39    byte          11      v. 5.x 
105 #>0x39    byte          12      v. 7.x 
106 #>>0x04   byte          0       indexed .DB data file 
107 #>>0x04   byte          1       primary index .PX file 
108 #>>0x04   byte          2       non-indexed .DB data file 
109 #>>0x04   byte          3       non-incrementing secondary index .Xnn file 
110 #>>0x04   byte          4       secondary index .Ynn file 
111 #>>0x04   byte          5       incrementing secondary index .Xnn file 
112 #>>0x04   byte          6       non-incrementing secondary index .XGn file 
113 #>>0x04   byte          7       secondary index .YGn file 
114 #>>>0x04          byte          8       incrementing secondary index .XGn file 
115
116 ## XBase database files
117 #0      byte       0x02 
118 #>8     leshort   >0
119 #>>12   leshort    0    FoxBase 
120 #!:mime application/x-dbf
121 #>>>0x04        lelong          0               (no records)
122 #>>>0x04        lelong          >0              (%ld records)
123 #
124 #0      byte       0x03 
125 #!:mime application/x-dbf
126 #>8     leshort   >0
127 #>>12   leshort    0    FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo 
128 #>>>0x04        lelong          0               (no records)
129 #>>>0x04        lelong          >0              (%ld records)
130 #
131 #0      byte       0x04 
132 #!:mime application/x-dbf
133 #>8     leshort   >0
134 #>>12   leshort    0    dBASE IV no memo file 
135 #>>>0x04        lelong          0               (no records)
136 #>>>0x04        lelong          >0              (%ld records)
137 #
138 #0      byte       0x05 
139 #!:mime application/x-dbf
140 #>8     leshort   >0
141 #>>12   leshort    0    dBASE V no memo file 
142 #>>>0x04        lelong          0               (no records)
143 #>>>0x04        lelong          >0              (%ld records)
144 #
145 #0      byte       0x30
146 #!:mime application/x-dbf
147 #>8     leshort   >0
148 #>>12   leshort    0    Visual FoxPro 
149 #>>>0x04        lelong          0               (no records)
150 #>>>0x04        lelong          >0              (%ld records)
151 #
152 #0      byte       0x43
153 #!:mime application/x-dbf
154 #>8     leshort   >0
155 #>>12   leshort    0    FlagShip with memo var size 
156 #>>>0x04        lelong          0               (no records)
157 #>>>0x04        lelong          >0              (%ld records)
158 #
159 #0      byte       0x7b
160 #!:mime application/x-dbf
161 #>8     leshort   >0
162 #>>12   leshort    0    dBASEIV with memo 
163 #>>>0x04        lelong          0               (no records)
164 #>>>0x04        lelong          >0              (%ld records)
165 #
166 #0      byte       0x83 
167 #!:mime application/x-dbf
168 #>8     leshort   >0
169 #>>12   leshort    0    FoxBase+, dBaseIII+ with memo 
170 #>>>0x04        lelong          0               (no records)
171 #>>>0x04        lelong          >0              (%ld records)
172 #
173 #0      byte       0x8b
174 #!:mime application/x-dbf
175 #>8     leshort   >0
176 #>>12   leshort    0    dBaseIV with memo 
177 #>>>0x04        lelong          0               (no records)
178 #>>>0x04        lelong          >0              (%ld records)
179 #
180 #0      byte       0x8e 
181 #!:mime application/x-dbf
182 #>8     leshort   >0
183 #>>12   leshort    0    dBaseIV with SQL Table 
184 #>>>0x04        lelong          0               (no records)
185 #>>>0x04        lelong          >0              (%ld records)
186 #
187 #0      byte       0xb3
188 #!:mime application/x-dbf
189 #>8     leshort   >0
190 #>>12   leshort    0    FlagShip with .dbt memo 
191 #>>>0x04        lelong          0               (no records)
192 #>>>0x04        lelong          >0              (%ld records)
193 #
194 #0      byte       0xf5
195 #!:mime application/x-dbf
196 #>8     leshort   >0
197 #>>12   leshort    0    FoxPro with memo 
198 #>>>0x04        lelong          0               (no records)
199 #>>>0x04        lelong          >0              (%ld records)
200 #
201 #0      leshort         0x0006          DBase 3 index file
202
203 # MS Access database
204 4       string  Standard\ Jet\ DB       Microsoft Access Database
205 !:mime  application/x-msaccess
206
207 # TDB database from Samba et al - Martin Pool <mbp@samba.org>
208 0       string  TDB\ file               TDB database
209 >32     lelong  0x2601196D              version 6, little-endian
210 >>36    lelong  x                       hash size %d bytes
211
212 # SE Linux policy database
213 0       lelong  0xf97cff8c      SE Linux policy
214 >16     lelong  x               v%d
215 >20     lelong  1      MLS
216 >24     lelong  x       %d symbols
217 >28     lelong  x       %d ocons
218
219 # ICE authority file data (Wolfram Kleff)
220 2       string          ICE             ICE authority data
221
222 # X11 Xauthority file (Wolfram Kleff)
223 10      string          MIT-MAGIC-COOKIE-1      X11 Xauthority data
224 11      string          MIT-MAGIC-COOKIE-1      X11 Xauthority data
225 12      string          MIT-MAGIC-COOKIE-1      X11 Xauthority data
226 13      string          MIT-MAGIC-COOKIE-1      X11 Xauthority data
227 14      string          MIT-MAGIC-COOKIE-1      X11 Xauthority data
228 15      string          MIT-MAGIC-COOKIE-1      X11 Xauthority data
229 16      string          MIT-MAGIC-COOKIE-1      X11 Xauthority data
230 17      string          MIT-MAGIC-COOKIE-1      X11 Xauthority data
231 18      string          MIT-MAGIC-COOKIE-1      X11 Xauthority data
232
233 # From: Maxime Henrion <mux@FreeBSD.org>
234 # PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
235 0       string          PGDMP           PostgreSQL custom database dump
236 >5      byte            x               - v%d
237 >6      byte            x               \b.%d
238 >5      beshort         <0x101          \b-0
239 >5      beshort         >0x100
240 >>7     byte            x               \b-%d
241
242 # Type: Advanced Data Format (ADF) database
243 # URL:  http://www.grc.nasa.gov/WWW/cgns/adf/
244 # From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
245 0       string  @(#)ADF\ Database       CGNS Advanced Data Format
246
247 # Tokyo Cabinet magic data
248 # http://tokyocabinet.sourceforge.net/index.html
249 0       string          ToKyO\ CaBiNeT\n        Tokyo Cabinet
250 >14     string          x                       \b (%s)
251 >32     byte            0                       \b, Hash
252 !:mime  application/x-tokyocabinet-hash
253 >32     byte            1                       \b, B+ tree
254 !:mime  application/x-tokyocabinet-btree
255 >32     byte            2                       \b, Fixed-length
256 !:mime  application/x-tokyocabinet-fixed
257 >32     byte            3                       \b, Table
258 !:mime  application/x-tokyocabinet-table
259 >33     byte            &1                      \b, [open]
260 >33     byte            &2                      \b, [fatal]
261 >34     byte            x                       \b, apow=%d
262 >35     byte            x                       \b, fpow=%d
263 >36     byte            &0x01                   \b, [large]
264 >36     byte            &0x02                   \b, [deflate]
265 >36     byte            &0x04                   \b, [bzip]
266 >36     byte            &0x08                   \b, [tcbs]
267 >36     byte            &0x10                   \b, [excodec]
268 >40     lequad          x                       \b, bnum=%lld
269 >48     lequad          x                       \b, rnum=%lld
270 >56     lequad          x                       \b, fsiz=%lld