p9trace

package module
v0.0.0-...-96bdba9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package p9trace implements a parser for the Plan 9 File System Traces.

Index

Constants

View Source
const (
	TagNull  = 0
	TagSuper = 1
	TagDir   = 2
	TagInd1  = 3
	TagInd2  = 4
	TagFile  = 5
	TagMax   = 6
)
View Source
const (
	HeaderSize = 35
	SuperSize  = 16
	DirSize    = 62
)

Variables

This section is empty.

Functions

func FileRecords

func FileRecords(files ...string) iter.Seq[*Record]

Types

type Dir

type Dir struct {
	Slot    uint16
	Path    uint32
	Version uint32
	Mode    uint16
	Size    uint32
	DBlock  [6]uint32
	IBlock  uint32
	DIBlock uint32
	MTime   uint32
	ATime   uint32
	UID     uint16
	GID     uint16
	WID     uint16
}

type Record

type Record struct {
	Tag   uint8    // type of block (Tag* constants)
	Path  uint32   // unique file id
	Addr  uint32   // address of block
	ZSize uint16   // zero-truncated size of data in block
	WSize uint16   // fast lempel-ziv (wide deflate) compressed
	DSize uint16   // deflate compressed
	Score [20]byte // keyed hash of data

	Super *Super
	Dir   []*Dir
	Ind   []uint32
}

func (*Record) MarshalBinary

func (r *Record) MarshalBinary() ([]byte, error)

func (*Record) Pointers

func (r *Record) Pointers() iter.Seq[*uint32]

func (*Record) UnmarshalBinary

func (r *Record) UnmarshalBinary(data []byte) error

type Super

type Super struct {
	CWRAddr uint32 // cached-worm root: dir block for root of snapshot
	RORAddr uint32 // read-only root: dir block for snapshot tree
	Last    uint32 // addr of previous super block
	Next    uint32 // addr of next super block
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL