1/*
2 * Copyright 2007, Marcus Overhagen. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _VMDK_H
6#define _VMDK_H
7
8
9#include <stdint.h>
10
11
12typedef uint64_t SectorType;
13
14
15struct SparseExtentHeader {
16	uint32_t		magicNumber;
17	uint32_t		version;
18	uint32_t		flags;
19	SectorType		capacity;
20	SectorType		grainSize;
21	SectorType		descriptorOffset;
22	SectorType		descriptorSize;
23	uint32_t		numGTEsPerGT;
24	SectorType		rgdOffset;
25	SectorType		gdOffset;
26	SectorType		overHead;
27	uint8_t			uncleanShutdown;
28	char			singleEndLineChar;
29	char			nonEndLineChar;
30	char			doubleEndLineChar1;
31	char			doubleEndLineChar2;
32	uint8_t			pad[435];
33} __attribute__((__packed__)) ;
34
35#define VMDK_SPARSE_MAGICNUMBER	0x564d444b /* 'V' 'M' 'D' 'K' */
36#define VMDK_SPARSE_VERSION		1
37
38#endif	// _VMDK_H
39