Dispatch the KernelPatch ctl0 supercall on the §4 header kind:
- config -> vpnhide_parse_config: per-uid hookmask + debug (replaces the
uid-only target set; each hook now gated by its bit, enabling per-hook
control). The decimal load-args path stays for headless QEMU bring-up and
enables the full kernel mask.
- status -> vpnhide_format_status: backend id, kver, installed-hook mask,
dominant error (ok / partial_hooks), via out_msg + clamp_to_line.
- stats -> format wired; per-(uid,hook) counters are a follow-up (TODO).
Add backend ids (kmod/kpm/zygisk/lsposed, protocol §4.3) to the registry so
the status emitter and the app share one source — codegen now renders them
to C/Rust/Kotlin alongside the hook ids and error codes.
data/hooks.toml is the global hook id space + status error codes shared by
the control/stats protocol: bit N of a config mask == hook id N == the id in
a stats line. scripts/codegen-hooks.py renders the matching id enums,
per-backend 'own' masks, and error codes for every language that touches the
protocol (kmod/KPM C, zygisk Rust, lsposed-native Rust, app Kotlin), so the
numbering can never diverge between backends. Wired into the CI drift-check
beside the iface-list codegen.
The script runs under uv (PEP 723, '#!/usr/bin/env -S uv run' so plain
./scripts/codegen-hooks.py works), matching the repo's other tooling; no
external deps. Generated outputs are rustfmt- and ktlint-clean by
construction. Registry is append-only: ids are permanent so old stats keep
meaning and old readers skip unknown ids.