Home
last modified time | relevance | path

Searched refs:hp (Results 1 – 4 of 4) sorted by relevance

/system/core/libcutils/
Dsocket_network_client.c41 struct hostent *hp; in socket_network_client() local
46 hp = gethostbyname(host); in socket_network_client()
47 if(hp == 0) return -1; in socket_network_client()
50 addr.sin_family = hp->h_addrtype; in socket_network_client()
52 memcpy(&addr.sin_addr, hp->h_addr, hp->h_length); in socket_network_client()
54 s = socket(hp->h_addrtype, type, 0); in socket_network_client()
/system/netd/
DDnsProxyListener.cpp93 static bool sendhostent(SocketClient *c, struct hostent *hp) { in sendhostent() argument
96 if (hp->h_name != NULL) { in sendhostent()
97 success &= sendLenAndData(c, strlen(hp->h_name)+1, hp->h_name); in sendhostent()
102 for (i=0; hp->h_aliases[i] != NULL; i++) { in sendhostent()
103 success &= sendLenAndData(c, strlen(hp->h_aliases[i])+1, hp->h_aliases[i]); in sendhostent()
107 uint32_t buf = htonl(hp->h_addrtype); in sendhostent()
110 buf = htonl(hp->h_length); in sendhostent()
113 for (i=0; hp->h_addr_list[i] != NULL; i++) { in sendhostent()
114 success &= sendLenAndData(c, 16, hp->h_addr_list[i]); in sendhostent()
321 struct hostent* hp; in run() local
[all …]
/system/core/adb/
Dservices.c62 struct hostent *hp; in dns_service() local
66 hp = gethostbyname(hostname); in dns_service()
68 if(hp == 0) { in dns_service()
71 writex(fd, hp->h_addr, 4); in dns_service()
Dsysdeps_win32.c665 struct hostent *hp; in socket_network_client() local
675 hp = gethostbyname(host); in socket_network_client()
676 if(hp == 0) { in socket_network_client()
682 addr.sin_family = hp->h_addrtype; in socket_network_client()
684 memcpy(&addr.sin_addr, hp->h_addr, hp->h_length); in socket_network_client()
686 s = socket(hp->h_addrtype, type, 0); in socket_network_client()