/external/syslinux/core/fs/pxe/ |
D | tftp.h | 34 #define TFTP_RRQ htons(1) // Read rest 35 #define TFTP_WRQ htons(2) // Write rest 36 #define TFTP_DATA htons(3) // Data packet 37 #define TFTP_ACK htons(4) // ACK packet 38 #define TFTP_ERROR htons(5) // ERROR packet 39 #define TFTP_OACK htons(6) // OACK packet 44 #define TFTP_EUNDEF htons(0) // Unspecified error 45 #define TFTP_ENOTFOUND htons(1) // File not found 46 #define TFTP_EACCESS htons(2) // Access violation 47 #define TFTP_ENOSPACE htons(3) // Disk full [all …]
|
/external/mtpd/ |
D | l2tp.c | 67 #define RESULT_CODE htons(1) 68 #define PROTOCOL_VERSION htons(2) 69 #define FRAMING_CAPABILITIES htons(3) 70 #define HOST_NAME htons(7) 71 #define ASSIGNED_TUNNEL htons(9) 72 #define WINDOW_SIZE htons(10) 73 #define CHALLENGE htons(11) 74 #define CHALLENGE_RESPONSE htons(13) 75 #define ASSIGNED_SESSION htons(14) 76 #define CALL_SERIAL_NUMBER htons(15) [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 …]
|
D | common.c | 112 packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery); in sendPADT() 125 hostUniq.type = htons(TAG_HOST_UNIQ); in sendPADT() 126 hostUniq.length = htons(sizeof(pid)); in sendPADT() 137 err.type = htons(TAG_GENERIC_ERROR); in sendPADT() 138 err.length = htons(elen); in sendPADT() 162 packet.length = htons(plen); in sendPADT()
|
/external/syslinux/gpxe/src/net/udp/ |
D | dns.c | 50 .st_port = htons ( DNS_PORT ), 292 dns->query.dns.id = htons ( ++qid ); in dns_send_packet() 371 case htons ( DNS_TYPE_A ): in dns_xfer_deliver_raw() 384 case htons ( DNS_TYPE_CNAME ): in dns_xfer_deliver_raw() 391 dns->qinfo->qtype = htons ( DNS_TYPE_A ); in dns_xfer_deliver_raw() 392 dns->qinfo->qclass = htons ( DNS_CLASS_IN ); in dns_xfer_deliver_raw() 415 case htons ( DNS_TYPE_A ): in dns_xfer_deliver_raw() 420 dns->qinfo->qtype = htons ( DNS_TYPE_CNAME ); in dns_xfer_deliver_raw() 424 case htons ( DNS_TYPE_CNAME ): in dns_xfer_deliver_raw() 429 if ( dns->qinfo->qtype == htons ( DNS_TYPE_A ) ) { in dns_xfer_deliver_raw() [all …]
|
/external/syslinux/gpxe/src/core/ |
D | gdbudp.c | 79 if ( ethhdr->h_protocol == htons ( ETH_P_ARP ) ) { in gdbudp_recv() 82 arphdr->ar_hrd != htons ( ARPHRD_ETHER ) || in gdbudp_recv() 83 arphdr->ar_pro != htons ( ETH_P_IP ) || in gdbudp_recv() 86 arphdr->ar_op != htons ( ARPOP_REQUEST ) || in gdbudp_recv() 92 arphdr->ar_op = htons ( ARPOP_REPLY ); in gdbudp_recv() 106 if ( ethhdr->h_protocol != htons ( ETH_P_IP ) ) { in gdbudp_recv() 182 udphdr->len = htons ( iob_len ( iob ) ); in gdbudp_send() 190 iphdr->len = htons ( iob_len ( iob ) ); in gdbudp_send() 201 ethhdr->h_protocol = htons ( ETH_P_IP ); in gdbudp_send() 221 source_addr.sin_port = ( addr && addr->sin_port ) ? addr->sin_port : htons ( DEFAULT_PORT ); in gdbudp_configure()
|
D | proto_eth_slow.c | 221 lacp.pkt.actor.system_priority = htons(1); in lacp_init_state() 223 lacp.pkt.actor.key = htons(1); in lacp_init_state() 224 lacp.pkt.actor.port = htons(1); in lacp_init_state() 225 lacp.pkt.actor.port_priority = htons(1); in lacp_init_state() 235 lacp.pkt.partner.system_priority = htons(1); in lacp_init_state() 237 lacp.pkt.partner.key = htons(1); in lacp_init_state() 238 lacp.pkt.partner.port = htons(1); in lacp_init_state() 239 lacp.pkt.partner.port_priority = htons(1); in lacp_init_state() 249 lacp.pkt.collector_max_delay = htons(0x8000); /* ???? */ in lacp_init_state()
|
/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/ltp/testcases/network/lib6/ |
D | getaddrinfo_01.c | 109 psin ? htons(psin->sin_port) : 0); in gaiv4() 174 err |= psin->sin_port != htons(servnum); in gaiv4() 186 psin ? htons(psin->sin_port) : 0); in gaiv4() 205 servnum = htons(9462); in gaiv4() 234 psin ? htons(psin->sin_port) : 0); in gaiv4() 273 servnum = htons(9462); in gaiv4() 301 psin ? htons(psin->sin_port) : 0); in gaiv4() 327 servnum = htons(9462); in gaiv4() 355 psin ? htons(psin->sin_port) : 0); in gaiv4() 407 servnum = htons(9462); in gaiv4() [all …]
|
/external/syslinux/gpxe/src/net/infiniband/ |
D | ib_cm.c | 65 mad.hdr.attr_id = htons ( IB_CM_ATTR_READY_TO_USE ); in ib_cm_send_rtu() 120 .attr_id = htons ( IB_CM_ATTR_CONNECT_REPLY ), 133 case htons ( IB_CM_REJECT_BAD_SERVICE_ID ) : in ib_cm_rejection_reason_to_rc() 135 case htons ( IB_CM_REJECT_STALE_CONN ) : in ib_cm_rejection_reason_to_rc() 137 case htons ( IB_CM_REJECT_CONSUMER ) : in ib_cm_rejection_reason_to_rc() 170 if ( ( rc == 0 ) && ( mad->hdr.status != htons ( IB_MGMT_STATUS_OK ) )) in ib_cm_req_complete() 184 case htons ( IB_CM_ATTR_CONNECT_REPLY ) : in ib_cm_req_complete() 207 case htons ( IB_CM_ATTR_CONNECT_REJECT ) : in ib_cm_req_complete() 212 if ( connect_rej->reason == htons ( IB_CM_REJECT_CONSUMER ) ) { in ib_cm_req_complete() 275 mad.hdr.attr_id = htons ( IB_CM_ATTR_CONNECT_REQUEST ); in ib_cm_path_complete() [all …]
|
D | ib_sma.c | 66 node_info->partition_cap = htons ( 1 ); in ib_sma_node_info() 206 htons ( IB_MGMT_STATUS_UNSUPPORTED_METHOD_ATTR ); in ib_sma_port_info() 292 htons ( IB_MGMT_STATUS_UNSUPPORTED_METHOD_ATTR ); in ib_sma_pkey_table() 300 pkey_table->pkey[0] = htons ( ibdev->pkey ); in ib_sma_pkey_table() 316 .attr_id = htons ( IB_SMP_ATTR_NODE_INFO ), 322 .attr_id = htons ( IB_SMP_ATTR_NODE_DESC ), 328 .attr_id = htons ( IB_SMP_ATTR_GUID_INFO ), 334 .attr_id = htons ( IB_SMP_ATTR_PORT_INFO ), 340 .attr_id = htons ( IB_SMP_ATTR_PKEY_TABLE ),
|
/external/syslinux/core/legacynet/ |
D | dnsresolv.c | 49 #define DNS_PORT htons(53) /* Default DNS port */ 256 hd1->flags = htons(0x0100); /* Recursion requested */ in dns_resolv() 257 hd1->qdcount = htons(1); /* One question */ in dns_resolv() 273 query->qtype = htons(TYPE_A); in dns_resolv() 274 query->qclass = htons(CLASS_IN); in dns_resolv() 314 if ((hd2->flags ^ 0x80) & htons(0xf80f)) in dns_resolv() 317 ques = htons(hd2->qdcount); /* Questions */ in dns_resolv() 318 reps = htons(hd2->ancount); /* Replies */ in dns_resolv() 375 if (hd2->flags == htons(0x480)) in dns_resolv()
|
/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/dnsmasq/src/ |
D | bpf.c | 188 ether.ether_type = htons(ETHERTYPE_IP); in send_via_bpf() 203 ip.ip_len = htons(sizeof(struct ip) + in send_via_bpf() 209 ip.ip_id = htons(0); in send_via_bpf() 210 ip.ip_off = htons(0x4000); /* don't fragment */ in send_via_bpf() 219 udp.uh_sport = htons(daemon->dhcp_server_port); in send_via_bpf() 220 udp.uh_dport = htons(daemon->dhcp_client_port); in send_via_bpf() 224 udp.uh_ulen = sum = htons(sizeof(struct udphdr) + len); in send_via_bpf() 225 sum += htons(IPPROTO_UDP); in send_via_bpf()
|
/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/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/kernel-headers/original/uapi/linux/ |
D | tipc_config.h | 282 tlv->tlv_len = htons(len); in TLV_SET_LEN() 292 tlv->tlv_type = htons(type); in TLV_SET_TYPE() 302 tlv_ptr->tlv_type = htons(type); in TLV_SET() 303 tlv_ptr->tlv_len = htons(tlv_len); in TLV_SET() 400 tcm_hdr->tcm_type = htons(cmd); in TCM_SET() 401 tcm_hdr->tcm_flags = htons(flags); in TCM_SET()
|
/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/iputils/ |
D | tftpd.c | 366 dp->th_opcode = htons((u_short)DATA); in sendfile() 367 dp->th_block = htons((u_short)block); in sendfile() 432 ap->th_opcode = htons((u_short)ACK); in recvfile() 433 ap->th_block = htons((u_short)block); in recvfile() 477 ap->th_opcode = htons((u_short)ACK); /* send the "final" ack */ in recvfile() 478 ap->th_block = htons((u_short)(block)); in recvfile() 522 tp->th_opcode = htons((u_short)ERROR); in nak() 523 tp->th_code = htons((u_short)error); in nak()
|
/external/iproute2/tc/ |
D | f_flower.c | 69 if (eth_type != htons(ETH_P_IP) && eth_type != htons(ETH_P_IPV6)) { in flower_parse_ip_proto() 98 if (eth_type == htons(ETH_P_IP)) { in flower_parse_ip_addr() 100 } else if (eth_type == htons(ETH_P_IPV6)) { in flower_parse_ip_addr() 157 addattr16(n, MAX_MSG, type, htons(port)); in flower_parse_port() 363 if (eth_type == htons(ETH_P_IP)) in flower_print_eth_type() 365 else if (eth_type == htons(ETH_P_IPV6)) in flower_print_eth_type() 404 if (eth_type == htons(ETH_P_IP)) { in flower_print_ip_addr() 409 } else if (eth_type == htons(ETH_P_IPV6)) { in flower_print_ip_addr()
|