/third_party/ltp/testcases/network/sctp/ |
D | sctp_big_chunk.c | 77 uint16_t src_port = htons(port - 1); in setup_client() 78 uint16_t dst_port = htons(port); in setup_client() 97 uint16_t outs = htons(10); in setup_client() 98 uint16_t ins = htons(65535); in setup_client() 108 uint16_t param_type = htons(6); in setup_client() 109 uint16_t param_len = htons(20); in setup_client() 121 chunk_len = htons(pkt_len - cmn_hdr_off); in setup_client() 129 ip6.ip6_plen = htons(pkt_len - ip6_hdr_len); in setup_client()
|
/third_party/toybox/toys/pending/ |
D | arping.c | 104 arp_h->ar_hrd = htons(ARPHRD_ETHER); in send_packet() 105 arp_h->ar_pro = htons(ETH_P_IP); in send_packet() 108 arp_h->ar_op = (toys.optflags & FLAG_A) ? htons(ARPOP_REPLY) in send_packet() 109 : htons(ARPOP_REQUEST); in send_packet() 137 if (arp_hdr->ar_op != htons(ARPOP_REQUEST) && in recv_from() 138 arp_hdr->ar_op != htons(ARPOP_REPLY)) return; in recv_from() 143 if (arp_hdr->ar_pro != htons(ETH_P_IP) || (arp_hdr->ar_pln != 4) in recv_from() 160 arp_hdr->ar_op == htons(ARPOP_REPLY) ? "ply" : "quest", in recv_from() 173 if (arp_hdr->ar_op == htons(ARPOP_REQUEST)) TT.rcvd_req++; in recv_from() 249 saddr.sin_port = htons(1025); in arping_main() [all …]
|
D | dhcp6.c | 178 *((uint16_t*)tmp) = htons(option_id); in fill_option() 179 *(uint16_t*)(tmp+2) = htons(option_len); in fill_option() 191 duid->type = htons(1); in fill_clientID() 192 duid->hwtype = htons(1); in fill_clientID() 212 *(uint16_t*)(tmp+4) = htons(23); in fill_optionRequest() 213 *(uint16_t*)(tmp+6) = htons(24); in fill_optionRequest() 222 *(uint16_t*)(tmp+6) = htons(0); in fill_elapsedTime() 246 TT.sock = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IPV6)); in mode_raw() 250 sockll.sll_protocol = htons(ETH_P_IPV6); in mode_raw() 281 addr6.sin6_port = htons(DHCPC_SERVER_PORT); //SERVER_PORT in send_msg() [all …]
|
/third_party/ltp/testcases/network/stress/ns-tools/ |
D | ns-icmp_redirector.c | 229 if ((sd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL))) < 0) in open_socket() 242 lla.sll_protocol = htons(ETH_P_ALL); in open_socket() 294 if (rcvarp_p->hdr.ar_op != htons(ARPOP_REQUEST)) in return_arp_reply() 328 sndeth.hdr.h_proto = htons(ETH_P_ARP); in return_arp_reply() 331 sndarp_p->hdr.ar_hrd = htons(ARPHRD_ETHER); in return_arp_reply() 332 sndarp_p->hdr.ar_pro = htons(ETH_P_IP); in return_arp_reply() 335 sndarp_p->hdr.ar_op = htons(ARPOP_REPLY); in return_arp_reply() 402 sndeth.hdr.h_proto = htons(ETH_P_IP); in return_icmp4_redirect() 408 sndip_p->hdr.tot_len = htons(sndeth_size - sizeof(struct ethhdr)); in return_icmp4_redirect() 409 sndip_p->hdr.id = htons(IPV4_PACKET_ID); in return_icmp4_redirect() [all …]
|
D | ns-icmpv4_sender.c | 323 fake_p->saddr_ll.sll_protocol = htons(ETH_P_IP); /* IPv4 */ in complete_eth_addrs() 369 pkt.hdr.tot_len = htons(pkt_size); in create_clean_packet() 370 pkt.hdr.id = htons(IPV4_PACKET_ID); in create_clean_packet() 371 pkt.hdr.frag_off = htons(IPV4_DEFAULT_FLAG); in create_clean_packet() 382 icmp_p->hdr.un.echo.id = htons(ICMP_ECHO_ID); in create_clean_packet() 383 icmp_p->hdr.un.echo.sequence = htons(1); in create_clean_packet() 454 pkt->hdr.frag_off |= htons(0x2000); in thrust_fakes() 462 pkt->hdr.frag_off &= htons(0xbfff); in thrust_fakes() 473 pkt->hdr.frag_off |= htons(seed); in thrust_fakes() 552 sock_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); in send_packets()
|
D | ns-icmpv6_sender.c | 183 lladdr_p->sll_protocol = htons(ETH_P_IPV6); /* IPv6 */ in specify_hw_addr() 214 lladdr_p->sll_protocol = htons(ETH_P_IPV6); /* IPv6 */ in calc_hd_mcastaddr() 277 pkt.hdr.ip6_plen = htons(ip6_psize); in create_mld_query() 288 alart_p->alart_data = htons(0x0000); /* MLD */ in create_mld_query() 296 query_p->maxdelay = htons(mrc); in create_mld_query() 301 query_p->nsrcs = htons(numsrc); in create_mld_query() 331 pseudo.hdr.p_ip6_plen = htons(query_size); in create_mld_query() 376 pkt.hdr.ip6_plen = htons(ip6_psize); in create_echo_request() 386 echoreq_p->hdr.icmp6_id = htons(ICMP_ECHO_ID); in create_echo_request() 387 echoreq_p->hdr.icmp6_seq = htons(1); in create_echo_request() [all …]
|
/third_party/ltp/utils/sctp/func_tests/ |
D | test_connectx.c | 97 svr_loop[i].sin_port = htons(SCTP_TESTPORT_1); in main() 100 svr_test[i].v4.sin_port = htons(SCTP_TESTPORT_1); in main() 108 svr_try[i].sin_port = htons(SCTP_TESTPORT_1); in main() 111 clt_loop1[i].sin_port = htons(SCTP_TESTPORT_2); in main() 114 clt_test1[i].v4.sin_port = htons(SCTP_TESTPORT_2); in main() 117 clt_loop2[i].sin_port = htons(SCTP_TESTPORT_2+1); in main() 120 clt_test2[i].v4.sin_port = htons(SCTP_TESTPORT_2+1); in main() 123 clt_loop3[i].sin_port = htons(SCTP_TESTPORT_2+2); in main()
|
D | test_basic.c | 110 loop1.v6.sin6_port = htons(SCTP_TESTPORT_1); in main() 114 loop2.v6.sin6_port = htons(SCTP_TESTPORT_2); in main() 120 loop1.v4.sin_port = htons(SCTP_TESTPORT_1); in main() 124 loop2.v4.sin_port = htons(SCTP_TESTPORT_2); in main() 207 if (msgname.v6.sin6_port != htons(SCTP_TESTPORT_1)) { in main() 223 if (msgname.v4.sin_port != htons(SCTP_TESTPORT_1)) { in main() 263 if (msgname.v6.sin6_port != htons(SCTP_TESTPORT_1)) { in main() 279 if (msgname.v4.sin_port != htons(SCTP_TESTPORT_1)) { in main() 426 if (msgname.v6.sin6_port != htons(SCTP_TESTPORT_1)) { in main() 442 if (msgname.v4.sin_port != htons(SCTP_TESTPORT_1)) { in main()
|
D | test_connect.c | 82 svr_loop.v4.sin_port = htons(SCTP_TESTPORT_1); in main() 85 clt_loop1.v4.sin_port = htons(SCTP_TESTPORT_2); in main() 88 clt_loop2.v4.sin_port = htons(SCTP_TESTPORT_2+1); in main() 91 clt_loop3.v4.sin_port = htons(SCTP_TESTPORT_2+2); in main()
|
D | test_tcp_style.c | 98 svr_loop.v6.sin6_port = htons(SCTP_TESTPORT_1); in main() 102 clt_loop[i].v6.sin6_port = htons(SCTP_TESTPORT_2 + i); in main() 106 clt2_loop.v6.sin6_port = htons(SCTP_TESTPORT_2 + i); in main() 111 svr_loop.v4.sin_port = htons(SCTP_TESTPORT_1); in main() 115 clt_loop[i].v4.sin_port = htons(SCTP_TESTPORT_2 + i); in main() 119 clt2_loop.v4.sin_port = htons(SCTP_TESTPORT_2 + i); in main()
|
D | test_fragments.c | 113 loop1.v6.sin6_port = htons(SCTP_TESTPORT_1); in main() 117 loop2.v6.sin6_port = htons(SCTP_TESTPORT_2); in main() 123 loop1.v4.sin_port = htons(SCTP_TESTPORT_1); in main() 127 loop2.v4.sin_port = htons(SCTP_TESTPORT_2); in main()
|
/third_party/iptables/extensions/ |
D | libxt_HMARK.c | 225 info->port_set.p16.src = htons(cb->val.u16); in HMARK_parse() 229 info->port_set.p16.dst = htons(cb->val.u16); in HMARK_parse() 233 info->port_mask.p16.src = htons(cb->val.u16); in HMARK_parse() 237 info->port_mask.p16.dst = htons(cb->val.u16); in HMARK_parse() 293 printf("sport-mask 0x%x ", htons(info->port_mask.p16.src)); in HMARK_print() 295 printf("dport-mask 0x%x ", htons(info->port_mask.p16.dst)); in HMARK_print() 299 printf("sport 0x%x ", htons(info->port_set.p16.src)); in HMARK_print() 301 printf("dport 0x%x ", htons(info->port_set.p16.dst)); in HMARK_print() 357 htons(info->port_mask.p16.src)); in HMARK_save() 360 htons(info->port_mask.p16.dst)); in HMARK_save() [all …]
|
/third_party/musl/libc-test/src/functionalext/supplement/network/ |
D | getservbyport.c | 28 struct servent *se = getservbyport(htons(TEST_GET_SEVERBY_TCP_PORT), NULL); in getservbyport_0100() 34 se = getservbyport(htons(TEST_GET_SEVERBY_TCP_PORT), "tcp"); in getservbyport_0100() 40 se = getservbyport(htons(TEST_GET_SEVERBY_UDP_PORT), "udp"); in getservbyport_0100()
|
D | send.c | 48 srvAddr.sin_port = htons(PORT); in SampleServerTask() 80 srvAddr.sin_port = htons(PORT); in SampleClientTask() 106 srvAddr.sin_port = htons(PORT); in SampleServerNullTask() 134 srvAddr.sin_port = htons(PORT); in SampleClientNullTask()
|
D | accept4.c | 53 srvAddr.sin_port = htons(PORT); in ServerTaskOne() 94 srvAddr.sin_port = htons(PORT); in ServerTaskTwo() 135 srvAddr.sin_port = htons(PORT); in ServerTaskThree() 176 srvAddr.sin_port = htons(PORT); in ServerTaskFive() 216 srvAddr.sin_port = htons(PORT); in ServerTaskSix() 245 srvAddr.sin_port = htons(PORT); in ClientTask()
|
/third_party/musl/libc-test/src/api/ |
D | arpa_inet.c | 21 #ifdef htons in f() 22 I(uint16_t, htons(0LL)) in f() 24 {uint16_t(*p)(uint16_t) = htons;} in f()
|
/third_party/ltp/testcases/kernel/syscalls/sendto/ |
D | sendto03.c | 54 sock = SAFE_SOCKET(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in setup() 64 bind_addr.sll_protocol = htons(ETH_P_ALL); in setup() 84 dst_sock = SAFE_SOCKET(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in check_tiny_frame() 150 dst_sock = SAFE_SOCKET(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in check_vnet_hdr()
|
/third_party/ltp/lib/ |
D | tst_net.c | 181 sa->sin_port = htons(port); in tst_init_sockaddr_inet() 189 sa->sin_port = htons(port); in tst_init_sockaddr_inet_bin() 197 sa->sin6_port = htons(port); in tst_init_sockaddr_inet6() 205 sa->sin6_port = htons(port); in tst_init_sockaddr_inet6_bin()
|
/third_party/gstreamer/gstplugins_bad/ext/sctp/usrsctp/usrsctplib/netinet/ |
D | sctp_output.c | 2025 paramh->param_type = htons(SCTP_IPV4_ADDRESS); in sctp_add_addr_to_mbuf() 2026 paramh->param_length = htons(plen); in sctp_add_addr_to_mbuf() 2040 paramh->param_type = htons(SCTP_IPV6_ADDRESS); in sctp_add_addr_to_mbuf() 2041 paramh->param_length = htons(plen); in sctp_add_addr_to_mbuf() 3989 ph->param_type = htons(SCTP_STATE_COOKIE); 4025 ph->param_length = htons(cookie_sz); 4221 ip->ip_off = htons(IP_DF); 4225 ip->ip_off = htons(IP_DF); 4229 ip->ip_off = htons(0); 4235 ip->ip_id = htons(SCTP_IP_ID(inp)++); [all …]
|
/third_party/ltp/tools/sparse/sparse-src/validation/ |
D | bswap-constant-folding.c | 10 #define htons(x) ___htons(x) macro 19 case htons(ETH_P_IPV6): in test()
|
/third_party/ltp/testcases/kernel/syscalls/recvmsg/ |
D | recvmsg03.c | 60 server_addr.sin_port = htons(4001); in client() 68 to_addr.sin_port = htons(4000); in client() 103 server_addr.sin_port = htons(4000); in server()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/ap/ |
D | fils_hlp.c | 32 return htons(~sum); in ip_checksum() 131 addr.sin_port = htons(hapd->conf->dhcp_server_port); in fils_dhcp_request() 264 iph->ip_len = htons(sizeof(*iph) + sizeof(*udph) + (end - pos)); in fils_dhcp_handler() 271 udph->uh_sport = htons(DHCP_SERVER_PORT); in fils_dhcp_handler() 272 udph->uh_dport = htons(DHCP_CLIENT_PORT); in fils_dhcp_handler() 273 udph->uh_ulen = htons(sizeof(*udph) + (end - pos)); in fils_dhcp_handler() 274 udph->uh_sum = htons(0x0000); /* TODO: calculate checksum */ in fils_dhcp_handler() 417 addr.sin_port = htons(hapd->conf->dhcp_relay_port); in fils_process_hlp_dhcp() 444 addr.sin_port = htons(hapd->conf->dhcp_server_port); in fils_process_hlp_dhcp()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/ap/ |
D | fils_hlp.c | 32 return htons(~sum); in ip_checksum() 131 addr.sin_port = htons(hapd->conf->dhcp_server_port); in fils_dhcp_request() 264 iph->tot_len = htons(sizeof(*iph) + sizeof(*udph) + (end - pos)); in fils_dhcp_handler() 271 udph->uh_sport = htons(DHCP_SERVER_PORT); in fils_dhcp_handler() 272 udph->uh_dport = htons(DHCP_CLIENT_PORT); in fils_dhcp_handler() 273 udph->uh_ulen = htons(sizeof(*udph) + (end - pos)); in fils_dhcp_handler() 274 udph->uh_sum = htons(0x0000); /* TODO: calculate checksum */ in fils_dhcp_handler() 417 addr.sin_port = htons(hapd->conf->dhcp_relay_port); in fils_process_hlp_dhcp() 444 addr.sin_port = htons(hapd->conf->dhcp_server_port); in fils_process_hlp_dhcp()
|
/third_party/node/deps/cares/src/lib/ |
D | ares_nowarn.h | 53 # undef htons 54 # define htons(a) aresx_htons((a)) macro
|
/third_party/skia/third_party/externals/microhttpd/src/testcurl/ |
D | test_options.c | 82 daemon_ip_addr.sin_port = htons (4233); in test_ip_addr_option() 88 daemon_ip_addr6.sin6_port = htons (4233); in test_ip_addr_option()
|