Contract reference (generated)

Machine-generated snapshot of the FFI / pipe contract from the values defined in the fmf-contract crate. The prose canonical source for semantics and the safety contract is Architecture; for Rust API details see rustdoc (/doc/fmf_contract/). Numbers are the actual offset_of! / size_of! values.

Versions and pipe name

ItemValue
ABI_VERSION2
PROTOCOL_VERSION2
PIPE_NAME\\.\pipe\fmf-engine-v2
PIPE_NAME_SHORTfmf-engine-v2
SERVICE_NAMEfmf-engine

Status codes (frame header status / FFI return values. append-only)

NameValue
OK0
INVALID_ARG1
STALE2
NOT_ADMIN3
VOLUME4
QUERY_SYNTAX5
IO6
LOCKED7
PANIC99

Pipe opcodes (event pushes reuse 1..=6 as the kind)

NameValue
HELLO1
SUBSCRIBE2
UNSUBSCRIBE3
LIST_VOLUMES4
INDEX_START5
INDEX_STATUS6
QUERY7
RESULT_PAGE8
RESULT_FREE9
STATS10
FLUSH_RESERVED11
SERVICE_INFO12

Event kinds (FFI FmfEvent.kind = pipe event-push opcode)

KindValue
Progress1
VolumeReady2
IndexChanged3
RescanStarted4
VolumeFailed5
EngineError6

Limits (protocol facts. not tunable)

ConstantValue
MAX_PAYLOAD_LEN16777216
MAX_RESULTS_PER_CONN64
EVENT_QUEUE_CAP256
PAGE_ROWS64

POD layouts (#[repr(C)], actual offset_of! values)

FrameHeader (16 B)

Fieldoffset
len0
opcode4
flags6
request_id8
status12

FmfRow (48 B)

Fieldoffset
entry_ref0
frn8
size16
mtime24
name_off32
parent_path_off36
flags40
name_len44
parent_path_len46

FmfQueryOptions (20 B)

Fieldoffset
sort0
desc4
case_mode8
include_hidden_system12
regex_mode16

FmfPage (32 B)

Fieldoffset
row_count0
rows8
blob16
blob_len24

FmfEvent (32 B)

Fieldoffset
kind0
entries8
volume16

FmfVolumeStatus (32 B)

Fieldoffset
label0
state16
entries24

FmfBlob (16 B)

Fieldoffset
data0
len8

Degradation counter names (snake_case keys of the stats JSON. append-only)

  • stat_fetch_failures
  • usn_batches_truncated
  • snapshot_load_failures
  • snapshot_save_failures
  • deferred_names_unresolved
  • corrupt_mft_records
  • journal_rescans
  • scan_pipeline_fallbacks
  • offset_table_rebuild_fallbacks
  • lazy_perm_rebuild_fallbacks
  • compaction_aborts
  • pipe_malformed_frames
  • pipe_events_dropped
  • pipe_connections_rejected
  • deferred_name_cache_overflow
  • deferred_name_read_failures
  • pipe_results_evicted
  • trace_serialize_failures
  • walk_read_errors
  • walk_depth_truncated