/packages/modules/DnsResolver/ |
D | res_mkquery.cpp | 120 hp->id = htons(arc4random_uniform(65536)); in res_nmkquery() 141 *reinterpret_cast<uint16_t*>(cp) = htons(type); in res_nmkquery() 143 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery() 145 hp->qdcount = htons(1); in res_nmkquery() 154 *reinterpret_cast<uint16_t*>(cp) = htons(ns_t_null); in res_nmkquery() 156 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery() 160 *reinterpret_cast<uint16_t*>(cp) = htons(0); in res_nmkquery() 162 hp->arcount = htons(1); in res_nmkquery() 171 *reinterpret_cast<uint16_t*>(cp) = htons(type); in res_nmkquery() 173 *reinterpret_cast<uint16_t*>(cp) = htons(cl); in res_nmkquery() [all …]
|
/packages/modules/Connectivity/bpf_progs/ |
D | clatd.c | 66 if (skb->protocol != htons(ETH_P_IPV6)) return TC_ACT_PIPE; in nat64() 84 if (is_ethernet && (eth->h_proto != htons(ETH_P_IPV6))) return TC_ACT_PIPE; in nat64() 115 __be16 frag_off = htons(IP_DF); in nat64() 135 frag_off = htons(frag_off); in nat64() 161 eth2.h_proto = htons(ETH_P_IP); // But replace the ethertype in nat64() 168 .tot_len = htons(tot_len), // be16 in nat64() 200 if (bpf_skb_change_proto(skb, htons(ETH_P_IP), 0)) { in nat64() 238 if (KVER_IS_AT_LEAST(kver, 4, 14, 0) && frag_off != htons(IP_DF)) { in nat64() 304 if (skb->protocol != htons(ETH_P_IP)) return TC_ACT_PIPE; 337 if (ip4->frag_off & ~htons(IP_DF)) return TC_ACT_PIPE; [all …]
|
D | dscpPolicy.c | 134 bpf_l3_csum_replace(skb, IP4_OFFSET(check, l2_header_size), htons(tos), htons(newTos), in DEFINE_BPF_MAP_GRW() 214 bpf_l3_csum_replace(skb, IP4_OFFSET(check, l2_header_size), htons(tos), htons(new_tos), 2); in DEFINE_BPF_MAP_GRW() 229 if (skb->protocol == htons(ETH_P_IP)) { 231 } else if (skb->protocol == htons(ETH_P_IPV6)) {
|
D | offload.c | 134 if (skb->protocol != htons(ETH_P_IPV6)) return TC_ACT_PIPE; 156 if (is_ethernet && (eth->h_proto != htons(ETH_P_IPV6))) return TC_ACT_PIPE; 509 const __be16 new_ttl_proto = old_ttl_proto - htons(0x0100); in do_forward4_bottom() 567 if (skb->protocol != htons(ETH_P_IP)) return TC_ACT_PIPE; in do_forward4() 586 if (is_ethernet && (eth->h_proto != htons(ETH_P_IP))) return TC_ACT_PIPE; in do_forward4() 609 if (ip->frag_off & ~htons(IP_DF)) TC_PUNT(IS_IP_FRAG); in do_forward4() 830 if (eth->h_proto == htons(ETH_P_IPV6)) in do_xdp_forward_ether() 832 if (eth->h_proto == htons(ETH_P_IP)) in do_xdp_forward_ether()
|
D | offload@mainline.c | 134 if (skb->protocol != htons(ETH_P_IPV6)) return TC_ACT_PIPE; 156 if (is_ethernet && (eth->h_proto != htons(ETH_P_IPV6))) return TC_ACT_PIPE; 509 const __be16 new_ttl_proto = old_ttl_proto - htons(0x0100); in do_forward4_bottom() 567 if (skb->protocol != htons(ETH_P_IP)) return TC_ACT_PIPE; in do_forward4() 586 if (is_ethernet && (eth->h_proto != htons(ETH_P_IP))) return TC_ACT_PIPE; in do_forward4() 609 if (ip->frag_off & ~htons(IP_DF)) TC_PUNT(IS_IP_FRAG); in do_forward4() 830 if (eth->h_proto == htons(ETH_P_IPV6)) in do_xdp_forward_ether() 832 if (eth->h_proto == htons(ETH_P_IP)) in do_xdp_forward_ether()
|
D | netd.c | 199 bool is_ipv6 = (skb->protocol == htons(ETH_P_IPV6)); \ in DEFINE_BPF_MAP_RO_NETD() 270 if (skb->protocol == htons(ETH_P_IP)) { in do_packet_tracing() 275 } else if (skb->protocol == htons(ETH_P_IPV6)) { in do_packet_tracing() 338 if (skb->protocol == htons(ETH_P_IP)) { in skip_owner_match() 354 } else if (skb->protocol == htons(ETH_P_IPV6)) { in skip_owner_match() 388 if (skb->protocol == htons(ETH_P_IP)) { in ingress_should_discard() 391 } else if (skb->protocol == htons(ETH_P_IPV6)) { in ingress_should_discard()
|
D | bpf_net_helpers.h | 74 #define htons(x) (__builtin_constant_p(x) ? ___constant_swab16(x) : __builtin_bswap16(x)) macro 76 #define ntohs(x) htons(x)
|
D | test.c | 68 if (eth->h_proto != htons(ETH_P_IP)) return XDP_PASS;
|
D | test@mainline.c | 68 if (eth->h_proto != htons(ETH_P_IP)) return XDP_PASS;
|
/packages/modules/Connectivity/service-t/native/libs/libnetworkstats/ |
D | NetworkTraceHandlerTest.cpp | 138 .sport = htons(8080), in TEST_F() 139 .dport = htons(443), in TEST_F() 145 .sport = htons(443), in TEST_F() 146 .dport = htons(8080), in TEST_F() 170 .sport = htons(11), // type in TEST_F() 171 .dport = htons(22), // code in TEST_F() 177 .sport = htons(33), // type in TEST_F() 178 .dport = htons(44), // code in TEST_F() 276 __be16 a = htons(10000); in TEST_F() 277 __be16 b = htons(10001); in TEST_F() [all …]
|
/packages/modules/Connectivity/clatd/ |
D | translate.c | 114 tun_header->proto = htons(proto); in fill_tun_header() 132 ip->tot_len = htons(sizeof(struct iphdr) + payload_len); in fill_ip_header() 134 ip->frag_off = htons(IP_DF); in fill_ip_header() 163 ip6->ip6_plen = htons(payload_len); in fill_ip6_header() 191 frag_hdr->ip6f_offlg = htons(frag_off << 3); in maybe_fill_frag_header() 213 ip_targ->frag_off = htons(frag_off); in parse_frag_header() 214 ip_targ->id = htons(ntohl(frag_hdr->ip6f_ident) & 0xffff); in parse_frag_header() 253 checksum = checksum + htons(20); in icmp_to_icmp6()
|
D | clatd_test.cpp | 235 EXPECT_EQ(len - sizeof(*ip6), htons(ip6->ip6_plen)) << msg << ": Incorrect IPv6 length\n"; in check_packet() 365 ip->frag_off &= ~htons(IP_MF); in reassemble_packet() 366 ip->tot_len = htons(total_length); in reassemble_packet() 373 ip6->ip6_plen = htons(total_length - sizeof(*ip6)); in reassemble_packet() 450 expected_proto = htons(ETH_P_IPV6); in do_translate_packet() 455 expected_proto = htons(ETH_P_IP); in do_translate_packet()
|
D | clatd.c | 220 .ip6_plen = htons(sizeof(dad_pkt) - sizeof(struct ip6_hdr)), // payload length, ie. 32 in send_dad() 258 uint32_t csum = dad_pkt.ip6h.ip6_plen + htons(dad_pkt.ip6h.ip6_nxt); in send_dad()
|
/packages/modules/ImsMedia/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/utils/ |
D | ImsMediaNetworkUtil.cpp | 123 sin.sin_port = htons(port); in openSocket() 141 sin6.sin6_port = htons(port); in openSocket() 172 sin.sin_port = htons(port); in connectSocket() 190 sin6.sin6_port = htons(port); in connectSocket()
|
/packages/modules/Bluetooth/system/gd/hal/ |
D | snoop_logger_socket_thread_test.cc | 107 addr.sin_port = htons(SnoopLoggerSocket::DEFAULT_LISTEN_PORT_); in TEST_F() 134 addr.sin_port = htons(SnoopLoggerSocket::DEFAULT_LISTEN_PORT_); in TEST_F() 179 addr.sin_port = htons(SnoopLoggerSocket::DEFAULT_LISTEN_PORT_); in TEST_F() 216 addr.sin_port = htons(SnoopLoggerSocket::DEFAULT_LISTEN_PORT_); in TEST_F() 254 addr.sin_port = htons(SnoopLoggerSocket::DEFAULT_LISTEN_PORT_); in TEST_F()
|
/packages/modules/DnsResolver/tests/dns_responder/ |
D | dns_responder.cpp | 274 *reinterpret_cast<uint16_t*>(buffer_cur) = htons(qtype); in write() 275 *reinterpret_cast<uint16_t*>(buffer_cur + sizeof(uint16_t)) = htons(qclass); in write() 344 intfields.rtype = htons(rtype); in writeIntFields() 345 intfields.rclass = htons(rclass); in writeIntFields() 347 intfields.rdlen = htons(rdlen); in writeIntFields() 411 header.id = htons(id); in write() 420 header.qdcount = htons(questions.size()); in write() 421 header.ancount = htons(answers.size()); in write() 422 header.nscount = htons(authorities.size()); in write() 423 header.arcount = htons(additionals.size()); in write() [all …]
|
/packages/modules/Connectivity/staticlibs/native/ip_checksum/ |
D | checksum.c | 101 uint16_t temp_protocol = htons(ip->protocol); in ipv4_pseudo_header_checksum() 102 uint16_t temp_length = htons(len); in ipv4_pseudo_header_checksum()
|
/packages/modules/adb/sysdeps/posix/ |
D | network.cpp | 44 addr4->sin_port = htons(port); in loopback_addr4() 54 addr6->sin6_port = htons(port); in loopback_addr6()
|
/packages/modules/Bluetooth/system/stack/test/ |
D | stack_avrcp_test.cc | 167 ASSERT_EQ(htons(0x500), 5); in TEST_F() 180 htons(sizeof(data.payload)), in TEST_F()
|
/packages/modules/Connectivity/service/native/libs/libclat/ |
D | clatutils_test.cpp | 172 const int s = socket(AF_PACKET, SOCK_RAW | SOCK_CLOEXEC, htons(ETH_P_IPV6)); in TEST_F() 183 EXPECT_EQ(htons(ETH_P_IPV6), sll.sll_protocol); in TEST_F()
|
D | clatutils.cpp | 46 .sin_port = htons(53), in isIpv4AddressFree() 244 .sll_protocol = htons(ETH_P_IPV6), in configure_packet_socket()
|
/packages/modules/adb/client/openscreen/platform/ |
D | udp_socket.cpp | 419 sa.sin_port = htons(dest.port); in JoinMulticastGroup() 432 sa.sin6_port = htons(dest.port); in JoinMulticastGroup() 517 address.sin_port = htons(local_endpoint_.port); in JoinMulticastGroup() 541 address.sin6_port = htons(local_endpoint_.port); in JoinMulticastGroup()
|
/packages/modules/Connectivity/tests/native/connectivity_native_test/ |
D | connectivity_native_test.cpp | 132 struct sockaddr_in addr4 = { .sin_family = family, .sin_port = htons(*port) }; in openSocket() 135 struct sockaddr_in6 addr6 = { .sin6_family = family, .sin6_port = htons(*port) }; in openSocket()
|
/packages/modules/Connectivity/staticlibs/native/tcutils/ |
D | tcutils.cpp | 182 | static_cast<uint32_t>(htons(proto)), in IngressPoliceFilterBuilder() 616 htons(static_cast<uint16_t>(proto))), in tcAddBpfFilter() 725 htons(static_cast<uint16_t>(proto))), in tcDeleteFilter()
|
/packages/modules/Bluetooth/tools/rootcanal/net/posix/ |
D | posix_async_socket_server.cc | 55 listen_address.sin_port = htons(port_); in PosixAsyncSocketServer()
|