Home
last modified time | relevance | path

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

12

/system/connectivity/dhcp_client/
Ddhcpv4.cc168 htons(ETHERTYPE_IP)); in CreateRawSocket()
199 local.sll_protocol = htons(ETHERTYPE_IP); in CreateRawSocket()
243 udp->uh_sport = htons(kDHCPClientPort); in MakeRawPacket()
244 udp->uh_dport = htons(kDHCPServerPort); in MakeRawPacket()
246 htons(static_cast<uint16_t>(sizeof(*udp) + payload.GetLength())); in MakeRawPacket()
259 udp->uh_sum = htons(DHCPMessage::ComputeChecksum( in MakeRawPacket()
278 ip->tot_len = htons(static_cast<uint16_t>(header_len+ payload.GetLength())); in MakeRawPacket()
280 ip->check = htons(DHCPMessage::ComputeChecksum( in MakeRawPacket()
292 remote.sll_protocol = htons(ETHERTYPE_IP); in SendRawPacket()
294 remote.sll_hatype = htons(ARPHRD_ETHER); in SendRawPacket()
[all …]
Ddhcp_options_writer.cc59 uint16_t value_net = htons(value); in WriteUInt16Option()
115 uint16_t element_net = htons(element); in WriteUInt16ListOption()
Ddhcp_message.cc281 raw_message.secs = htons(seconds_); in Serialize()
282 raw_message.flags = htons(flags_); in Serialize()
/system/core/libnetutils/
Dpacket.c48 if((s = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) { in open_raw_socket()
54 bindaddr.sll_protocol = htons(ETH_P_IP); in open_raw_socket()
104 ip.tot_len = htons(sizeof(ip) + sizeof(udp) + size); in send_packet()
114 udp.source = htons(sport); in send_packet()
115 udp.dest = htons(dport); in send_packet()
116 udp.len = htons(sizeof(udp) + size); in send_packet()
122 temp = htons(IPPROTO_UDP); in send_packet()
142 destaddr.sll_protocol = htons(ETH_P_IP); in send_packet()
197 } 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.cpp35 sockaddr_in6 sin6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in bindAndListen()
76 sockaddr_in server4 = { .sin_family = AF_INET, .sin_port = htons(port) }; in TEST_F()
77 sockaddr_in6 server6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_F()
110 src, htons(msg->id.idiag_sport), in TEST_F()
111 dst, htons(msg->id.idiag_dport), in TEST_F()
131 seenServer46 |= (msg->id.idiag_sport == htons(port)); in TEST_F()
132 seenServer6 |= (msg->id.idiag_sport == htons(port)); in TEST_F()
136 src, htons(msg->id.idiag_sport), in TEST_F()
137 dst, htons(msg->id.idiag_dport), in TEST_F()
301 sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_P()
/system/connectivity/shill/
Darp_client.cc69 int socket = sockets_->Socket(PF_PACKET, SOCK_DGRAM, htons(ETHERTYPE_ARP)); in CreateSocket()
104 socket_address.sll_protocol = htons(ETHERTYPE_ARP); in CreateSocket()
160 socket_address.sll_protocol = htons(ETHERTYPE_ARP); in TransmitRequest()
Darp_packet.cc164 header.ar_hrd = htons(ARPHRD_ETHER); in FormatRequest()
165 header.ar_pro = htons(protocol); in FormatRequest()
168 header.ar_op = htons(ARPOP_REQUEST); in FormatRequest()
Deap_listener.cc69 int socket = sockets_->Socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_PAE)); in CreateSocket()
85 socket_address.sll_protocol = htons(ETH_P_PAE); in CreateSocket()
Dasync_connection.cc138 iaddr.sin_port = htons(port); in ConnectTo()
149 iaddr6.sin6_port = htons(port); in ConnectTo()
Deap_listener_unittest.cc118 socket_address->sll_protocol == htons(ETH_P_PAE) &&
123 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_PAE))) in StartListenerWithFD()
146 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_PAE))) in TEST_F()
Darp_client_unittest.cc106 socket_address->sll_protocol == htons(ETHERTYPE_ARP) &&
139 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETHERTYPE_ARP))) in StartClientWithFD()
161 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETHERTYPE_ARP))) in TEST_F()
Dasync_connection_unittest.cc210 return address.Equals(arg_addr) && arg_saddr->sin_port == htons(port);
220 return ipv6_address.Equals(arg_addr) && arg_saddr->sin6_port == htons(port);
/system/netd/tests/
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/core/libcutils/
Dsocket_loopback_client_unix.c43 addr.sin_port = htons(port); in socket_loopback_client()
Dsocket_inaddr_any_server_unix.c40 addr.sin6_port = htons(port); in socket_inaddr_any_server()
Dsocket_loopback_server_unix.c42 addr.sin_port = htons(port); in socket_loopback_server()
Dsocket_inaddr_any_server_windows.c65 addr.sin6_port = htons(port); in socket_inaddr_any_server()
/system/bt/btif/src/
Dbtif_util.c130 uuid1 = htons(uuid1); in string_to_uuid()
131 uuid2 = htons(uuid2); in string_to_uuid()
132 uuid3 = htons(uuid3); in string_to_uuid()
134 uuid5 = htons(uuid5); in string_to_uuid()
/system/core/adb/
Dtest_track_devices.cpp34 server.sin_port = htons(5037); in main()
/system/bt/hci/src/
Dbtsnoop_net.c110 addr.sin_port = htons(LISTEN_PORT_); in listen_fn_()
/system/bt/vendor_libs/test_vendor_lib/src/
Dtest_channel_transport.cc52 listen_address.sin_port = htons(port_); in SetUp()
/system/bt/tools/hci/
Dmain.c178 addr.sin_port = htons(8873); in write_hci_command()
/system/core/libutils/
DUnicode.cpp25 # undef htons
30 # define htons(x) ntohs(x) macro
/system/bt/osi/src/
Dsocket.c99 addr.sin_port = htons(port); in socket_listen()

12