Files
Aaru/Aaru.Images/Parallels/Structs.cs

71 lines
3.1 KiB
C#
Raw Normal View History

// /***************************************************************************
2020-02-27 12:31:25 +00:00
// Aaru Data Preservation Suite
// ----------------------------------------------------------------------------
//
// Filename : Structs.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Disk image plugins.
//
// --[ Description ] ----------------------------------------------------------
//
// Contains structures for Parallels disk images.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
2020-01-03 17:51:30 +00:00
// Copyright © 2011-2020 Natalia Portillo
// ****************************************************************************/
using System.Runtime.InteropServices;
2020-02-27 00:33:26 +00:00
namespace Aaru.DiscImages
{
public partial class Parallels
{
2020-02-29 18:03:35 +00:00
/// <summary>Parallels disk image header, little-endian</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct ParallelsHeader
{
2020-07-20 21:11:32 +01:00
/// <summary>Magic, <see cref="Parallels._parallelsMagic" /> or <see cref="Parallels._parallelsExtMagic" /></summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[] magic;
2020-02-29 18:03:35 +00:00
/// <summary>Version</summary>
public uint version;
2020-02-29 18:03:35 +00:00
/// <summary>Disk geometry parameter</summary>
public uint heads;
2020-02-29 18:03:35 +00:00
/// <summary>Disk geometry parameter</summary>
public uint cylinders;
2020-02-29 18:03:35 +00:00
/// <summary>Cluser size in sectors</summary>
public uint cluster_size;
2020-02-29 18:03:35 +00:00
/// <summary>Entries in BAT (clusters in image)</summary>
public uint bat_entries;
2020-02-29 18:03:35 +00:00
/// <summary>Disk size in sectors</summary>
public ulong sectors;
/// <summary>
/// Set to <see cref="Parallels.PARALLELS_INUSE" /> if image is opened by any software,
/// <see cref="Parallels.PARALLELS_CLOSED" /> if not, and 0 if old version
/// </summary>
public uint in_use;
2020-02-29 18:03:35 +00:00
/// <summary>Offset in sectors to start of data</summary>
public uint data_off;
2020-02-29 18:03:35 +00:00
/// <summary>Flags</summary>
public readonly uint flags;
/// <summary>Offset in sectors to format extension</summary>
public readonly ulong ext_off;
}
}
}