Documentation
¶
Index ¶
- Constants
- func ParseArray_byte(profile *VHDXProfile, reader io.ReaderAt, offset int64, count int) []byte
- func ParseString(reader io.ReaderAt, offset int64, length int64) string
- func ParseTerminatedString(reader io.ReaderAt, offset int64) string
- func ParseTerminatedUTF16String(reader io.ReaderAt, offset int64) string
- func ParseUTF16String(reader io.ReaderAt, offset int64, length int64) string
- func ParseUint16(reader io.ReaderAt, offset int64) uint16
- func ParseUint32(reader io.ReaderAt, offset int64) uint32
- func ParseUint64(reader io.ReaderAt, offset int64) uint64
- func ParseUint8(reader io.ReaderAt, offset int64) byte
- func SetDebug()
- func UTF16BytesToUTF8(b []byte, o binary.ByteOrder) string
- type BATEntry
- type Bat
- type BatRange
- type BatReader
- type FileParameters
- type FileType
- func (self *FileType) Creator() string
- func (self *FileType) DebugString() string
- func (self *FileType) Header1() *Header
- func (self *FileType) Header2() *Header
- func (self *FileType) Region1() *Region
- func (self *FileType) Region2() *Region
- func (self *FileType) Signature() string
- func (self *FileType) Size() int
- type GUID
- type Header
- type Metadata
- type MetadataEntry
- type Misc
- type Region
- type RegionEntry
- type VHDXFile
- type VHDXMetadata
- type VHDXProfile
- func (self *VHDXProfile) BATEntry(reader io.ReaderAt, offset int64) *BATEntry
- func (self *VHDXProfile) FileParameters(reader io.ReaderAt, offset int64) *FileParameters
- func (self *VHDXProfile) FileType(reader io.ReaderAt, offset int64) *FileType
- func (self *VHDXProfile) GUID(reader io.ReaderAt, offset int64) *GUID
- func (self *VHDXProfile) Header(reader io.ReaderAt, offset int64) *Header
- func (self *VHDXProfile) Metadata(reader io.ReaderAt, offset int64) *Metadata
- func (self *VHDXProfile) MetadataEntry(reader io.ReaderAt, offset int64) *MetadataEntry
- func (self *VHDXProfile) Misc(reader io.ReaderAt, offset int64) *Misc
- func (self *VHDXProfile) Region(reader io.ReaderAt, offset int64) *Region
- func (self *VHDXProfile) RegionEntry(reader io.ReaderAt, offset int64) *RegionEntry
Constants ¶
View Source
const ( VHDXFileSignature = "vhdxfile" HeaderSignature = "head" RegionSignature = "regi" MetadataSignature = "metadata" // Represents a GUID of 2DC27766-F623-4200-9D64-115E9BFD4A08 BAT_GUID = "\x66\x77\xc2\x2d\x23\xf6\x00\x42\x9d\x64\x11\x5e\x9b\xfd\x4a\x08" // Represents a GUID of 8B7CA206-4790-4B9A-B8FE-575F050F886E Metadata_GUID = "\x06\xa2\x7c\x8b\x90\x47\x9a\x4b\xb8\xfe\x57\x5f\x05\x0f\x88\x6e" PAYLOAD_BLOCK_NOT_PRESENT = 0 PAYLOAD_BLOCK_UNDEFINED = 1 PAYLOAD_BLOCK_ZERO = 2 PAYLOAD_BLOCK_UNMAPPED = 3 PAYLOAD_BLOCK_FULLY_PRESENT = 6 PAYLOAD_BLOCK_PARTIALLY_PRESENT = 7 // CAA16737-FA36-4D43-B3B6-33F0AA44E76B MetadataFileParameters = "\x37\x67\xa1\xca\x36\xfa\x43\x4d\xb3\xb6\x33\xf0\xaa\x44\xe7\x6b" // 2FA54224-CD1B-4876-B211-5DBED83BF4B8 MetadataVirtualDiskSize = "\x24\x42\xa5\x2f\x1b\xcd\x76\x48\xb2\x11\x5d\xbe\xd8\x3b\xf4\xb8" // 8141BF1D-A96F-4709-BA47-F233A8FAAB5F MetadataLogicalSectorSize = "\x1d\xbf\x41\x81\x6f\xa9\x09\x47\xba\x47\xf2\x33\xa8\xfa\xab\x5f" // CDA348C7-445D-4471-9CC9-E9885251C556 MetadataPhysicalSectorSize = "\xc7\x48\xa3\xcd\x5d\x44\x71\x44\x9c\xc9\xe9\x88\x52\x51\xc5\x56" // BECA12AB-B2E6-4523-93EF-C309E000C746 MetadataVirtualDiskId = "\xab\x12\xca\xbe\xe6\xb2\x23\x45\x93\xef\xc3\x09\xe0\x00\xc7\x46" )
Variables ¶
This section is empty.
Functions ¶
func ParseArray_byte ¶
func ParseUTF16String ¶
Types ¶
type BATEntry ¶
type BATEntry struct { Reader io.ReaderAt Offset int64 Profile *VHDXProfile }
func ParseArray_BATEntry ¶
func (*BATEntry) DebugString ¶
func (*BATEntry) FileOffsetMB ¶
type Bat ¶
type Bat struct {
StartOffset, EntrySize uint64
TotalNumberOfEntries uint64
EntriesPerChunk uint64
// contains filtered or unexported fields
}
func (*Bat) DebugString ¶
func (*Bat) GetFileOffset ¶
type BatReader ¶
type FileParameters ¶
type FileParameters struct { Reader io.ReaderAt Offset int64 Profile *VHDXProfile }
func (*FileParameters) BlockSize ¶
func (self *FileParameters) BlockSize() uint32
func (*FileParameters) DebugString ¶
func (self *FileParameters) DebugString() string
func (*FileParameters) HasParent ¶
func (self *FileParameters) HasParent() uint64
func (*FileParameters) Size ¶
func (self *FileParameters) Size() int
type FileType ¶
type FileType struct { Reader io.ReaderAt Offset int64 Profile *VHDXProfile }
func (*FileType) DebugString ¶
type GUID ¶
type GUID struct { Reader io.ReaderAt Offset int64 Profile *VHDXProfile }
func (*GUID) DebugString ¶
type Header ¶
type Header struct { Reader io.ReaderAt Offset int64 Profile *VHDXProfile }
func (*Header) DebugString ¶
func (*Header) SequenceNumber ¶
type Metadata ¶
type Metadata struct { Reader io.ReaderAt Offset int64 Profile *VHDXProfile }
func (*Metadata) DebugString ¶
func (*Metadata) Entries ¶
func (self *Metadata) Entries() []*MetadataEntry
func (*Metadata) EntryCount ¶
func (*Metadata) ParseMetadata ¶
func (self *Metadata) ParseMetadata() *VHDXMetadata
type MetadataEntry ¶
type MetadataEntry struct { Reader io.ReaderAt Offset int64 Profile *VHDXProfile }
func ParseArray_MetadataEntry ¶
func ParseArray_MetadataEntry(profile *VHDXProfile, reader io.ReaderAt, offset int64, count int) []*MetadataEntry
func (*MetadataEntry) DebugString ¶
func (self *MetadataEntry) DebugString() string
func (*MetadataEntry) GUID ¶
func (self *MetadataEntry) GUID() string
func (*MetadataEntry) Length ¶
func (self *MetadataEntry) Length() uint32
func (*MetadataEntry) MetadataOffset ¶
func (self *MetadataEntry) MetadataOffset() uint32
func (*MetadataEntry) Size ¶
func (self *MetadataEntry) Size() int
type Misc ¶
type Misc struct { Reader io.ReaderAt Offset int64 Profile *VHDXProfile }
func (*Misc) DebugString ¶
func (*Misc) Regions ¶
func (self *Misc) Regions() []*RegionEntry
type Region ¶
type Region struct { Reader io.ReaderAt Offset int64 Profile *VHDXProfile }
func (*Region) DebugString ¶
func (*Region) EntryCount ¶
type RegionEntry ¶
type RegionEntry struct { Reader io.ReaderAt Offset int64 Profile *VHDXProfile }
func ParseArray_RegionEntry ¶
func ParseArray_RegionEntry(profile *VHDXProfile, reader io.ReaderAt, offset int64, count int) []*RegionEntry
func (*RegionEntry) DebugString ¶
func (self *RegionEntry) DebugString() string
func (*RegionEntry) FileOffset ¶
func (self *RegionEntry) FileOffset() uint64
func (*RegionEntry) GUID ¶
func (self *RegionEntry) GUID() string
func (*RegionEntry) IsRequired ¶
func (self *RegionEntry) IsRequired() uint32
func (*RegionEntry) Length ¶
func (self *RegionEntry) Length() uint32
func (*RegionEntry) Size ¶
func (self *RegionEntry) Size() int
type VHDXFile ¶
type VHDXFile struct { Metadata *VHDXMetadata // contains filtered or unexported fields }
func (*VHDXFile) DebugString ¶
type VHDXMetadata ¶
type VHDXProfile ¶
type VHDXProfile struct { Off_BATEntry_State int64 Off_BATEntry_FileOffsetMB int64 Off_FileParameters_BlockSize int64 Off_FileParameters_HasParent int64 Off_FileType_Signature int64 Off_FileType_Creator int64 Off_FileType_Header1 int64 Off_FileType_Header2 int64 Off_FileType_Region1 int64 Off_FileType_Region2 int64 Off_GUID_Data1 int64 Off_GUID_Data2 int64 Off_GUID_Data3 int64 Off_GUID_Data4 int64 Off_Header_Signature int64 Off_Header_SequenceNumber int64 Off_Metadata_Signature int64 Off_Metadata_EntryCount int64 Off_Metadata_Entries int64 Off_MetadataEntry_GUID int64 Off_MetadataEntry_MetadataOffset int64 Off_MetadataEntry_Length int64 Off_Misc_Regions int64 Off_Misc_Bats int64 Off_Region_Signature int64 Off_Region_EntryCount int64 Off_RegionEntry_GUID int64 Off_RegionEntry_FileOffset int64 Off_RegionEntry_Length int64 Off_RegionEntry_IsRequired int64 }
func NewVHDXProfile ¶
func NewVHDXProfile() *VHDXProfile
func (*VHDXProfile) BATEntry ¶
func (self *VHDXProfile) BATEntry(reader io.ReaderAt, offset int64) *BATEntry
func (*VHDXProfile) FileParameters ¶
func (self *VHDXProfile) FileParameters(reader io.ReaderAt, offset int64) *FileParameters
func (*VHDXProfile) FileType ¶
func (self *VHDXProfile) FileType(reader io.ReaderAt, offset int64) *FileType
func (*VHDXProfile) Header ¶
func (self *VHDXProfile) Header(reader io.ReaderAt, offset int64) *Header
func (*VHDXProfile) Metadata ¶
func (self *VHDXProfile) Metadata(reader io.ReaderAt, offset int64) *Metadata
func (*VHDXProfile) MetadataEntry ¶
func (self *VHDXProfile) MetadataEntry(reader io.ReaderAt, offset int64) *MetadataEntry
func (*VHDXProfile) Region ¶
func (self *VHDXProfile) Region(reader io.ReaderAt, offset int64) *Region
func (*VHDXProfile) RegionEntry ¶
func (self *VHDXProfile) RegionEntry(reader io.ReaderAt, offset int64) *RegionEntry
Click to show internal directories.
Click to hide internal directories.