/system/netd/bpf_progs/ |
D | clatd.c | 50 if (skb->protocol != htons(ETH_P_IPV6)) return TC_ACT_OK; in nat64() 56 if (is_ethernet && (eth->h_proto != htons(ETH_P_IPV6))) return TC_ACT_OK; in nat64() 93 eth2.h_proto = htons(ETH_P_IP); // But replace the ethertype in nat64() 100 .tot_len = htons(ntohs(ip6->payload_len) + sizeof(struct iphdr)), // u16 in nat64() 102 .frag_off = htons(IP_DF), // u16 in nat64() 132 if (bpf_skb_change_proto(skb, htons(ETH_P_IP), 0)) return TC_ACT_OK; in nat64() 203 if (skb->protocol != htons(ETH_P_IP)) return TC_ACT_OK; in sched_cls_egress_clat_rawip() 229 if (ip4->frag_off & ~htons(IP_DF)) return TC_ACT_OK; in sched_cls_egress_clat_rawip() 270 .payload_len = htons(ntohs(ip4->tot_len) - 20), // __be16 in sched_cls_egress_clat_rawip() 290 if (bpf_skb_change_proto(skb, htons(ETH_P_IPV6), 0)) return TC_ACT_OK; in sched_cls_egress_clat_rawip()
|
D | bpf_net_helpers.h | 51 #define htons(x) (__builtin_constant_p(x) ? ___constant_swab16(x) : __builtin_bswap16(x)) macro 53 #define ntohs(x) htons(x)
|
D | offload.c | 45 if (skb->protocol != htons(ETH_P_IPV6)) return TC_ACT_OK; in do_forward() 51 if (is_ethernet && (eth->h_proto != htons(ETH_P_IPV6))) return TC_ACT_OK; in do_forward()
|
D | netd.c | 113 bool is_ipv6 = (skb->protocol == htons(ETH_P_IPV6)); \ 139 if (skb->protocol == htons(ETH_P_IP)) { in DEFINE_UPDATE_STATS() 156 } else if (skb->protocol == htons(ETH_P_IPV6)) { in DEFINE_UPDATE_STATS()
|
/system/netd/tests/ |
D | sock_diag_test.cpp | 38 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/libnetutils/ |
D | packet.c | 48 .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()
|
D | checksum.c | 114 temp_protocol = htons(ip->protocol); in ipv4_pseudo_header_checksum() 115 temp_length = htons(len); in ipv4_pseudo_header_checksum()
|
D | dhcpmsg.c | 35 msg->flags = htons(FLAGS_BROADCAST); in init_dhcp_msg()
|
/system/netd/server/ |
D | SockDiagTest.cpp | 46 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() 117 src, htons(msg->id.idiag_sport), in TEST_F() 118 dst, htons(msg->id.idiag_dport), in TEST_F() 136 seenServer46 |= (msg->id.idiag_sport == htons(port)); in TEST_F() 137 seenServer6 |= (msg->id.idiag_sport == htons(port)); in TEST_F() 141 src, htons(msg->id.idiag_sport), in TEST_F() 142 dst, htons(msg->id.idiag_dport), in TEST_F() 468 sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(port) }; in TEST_P()
|
D | NFLogListener.cpp | 94 msg.nfhdr.res_id = htons(nfLogGroup); in cfgMode() 115 msg.nfhdr.res_id = htons(nfLogGroup); in cfgCmdBind() 135 msg.nfhdr.res_id = htons(nfLogGroup); in cfgCmdUnbind()
|
D | WakeupControllerTest.cpp | 189 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()
|
D | OffloadUtils.cpp | 309 .tcm_info = static_cast<__u32>((prio << 16) | htons(proto)), in tcFilterAddDevBpf() 384 .tcm_info = static_cast<__u32>((prio << 16) | htons(proto)), in tcFilterDelDev()
|
D | NFLogListenerTest.cpp | 91 msg.nfmsg.res_id = htons(type); in sendEmptyMsg()
|
/system/core/libcutils/ |
D | socket_inaddr_any_server_unix.cpp | 40 addr.sin6_port = htons(port); in socket_inaddr_any_server()
|
D | socket_inaddr_any_server_windows.cpp | 65 addr.sin6_port = htons(port); in socket_inaddr_any_server()
|
/system/core/adb/sysdeps/posix/ |
D | network.cpp | 44 addr4->sin_port = htons(port); in loopback_addr4() 54 addr6->sin6_port = htons(port); in loopback_addr6()
|
/system/netd/tests/benchmarks/ |
D | connect_benchmark.cpp | 120 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/ |
D | endian.h | 58 #define htons(x) __builtin_bswap16(x) macro
|
/system/libbase/ |
D | endian_test.cpp | 38 ASSERT_EQ(be16, htons(le16)); in TEST()
|
/system/bt/vendor_libs/test_vendor_lib/test/ |
D | async_manager_unittest.cc | 49 serv_addr.sin_port = htons(kPort); in StartServer() 111 serv_addr.sin_port = htons(kPort); in ConnectClient()
|
D | link_layer_socket_device_test.cc | 78 serv_addr.sin_port = htons(kPort); in StartServer() 154 serv_addr.sin_port = htons(kPort); in ConnectClient()
|
/system/bt/hci/src/ |
D | btsnoop_net.cc | 112 addr.sin_port = htons(LISTEN_PORT_); in listen_fn_()
|
/system/bt/vendor_libs/test_vendor_lib/model/devices/ |
D | server_port_factory.cc | 48 listen_address.sin_port = htons(port); in SetUp()
|
/system/bt/gd/facade/ |
D | facade_main.cc | 132 addr.sin_port = htons(signal_port); in main()
|
/system/bt/vendor_libs/test_vendor_lib/model/setup/ |
D | test_channel_transport.cc | 50 listen_address.sin_port = htons(port); in SetUp()
|