[1/6] fd passing: move interface code from daemon.