refactor and move +gethostbyaddr() into its own shell function