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

12

/system/connectivity/dhcp_client/
H A Ddhcpv4.cc168 htons(ETHERTYPE_IP));
199 local.sll_protocol = htons(ETHERTYPE_IP);
243 udp->uh_sport = htons(kDHCPClientPort);
244 udp->uh_dport = htons(kDHCPServerPort);
246 htons(static_cast<uint16_t>(sizeof(*udp) + payload.GetLength()));
259 udp->uh_sum = htons(DHCPMessage::ComputeChecksum(
278 ip->tot_len = htons(static_cast<uint16_t>(header_len+ payload.GetLength()));
280 ip->check = htons(DHCPMessage::ComputeChecksum(
292 remote.sll_protocol = htons(ETHERTYPE_IP);
294 remote.sll_hatype = htons(ARPHRD_ETHE
[all...]
H A Ddhcp_options_writer.cc59 uint16_t value_net = htons(value);
115 uint16_t element_net = htons(element);
H A Ddhcp_message.cc281 raw_message.secs = htons(seconds_);
282 raw_message.flags = htons(flags_);
/system/core/libnetutils/
H A Dpacket.c48 if((s = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) {
54 bindaddr.sll_protocol = htons(ETH_P_IP);
104 ip.tot_len = htons(sizeof(ip) + sizeof(udp) + size);
114 udp.source = htons(sport);
115 udp.dest = htons(dport);
116 udp.len = htons(sizeof(udp) + size);
122 temp = htons(IPPROTO_UDP);
142 destaddr.sll_protocol = htons(ETH_P_IP);
197 } else if (packet.udp.dest != htons(PORT_BOOTP_CLIENT)) {
H A Ddhcpmsg.c35 msg->flags = htons(FLAGS_BROADCAST);
/system/core/libcutils/
H A Dsocket_inaddr_any_server_unix.c40 addr.sin6_port = htons(port);
H A Dsocket_inaddr_any_server_windows.c65 addr.sin6_port = htons(port);
H A Dsocket_loopback_client_unix.c43 addr.sin_port = htons(port);
H A Dsocket_loopback_server_unix.c42 addr.sin_port = htons(port);
/system/connectivity/shill/
H A Deap_listener.cc69 int socket = sockets_->Socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_PAE));
85 socket_address.sll_protocol = htons(ETH_P_PAE);
H A Darp_client.cc69 int socket = sockets_->Socket(PF_PACKET, SOCK_DGRAM, htons(ETHERTYPE_ARP));
104 socket_address.sll_protocol = htons(ETHERTYPE_ARP);
160 socket_address.sll_protocol = htons(ETHERTYPE_ARP);
H A Darp_packet.cc164 header.ar_hrd = htons(ARPHRD_ETHER);
165 header.ar_pro = htons(protocol);
168 header.ar_op = htons(ARPOP_REQUEST);
H A Dasync_connection.cc138 iaddr.sin_port = htons(port);
149 iaddr6.sin6_port = htons(port);
H A 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)))
146 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_PAE)))
H A Darp_client_unittest.cc106 socket_address->sll_protocol == htons(ETHERTYPE_ARP) &&
139 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETHERTYPE_ARP)))
161 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETHERTYPE_ARP)))
H A 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/server/
H A DSockDiagTest.cpp35 sockaddr_in6 sin6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) };
76 sockaddr_in server4 = { .sin_family = AF_INET, .sin_port = htons(port) };
77 sockaddr_in6 server6 = { .sin6_family = AF_INET6, .sin6_port = htons(port) };
110 src, htons(msg->id.idiag_sport),
111 dst, htons(msg->id.idiag_dport),
131 seenServer46 |= (msg->id.idiag_sport == htons(port));
132 seenServer6 |= (msg->id.idiag_sport == htons(port));
136 src, htons(msg->id.idiag_sport),
137 dst, htons(msg->id.idiag_dport),
301 sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(por
[all...]
/system/core/adb/
H A Dtest_track_devices.cpp34 server.sin_port = htons(5037);
/system/netd/tests/
H A Ddns_responder.cpp260 *reinterpret_cast<uint16_t*>(buffer_cur) = htons(qtype);
262 htons(qclass);
356 intfields.rtype = htons(rtype);
357 intfields.rclass = htons(rclass);
359 intfields.rdlen = htons(rdlen);
457 header.id = htons(id);
463 header.qdcount = htons(questions.size());
464 header.ancount = htons(answers.size());
465 header.nscount = htons(authorities.size());
466 header.arcount = htons(additional
[all...]
/system/bt/btif/src/
H A Dbtif_util.c130 uuid1 = htons(uuid1);
131 uuid2 = htons(uuid2);
132 uuid3 = htons(uuid3);
134 uuid5 = htons(uuid5);
/system/bt/hci/src/
H A Dbtsnoop_net.c110 addr.sin_port = htons(LISTEN_PORT_);
/system/bt/vendor_libs/test_vendor_lib/src/
H A Dtest_channel_transport.cc52 listen_address.sin_port = htons(port_);
/system/core/libutils/
H A DUnicode.cpp25 # undef htons macro
30 # define htons(x) ntohs(x) macro
/system/bt/osi/src/
H A Dsocket.c99 addr.sin_port = htons(port);
/system/bt/tools/hci/
H A Dmain.c178 addr.sin_port = htons(8873);

Completed in 587 milliseconds

12