Port /host over. Needs error handling and probably generalized.