Home
last modified time | relevance | path

Searched refs:ntohs (Results 1 – 21 of 21) sorted by relevance

/packages/modules/Connectivity/tests/native/connectivity_native_test/
Dconnectivity_native_test.cpp100 blockedPort = ntohs(port); in runSocketTest()
151 EXPECT_NE(0, ntohs(sin.sin_port)); in openSocket()
152 if (*port != 0) EXPECT_EQ(*port, ntohs(sin.sin_port)); in openSocket()
153 *port = ntohs(sin.sin_port); in openSocket()
158 EXPECT_NE(0, ntohs(sin.sin6_port)); in openSocket()
159 if (*port != 0) EXPECT_EQ(*port, ntohs(sin.sin6_port)); in openSocket()
160 *port = ntohs(sin.sin6_port); in openSocket()
/packages/modules/DnsResolver/
Dres_query.cpp168 if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { in res_nquery()
170 << "), counts = an:" << ntohs(hp->ancount) << " ns:" << ntohs(hp->nscount) in res_nquery()
171 << " ar:" << ntohs(hp->arcount); in res_nquery()
Dgethnamaddr.cpp151 ancount = ntohs(hp->ancount); in getanswer()
152 qdcount = ntohs(hp->qdcount); in getanswer()
187 int type = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
189 int cl = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
191 n = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
Dres_send.cpp367 int qdcount = ntohs(((const HEADER*)(const void*)msg)->qdcount); in res_nameinquery()
375 int ttype = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in res_nameinquery()
377 int tclass = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in res_nameinquery()
398 int qdcount = ntohs(((const HEADER*) (const void*) buf1)->qdcount); in res_queriesmatch()
410 if (qdcount != ntohs(((const HEADER*) (const void*) buf2)->qdcount)) return (0); in res_queriesmatch()
417 int ttype = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in res_queriesmatch()
419 int tclass = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in res_queriesmatch()
845 uint16_t resplen = ntohs(*reinterpret_cast<const uint16_t*>(ans.data())); in send_vc()
Dgetaddrinfo.cpp857 ancount = ntohs(hp->ancount); in getanswer()
858 qdcount = ntohs(hp->qdcount); in getanswer()
898 type = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
900 int cl = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
902 n = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
1643 if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { in doQuery()
1655 LOG(INFO) << __func__ << ": rcode=" << rcode << ", ancount=" << ntohs(hp->ancount) in doQuery()
1660 .ancount = ntohs(hp->ancount), in doQuery()
Dres_mkquery.cpp241 hp->arcount = htons(ntohs(hp->arcount) + 1); in res_nopt()
/packages/modules/Connectivity/bpf_progs/
Dclatd.c94 if (ntohs(ip6->payload_len) > 0xFFFF - sizeof(struct iphdr)) return TC_ACT_PIPE; in nat64()
114 __u16 tot_len = ntohs(ip6->payload_len) + sizeof(struct iphdr); // cannot overflow, see above in nat64()
131 frag_off = ntohs(frag->frag_off); in nat64()
325 if (ntohs(ip4->tot_len) < sizeof(*ip4)) return TC_ACT_PIPE;
369 .payload_len = htons(ntohs(ip4->tot_len) - 20), // __be16
DdscpPolicy.c109 dport = ntohs(udp->dest); in DEFINE_BPF_MAP_GRW()
116 dport = ntohs(tcp->dest); in DEFINE_BPF_MAP_GRW()
Doffload@btf.c281 bpf_csum_update(skb, 0xFFFF - ntohs(old_hl) + ntohs(new_hl));
594 if (ntohs(ip->tot_len) < sizeof(*ip)) TC_PUNT(TRUNCATED_IPV4); in do_forward4()
Doffload.c281 bpf_csum_update(skb, 0xFFFF - ntohs(old_hl) + ntohs(new_hl));
594 if (ntohs(ip->tot_len) < sizeof(*ip)) TC_PUNT(TRUNCATED_IPV4); in do_forward4()
Dbpf_net_helpers.h75 #define ntohs(x) htons(x) macro
/packages/modules/DnsResolver/tests/dns_responder/
Ddns_responder.cpp262 qtype = ntohs(*reinterpret_cast<const uint16_t*>(cur)); in read()
263 qclass = ntohs(*reinterpret_cast<const uint16_t*>(cur + sizeof(uint16_t))); in read()
331 rtype = ntohs(intfields.rtype); in readIntFields()
332 rclass = ntohs(intfields.rclass); in readIntFields()
334 *rdlen = ntohs(intfields.rdlen); in readIntFields()
463 id = ntohs(header.id); in readHeader()
475 *qdcount = ntohs(header.qdcount); in readHeader()
476 *ancount = ntohs(header.ancount); in readHeader()
477 *nscount = ntohs(header.nscount); in readHeader()
478 *arcount = ntohs(header.arcount); in readHeader()
/packages/modules/ImsMedia/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/utils/
DImsMediaNetworkUtil.cpp50 port = ntohs(sin.sin_port); in GetIpPortFromSockAddr()
55 port = ntohs(sin6.sin6_port); in GetIpPortFromSockAddr()
/packages/modules/adb/client/openscreen/platform/
Dudp_socket.cpp76 return ntohs(sa.sin_port); in GetPortFromFromSockAddr()
88 return ntohs(sa.sin6_port); in GetPortFromFromSockAddr()
200 local_endpoint_.port = ntohs(address.sin_port); in GetLocalEndpoint()
214 local_endpoint_.port = ntohs(address.sin6_port); in GetLocalEndpoint()
/packages/modules/Connectivity/service-t/native/libs/libnetworkstats/
DNetworkTraceHandler.cpp249 event->set_local_port(ntohs(src.egress ? src.sport : src.dport)); in Fill()
252 event->set_remote_port(ntohs(src.egress ? src.dport : src.sport)); in Fill()
/packages/modules/Bluetooth/tools/rootcanal/net/posix/
Dposix_async_socket_server.cc77 port_ = ntohs(sin.sin_port); in PosixAsyncSocketServer()
/packages/modules/DnsResolver/tests/
Dtun_forwarder.cpp230 switch (uint16_t proto = ntohs(tunHeader->proto); proto) { in validatePacket()
315 switch (uint16_t proto = ntohs(tunHeader->proto); proto) { in translatePacket()
/packages/modules/Bluetooth/system/gd/hal/
Dsnoop_logger_socket.cc180 (int)ntohs(client_addr.sin_port)); in AcceptIncomingConnection()
/packages/modules/Bluetooth/system/btif/src/
Dbtif_pan.cc533 uint16_t proto = ntohs(hdr->h_proto); in should_forward()
550 ntohs(eth_hdr->h_proto), hdr, 0); in forward_bnep()
/packages/modules/adb/client/
Dmdnsresponder_client.cpp498 interface_index, host_target, ntohs(port), service_version); in register_resolved_mdns_service()
/packages/modules/adb/
Dsysdeps_win32.cpp1029 inet_ntoa(addr.sin_addr), ntohs(addr.sin_port), in network_loopback_client()
1092 ntohs(addr.sin_port), in _network_server()
1320 return ntohs(reinterpret_cast<sockaddr_in*>(&addr_storage)->sin_port); in adb_socket_get_local_port()