/system/netd/resolv/ |
D | res_mkquery.cpp | 125 hp->id = htons(arc4random_uniform(65536)); in res_nmkquery() 146 *reinterpret_cast<uint16_t*>(cp) = htons(type); in res_nmkquery() 148 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery() 150 hp->qdcount = htons(1); in res_nmkquery() 159 *reinterpret_cast<uint16_t*>(cp) = htons(ns_t_null); in res_nmkquery() 161 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery() 165 *reinterpret_cast<uint16_t*>(cp) = htons(0); in res_nmkquery() 167 hp->arcount = htons(1); in res_nmkquery() 176 *reinterpret_cast<uint16_t*>(cp) = htons(type); in res_nmkquery() 178 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery() [all …]
|
/system/netd/bpf_progs/ |
D | clatd.c | 46 #define htons(x) (__builtin_constant_p(x) ? ___constant_swab16(x) : __builtin_bswap16(x)) macro 48 #define ntohs(x) htons(x) 63 if (skb->protocol != htons(ETH_P_IPV6)) return TC_ACT_OK; in nat64() 69 if (is_ethernet && (eth->h_proto != htons(ETH_P_IPV6))) return TC_ACT_OK; in nat64() 108 eth2.h_proto = htons(ETH_P_IP); // But replace the ethertype in nat64() 115 .tot_len = htons(ntohs(ip6->payload_len) + sizeof(struct iphdr)), // u16 in nat64() 117 .frag_off = htons(IP_DF), // u16 in nat64() 139 if (bpf_skb_change_proto(skb, htons(ETH_P_IP), 0)) return TC_ACT_SHOT; in nat64()
|
/system/core/libnetutils/ |
D | packet.c | 47 if((s = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) { in open_raw_socket() 53 bindaddr.sll_protocol = htons(ETH_P_IP); in open_raw_socket() 103 ip.tot_len = htons(sizeof(ip) + sizeof(udp) + size); in send_packet() 113 udp.source = htons(sport); in send_packet() 114 udp.dest = htons(dport); in send_packet() 115 udp.len = htons(sizeof(udp) + size); in send_packet() 121 temp = htons(IPPROTO_UDP); in send_packet() 141 destaddr.sll_protocol = htons(ETH_P_IP); in send_packet() 196 } else if (packet.udp.dest != htons(PORT_BOOTP_CLIENT)) { in receive_packet()
|
D | checksum.c | 114 temp_protocol = htons(ip->protocol); in ipv4_pseudo_header_checksum() 115 temp_length = htons(len); in ipv4_pseudo_header_checksum()
|
D | dhcpmsg.c | 35 msg->flags = htons(FLAGS_BROADCAST); in init_dhcp_msg()
|
/system/netd/tests/ |
D | sock_diag_test.cpp | 38 sockaddr_in6 sin6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in bindAndListen() 79 sockaddr_in server4 = { .sin_family = AF_INET, .sin_port = htons(port) }; in TEST_F() 80 sockaddr_in6 server6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_F() 113 src, htons(msg->id.idiag_sport), in TEST_F() 114 dst, htons(msg->id.idiag_dport), in TEST_F() 134 seenServer46 |= (msg->id.idiag_sport == htons(port)); in TEST_F() 135 seenServer6 |= (msg->id.idiag_sport == htons(port)); in TEST_F() 139 src, htons(msg->id.idiag_sport), in TEST_F() 140 dst, htons(msg->id.idiag_dport), in TEST_F() 189 sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_F()
|
/system/netd/server/ |
D | SockDiagTest.cpp | 46 sockaddr_in6 sin6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in bindAndListen() 87 sockaddr_in server4 = { .sin_family = AF_INET, .sin_port = htons(port) }; in TEST_F() 88 sockaddr_in6 server6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_F() 117 src, htons(msg->id.idiag_sport), in TEST_F() 118 dst, htons(msg->id.idiag_dport), in TEST_F() 136 seenServer46 |= (msg->id.idiag_sport == htons(port)); in TEST_F() 137 seenServer6 |= (msg->id.idiag_sport == htons(port)); in TEST_F() 141 src, htons(msg->id.idiag_sport), in TEST_F() 142 dst, htons(msg->id.idiag_dport), in TEST_F() 467 sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_P()
|
D | NFLogListener.cpp | 94 msg.nfhdr.res_id = htons(nfLogGroup); in cfgMode() 115 msg.nfhdr.res_id = htons(nfLogGroup); in cfgCmdBind() 135 msg.nfhdr.res_id = htons(nfLogGroup); in cfgCmdUnbind()
|
D | WakeupControllerTest.cpp | 189 msg.packetHeader.hw_protocol = htons(kEthertype); in TEST_F() 193 msg.hardwareAddr.hw_addrlen = htons(kMacAddr.size()); in TEST_F() 203 msg.tcpHeader.th_sport = htons(kSrcPort); in TEST_F() 204 msg.tcpHeader.th_dport = htons(kDstPort); in TEST_F()
|
D | NFLogListenerTest.cpp | 91 msg.nfmsg.res_id = htons(type); in sendEmptyMsg()
|
/system/core/libcutils/ |
D | socket_inaddr_any_server_unix.cpp | 40 addr.sin6_port = htons(port); in socket_inaddr_any_server()
|
D | socket_inaddr_any_server_windows.cpp | 65 addr.sin6_port = htons(port); in socket_inaddr_any_server()
|
/system/bt/vendor_libs/test_vendor_lib/test/ |
D | async_manager_unittest.cc | 49 serv_addr.sin_port = htons(kPort); in StartServer() 111 serv_addr.sin_port = htons(kPort); in ConnectClient()
|
D | link_layer_socket_device_test.cc | 81 serv_addr.sin_port = htons(kPort); in StartServer() 157 serv_addr.sin_port = htons(kPort); in ConnectClient()
|
/system/core/adb/sysdeps/posix/ |
D | network.cpp | 44 addr4->sin_port = htons(port); in loopback_addr4() 54 addr6->sin6_port = htons(port); in loopback_addr6()
|
/system/netd/resolv/dns_responder/ |
D | dns_responder.cpp | 274 *reinterpret_cast<uint16_t*>(buffer_cur) = htons(qtype); in write() 276 htons(qclass); in write() 370 intfields.rtype = htons(rtype); in writeIntFields() 371 intfields.rclass = htons(rclass); in writeIntFields() 373 intfields.rdlen = htons(rdlen); in writeIntFields() 472 header.id = htons(id); in write() 481 header.qdcount = htons(questions.size()); in write() 482 header.ancount = htons(answers.size()); in write() 483 header.nscount = htons(authorities.size()); in write() 484 header.arcount = htons(additionals.size()); in write()
|
/system/netd/tests/benchmarks/ |
D | connect_benchmark.cpp | 120 sockaddr_in server = { .sin_family = AF_INET, .sin_port = htons(port) }; in ipv4_loopback() 177 sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in ipv6_loopback()
|
/system/core/base/include/android-base/ |
D | endian.h | 55 #define htons(x) __builtin_bswap16(x) macro
|
/system/core/base/ |
D | endian_test.cpp | 38 ASSERT_EQ(be16, htons(le16)); in TEST()
|
/system/bt/hci/src/ |
D | btsnoop_net.cc | 114 addr.sin_port = htons(LISTEN_PORT_); in listen_fn_()
|
/system/bt/vendor_libs/test_vendor_lib/model/devices/ |
D | server_port_factory.cc | 52 listen_address.sin_port = htons(port); in SetUp()
|
/system/bt/vendor_libs/test_vendor_lib/model/setup/ |
D | test_channel_transport.cc | 46 listen_address.sin_port = htons(port); in SetUp()
|
/system/bt/vendor_libs/test_vendor_lib/desktop/ |
D | test_environment.cc | 129 serv_addr.sin_port = htons(port); in ConnectToRemoteServer()
|
/system/bt/tools/hci/ |
D | main.c | 184 addr.sin_port = htons(8873); in write_hci_command()
|
/system/netd/libnetdutils/include/netdutils/ |
D | InternetAddresses.h | 260 reinterpret_cast<sockaddr_in*>(&ss)->sin_port = htons(mData.port); in sockaddr_storage() 264 reinterpret_cast<sockaddr_in6*>(&ss)->sin6_port = htons(mData.port); in sockaddr_storage()
|