/third_party/backends/backend/ |
H A D | hp5400_internal.c | 62 #include <netinet/in.h> /* for htons */ 645 *(itPix++) = htons (*(itR++)); in CircBufferGetLine() 646 *(itPix++) = htons (*(itG++)); in CircBufferGetLine() 647 *(itPix++) = htons (*(itB++)); in CircBufferGetLine() 755 HP5400_DBG (DBG_MSG, " ysize=%d htons-> %d\n", resp->ysize, in hp5400_test_scan_response() 756 htons (resp->ysize)); in hp5400_test_scan_response() 798 for (i = 0; i < htons (res.ysize); i++) in DoAverageScan() 813 array[k][j] /= htons (res.ysize); in DoAverageScan() 851 htons (res->ysize)); in DoScan() 855 for (i = 0; i < htons (re in DoScan() [all...] |
H A D | hp5590_cmds.c | 956 lamp_state.turnoff_time = htons (0x0a0a); in hp5590_turnon_lamp() 965 lamp_state.turnoff_time = htons (0x0a0a); in hp5590_turnon_lamp() 974 lamp_state.turnoff_time = htons (0x0336); in hp5590_turnon_lamp() 983 lamp_state.turnoff_time = htons (0x0f36); in hp5590_turnon_lamp() 1250 _base_dpi = htons (base_dpi); in hp5590_set_base_dpi() 1553 scan_params.dpi_x = htons (scanner_dpi); in hp5590_set_scan_area() 1554 scan_params.dpi_y = htons (scanner_dpi); in hp5590_set_scan_area() 1569 scan_params.bw_gray_flag = htons (0x40); in hp5590_set_scan_area() 1571 scan_params.flags = htons (0xe840); in hp5590_set_scan_area() 1573 scan_params.flags = htons ( in hp5590_set_scan_area() [all...] |
/third_party/ltp/testcases/network/sctp/ |
H A D | sctp_big_chunk.c | 106 uint16_t src_port = htons(port - 1); in setup_client() 107 uint16_t dst_port = htons(port); in setup_client() 126 uint16_t outs = htons(10); in setup_client() 127 uint16_t ins = htons(65535); in setup_client() 137 uint16_t param_type = htons(6); in setup_client() 138 uint16_t param_len = htons(20); in setup_client() 150 chunk_len = htons(pkt_len - cmn_hdr_off); in setup_client() 158 ip6.ip6_plen = htons(pkt_len - ip6_hdr_len); in setup_client()
|
/third_party/toybox/toys/pending/ |
H A 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(102 in arping_main() [all...] |
H A 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_POR in send_msg() [all...] |
/third_party/ltp/testcases/network/stress/ns-tools/ |
H A 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_I in return_icmp4_redirect() [all...] |
H A 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( in create_echo_request() [all...] |
H A 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_I in send_packets() [all...] |
/third_party/ltp/utils/sctp/func_tests/ |
H A 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()
|
H A 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_ in main() [all...] |
H A 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()
|
/third_party/musl/libc-test/src/functionalext/supplement/network/ |
H A 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()
|
H A 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()
|
/third_party/musl/libc-test/src/api/ |
H A 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/lib/ |
H A D | tst_net.c | 183 sa->sin_port = htons(port); in tst_init_sockaddr_inet() 191 sa->sin_port = htons(port); in tst_init_sockaddr_inet_bin() 199 sa->sin6_port = htons(port); in tst_init_sockaddr_inet6() 207 sa->sin6_port = htons(port); in tst_init_sockaddr_inet6_bin()
|
/third_party/ltp/testcases/kernel/syscalls/sendto/ |
H A D | sendto03.c | 44 sock = SAFE_SOCKET(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in setup() 54 bind_addr.sll_protocol = htons(ETH_P_ALL); in setup() 74 dst_sock = SAFE_SOCKET(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in check_tiny_frame() 140 dst_sock = SAFE_SOCKET(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in check_vnet_hdr()
|
/third_party/ltp/tools/sparse/sparse-src/validation/ |
H A D | bswap-constant-folding.c | 10 #define htons(x) ___htons(x) macro 19 case htons(ETH_P_IPV6): in test()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/ap/ |
H A 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/ |
H A 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/ltp/testcases/kernel/syscalls/recvmsg/ |
H A 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/musl/libc-test/src/functionalext/supplement/manual/network/ |
H A D | getnameinfo.c | 185 addrDst.sin_port = htons(HTTP_PORT); in getnameinfo_0900() 205 addrDst.sin_port = htons(TCPMUX_PORT); in getnameinfo_1000() 226 addrDst.sin_port = htons(FIDO_PORT); in getnameinfo_1100() 246 addrDst.sin_port = htons(NOT_EXIST_PORT); in getnameinfo_1200()
|
/third_party/curl/tests/server/ |
H A D | tftpd.c | 684 me.sa4.sin_port = htons(port); in main() 692 me.sa6.sin6_port = htons(port); in main() 1183 sdp->th_opcode = htons((unsigned short)opcode_DATA); in sendtftp() 1184 sdp->th_block = htons(sendblock); in sendtftp() 1261 rap->th_opcode = htons((unsigned short)opcode_ACK); in recvtftp() 1262 rap->th_block = htons(recvblock); in recvtftp() 1321 rap->th_opcode = htons((unsigned short)opcode_ACK); /* send the "final" in recvtftp() 1323 rap->th_block = htons(recvblock); in recvtftp() 1361 tp->th_opcode = htons((unsigned short)opcode_ERROR); in nak() 1362 tp->th_code = htons((unsigne in nak() [all...] |
/third_party/rust/crates/linux-raw-sys/gen/include/ |
H A D | support.h | 34 #define htons(x) (x) macro 39 #define htons(x) (__builtin_bswap16(x)) macro
|
/third_party/skia/third_party/externals/microhttpd/src/testcurl/ |
H A 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()
|
/third_party/ltp/testcases/network/sockets/ |
H A D | ltpClient.c | 131 udpRemoteServerAddr.sin_port = htons(LOCAL_UDP_SERVER_PORT); in main() 138 tcpRemoteServerAddr.sin_port = htons(LOCAL_TCP_SERVER_PORT); in main() 145 mcastRemoteServerAddr.sin_port = htons(LOCAL_MCAST_SERVER_PORT); in main() 162 udpClientAddr.sin_port = htons(0); in main() 167 tcpClientAddr.sin_port = htons(0); in main() 217 mcastClientAddr.sin_port = htons(0); in main()
|