Skip to main content

Module container

Module container 

Source
Expand description

Container superblock (nx_superblock_t, magic NX_MAGIC = 'BSXN' → “NXSB” → LE 0x4253584E) and container geometry.

The NXSB (Apple APFS Reference, nx_superblock_t) names the block size (nx_block_size, default 4096, max 65536), block count, feature/incompatible flags, container UUID, the spaceman/omap/reaper oids, the checkpoint descriptor + data areas (nx_xp_desc_base/len, nx_xp_data_base/len), and the volume oids (nx_fs_oid[]). Block 0 holds a copy, but the live superblock is found via the checkpoint ring (crate::checkpoint).

The EFI jumpstart (nx_efi_jumpstart, magic NX_EFI_JUMPSTART_MAGIC = 'RDSJ' → “JSDR”) locates the bootable EFI driver, parsed here for completeness.

Structs§

NxSuperblock
A parsed container superblock (subset; #[non_exhaustive] for additive growth).

Constants§

NX_DEFAULT_BLOCK_SIZE
NX_INCOMPAT_FUSION
Smallest / default / largest block size and minimum container size (Apple). NX_INCOMPAT_FUSION — the nx_incompatible_features bit set on a Fusion (SSD+HDD) container (Apple APFS Reference). A reader that does not implement tier-aware address translation must reject such a container rather than mis-read physical addresses (see crate::fusion).
NX_MAGIC
Container superblock magic NX_MAGIC (‘BSXN’, “NXSB” in a hex dump).
NX_MAXIMUM_BLOCK_SIZE
NX_MAX_FILE_SYSTEMS
NX_MAX_FILE_SYSTEMS (Apple) — the hard cap on volumes per container, used as the sanity bound on nx_max_file_systems (allocation-bomb defense).
NX_MINIMUM_BLOCK_SIZE
NX_MINIMUM_CONTAINER_SIZE