Home
last modified time | relevance | path

Searched refs:htons (Results 1 – 16 of 16) sorted by relevance

/system/netd/tests/
Dsock_diag_test.cpp39 sockaddr_in6 sin6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in bindAndListen()
80 sockaddr_in server4 = { .sin_family = AF_INET, .sin_port = htons(port) }; in TEST_F()
81 sockaddr_in6 server6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_F()
114 src, htons(msg->id.idiag_sport), in TEST_F()
115 dst, htons(msg->id.idiag_dport), in TEST_F()
135 seenServer46 |= (msg->id.idiag_sport == htons(port)); in TEST_F()
136 seenServer6 |= (msg->id.idiag_sport == htons(port)); in TEST_F()
140 src, htons(msg->id.idiag_sport), in TEST_F()
141 dst, htons(msg->id.idiag_dport), in TEST_F()
190 sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_F()
Dbinder_test.cpp357 .sin6_port = htons(53), in testNetworkExistsButCannotConnect()
2746 if (msg->id.idiag_sport != htons(53)) return false; in findDnsSockets()
/system/core/libnetutils/
Dpacket.c48 .sll_protocol = htons(ETH_P_IP), in open_raw_socket()
100 ip.tot_len = htons(sizeof(ip) + sizeof(udp) + size); in send_packet()
110 udp.source = htons(sport); in send_packet()
111 udp.dest = htons(dport); in send_packet()
112 udp.len = htons(sizeof(udp) + size); in send_packet()
118 temp = htons(IPPROTO_UDP); in send_packet()
138 destaddr.sll_protocol = htons(ETH_P_IP); in send_packet()
193 } else if (packet.udp.dest != htons(PORT_BOOTP_CLIENT)) { in receive_packet()
Ddhcpmsg.c35 msg->flags = htons(FLAGS_BROADCAST); in init_dhcp_msg()
/system/netd/server/
DSockDiagTest.cpp47 sockaddr_in6 sin6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in bindAndListen()
88 sockaddr_in server4 = { .sin_family = AF_INET, .sin_port = htons(port) }; in TEST_F()
89 sockaddr_in6 server6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_F()
118 src, htons(msg->id.idiag_sport), in TEST_F()
119 dst, htons(msg->id.idiag_dport), in TEST_F()
137 seenServer46 |= (msg->id.idiag_sport == htons(port)); in TEST_F()
138 seenServer6 |= (msg->id.idiag_sport == htons(port)); in TEST_F()
142 src, htons(msg->id.idiag_sport), in TEST_F()
143 dst, htons(msg->id.idiag_dport), in TEST_F()
469 sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_P()
DNFLogListener.cpp96 msg.nfhdr.res_id = htons(nfLogGroup); in cfgMode()
117 msg.nfhdr.res_id = htons(nfLogGroup); in cfgCmdBind()
137 msg.nfhdr.res_id = htons(nfLogGroup); in cfgCmdUnbind()
DWakeupControllerTest.cpp189 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()
DNFLogListenerTest.cpp93 msg.nfmsg.res_id = htons(type); in sendEmptyMsg()
DSockDiag.cpp65 return adbPort > 0 && msg->id.idiag_sport == htons(adbPort) && in isAdbSocket()
DXfrmController.cpp1109 tmpl->tmpl.encap_sport = htons(record.encap.srcPort); in fillNlAttrXfrmEncapTmpl()
1110 tmpl->tmpl.encap_dport = htons(record.encap.dstPort); in fillNlAttrXfrmEncapTmpl()
/system/core/libcutils/
Dsocket_inaddr_any_server_unix.cpp40 addr.sin6_port = htons(port); in socket_inaddr_any_server()
Dsocket_inaddr_any_server_windows.cpp65 addr.sin6_port = htons(port); in socket_inaddr_any_server()
/system/netd/tests/benchmarks/
Dconnect_benchmark.cpp120 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/libbase/include/android-base/
Dendian.h60 #define htons(x) __builtin_bswap16(x) macro
/system/libbase/
Dendian_test.cpp38 ASSERT_EQ(be16, htons(le16)); in TEST()
/system/memory/lmkd/
Dstatslog.cpp290 *short_buffer = htons((int16_t)len_proc_name); in pack_string()