Documentation ¶
Index ¶
- Constants
- Variables
- type BATHeader
- type BATManager
- type Block
- type BlockHeader
- type BlockReadable
- type DAddr
- type Dir
- type DirEntry
- type DirEntrySR9
- type DirInformationBlock
- type DirSR9
- type DriveType
- type File
- type FileManager
- type LVLabel
- type LogicalVolume
- type NamingManager
- type PVLabel
- type PhysicalVolume
- type UID
- type VTOCBlock
- type VTOCBlockSR9
- type VTOCBucket
- type VTOCBucketBlock
- type VTOCBucketEntry
- type VTOCE
- type VTOCEHeader
- type VTOCEHeaderSR9
- type VTOCESR9
- type VTOCHeader
- type VTOCManager
- func (vm *VTOCManager) AllocateEntry(uid UID) (VTOCX, error)
- func (vm *VTOCManager) GetEntry(vtocx VTOCX) (*VTOCE, error)
- func (vm *VTOCManager) GetEntryForUID(uid UID) (*VTOCE, error)
- func (vm VTOCManager) GetFMBlocks(e *VTOCE) ([]DAddr, error)
- func (vm *VTOCManager) GetIndexForUID(uid UID) (VTOCX, error)
- func (vm *VTOCManager) LookupEntry(uid UID) (*VTOCE, error)
- type VTOCMap
- type VTOCMapData
- type VTOCMapDataSR9
- type VTOCMapExtent
- type VTOCX
Constants ¶
View Source
const BlockDataSize = 1024
View Source
const BlockHeaderSize = 32
View Source
const BlockSize = BlockDataSize + BlockHeaderSize
View Source
const MaxLogicalVolumes = 10
Variables ¶
View Source
var ( UIDpvlabel = UID{0x0200, 0x0000} UIDlvlabel = UID{0x0201, 0x0000} UIDvtoc = UID{0x0202, 0x0000} UIDbat = UID{0x0203, 0x0000} UIDvtoc_bkt = UID{0x0204, 0x000} UIDrecords = UID{0x0300, 0x0000} UIDhdr_undef = UID{0x0301, 0x0000} UIDobject_file = UID{0x0302, 0x0000} UIDundef = UID{0x0304, 0x0000} UIDpad = UID{0x0305, 0x0000} UIDroot = UID{0x0308, 0x0000} UIDinput_pad = UID{0x0309, 0x0000} UIDsio = UID{0x030a, 0x0000} UIDddf = UID{0x030b, 0x0000} UIDmbx = UID{0x030c, 0x0000} UIDnulldev = UID{0x030d, 0x0000} UIDd3m_area = UID{0x030e, 0x0000} UIDd3m_sch = UID{0x030f, 0x0000} UIDpipe = UID{0x0310, 0x0000} UIDuasc = UID{0x0311, 0x0000} UIDdirectory = UID{0x0312, 0x0000} UIDunix_directory = UID{0x0313, 0x0000} UIDmt = UID{0x0314, 0x0000} UIDsysboot = UID{0x0315, 0x0000} )
some canned UIDs from the docs that we recognize further down in String()
Functions ¶
This section is empty.
Types ¶
type BATHeader ¶
type BATManager ¶
type BATManager struct {
// contains filtered or unexported fields
}
func NewBATManager ¶
func NewBATManager(lvol *LogicalVolume) *BATManager
func (*BATManager) AllocateBlock ¶
func (bm *BATManager) AllocateBlock() (DAddr, error)
type Block ¶
type Block struct { Header BlockHeader Data [1024]byte // must match BlockDataSize above }
func NewBlock ¶
func NewBlock(header BlockHeader, data any) Block
type BlockHeader ¶
type BlockHeader struct { ObjectUID UID PageWithinObject int32 LastWritten int32 BlockSystemTypes int32 Ignore1 int32 Ignore2 int16 DataChecksum int16 PVBlockDAddr DAddr }
func (*BlockHeader) BlockType ¶
func (bh *BlockHeader) BlockType() int
func (*BlockHeader) Print ¶
func (h *BlockHeader) Print()
func (*BlockHeader) SystemType ¶
func (bh *BlockHeader) SystemType() int
type BlockReadable ¶
type DirEntry ¶
type DirEntry struct { EntryType uint8 // 0x*2 = file. 0x*4 = symlink // nameLength uint8 LinkTextLength uint16 // unknown2 uint32 Name string UID UID // entry type == 0x*2 LinkText string // entry type == 0x*4 }
looks like 10.4 filesystem has the following format per entry
[0] uint8 .version [1] uint8 .name_length [2] uint8 .unknown (entry type?) [3] uint8 .unknown (entry length?) [4] uid_t .uid (not sure what. it's the same for all entries it seems) [5]
func (*DirEntry) HasLinkText ¶
type DirEntrySR9 ¶
type DirEntrySR9 struct { Name [32]byte NetworkNumberHint uint16 Unused uint16 Reserved uint16 EntryType uint8 Length uint8 Rest [8]byte }
func (DirEntrySR9) UID ¶
func (de DirEntrySR9) UID() (UID, error)
type DirInformationBlock ¶
type DriveType ¶
func GetDriveType ¶
func GetDriveTypes ¶
func GetDriveTypes() []DriveType
func (DriveType) TotalBlocks ¶
type FileManager ¶
type FileManager struct {
// contains filtered or unexported fields
}
func (*FileManager) CreateFile ¶
func (fm *FileManager) CreateFile(containingDirectory UID) (*File, error)
type LVLabel ¶
type LogicalVolume ¶
type LogicalVolume struct { Label LVLabel // there will be 8 of these VTOCMap VTOCMap // contains filtered or unexported fields }
func NewLogicalVolume ¶
func NewLogicalVolume(pvol *PhysicalVolume, startDAddr DAddr) (*LogicalVolume, error)
func (*LogicalVolume) PrintLabel ¶
func (lvol *LogicalVolume) PrintLabel()
type NamingManager ¶
type NamingManager struct {
// contains filtered or unexported fields
}
func NewNamingManager ¶
func NewNamingManager(lvol *LogicalVolume, vtoc *VTOCManager) *NamingManager
func (*NamingManager) CreateDirectory ¶
func (nm *NamingManager) CreateDirectory(p string) (*Dir, error)
func (*NamingManager) CreateFile ¶
func (nm *NamingManager) CreateFile(p string) (*File, error)
func (*NamingManager) GetDirEntryUID ¶
func (nm *NamingManager) GetDirEntryUID(dirUID UID, name string) (UID, error)
type PVLabel ¶
type PVLabel struct { Version int16 APOLLO [6]byte Name [32]byte UID UID Ignore1 int16 DriveType int16 TotalBlocksInVolume int32 BlocksPerTrack int16 TracksPerCylinder int16 LVDAddr [10]DAddr AltLVLabelDAddr [10]DAddr // start of phys bad spot cylinder PhysBadspotDAddr DAddr // start of phys diag cylinder PhysDiagDAddr DAddr SectorStart uint16 SectorSize uint16 PreCompCylinder uint16 }
type PhysicalVolume ¶
type PhysicalVolume struct { Label PVLabel LV *LogicalVolume // contains filtered or unexported fields }
func Mount ¶
func Mount(diskImage string) (*PhysicalVolume, error)
func (*PhysicalVolume) LogicalVolumes ¶
func (pvol *PhysicalVolume) LogicalVolumes() []int
func (*PhysicalVolume) PrintLabel ¶
func (pvol *PhysicalVolume) PrintLabel()
func (*PhysicalVolume) ReadBlock ¶
func (pvol *PhysicalVolume) ReadBlock(blockNum DAddr) (*Block, error)
func (*PhysicalVolume) Unmount ¶
func (pvol *PhysicalVolume) Unmount() error
type VTOCBlock ¶
type VTOCBlockSR9 ¶
type VTOCBucket ¶
type VTOCBucket struct { // bucket header (next daddr/index) NextBlockDAddr DAddr NextIndex uint16 Padding uint16 // bucket entries Entries [20]VTOCBucketEntry }
type VTOCBucketBlock ¶
type VTOCBucketBlock struct {
Buckets [4]VTOCBucket
}
this seem to be a struct in SR10 only, and not present in SR9?
func (VTOCBucketBlock) Print ¶
func (b VTOCBucketBlock) Print()
type VTOCBucketEntry ¶
type VTOCE ¶
type VTOCE struct { Header VTOCEHeader FileMap1Ptr DAddr FileMap2Ptr DAddr FileMap3Ptr DAddr FileMap0 [32]DAddr // daddrs for the first 32 pages of an object }
func (VTOCE) IsDirectory ¶
type VTOCEHeader ¶
type VTOCEHeader struct { Version uint8 SystemType uint8 Flags uint16 ObjectUID UID ObjectTypeDefUID UID CurrentLength uint32 BlocksUsed uint32 LastModifiedTime uint32 ExtDtm uint16 RefCount uint16 LastUsedTime uint32 U5 uint32 U6 uint32 U7 uint32 U8 uint32 U9 uint32 DirectoryUID UID ObjectLockKey uint32 ObjectUserUID UID ObjectGroupUID UID ObjectOrgUID UID U19 uint32 U20 uint32 U21 uint32 U22 uint32 U23 uint32 U24 uint32 U25 uint32 U26 uint32 U27 uint32 U28 uint32 ObjectACLUID UID Padding [52]byte }
type VTOCEHeaderSR9 ¶
type VTOCEHeaderSR9 struct { // "VTOCE & Object Info" in the docs Version uint8 SystemType uint8 Flags uint16 ObjectUID UID ObjectTypeDefUID UID ObjectACLUID UID CurrentLength int32 BlocksUsed int32 LastUsedTime int32 LastModifiedTime int32 DirectoryUID UID // "UID of Directory in which object catalogued" in the docs. containing dir? MoreStuff int32 // "DTM Ext. / Unused / Ref. Count" in the docs ObjectLockKey int32 Padding [4]byte // Aegis Internals doesn't have this, but EH'87 does. }
type VTOCESR9 ¶
type VTOCESR9 struct { Header VTOCEHeaderSR9 FileMap0 [32]DAddr FileMap1Ptr DAddr FileMap2Ptr DAddr FileMap3Ptr DAddr }
type VTOCHeader ¶
type VTOCHeader struct { Version int16 VTOCSizeInBlocks int16 VTOCBlocksUsed int32 NetworkRootDirVTOCX VTOCX DiskEntryDirVTOCX VTOCX OSPagingFileVTOCX VTOCX SysbootVTOCX VTOCX VTOCMapData VTOCMapData Unused [28]byte }
func (VTOCHeader) Print ¶
func (h VTOCHeader) Print()
type VTOCManager ¶
type VTOCManager struct {
// contains filtered or unexported fields
}
func NewVTOCManager ¶
func NewVTOCManager(lvol *LogicalVolume) *VTOCManager
func (*VTOCManager) AllocateEntry ¶
func (vm *VTOCManager) AllocateEntry(uid UID) (VTOCX, error)
func (*VTOCManager) GetEntryForUID ¶
func (vm *VTOCManager) GetEntryForUID(uid UID) (*VTOCE, error)
func (VTOCManager) GetFMBlocks ¶
func (vm VTOCManager) GetFMBlocks(e *VTOCE) ([]DAddr, error)
func (*VTOCManager) GetIndexForUID ¶
func (vm *VTOCManager) GetIndexForUID(uid UID) (VTOCX, error)
func (*VTOCManager) LookupEntry ¶
func (vm *VTOCManager) LookupEntry(uid UID) (*VTOCE, error)
type VTOCMap ¶
type VTOCMap []VTOCMapExtent
the next two are the parsed form of VTOCMapData. check logical_volume.go
type VTOCMapData ¶
type VTOCMapData [60]byte
type VTOCMapDataSR9 ¶
type VTOCMapDataSR9 [48]byte
type VTOCMapExtent ¶
Click to show internal directories.
Click to hide internal directories.