Lines Matching refs:hptr1
139 struct hostent *hptr1, *hptr2; in test_hosts() local
144 hptr1 = gethostbyname ("localhost"); in test_hosts()
146 if (hptr1 != NULL || hptr2 != NULL) in test_hosts()
148 if (hptr1 == NULL) in test_hosts()
158 else if (strcmp (hptr1->h_name, hptr2->h_name) != 0) in test_hosts()
161 printf ("gethostbyname (\"localhost\")->%s\n", hptr1->h_name); in test_hosts()
166 output_hostent ("gethostbyname(\"localhost\")", hptr1); in test_hosts()
169 hptr1 = gethostbyname ("127.0.0.1"); in test_hosts()
170 output_hostent ("gethostbyname (\"127.0.0.1\")", hptr1); in test_hosts()
172 hptr1 = gethostbyname ("10.1234"); in test_hosts()
173 output_hostent ("gethostbyname (\"10.1234\")", hptr1); in test_hosts()
175 hptr1 = gethostbyname2 ("localhost", AF_INET); in test_hosts()
176 output_hostent ("gethostbyname2 (\"localhost\", AF_INET)", hptr1); in test_hosts()
188 hptr1 = gethostbyname (name); in test_hosts()
189 output_hostent ("gethostbyname (gethostname(...))", hptr1); in test_hosts()
194 hptr1 = gethostbyaddr ((char *) &ip, sizeof (ip), AF_INET); in test_hosts()
195 if (hptr1 != NULL) in test_hosts()
197 printf ("official name of 127.0.0.1: %s\n", hptr1->h_name); in test_hosts()
203 hptr1 = gethostent (); in test_hosts()
204 output_hostent ("gethostent ()", hptr1); in test_hosts()
206 while (hptr1 != NULL); in test_hosts()