2014-04-17 19:58:14 +00:00
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2014-06-15 23:39:34 +01:00
The Disc Image Chef
2014-04-17 19:58:14 +00:00
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Filename : ODS . cs
Version : 1.0
Author ( s ) : Natalia Portillo
Component : Filesystem plugins
Revision : $ Revision $
Last change by : $ Author $
Date : $ Date $
- - [ Description ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Identifies VMS filesystems and shows information .
- - [ License ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This program is free software : you can redistribute it and / or modify
2014-04-19 18:23:00 +01:00
it under the terms of the GNU General Public License as
2014-04-17 19:58:14 +00:00
published by the Free Software Foundation , either version 3 of the
License , or ( at your option ) any later version .
This program 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
2014-04-19 18:23:00 +01:00
GNU General Public License for more details .
2014-04-17 19:58:14 +00:00
2014-04-19 18:23:00 +01:00
You should have received a copy of the GNU General Public License
2014-04-17 19:58:14 +00:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Copyright ( C ) 2011 - 2014 Claunia . com
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
//$Id$
2011-06-02 19:34:47 +00:00
using System ;
using System.Text ;
2014-06-15 23:39:34 +01:00
using DiscImageChef ;
2011-06-02 19:34:47 +00:00
// Information from VMS File System Internals by Kirby McCoy
// ISBN: 1-55558-056-4
// With some hints from http://www.decuslib.com/DECUS/vmslt97b/gnusoftware/gccaxp/7_1/vms/hm2def.h
// Expects the home block to be always in sector #1 (does not check deltas)
// Assumes a sector size of 512 bytes (VMS does on HDDs and optical drives, dunno about M.O.)
2014-04-17 19:58:14 +00:00
// Book only describes ODS-2. Need to test ODS-1 and ODS-5
2011-06-02 19:34:47 +00:00
// There is an ODS with signature "DECFILES11A", yet to be seen
// Time is a 64 bit unsigned integer, tenths of microseconds since 1858/11/17 00:00:00.
2014-04-14 01:14:20 +00:00
// TODO: Implement checksum
2016-07-21 16:15:39 +01:00
namespace DiscImageChef.Filesystems
2011-06-02 19:34:47 +00:00
{
2016-07-21 16:15:39 +01:00
class ODS : Filesystem
2014-04-14 02:29:13 +00:00
{
2015-10-05 20:04:05 +01:00
public ODS ( )
2011-06-02 19:34:47 +00:00
{
2014-04-14 02:29:13 +00:00
Name = "Files-11 On-Disk Structure" ;
PluginUUID = new Guid ( "de20633c-8021-4384-aeb0-83b0df14491f" ) ;
2011-06-02 19:34:47 +00:00
}
2014-04-14 02:29:13 +00:00
2015-04-20 05:09:46 +01:00
public override bool Identify ( ImagePlugins . ImagePlugin imagePlugin , ulong partitionStart , ulong partitionEnd )
2014-04-14 02:29:13 +00:00
{
2016-04-19 02:11:47 +01:00
if ( ( 2 + partitionStart ) > = imagePlugin . GetSectors ( ) )
2014-07-09 19:49:14 +01:00
return false ;
2016-04-19 02:11:47 +01:00
if ( imagePlugin . GetSectorSize ( ) < 512 )
2014-06-07 17:32:14 +01:00
return false ;
2014-04-14 02:29:13 +00:00
byte [ ] magic_b = new byte [ 12 ] ;
string magic ;
2015-04-20 05:09:46 +01:00
byte [ ] hb_sector = imagePlugin . ReadSector ( 1 + partitionStart ) ;
2014-04-14 01:14:20 +00:00
Array . Copy ( hb_sector , 0x1F0 , magic_b , 0 , 12 ) ;
2014-04-14 02:29:13 +00:00
magic = Encoding . ASCII . GetString ( magic_b ) ;
2016-04-19 02:11:47 +01:00
2014-04-14 02:29:13 +00:00
return magic = = "DECFILE11A " | | magic = = "DECFILE11B " ;
}
2015-04-20 05:09:46 +01:00
public override void GetInformation ( ImagePlugins . ImagePlugin imagePlugin , ulong partitionStart , ulong partitionEnd , out string information )
2014-04-14 02:29:13 +00:00
{
information = "" ;
2016-04-19 02:11:47 +01:00
2014-04-14 02:29:13 +00:00
StringBuilder sb = new StringBuilder ( ) ;
ODSHomeBlock homeblock = new ODSHomeBlock ( ) ;
byte [ ] temp_string = new byte [ 12 ] ;
homeblock . min_class = new byte [ 20 ] ;
homeblock . max_class = new byte [ 20 ] ;
2016-04-19 02:11:47 +01:00
2015-04-20 05:09:46 +01:00
byte [ ] hb_sector = imagePlugin . ReadSector ( 1 + partitionStart ) ;
2016-04-19 02:11:47 +01:00
2014-04-14 01:14:20 +00:00
homeblock . homelbn = BitConverter . ToUInt32 ( hb_sector , 0x000 ) ;
homeblock . alhomelbn = BitConverter . ToUInt32 ( hb_sector , 0x004 ) ;
homeblock . altidxlbn = BitConverter . ToUInt32 ( hb_sector , 0x008 ) ;
homeblock . struclev = BitConverter . ToUInt16 ( hb_sector , 0x00C ) ;
homeblock . cluster = BitConverter . ToUInt16 ( hb_sector , 0x00E ) ;
homeblock . homevbn = BitConverter . ToUInt16 ( hb_sector , 0x010 ) ;
homeblock . alhomevbn = BitConverter . ToUInt16 ( hb_sector , 0x012 ) ;
homeblock . altidxvbn = BitConverter . ToUInt16 ( hb_sector , 0x014 ) ;
homeblock . ibmapvbn = BitConverter . ToUInt16 ( hb_sector , 0x016 ) ;
homeblock . ibmaplbn = BitConverter . ToUInt32 ( hb_sector , 0x018 ) ;
homeblock . maxfiles = BitConverter . ToUInt32 ( hb_sector , 0x01C ) ;
homeblock . ibmapsize = BitConverter . ToUInt16 ( hb_sector , 0x020 ) ;
homeblock . resfiles = BitConverter . ToUInt16 ( hb_sector , 0x022 ) ;
homeblock . devtype = BitConverter . ToUInt16 ( hb_sector , 0x024 ) ;
homeblock . rvn = BitConverter . ToUInt16 ( hb_sector , 0x026 ) ;
homeblock . setcount = BitConverter . ToUInt16 ( hb_sector , 0x028 ) ;
homeblock . volchar = BitConverter . ToUInt16 ( hb_sector , 0x02A ) ;
homeblock . volowner = BitConverter . ToUInt32 ( hb_sector , 0x02C ) ;
homeblock . sec_mask = BitConverter . ToUInt32 ( hb_sector , 0x030 ) ;
homeblock . protect = BitConverter . ToUInt16 ( hb_sector , 0x034 ) ;
homeblock . fileprot = BitConverter . ToUInt16 ( hb_sector , 0x036 ) ;
homeblock . recprot = BitConverter . ToUInt16 ( hb_sector , 0x038 ) ;
homeblock . checksum1 = BitConverter . ToUInt16 ( hb_sector , 0x03A ) ;
homeblock . credate = BitConverter . ToUInt64 ( hb_sector , 0x03C ) ;
homeblock . window = hb_sector [ 0x044 ] ;
homeblock . lru_lim = hb_sector [ 0x045 ] ;
homeblock . extend = BitConverter . ToUInt16 ( hb_sector , 0x046 ) ;
homeblock . retainmin = BitConverter . ToUInt64 ( hb_sector , 0x048 ) ;
homeblock . retainmax = BitConverter . ToUInt64 ( hb_sector , 0x050 ) ;
homeblock . revdate = BitConverter . ToUInt64 ( hb_sector , 0x058 ) ;
Array . Copy ( hb_sector , 0x060 , homeblock . min_class , 0 , 20 ) ;
Array . Copy ( hb_sector , 0x074 , homeblock . max_class , 0 , 20 ) ;
homeblock . filetab_fid1 = BitConverter . ToUInt16 ( hb_sector , 0x088 ) ;
homeblock . filetab_fid2 = BitConverter . ToUInt16 ( hb_sector , 0x08A ) ;
homeblock . filetab_fid3 = BitConverter . ToUInt16 ( hb_sector , 0x08C ) ;
homeblock . lowstruclev = BitConverter . ToUInt16 ( hb_sector , 0x08E ) ;
homeblock . highstruclev = BitConverter . ToUInt16 ( hb_sector , 0x090 ) ;
homeblock . copydate = BitConverter . ToUInt64 ( hb_sector , 0x092 ) ;
homeblock . serialnum = BitConverter . ToUInt32 ( hb_sector , 0x1C8 ) ;
Array . Copy ( hb_sector , 0x1CC , temp_string , 0 , 12 ) ;
2014-04-14 02:29:13 +00:00
homeblock . strucname = StringHandlers . CToString ( temp_string ) ;
2014-04-14 01:14:20 +00:00
Array . Copy ( hb_sector , 0x1D8 , temp_string , 0 , 12 ) ;
2014-04-14 02:29:13 +00:00
homeblock . volname = StringHandlers . CToString ( temp_string ) ;
2014-04-14 01:14:20 +00:00
Array . Copy ( hb_sector , 0x1E4 , temp_string , 0 , 12 ) ;
2014-04-14 02:29:13 +00:00
homeblock . ownername = StringHandlers . CToString ( temp_string ) ;
2014-04-14 01:14:20 +00:00
Array . Copy ( hb_sector , 0x1F0 , temp_string , 0 , 12 ) ;
2014-04-14 02:29:13 +00:00
homeblock . format = StringHandlers . CToString ( temp_string ) ;
2014-04-14 01:14:20 +00:00
homeblock . checksum2 = BitConverter . ToUInt16 ( hb_sector , 0x1FE ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . struclev & 0xFF00 ) ! = 0x0200 | | ( homeblock . struclev & 0xFF ) ! = 1 | | homeblock . format ! = "DECFILE11B " )
2014-04-14 02:29:13 +00:00
sb . AppendLine ( "The following information may be incorrect for this volume." ) ;
2016-04-19 02:11:47 +01:00
if ( homeblock . resfiles < 5 | | homeblock . devtype ! = 0 )
2014-04-14 02:29:13 +00:00
sb . AppendLine ( "This volume may be corrupted." ) ;
2016-04-19 02:11:47 +01:00
2014-04-14 02:29:13 +00:00
sb . AppendFormat ( "Volume format is {0}" , homeblock . format ) . AppendLine ( ) ;
sb . AppendFormat ( "Volume is Level {0} revision {1}" , ( homeblock . struclev & 0xFF00 ) > > 8 , homeblock . struclev & 0xFF ) . AppendLine ( ) ;
sb . AppendFormat ( "Lowest structure in the volume is Level {0}, revision {1}" , ( homeblock . lowstruclev & 0xFF00 ) > > 8 , homeblock . lowstruclev & 0xFF ) . AppendLine ( ) ;
sb . AppendFormat ( "Highest structure in the volume is Level {0}, revision {1}" , ( homeblock . highstruclev & 0xFF00 ) > > 8 , homeblock . highstruclev & 0xFF ) . AppendLine ( ) ;
sb . AppendFormat ( "{0} sectors per cluster ({1} bytes)" , homeblock . cluster , homeblock . cluster * 512 ) . AppendLine ( ) ;
sb . AppendFormat ( "This home block is on sector {0} (cluster {1})" , homeblock . homelbn , homeblock . homevbn ) . AppendLine ( ) ;
sb . AppendFormat ( "Secondary home block is on sector {0} (cluster {1})" , homeblock . alhomelbn , homeblock . alhomevbn ) . AppendLine ( ) ;
sb . AppendFormat ( "Volume bitmap starts in sector {0} (cluster {1})" , homeblock . ibmaplbn , homeblock . ibmapvbn ) . AppendLine ( ) ;
sb . AppendFormat ( "Volume bitmap runs for {0} sectors ({1} bytes)" , homeblock . ibmapsize , homeblock . ibmapsize * 512 ) . AppendLine ( ) ;
sb . AppendFormat ( "Backup INDEXF.SYS;1 is in sector {0} (cluster {1})" , homeblock . altidxlbn , homeblock . altidxvbn ) . AppendLine ( ) ;
sb . AppendFormat ( "{0} maximum files on the volume" , homeblock . maxfiles ) . AppendLine ( ) ;
sb . AppendFormat ( "{0} reserved files" , homeblock . resfiles ) . AppendLine ( ) ;
2016-04-19 02:11:47 +01:00
if ( homeblock . rvn > 0 & & homeblock . setcount > 0 & & homeblock . strucname ! = " " )
2014-04-14 02:29:13 +00:00
sb . AppendFormat ( "Volume is {0} of {1} in set \"{2}\"." , homeblock . rvn , homeblock . setcount , homeblock . strucname ) . AppendLine ( ) ;
sb . AppendFormat ( "Volume owner is \"{0}\" (ID 0x{1:X8})" , homeblock . ownername , homeblock . volowner ) . AppendLine ( ) ;
sb . AppendFormat ( "Volume label: \"{0}\"" , homeblock . volname ) . AppendLine ( ) ;
sb . AppendFormat ( "Drive serial number: 0x{0:X8}" , homeblock . serialnum ) . AppendLine ( ) ;
sb . AppendFormat ( "Volume was created on {0}" , DateHandlers . VMSToDateTime ( homeblock . credate ) ) . AppendLine ( ) ;
2016-04-19 02:11:47 +01:00
if ( homeblock . revdate > 0 )
2014-04-14 02:29:13 +00:00
sb . AppendFormat ( "Volume was last modified on {0}" , DateHandlers . VMSToDateTime ( homeblock . revdate ) ) . AppendLine ( ) ;
2016-04-19 02:11:47 +01:00
if ( homeblock . copydate > 0 )
2014-04-14 02:29:13 +00:00
sb . AppendFormat ( "Volume copied on {0}" , DateHandlers . VMSToDateTime ( homeblock . copydate ) ) . AppendLine ( ) ;
sb . AppendFormat ( "Checksums: 0x{0:X4} and 0x{1:X4}" , homeblock . checksum1 , homeblock . checksum2 ) . AppendLine ( ) ;
sb . AppendLine ( "Flags:" ) ;
sb . AppendFormat ( "Window: {0}" , homeblock . window ) . AppendLine ( ) ;
sb . AppendFormat ( "Cached directores: {0}" , homeblock . lru_lim ) . AppendLine ( ) ;
sb . AppendFormat ( "Default allocation: {0} blocks" , homeblock . extend ) . AppendLine ( ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . volchar & 0x01 ) = = 0x01 )
2014-04-14 02:29:13 +00:00
sb . AppendLine ( "Readings should be verified" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . volchar & 0x02 ) = = 0x02 )
2014-04-14 02:29:13 +00:00
sb . AppendLine ( "Writings should be verified" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . volchar & 0x04 ) = = 0x04 )
2014-04-14 02:29:13 +00:00
sb . AppendLine ( "Files should be erased or overwritten when deleted" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . volchar & 0x08 ) = = 0x08 )
2014-04-14 02:29:13 +00:00
sb . AppendLine ( "Highwater mark is to be disabled" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . volchar & 0x10 ) = = 0x10 )
2014-04-14 02:29:13 +00:00
sb . AppendLine ( "Classification checks are enabled" ) ;
sb . AppendLine ( "Volume permissions (r = read, w = write, c = create, d = delete)" ) ;
sb . AppendLine ( "System, owner, group, world" ) ;
// System
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x1000 ) = = 0x1000 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "r" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x2000 ) = = 0x2000 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "w" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x4000 ) = = 0x4000 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "c" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x8000 ) = = 0x8000 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "d" ) ;
// Owner
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x100 ) = = 0x100 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "r" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x200 ) = = 0x200 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "w" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x400 ) = = 0x400 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "c" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x800 ) = = 0x800 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "d" ) ;
// Group
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x10 ) = = 0x10 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "r" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x20 ) = = 0x20 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "w" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x40 ) = = 0x40 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "c" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x80 ) = = 0x80 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "d" ) ;
// World (other)
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x1 ) = = 0x1 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "r" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x2 ) = = 0x2 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "w" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x4 ) = = 0x4 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "c" ) ;
2016-04-19 02:11:47 +01:00
if ( ( homeblock . protect & 0x8 ) = = 0x8 )
2014-04-14 02:29:13 +00:00
sb . Append ( "-" ) ;
else
sb . Append ( "d" ) ;
2016-04-19 02:11:47 +01:00
2014-04-14 02:29:13 +00:00
sb . AppendLine ( ) ;
2016-04-19 02:11:47 +01:00
2014-04-14 02:29:13 +00:00
sb . AppendLine ( "Unknown structures:" ) ;
sb . AppendFormat ( "Security mask: 0x{0:X8}" , homeblock . sec_mask ) . AppendLine ( ) ;
sb . AppendFormat ( "File protection: 0x{0:X4}" , homeblock . fileprot ) . AppendLine ( ) ;
sb . AppendFormat ( "Record protection: 0x{0:X4}" , homeblock . recprot ) . AppendLine ( ) ;
2016-04-19 02:11:47 +01:00
2015-12-05 17:10:27 +00:00
xmlFSType = new Schemas . FileSystemType ( ) ;
xmlFSType . Type = "FILES-11" ;
xmlFSType . ClusterSize = homeblock . cluster * 512 ;
2015-12-06 05:09:31 +00:00
xmlFSType . Clusters = homeblock . cluster ;
2015-12-05 17:10:27 +00:00
xmlFSType . VolumeName = homeblock . volname ;
xmlFSType . VolumeSerial = String . Format ( "{0:X8}" , homeblock . serialnum ) ;
2016-04-19 02:11:47 +01:00
if ( homeblock . credate > 0 )
2015-12-06 05:09:31 +00:00
{
xmlFSType . CreationDate = DateHandlers . VMSToDateTime ( homeblock . credate ) ;
xmlFSType . CreationDateSpecified = true ;
}
2016-04-19 02:11:47 +01:00
if ( homeblock . revdate > 0 )
2015-12-06 05:09:31 +00:00
{
2015-12-05 17:10:27 +00:00
xmlFSType . ModificationDate = DateHandlers . VMSToDateTime ( homeblock . revdate ) ;
2015-12-06 05:09:31 +00:00
xmlFSType . ModificationDateSpecified = true ;
}
2015-12-05 17:10:27 +00:00
2014-04-14 02:29:13 +00:00
information = sb . ToString ( ) ;
}
struct ODSHomeBlock
{
2015-12-06 07:18:36 +00:00
/// <summary>0x000, LBN of THIS home block</summary>
2014-04-14 02:29:13 +00:00
public UInt32 homelbn ;
2015-12-06 07:18:36 +00:00
/// <summary>0x004, LBN of the secondary home block</summary>
2014-04-14 02:29:13 +00:00
public UInt32 alhomelbn ;
2015-12-06 07:18:36 +00:00
/// <summary>0x008, LBN of backup INDEXF.SYS;1</summary>
2014-04-14 02:29:13 +00:00
public UInt32 altidxlbn ;
2015-12-06 07:18:36 +00:00
/// <summary>0x00C, High byte contains filesystem version (1, 2 or 5), low byte contains revision (1)</summary>
2014-04-14 02:29:13 +00:00
public UInt16 struclev ;
2015-12-06 07:18:36 +00:00
/// <summary>0x00E, Number of blocks each bit of the volume bitmap represents</summary>
2014-04-14 02:29:13 +00:00
public UInt16 cluster ;
2015-12-06 07:18:36 +00:00
/// <summary>0x010, VBN of THIS home block</summary>
2014-04-14 02:29:13 +00:00
public UInt16 homevbn ;
2015-12-06 07:18:36 +00:00
/// <summary>0x012, VBN of the secondary home block</summary>
2014-04-14 02:29:13 +00:00
public UInt16 alhomevbn ;
2015-12-06 07:18:36 +00:00
/// <summary>0x014, VBN of backup INDEXF.SYS;1</summary>
2014-04-14 02:29:13 +00:00
public UInt16 altidxvbn ;
2015-12-06 07:18:36 +00:00
/// <summary>0x016, VBN of the bitmap</summary>
2014-04-14 02:29:13 +00:00
public UInt16 ibmapvbn ;
2015-12-06 07:18:36 +00:00
/// <summary>0x018, LBN of the bitmap</summary>
2014-04-14 02:29:13 +00:00
public UInt32 ibmaplbn ;
2015-12-06 07:18:36 +00:00
/// <summary>0x01C, Max files on volume</summary>
2014-04-14 02:29:13 +00:00
public UInt32 maxfiles ;
2015-12-06 07:18:36 +00:00
/// <summary>0x020, Bitmap size in sectors</summary>
2014-04-14 02:29:13 +00:00
public UInt16 ibmapsize ;
2015-12-06 07:18:36 +00:00
/// <summary>0x022, Reserved files, 5 at minimum</summary>
2014-04-14 02:29:13 +00:00
public UInt16 resfiles ;
2015-12-06 07:18:36 +00:00
/// <summary>0x024, Device type, ODS-2 defines it as always 0</summary>
2014-04-14 02:29:13 +00:00
public UInt16 devtype ;
2015-12-06 07:18:36 +00:00
/// <summary>0x026, Relative volume number (number of the volume in a set)</summary>
2014-04-14 02:29:13 +00:00
public UInt16 rvn ;
2015-12-06 07:18:36 +00:00
/// <summary>0x028, Total number of volumes in the set this volume is</summary>
2014-04-14 02:29:13 +00:00
public UInt16 setcount ;
2015-12-06 07:18:36 +00:00
/// <summary>0x02A, Flags</summary>
2014-04-14 02:29:13 +00:00
public UInt16 volchar ;
2015-12-06 07:18:36 +00:00
/// <summary>0x02C, User ID of the volume owner</summary>
2014-04-14 02:29:13 +00:00
public UInt32 volowner ;
2015-12-06 07:18:36 +00:00
/// <summary>0x030, Security mask (??)</summary>
2014-04-14 02:29:13 +00:00
public UInt32 sec_mask ;
2015-12-06 07:18:36 +00:00
/// <summary>0x034, Volume permissions (system, owner, group and other)</summary>
2014-04-14 02:29:13 +00:00
public UInt16 protect ;
2015-12-06 07:18:36 +00:00
/// <summary>0x036, Default file protection, unsupported in ODS-2</summary>
2014-04-14 02:29:13 +00:00
public UInt16 fileprot ;
2015-12-06 07:18:36 +00:00
/// <summary>0x038, Default file record protection</summary>
2014-04-14 02:29:13 +00:00
public UInt16 recprot ;
2015-12-06 07:18:36 +00:00
/// <summary>0x03A, Checksum of all preceding entries</summary>
2014-04-14 02:29:13 +00:00
public UInt16 checksum1 ;
2015-12-06 07:18:36 +00:00
/// <summary>0x03C, Creation date</summary>
2014-04-14 02:29:13 +00:00
public UInt64 credate ;
2015-12-06 07:18:36 +00:00
/// <summary>0x044, Window size (pointers for the window)</summary>
2014-04-14 02:29:13 +00:00
public byte window ;
2015-12-06 07:18:36 +00:00
/// <summary>0x045, Directories to be stored in cache</summary>
2014-04-14 02:29:13 +00:00
public byte lru_lim ;
2015-12-06 07:18:36 +00:00
/// <summary>0x046, Default allocation size in blocks</summary>
2014-04-14 02:29:13 +00:00
public UInt16 extend ;
2015-12-06 07:18:36 +00:00
/// <summary>0x048, Minimum file retention period</summary>
2014-04-14 02:29:13 +00:00
public UInt64 retainmin ;
2015-12-06 07:18:36 +00:00
/// <summary>0x050, Maximum file retention period</summary>
2014-04-14 02:29:13 +00:00
public UInt64 retainmax ;
2015-12-06 07:18:36 +00:00
/// <summary>0x058, Last modification date</summary>
2014-04-14 02:29:13 +00:00
public UInt64 revdate ;
2015-12-06 07:18:36 +00:00
/// <summary>0x060, Minimum security class, 20 bytes</summary>
2014-04-14 02:29:13 +00:00
public byte [ ] min_class ;
2015-12-06 07:18:36 +00:00
/// <summary>0x074, Maximum security class, 20 bytes</summary>
2014-04-14 02:29:13 +00:00
public byte [ ] max_class ;
2015-12-06 07:18:36 +00:00
/// <summary>0x088, File lookup table FID</summary>
2014-04-14 02:29:13 +00:00
public UInt16 filetab_fid1 ;
2015-12-06 07:18:36 +00:00
/// <summary>0x08A, File lookup table FID</summary>
2014-04-14 02:29:13 +00:00
public UInt16 filetab_fid2 ;
2015-12-06 07:18:36 +00:00
/// <summary>0x08C, File lookup table FID</summary>
2014-04-14 02:29:13 +00:00
public UInt16 filetab_fid3 ;
2015-12-06 07:18:36 +00:00
/// <summary>0x08E, Lowest structure level on the volume</summary>
2014-04-14 02:29:13 +00:00
public UInt16 lowstruclev ;
2015-12-06 07:18:36 +00:00
/// <summary>0x090, Highest structure level on the volume</summary>
2014-04-14 02:29:13 +00:00
public UInt16 highstruclev ;
2015-12-06 07:18:36 +00:00
/// <summary>0x092, Volume copy date (??)</summary>
2014-04-14 02:29:13 +00:00
public UInt64 copydate ;
2015-12-06 07:18:36 +00:00
/// <summary>0x09A, 302 bytes</summary>
2014-04-14 02:29:13 +00:00
public byte [ ] reserved1 ;
2015-12-06 07:18:36 +00:00
/// <summary>0x1C8, Physical drive serial number</summary>
2014-04-14 02:29:13 +00:00
public UInt32 serialnum ;
2015-12-06 07:18:36 +00:00
/// <summary>0x1CC, Name of the volume set, 12 bytes</summary>
2014-04-14 02:29:13 +00:00
public string strucname ;
2015-12-06 07:18:36 +00:00
/// <summary>0x1D8, Volume label, 12 bytes</summary>
2014-04-14 02:29:13 +00:00
public string volname ;
2015-12-06 07:18:36 +00:00
/// <summary>0x1E4, Name of the volume owner, 12 bytes</summary>
2014-04-14 02:29:13 +00:00
public string ownername ;
2015-12-06 07:18:36 +00:00
/// <summary>0x1F0, ODS-2 defines it as "DECFILE11B", 12 bytes</summary>
2014-04-14 02:29:13 +00:00
public string format ;
2015-12-06 07:18:36 +00:00
/// <summary>0x1FC, Reserved</summary>
2014-04-14 02:29:13 +00:00
public UInt16 reserved2 ;
2015-12-06 07:18:36 +00:00
/// <summary>0x1FE, Checksum of preceding 255 words (16 bit units)</summary>
2014-04-14 02:29:13 +00:00
public UInt16 checksum2 ;
}
}
2014-04-14 01:14:20 +00:00
}