summaryrefslogtreecommitdiff
path: root/usr.bin/file/magdir/database
blob: 071576c4f5556f75cb4e46e7c7654b269997cf2f (plain)
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

#------------------------------------------------------------------------------
# database:  file(1) magic for various databases
#
# extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
#
#
# GDBM magic numbers
#  Will be maintained as part of the GDBM distribution in the future.
#  <downsj@teeny.org>
0	belong	0x13579ace	GNU dbm 1.x or ndbm database, big endian
0	lelong	0x13579ace	GNU dbm 1.x or ndbm database, little endian
0	string	GDBM		GNU dbm 2.x database
#
0	belong	0x061561	Berkeley DB
>4	belong	>2		1.86
>4	belong	<3		1.85
>8	belong	4321		Hash/Big Endian
>8	belong	1234		Hash/Little Endian
>4	belong	>0		(Version %d,
>12	belong	x		Bucket Size %d,
>16	belong	x		Bucket Shift %d,
>20	belong	x		Directory Size %d,
>24	belong	x		Segment Size %d,
>28	belong	x		Segment Shift %d,
>32	belong	x		Overflow Point %d,
>36	belong	x		Last Freed %d,
>40	belong	x		Max Bucket %d,
>44	belong	x		High Mask 0x%x,
>48	belong	x		Low Mask 0x%x,
>52	belong	x		Fill Factor %d,
>56	belong	x		Number of Keys %d)
#
#
0	belong	0x053162	Berkeley DB 1.85/1.86 Btree/Big Endian
>4	belong	>0		(Version %d,
>8	belong	x		Page Size %d,
>12	belong	x		Free Page %d,
>16	belong	x		Number of Records %d,
>20	belong	x		Flags 0x%x)
0	lelong	0x053162	Berkeley DB 1.85/1.86 Btree/Little Endian
>4	lelong	>0		(Version %d,
>8	lelong	x		Page Size %d,
>12	lelong	x		Free Page %d,
>16	lelong	x		Number of Records %d,
>20	lelong	x		Flags 0x%x)
#
#
12	belong	0x061561	Berkeley DB 2.X Hash/Big Endian
>16	belong	>0		(Version %d,
>0	belong  x		Logical sequence number: file - %d,
>4	belong  x		offset - %d,
>20	belong	x		Bucket Size %d,
>24	belong	x		Overflow Point %d,
>28	belong	x		Last Freed %d,
>32	belong	x		Max Bucket %d,
>36	belong	x		High Mask 0x%x,
>40	belong	x		Low Mask 0x%x,
>44	belong	x		Fill Factor %d,
>48	belong	x		Number of Keys %d)
#
# DB2.X formats from Khimenko Victor <khim@sch57.msk.ru>
#
12	lelong	0x061561	Berkeley DB 2.X Hash/Little Endian
>16	lelong	>0		(Version %d,
>0	lelong  x		Logical sequence number: file - %d,
>4	lelong  x		offset - %d,
>20	lelong	x		Bucket Size %d,
>24	lelong	x		Overflow Point %d,
>28	lelong	x		Last Freed %d,
>32	lelong	x		Max Bucket %d,
>36	lelong	x		High Mask 0x%x,
>40	lelong	x		Low Mask 0x%x,
>44	lelong	x		Fill Factor %d,
>48	lelong	x		Number of Keys %d)
#
#
12	belong	0x053162	Berkeley DB 2.X Btree/Big Endian
>16	belong	>0		(Version %d, 
>0	belong  x		Logical sequence number: file - %d,
>4	belong  x		offset - %d,
>20	belong	x		Page Size %d,
>24	belong	x		Maxkey %d,
>28	belong	x		Minkey %d,
>32	belong	x		Free Page %d)
#
#
12	lelong	0x053162	Berkeley DB 2.X Btree/Little Endian
>16	lelong	>0		(Version %d,
>0	lelong  x		Logical sequence number: file - %d,
>4	lelong  x		offset - %d,
>20	lelong	x		Page Size %d,
>24	lelong	x		Maxkey %d,
>28	lelong	x		Minkey %d,
>32	lelong	x		Free Page %d)