This is a pure structural refactor with zero behavior change.
Motivation
Currently, ParseAddress and the underlying connect/bind functions in src/ipc/process.cpp are hardwired to use struct sockaddr_un. This tightly couples the IPC implementation to Unix domain sockets and makes it difficult to introduce other socket types.
This PR abstracts the address parsing to use the protocol-agnostic sockaddr_storage and socklen_t.
- The existing Unix socket logic is extracted into a
ParseUnixAddresshelper. - The main
ParseAddressfunction is turned into a clean dispatcher. connectandbindare updated to use the genericss_familyand dynamic address lengths.
This structural change paves the way for introducing authenticated TCP socket support to multiprocess IPC (addressing #32802). By separating this refactor from the TCP implementation, it keeps the diff footprint small and makes the follow-on feature PR much easier to review.
(Note: The follow-on TCP work will rely on reusing the existing RPC cookie auth and explicit SSH tunneling for untrusted networks, mirroring our existing RPC threat model without introducing new dependencies).