add sample code of gethostbyname