Lines Matching refs:hp
95 static bool sendhostent(SocketClient *c, struct hostent *hp) {
98 if (hp->h_name != NULL) {
99 success &= sendLenAndData(c, strlen(hp->h_name)+1, hp->h_name);
104 for (i=0; hp->h_aliases[i] != NULL; i++) {
105 success &= sendLenAndData(c, strlen(hp->h_aliases[i])+1, hp->h_aliases[i]);
109 uint32_t buf = htonl(hp->h_addrtype);
112 buf = htonl(hp->h_length);
115 for (i=0; hp->h_addr_list[i] != NULL; i++) {
116 success &= sendLenAndData(c, 16, hp->h_addr_list[i]);
311 struct hostent* hp;
313 hp = android_gethostbynamefornet(mName, mAf, mNetId, mMark);
316 ALOGD("GetHostByNameHandler::run gethostbyname errno: %s hp->h_name = %s, name_len = %zu\n",
317 hp ? "success" : strerror(errno),
318 (hp && hp->h_name) ? hp->h_name : "null",
319 (hp && hp->h_name) ? strlen(hp->h_name) + 1 : 0);
323 if (hp) {
325 success &= sendhostent(mClient, hp);
427 struct hostent* hp;
430 hp = android_gethostbyaddrfornet((char*)mAddress, mAddressLen, mAddressFamily, mNetId, mMark);
433 ALOGD("GetHostByAddrHandler::run gethostbyaddr errno: %s hp->h_name = %s, name_len = %zu\n",
434 hp ? "success" : strerror(errno),
435 (hp && hp->h_name) ? hp->h_name : "null",
436 (hp && hp->h_name) ? strlen(hp->h_name) + 1 : 0);
440 if (hp) {
442 success &= sendhostent(mClient, hp);