Home
last modified time | relevance | path

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

123

/aosp12/bionic/libc/dns/net/
H A Dsethostent.c120 hp = NULL; in _hf_gethtbyname()
121 if (hp == NULL) in _hf_gethtbyname()
128 if (hp == NULL) { in _hf_gethtbyname()
172 hp = netbsd_gethostent_r(hf, info->hp, info->buf, info->buflen, in _hf_gethtbyname2()
174 if (hp == NULL) { in _hf_gethtbyname2()
207 HENT_COPY(addr_ptrs[num], hp->h_addr_list[0], hp->h_length, ptr, in _hf_gethtbyname2()
219 hp = info->hp; in _hf_gethtbyname2()
230 HENT_COPY(hp->h_addr_list[i], addr_ptrs[i], hp->h_length, ptr, in _hf_gethtbyname2()
241 return hp; in _hf_gethtbyname2()
272 if (!memcmp(hp->h_addr_list[0], addr, (size_t)hp->h_length)) in _hf_gethtbyaddr()
[all …]
H A Dgethnamaddr.c586 memset(hp, 0, sizeof(*hp)); in android_read_hostent()
665 return hp; in android_read_hostent()
754 info.hp = hp; in gethostbyname_internal_real()
762 return hp; in gethostbyname_internal_real()
787 return hp; in gethostbyname_internal_real()
880 info.hp = hp; in android_gethostbyaddrfornetcontext_real()
889 return hp; in android_gethostbyaddrfornetcontext_real()
1320 struct hostent *hp = info->hp; in _yp_hostent() local
1418 HENT_SCOPY(hp->h_name, hp->h_name, ptr, len); in _yp_hostent()
1425 return hp; in _yp_hostent()
[all …]
H A Dgetnameinfo.c179 struct hostent *hp; in getnameinfo_inet() local
318 hp = android_gethostbyaddrfornetcontext_proxy(addr, afd->a_addrlen, afd->a_af, &netcontext); in getnameinfo_inet()
319 if (hp) { in getnameinfo_inet()
327 p = strchr(hp->h_name, '.'); in getnameinfo_inet()
329 TODO: Before uncommenting rewrite to avoid modifying hp. in getnameinfo_inet()
333 if (strlen(hp->h_name) + 1 > (size_t)hostlen) { in getnameinfo_inet()
336 strlcpy(host, hp->h_name, hostlen); in getnameinfo_inet()
H A Dgetaddrinfo.c1317 const HEADER *hp; in getanswer() local
1349 hp = &answer->hdr; in getanswer()
1350 ancount = ntohs(hp->ancount); in getanswer()
1351 qdcount = ntohs(hp->qdcount); in getanswer()
2163 HEADER *hp; in res_queryN() local
2181 hp = (HEADER *)(void *)t->answer; in res_queryN()
2224 if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { in res_queryN()
2241 ntohs(hp->ancount)); in res_queryN()
2246 ancount += ntohs(hp->ancount); in res_queryN()
2284 HEADER *hp; in res_searchN() local
[all …]
/aosp12/packages/modules/DnsResolver/
H A Dsethostent.cpp69 struct hostent *hp, hent; in _hf_gethtbyname2() local
96 info->hp->h_length = 0; in _hf_gethtbyname2()
99 hp = netbsd_gethostent_r(hf, info->hp, info->buf, info->buflen, &he); in _hf_gethtbyname2()
100 if (hp == NULL) { in _hf_gethtbyname2()
129 HENT_COPY(addr_ptrs[num], hp->h_addr_list[0], hp->h_length, ptr, len); in _hf_gethtbyname2()
143 hp = info->hp; in _hf_gethtbyname2()
154 HENT_COPY(hp->h_addr_list[i], addr_ptrs[i], hp->h_length, ptr, len); in _hf_gethtbyname2()
180 info->hp->h_length = len; in _hf_gethtbyaddr()
192 struct hostent* hp; in _hf_gethtbyaddr() local
195 if (!memcmp(hp->h_addr_list[0], uaddr, (size_t) hp->h_length)) break; in _hf_gethtbyaddr()
[all …]
H A Dgethnamaddr.cpp130 const HEADER* hp; in getanswer() local
168 hp = &answer->hdr; in getanswer()
411 hp->h_addrtype = af; in resolv_gethostbyname()
447 info.hp = hp; in resolv_gethostbyname()
454 *result = hp; in resolv_gethostbyname()
462 hp->h_aliases[0] = NULL; in resolv_gethostbyname()
473 *result = hp; in resolv_gethostbyname()
517 info.hp = hp; in resolv_gethostbyaddr()
524 *result = hp; in resolv_gethostbyaddr()
624 if (hp->h_addrtype != AF_INET || hp->h_length != NS_INADDRSZ) return; in convert_v4v6_hostent()
[all …]
H A Dres_mkquery.cpp108 HEADER* hp; in res_nmkquery() local
121 hp = (HEADER*) (void*) buf; in res_nmkquery()
123 hp->opcode = op; in res_nmkquery()
124 hp->rd = true; in res_nmkquery()
126 hp->rcode = NOERROR; in res_nmkquery()
147 hp->qdcount = htons(1); in res_nmkquery()
164 hp->arcount = htons(1); in res_nmkquery()
185 hp->ancount = htons(1); in res_nmkquery()
199 HEADER* hp; in res_nopt() local
205 hp = (HEADER*) (void*) buf; in res_nopt()
[all …]
H A Dres_query.cpp110 HEADER* hp = (HEADER*) (void*) answer; in res_nquery() local
116 hp->rcode = NOERROR; // default in res_nquery()
171 if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { in res_nquery()
172 LOG(DEBUG) << __func__ << ": rcode = (" << p_rcode(hp->rcode) in res_nquery()
173 << "), counts = an:" << ntohs(hp->ancount) << " ns:" << ntohs(hp->nscount) in res_nquery()
174 << " ar:" << ntohs(hp->arcount); in res_nquery()
176 switch (hp->rcode) { in res_nquery()
212 HEADER* hp = (HEADER*) (void*) answer; in res_nsearch() local
287 if (hp->rcode == SERVFAIL) { in res_nsearch()
H A DDnsProxyListener.cpp197 if (hp == nullptr) { in extractGetHostByNameAnswers()
259 hp->id = htons(query_id); in setQueryId()
441 if (hp == nullptr) return; in logDnsQueryResult()
518 logDnsQueryResult(hp); in synthesizeNat64PrefixWithARecord()
620 success &= sendLenAndData(c, strlen(hp->h_name) + 1, hp->h_name); in sendhostent()
626 success &= sendLenAndData(c, strlen(hp->h_aliases[i]) + 1, hp->h_aliases[i]); in sendhostent()
1132 hostent* hp = nullptr; in run() local
1161 if (hp) { in run()
1292 hostent* hp = nullptr; in run() local
1316 if (hp) { in run()
[all …]
H A Dgetaddrinfo.cpp847 const HEADER* hp; in getanswer() local
879 ancount = ntohs(hp->ancount); in getanswer()
880 qdcount = ntohs(hp->qdcount); in getanswer()
1614 hp->rcode = NOERROR; // default in doQuery()
1648 if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { in doQuery()
1662 LOG(DEBUG) << __func__ << ": rcode=" << hp->rcode << ", ancount=" << ntohs(hp->ancount); in doQuery()
1666 .ancount = ntohs(hp->ancount), in doQuery()
1772 if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { in res_queryN()
1786 LOG(DEBUG) << __func__ << ": rcode=" << hp->rcode << ", ancount=" << ntohs(hp->ancount); in res_queryN()
1790 ancount += ntohs(hp->ancount); in res_queryN()
[all …]
H A Dgethnamaddr.h31 int resolv_gethostbyname(const char* name, int af, hostent* hp, char* buf, size_t buflen,
36 int resolv_gethostbyaddr(const void* addr, socklen_t len, int af, hostent* hp, char* buf,
H A Dres_send.cpp438 HEADER* hp = (HEADER*)(void*)ans; in res_nsend() local
439 *rcode = hp->rcode; in res_nsend()
507 auto hp = reinterpret_cast<const HEADER*>(buf); in res_nsend() local
510 int selectedServer = (hp->id % usableServersCount) + 1; in res_nsend()
660 const HEADER* hp = (const HEADER*) (const void*) buf; in send_vc() local
849 if (hp->id != anhp->id) { in send_vc()
980 const HEADER* hp = (const HEADER*)(const void*)buf; in ignoreInvalidAnswer() local
982 if (hp->id != anhp->id) { in ignoreInvalidAnswer()
/aosp12/packages/modules/Wifi/service/java/com/android/server/wifi/util/
H A DMetricsUtils.java90 double logArg = (double) (x - hp.b) / (double) hp.p; in addValueToLogHistogram()
99 } else if (bigBucketIndex >= hp.n) { in addValueToLogHistogram()
100 bigBucketIndex = hp.n - 1; in addValueToLogHistogram()
101 subBucketIndex = hp.s - 1; in addValueToLogHistogram()
103 subBucketIndex = (int) ((x - hp.bb[bigBucketIndex]) / hp.sbw[bigBucketIndex]); in addValueToLogHistogram()
106 if (bigBucketIndex >= hp.n) { in addValueToLogHistogram()
110 subBucketIndex = (int) ((x - hp.bb[bigBucketIndex]) / hp.sbw[bigBucketIndex]); in addValueToLogHistogram()
128 LogHistParms hp) { in logHistogramToGenericBuckets() argument
134 protoArray[i].start = (long) (hp.bb[key / hp.s] + hp.sbw[key / hp.s] * (key % hp.s)); in logHistogramToGenericBuckets()
135 protoArray[i].end = (long) (protoArray[i].start + hp.sbw[key / hp.s]); in logHistogramToGenericBuckets()
[all …]
/aosp12/bionic/tests/
H A Dnetdb_test.cpp197 hostent *hp; in TEST() local
205 hp->h_addr[0] = 0; in TEST()
219 hostent *hp; in TEST() local
227 hp->h_addr[0] = 0; in TEST()
248 hostent *hp; in TEST() local
270 hostent *hp; in TEST() local
281 hostent *hp; in TEST() local
293 hostent *hp; in TEST() local
304 hostent *hp; in TEST() local
315 hostent *hp; in TEST() local
[all …]
/aosp12/bionic/libm/upstream-freebsd/lib/msun/src/
H A De_remainder.c37 int32_t hx,hp; in __ieee754_remainder() local
42 EXTRACT_WORDS(hp,lp,p); in __ieee754_remainder()
44 hp &= 0x7fffffff; in __ieee754_remainder()
48 if(((hp|lp)==0)|| /* p = 0 */ in __ieee754_remainder()
50 ((hp>=0x7ff00000)&& /* p is NaN */ in __ieee754_remainder()
51 (((hp-0x7ff00000)|lp)!=0))) in __ieee754_remainder()
55 if (hp<=0x7fdfffff) x = __ieee754_fmod(x,p+p); /* now x < 2p */ in __ieee754_remainder()
56 if (((hx-hp)|(lx-lp))==0) return zero*x; in __ieee754_remainder()
59 if (hp<0x00200000) { in __ieee754_remainder()
H A De_remainderf.c28 int32_t hx,hp; in __ieee754_remainderf() local
33 GET_FLOAT_WORD(hp,p); in __ieee754_remainderf()
35 hp &= 0x7fffffff; in __ieee754_remainderf()
39 if((hp==0)|| /* p = 0 */ in __ieee754_remainderf()
41 ((hp>0x7f800000))) /* p is NaN */ in __ieee754_remainderf()
45 if (hp<=0x7effffff) x = __ieee754_fmodf(x,p+p); /* now x < 2p */ in __ieee754_remainderf()
46 if ((hx-hp)==0) return zero*x; in __ieee754_remainderf()
49 if (hp<0x01000000) { in __ieee754_remainderf()
/aosp12/bionic/libc/dns/resolv/
H A Dres_mkquery.c126 register HEADER *hp; in res_nmkquery() local
144 hp = (HEADER *)(void *)buf; in res_nmkquery()
145 hp->id = htons(res_randomid()); in res_nmkquery()
146 hp->opcode = op; in res_nmkquery()
149 hp->rcode = NOERROR; in res_nmkquery()
172 hp->qdcount = htons(1); in res_nmkquery()
193 hp->arcount = htons(1); in res_nmkquery()
215 hp->ancount = htons(1); in res_nmkquery()
237 register HEADER *hp; in res_nopt() local
246 hp = (HEADER *)(void *)buf; in res_nopt()
[all …]
H A Dres_query.c135 HEADER *hp = (HEADER *)(void *)answer; in res_nquery() local
142 hp->rcode = NOERROR; /* default */ in res_nquery()
184 if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { in res_nquery()
188 p_rcode(hp->rcode), in res_nquery()
189 ntohs(hp->ancount), in res_nquery()
190 ntohs(hp->nscount), in res_nquery()
191 ntohs(hp->arcount)); in res_nquery()
193 switch (hp->rcode) { in res_nquery()
229 HEADER *hp = (HEADER *)(void *)answer; in res_nsearch() local
326 if (hp->rcode == SERVFAIL) { in res_nsearch()
/aosp12/packages/modules/DnsResolver/tests/
H A Dresolv_unit_test.cpp1249 hostent* hp = nullptr; in TEST_F() local
1258 EXPECT_TRUE(hp != nullptr); in TEST_F()
1299 EXPECT_EQ(nullptr, hp); in TEST_F()
1315 hostent* hp = nullptr; in TEST_F() local
1322 EXPECT_EQ(nullptr, hp); in TEST_F()
1356 hostent* hp = nullptr; in TEST_F() local
1362 EXPECT_EQ(nullptr, hp); in TEST_F()
1376 hostent* hp = nullptr; in TEST_F() local
1415 EXPECT_EQ(nullptr, hp); in TEST_F()
1467 EXPECT_EQ(nullptr, hp); in TEST_F()
[all …]
/aosp12/frameworks/base/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/mopria/
H A DMopriaRecommendationPlugin.java25 import com.android.printservice.recommendation.plugin.hp.MDnsUtils;
26 import com.android.printservice.recommendation.plugin.hp.ServiceRecommendationPlugin;
27 import com.android.printservice.recommendation.plugin.hp.VendorInfo;
/aosp12/system/iorap/src/prefetcher/
H A Dprefetcher_daemon.cc368 struct cmsghdr* hp; in ParseSocketCommands() local
369 hp = CMSG_FIRSTHDR(&hdr); in ParseSocketCommands()
374 (hp->cmsg_type == SCM_RIGHTS)) { in ParseSocketCommands()
376 int passed_fd = *(int*) CMSG_DATA(hp); in ParseSocketCommands()
384 } else if (hp != nullptr) { in ParseSocketCommands()
1186 struct cmsghdr *hp; in SendCommand() local
1187 hp = CMSG_FIRSTHDR(&msg); in SendCommand()
1188 hp->cmsg_len = CMSG_LEN(sizeof(int)); in SendCommand()
1189 hp->cmsg_level = SOL_SOCKET; in SendCommand()
1190 hp->cmsg_type = SCM_RIGHTS; in SendCommand()
[all …]
/aosp12/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/dataconnection/
H A DTelephonyNetworkFactoryTest.java382 HandoverParams hp = new HandoverParams(ApnSetting.TYPE_MMS, in testHandoverNoLiveData() local
384 AsyncResult ar = new AsyncResult(null, hp, null); in testHandoverNoLiveData()
391 hp = new HandoverParams(ApnSetting.TYPE_MMS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN, in testHandoverNoLiveData()
393 ar = new AsyncResult(null, hp, null); in testHandoverNoLiveData()
424 HandoverParams hp = new HandoverParams(ApnSetting.TYPE_MMS, in testHandoverActivatingData() local
426 AsyncResult ar = new AsyncResult(null, hp, null); in testHandoverActivatingData()
457 HandoverParams hp = new HandoverParams(ApnSetting.TYPE_MMS, in testNetworkRequestReleasedDuringHandover() local
459 AsyncResult ar = new AsyncResult(null, hp, null); in testNetworkRequestReleasedDuringHandover()
/aosp12/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/
H A DMetricsUtilsTest.java190 MetricsUtils.LogHistParms hp, int expectedKey, int expectedValue) { in bucketValueAndVerify() argument
191 MetricsUtils.addValueToLogHistogram(value, h, hp); in bucketValueAndVerify()
195 private void bucketValueAndVerify(String prefix, int value, SparseIntArray h, int[] hp, in bucketValueAndVerify() argument
197 MetricsUtils.addValueToLinearHistogram(value, h, hp); in bucketValueAndVerify()
/aosp12/hardware/qcom/sm8150p/gps/utils/
H A DLocIpc.cpp199 struct hostent* hp = gethostbyname(name); local
200 if (nullptr != hp) {
201 memcpy((char*)&(mAddr.sin_addr.s_addr), hp->h_addr_list[0], hp->h_length);
/aosp12/hardware/qcom/sm7250/gps/utils/
H A DLocIpc.cpp214 struct hostent* hp = gethostbyname(name); local
215 if (nullptr != hp) {
216 memcpy((char*)&(mAddr.sin_addr.s_addr), hp->h_addr_list[0], hp->h_length);

123