Lines Matching refs:host
304 static Handle makeHostEntry(TaskData *taskData, struct hostent *host);
1189 struct hostent *host = (struct hostent *)arg;
1194 for (j = 0; j < host->h_length; j++)
1199 /* Convert a host entry into a tuple for ML. */
1200 static Handle makeHostEntry(TaskData *taskData, struct hostent *host)
1212 name = SAVE(C_string_to_Poly(taskData, host->h_name));
1215 for (i=0, p = host->h_aliases; *p != NULL; p++, i++);
1216 aliases = convert_string_list(taskData, i, host->h_aliases);
1219 addrType = Make_arbitrary_precision(taskData, host->h_addrtype);
1223 for (i=0, p = host->h_addr_list; *p != NULL; p++, i++);
1224 addrList = makeList(taskData, i, (char*)host->h_addr_list, sizeof(char*), host, mkAddr);
1625 try { /* Get the current host name. */
1659 /* Look up a host name. */
1661 struct hostent *host = gethostbyname(hostName);
1663 Handle result = host == NULL ? 0 : makeHostEntry(taskData, host);
1680 /* Look up a host name given an address. */
1681 struct hostent *host = gethostbyaddr((char*)&addr, sizeof(addr), AF_INET);
1682 Handle result = host == NULL ? 0 : makeHostEntry(taskData, host);