Parent
#24 — Spec: One typed seam through which all NAT state flows
What to build
Auto-discover talks to the natmap daemon through a typed client module in the natmap crate, instead of building a Cli struct and round-tripping through run_cli. The client calls the existing socket protocol (request_json) directly, one typed method per operation, taking the existing typed config structs. DnatConfig.no_masquerade is renamed to preserve_src_ip so intent is visible at the call site. Errors come back as a typed enum (Conflict, ContainerNotFound, NotFound, …) mapped from the daemon's status codes; auto-discover's 409/404/"Container not found" string-matching is removed and replaced with variant matching. The CLI surface is unchanged.
Acceptance criteria
Blocked by
None — can start immediately.
Parent
#24 — Spec: One typed seam through which all NAT state flows
What to build
Auto-discover talks to the natmap daemon through a typed client module in the natmap crate, instead of building a Cli struct and round-tripping through
run_cli. The client calls the existing socket protocol (request_json) directly, one typed method per operation, taking the existing typed config structs.DnatConfig.no_masqueradeis renamed topreserve_src_ipso intent is visible at the call site. Errors come back as a typed enum (Conflict, ContainerNotFound, NotFound, …) mapped from the daemon's status codes; auto-discover's 409/404/"Container not found" string-matching is removed and replaced with variant matching. The CLI surface is unchanged.Acceptance criteria
Clistruct or callsrun_cliDnatConfigusespreserve_src_ip(renamed fromno_masquerade) across the seamBlocked by
None — can start immediately.