Home
last modified time | relevance | path

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

/system/core/libnetutils/
Dpacket.c47 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()
Ddhcpmsg.c35 msg->flags = htons(FLAGS_BROADCAST); in init_dhcp_msg()
/system/netd/tests/
Dsock_diag_test.cpp38 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/core/libcutils/
Dsocket_loopback_server_unix.c71 addr.sin6_port = htons(port); in socket_loopback_server6()
84 addr.sin_port = htons(port); in socket_loopback_server()
Dsocket_inaddr_any_server_unix.c40 addr.sin6_port = htons(port); in socket_inaddr_any_server()
Dsocket_inaddr_any_server_windows.c65 addr.sin6_port = htons(port); in socket_inaddr_any_server()
/system/netd/server/
DSockDiagTest.cpp46 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()
115 src, htons(msg->id.idiag_sport), in TEST_F()
116 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()
465 sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_P()
DMDnsSdListener.cpp166 port = htons(port); in serviceRegister()
/system/netd/tests/dns_responder/
Ddns_responder.cpp260 *reinterpret_cast<uint16_t*>(buffer_cur) = htons(qtype); in write()
262 htons(qclass); in write()
356 intfields.rtype = htons(rtype); in writeIntFields()
357 intfields.rclass = htons(rclass); in writeIntFields()
359 intfields.rdlen = htons(rdlen); in writeIntFields()
457 header.id = htons(id); in write()
463 header.qdcount = htons(questions.size()); in write()
464 header.ancount = htons(answers.size()); in write()
465 header.nscount = htons(authorities.size()); in write()
466 header.arcount = htons(additionals.size()); in write()
/system/nfc/src/gki/common/
Dgki_inet.h23 #define htons ntohs macro
/system/nfc/halimpl/bcm2079x/gki/common/
Dgki_inet.h23 #define htons ntohs macro
/system/bt/vendor_libs/test_vendor_lib/test/
Dasync_manager_unittest.cc49 serv_addr.sin_port = htons(kPort); in StartServer()
113 serv_addr.sin_port = htons(kPort); in ConnectClient()
/system/bt/btif/src/
Dbtif_util.cc128 uuid1 = htons(uuid1); in string_to_uuid()
129 uuid2 = htons(uuid2); in string_to_uuid()
130 uuid3 = htons(uuid3); in string_to_uuid()
132 uuid5 = htons(uuid5); in string_to_uuid()
Dbtif_pan.cc418 eth_hdr.h_proto = htons(proto); in btpan_tap_send()
/system/core/base/include/android-base/
Dendian.h56 #define htons(x) __builtin_bswap16(x) macro
/system/core/base/
Dendian_test.cpp38 ASSERT_EQ(be16, htons(le16)); in TEST()
/system/bt/hci/src/
Dbtsnoop_net.cc114 addr.sin_port = htons(LISTEN_PORT_); in listen_fn_()
/system/netd/tests/benchmarks/
Dconnect_benchmark.cpp142 sockaddr_in server = { .sin_family = AF_INET, .sin_port = htons(port) }; in ipv4_loopback()
199 sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in ipv6_loopback()
/system/bt/vendor_libs/test_vendor_lib/src/
Dtest_channel_transport.cc46 listen_address.sin_port = htons(port); in SetUp()
/system/bt/tools/hci/
Dmain.c184 addr.sin_port = htons(8873); in write_hci_command()
/system/core/libutils/
DUnicode.cpp28 # undef htons
33 # define htons(x) ntohs(x) macro
/system/bt/osi/src/
Dsocket.cc100 addr.sin_port = htons(port); in socket_listen()
/system/core/adb/
Dsysdeps_win32.cpp716 addr.sin_port = htons(port); in network_loopback_client()
768 addr.sin_port = htons(port); in _network_server()