/external/u-boot/net/ |
D | cdp.c | 100 if (csum != htons(csum)) /* little endian */ in cdp_compute_csum() 101 csum = htons(csum); in cdp_compute_csum() 140 *s++ = htons(0); in cdp_send_trigger() 144 *s++ = htons(CDP_DEVICE_ID_TLV); in cdp_send_trigger() 145 *s++ = htons(CONFIG_CDP_DEVICE_ID); in cdp_send_trigger() 152 *s++ = htons(CDP_PORT_ID_TLV); in cdp_send_trigger() 158 *s++ = htons(len + 4); in cdp_send_trigger() 164 *s++ = htons(CDP_CAPABILITIES_TLV); in cdp_send_trigger() 165 *s++ = htons(8); in cdp_send_trigger() 171 *s++ = htons(CDP_VERSION_TLV); in cdp_send_trigger() [all …]
|
D | fastboot.c | 63 .seq = htons(sequence_number) in fastboot_udp_send_info() 149 response_header.seq = htons(response_header.seq); in fastboot_send() 155 tmp = htons(sequence_number); in fastboot_send() 160 tmp = htons(udp_version); in fastboot_send() 163 tmp = htons(packet_size); in fastboot_send() 194 response_header.seq = htons(sequence_number); in fastboot_send()
|
D | net.c | 993 localip->ip_len = htons(total_len); in __net_defragment() 1422 et->et_protlen = htons(prot); in net_set_ether() 1428 vet->vet_vlan_type = htons(PROT_VLAN); in net_set_ether() 1429 vet->vet_tag = htons((0 << 5) | (myvlanid & VLAN_IDMASK)); in net_set_ether() 1430 vet->vet_type = htons(prot); in net_set_ether() 1445 vet->vet_type = htons(prot); in net_update_ether() 1448 et->et_protlen = htons(prot); in net_update_ether() 1453 et802->et_prot = htons(prot); in net_update_ether() 1468 ip->ip_len = htons(IP_HDR_SIZE); in net_set_ip_header() 1469 ip->ip_id = htons(net_ip_id++); in net_set_ip_header() [all …]
|
/external/mtpd/ |
D | l2tp.c | 72 #define RESULT_CODE htons(1) 73 #define PROTOCOL_VERSION htons(2) 74 #define FRAMING_CAPABILITIES htons(3) 75 #define HOST_NAME htons(7) 76 #define ASSIGNED_TUNNEL htons(9) 77 #define WINDOW_SIZE htons(10) 78 #define CHALLENGE htons(11) 79 #define CHALLENGE_RESPONSE htons(13) 80 #define ASSIGNED_SESSION htons(14) 81 #define CALL_SERIAL_NUMBER htons(15) [all …]
|
/external/linux-kselftest/tools/testing/selftests/net/ |
D | ip_defrag.c | 110 return htons(res); in udp_checksum() 127 return htons(res); in udp6_checksum() 143 udphdr.source = htons(cfg_port + 1); in send_fragment() 144 udphdr.dest = htons(cfg_port); in send_fragment() 145 udphdr.len = htons(UDP_HLEN + payload_len); in send_fragment() 160 fraghdr->ip6f_offlg = htons(offset); in send_fragment() 163 fraghdr->ip6f_offlg = htons(offset | IP6_MF); in send_fragment() 165 ip6hdr->ip6_plen = htons(frag_len); in send_fragment() 178 iphdr->ip_off = htons(offset / 8); in send_fragment() 181 iphdr->ip_off = htons(offset / 8 | IP4_MF); in send_fragment() [all …]
|
D | psock_snd.c | 108 eth->h_proto = htons(ETH_P_8021Q); in build_eth_header() 109 tag[1] = htons(ETH_P_IP); in build_eth_header() 113 eth->h_proto = htons(ETH_P_IP); in build_eth_header() 124 iph->tot_len = htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len); in build_ipv4_header() 125 iph->id = htons(1337); in build_ipv4_header() 140 udph->source = htons(9); in build_udp_header() 141 udph->dest = htons(cfg_port); in build_udp_header() 142 udph->len = htons(len); in build_udp_header() 146 htons(IPPROTO_UDP) + udph->len); in build_udp_header() 175 laddr.sll_protocol = htons(ETH_P_IP); in do_bind() [all …]
|
/external/ppp/pppd/plugins/rp-pppoe/ |
D | discovery.c | 161 conn->cookie.type = htons(type); in parsePADOTags() 162 conn->cookie.length = htons(len); in parsePADOTags() 166 conn->relayId.type = htons(type); in parsePADOTags() 167 conn->relayId.length = htons(len); in parsePADOTags() 246 conn->relayId.type = htons(type); in parsePADSTags() 247 conn->relayId.length = htons(len); in parsePADSTags() 283 packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery); in sendPADI() 293 svc->length = htons(namelen); in sendPADI() 307 hostUniq.type = htons(TAG_HOST_UNIQ); in sendPADI() 308 hostUniq.length = htons(sizeof(pid)); in sendPADI() [all …]
|
D | pppoe-discovery.c | 124 if ((fd = socket(domain, stype, htons(type))) < 0) { in openInterface() 173 sa.sll_protocol = htons(type); in openInterface() 405 conn->cookie.type = htons(type); in parsePADOTags() 406 conn->cookie.length = htons(len); in parsePADOTags() 417 conn->relayId.type = htons(type); in parsePADOTags() 418 conn->relayId.length = htons(len); in parsePADOTags() 461 packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery); in sendPADI() 467 svc->length = htons(namelen); in sendPADI() 479 hostUniq.type = htons(TAG_HOST_UNIQ); in sendPADI() 480 hostUniq.length = htons(sizeof(pid)); in sendPADI() [all …]
|
/external/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()
|
/external/ltp/testcases/network/lib6/ |
D | getaddrinfo_01.c | 110 psin ? htons(psin->sin_port) : 0); in gaiv4() 175 err |= psin->sin_port != htons(servnum); in gaiv4() 187 psin ? htons(psin->sin_port) : 0); in gaiv4() 206 servnum = htons(9462); in gaiv4() 235 psin ? htons(psin->sin_port) : 0); in gaiv4() 274 servnum = htons(9462); in gaiv4() 302 psin ? htons(psin->sin_port) : 0); in gaiv4() 328 servnum = htons(9462); in gaiv4() 356 psin ? htons(psin->sin_port) : 0); in gaiv4() 408 servnum = htons(9462); in gaiv4() [all …]
|
/external/libnetfilter_conntrack/utils/ |
D | conntrack_master.c | 28 nfct_set_attr_u16(ct, ATTR_PORT_SRC, htons(20)); in main() 29 nfct_set_attr_u16(ct, ATTR_PORT_DST, htons(10)); in main() 69 nfct_set_attr_u16(ct, ATTR_PORT_SRC, htons(1024)); in main() 70 nfct_set_attr_u16(ct, ATTR_PORT_DST, htons(1025)); in main() 84 nfct_set_attr_u16(ct, ATTR_MASTER_PORT_SRC, htons(20)); in main() 85 nfct_set_attr_u16(ct, ATTR_MASTER_PORT_DST, htons(10)); in main()
|
/external/iproute2/tc/ |
D | f_flower.c | 133 if (eth_type != htons(ETH_P_8021Q)) { in flower_parse_vlan_eth_type() 205 if (eth_type != htons(ETH_P_IP) && eth_type != htons(ETH_P_IPV6)) in flower_parse_ip_proto() 215 if (eth_type != htons(ETH_P_IP)) in flower_parse_ip_proto() 219 if (eth_type != htons(ETH_P_IPV6)) in flower_parse_ip_proto() 285 if (eth_type == htons(ETH_P_IP)) { in flower_parse_ip_addr() 287 } else if (eth_type == htons(ETH_P_IPV6)) { in flower_parse_ip_addr() 301 return eth_type == htons(ETH_P_ARP) || eth_type == htons(ETH_P_RARP); in flower_eth_type_arp() 401 if (eth_type == htons(ETH_P_IP) && ip_proto == IPPROTO_ICMP) in flower_icmp_attr_type() 405 else if (eth_type == htons(ETH_P_IPV6) && ip_proto == IPPROTO_ICMPV6) in flower_icmp_attr_type() 416 if (eth_type == htons(ETH_P_IP) && ip_proto == IPPROTO_ICMP) in flower_icmp_attr_mask_type() [all …]
|
/external/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() 174 if (arp_hdr->ar_op == htons(ARPOP_REQUEST)) TT.rcvd_req++; in recv_from() 251 saddr.sin_port = htons(1025); in arping_main() [all …]
|
/external/strace/tests-m32/ |
D | netlink_netfilter.c | 126 if (htons(NFNL_SUBSYS_NFTABLES) == NFNL_SUBSYS_NFTABLES) in test_nfgenmsg() 132 msg.res_id = htons(NFNL_SUBSYS_NFTABLES); in test_nfgenmsg() 142 msg.res_id = htons(0xabcd); in test_nfgenmsg() 153 msg.res_id = htons(NFNL_SUBSYS_NFTABLES); in test_nfgenmsg() 161 msg.res_id = htons(0xabcd); in test_nfgenmsg() 174 msg.res_id = htons(NFNL_SUBSYS_NFTABLES); in test_nfgenmsg()
|
/external/strace/tests-mx32/ |
D | netlink_netfilter.c | 126 if (htons(NFNL_SUBSYS_NFTABLES) == NFNL_SUBSYS_NFTABLES) in test_nfgenmsg() 132 msg.res_id = htons(NFNL_SUBSYS_NFTABLES); in test_nfgenmsg() 142 msg.res_id = htons(0xabcd); in test_nfgenmsg() 153 msg.res_id = htons(NFNL_SUBSYS_NFTABLES); in test_nfgenmsg() 161 msg.res_id = htons(0xabcd); in test_nfgenmsg() 174 msg.res_id = htons(NFNL_SUBSYS_NFTABLES); in test_nfgenmsg()
|
/external/strace/tests/ |
D | netlink_netfilter.c | 126 if (htons(NFNL_SUBSYS_NFTABLES) == NFNL_SUBSYS_NFTABLES) in test_nfgenmsg() 132 msg.res_id = htons(NFNL_SUBSYS_NFTABLES); in test_nfgenmsg() 142 msg.res_id = htons(0xabcd); in test_nfgenmsg() 153 msg.res_id = htons(NFNL_SUBSYS_NFTABLES); in test_nfgenmsg() 161 msg.res_id = htons(0xabcd); in test_nfgenmsg() 174 msg.res_id = htons(NFNL_SUBSYS_NFTABLES); in test_nfgenmsg()
|
/external/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 …]
|
/external/ltp/utils/sctp/func_tests/ |
D | test_connectx.c | 93 svr_loop[i].sin_port = htons(SCTP_TESTPORT_1); in main() 96 svr_test[i].v4.sin_port = htons(SCTP_TESTPORT_1); in main() 104 svr_try[i].sin_port = htons(SCTP_TESTPORT_1); in main() 107 clt_loop1[i].sin_port = htons(SCTP_TESTPORT_2); in main() 110 clt_test1[i].v4.sin_port = htons(SCTP_TESTPORT_2); in main() 113 clt_loop2[i].sin_port = htons(SCTP_TESTPORT_2+1); in main() 116 clt_test2[i].v4.sin_port = htons(SCTP_TESTPORT_2+1); in main() 119 clt_loop3[i].sin_port = htons(SCTP_TESTPORT_2+2); in main()
|
D | test_basic.c | 106 loop1.v6.sin6_port = htons(SCTP_TESTPORT_1); in main() 110 loop2.v6.sin6_port = htons(SCTP_TESTPORT_2); in main() 116 loop1.v4.sin_port = htons(SCTP_TESTPORT_1); in main() 120 loop2.v4.sin_port = htons(SCTP_TESTPORT_2); in main() 203 if (msgname.v6.sin6_port != htons(SCTP_TESTPORT_1)) { in main() 219 if (msgname.v4.sin_port != htons(SCTP_TESTPORT_1)) { in main() 259 if (msgname.v6.sin6_port != htons(SCTP_TESTPORT_1)) { in main() 275 if (msgname.v4.sin_port != htons(SCTP_TESTPORT_1)) { in main() 422 if (msgname.v6.sin6_port != htons(SCTP_TESTPORT_1)) { in main() 438 if (msgname.v4.sin_port != htons(SCTP_TESTPORT_1)) { in main()
|
/external/u-boot/lib/efi_selftest/ |
D | efi_selftest_snp.c | 111 p.eth_hdr.et_protlen = htons(PROT_IP); in send_dhcp_discover() 116 p.ip_udp.ip_len = htons(sizeof(struct dhcp) - in send_dhcp_discover() 118 p.ip_udp.ip_id = htons(++net_ip_id); in send_dhcp_discover() 119 p.ip_udp.ip_off = htons(IP_FLAGS_DFRAG); in send_dhcp_discover() 128 p.ip_udp.udp_src = htons(68); in send_dhcp_discover() 129 p.ip_udp.udp_dst = htons(67); in send_dhcp_discover() 130 p.ip_udp.udp_len = htons(sizeof(struct dhcp) - in send_dhcp_discover() 139 p.dhcp_hdr.flags = htons(DHCP_FLAGS_UNICAST); in send_dhcp_discover()
|
/external/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 …]
|
/external/android-clat/ |
D | clatd_microbenchmark.c | 88 struct tun_pi tun = { 0, htons(ETH_P_IP) }; in send_packet() 90 .source = htons(1234), in send_packet() 91 .dest = htons(PORT), in send_packet() 92 .len = htons(len + sizeof(udp)), in send_packet() 98 .tot_len = htons(len + sizeof(ip) + sizeof(udp)), in send_packet() 99 .frag_off = htons(IP_DF), in send_packet()
|
/external/kernel-headers/original/uapi/linux/ |
D | tipc_config.h | 288 tlv->tlv_len = htons(len); in TLV_SET_LEN() 298 tlv->tlv_type = htons(type); in TLV_SET_TYPE() 308 tlv_ptr->tlv_type = htons(type); in TLV_SET() 309 tlv_ptr->tlv_len = htons(tlv_len); in TLV_SET() 406 tcm_hdr->tcm_type = htons(cmd); in TCM_SET() 407 tcm_hdr->tcm_flags = htons(flags); in TCM_SET()
|