/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 …]
|
D | pptp.c | 62 #define CONTROL_MESSAGE htons(1) 64 #define PROTOCOL_VERSION htons(0x0100) 139 outgoing.header.length = htons(length); in set_message() 142 outgoing.message = htons(message); in set_message() 226 outgoing.sccrq.channels = htons(1); in pptp_connect() 297 outgoing.ocrq.window_size = htons(8192); in pptp_process()
|
/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/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 …]
|
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() 284 addr6.sin6_port = htons(DHCPC_SERVER_PORT); //SERVER_PORT in send_msg() [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()
|
D | network.c | 226 addr.in6.sin6_port = htons(daemon->port); in iface_allowed_v6() 253 addr.in.sin_port = htons(daemon->port); in iface_allowed_v4() 290 addr.in6.sin6_port = htons(port); in create_ipv6_listener() 343 addr.in.sin_port = htons(daemon->port); in create_wildcard_listeners() 377 addr.in.sin_port = htons(TFTP_PORT); in create_wildcard_listeners() 487 iface->addr.in.sin_port = htons(TFTP_PORT); in create_bound_listener() 671 iface->addr.in.sin_port = htons(TFTP_PORT); in create_bound_listeners() 710 port = htons(daemon->min_port + (port % ((unsigned short)ports_avail))); in random_sock() 788 addr->in.sin_port == htons(0)) in allocate_sfd() 794 addr->in6.sin6_port == htons(0)) in allocate_sfd() [all …]
|
/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 …]
|
D | libip6t_MASQUERADE.c | 55 = htons(port); in parse_ports() 64 r->min_proto.tcp.port = htons(port); in parse_ports() 65 r->max_proto.tcp.port = htons(maxport); in parse_ports()
|
D | libipt_MASQUERADE.c | 56 = htons(port); in parse_ports() 65 mr->range[0].min.tcp.port = htons(port); in parse_ports() 66 mr->range[0].max.tcp.port = htons(maxport); in parse_ports()
|
D | libip6t_REDIRECT.c | 55 = htons(port); in parse_ports() 65 range->min_proto.tcp.port = htons(port); in parse_ports() 66 range->max_proto.tcp.port = htons(maxport); in parse_ports()
|
/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()
|
D | translate.c | 113 tun_header->proto = htons(proto); in fill_tun_header() 131 ip->tot_len = htons(sizeof(struct iphdr) + payload_len); in fill_ip_header() 133 ip->frag_off = htons(IP_DF); in fill_ip_header() 162 ip6->ip6_plen = htons(payload_len); in fill_ip6_header() 190 frag_hdr->ip6f_offlg = htons(frag_off << 3); in maybe_fill_frag_header() 212 ip_targ->frag_off = htons(frag_off); in parse_frag_header() 213 ip_targ->id = htons(ntohl(frag_hdr->ip6f_ident) & 0xffff); in parse_frag_header() 254 checksum = checksum + htons(20); in icmp_to_icmp6()
|
/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()
|
D | arping.c | 279 ah->ar_hrd = htons(ME->sll_hatype); in send_pack() 280 if (ah->ar_hrd == htons(ARPHRD_FDDI)) in send_pack() 281 ah->ar_hrd = htons(ARPHRD_ETHER); in send_pack() 282 ah->ar_pro = htons(ETH_P_IP); in send_pack() 285 ah->ar_op = advert ? htons(ARPOP_REPLY) : htons(ARPOP_REQUEST); in send_pack() 392 if (ah->ar_op != htons(ARPOP_REQUEST) && in recv_pack() 393 ah->ar_op != htons(ARPOP_REPLY)) in recv_pack() 397 if (ah->ar_hrd != htons(FROM->sll_hatype) && in recv_pack() 398 (FROM->sll_hatype != ARPHRD_FDDI || ah->ar_hrd != htons(ARPHRD_ETHER))) in recv_pack() 402 if (ah->ar_pro != htons(ETH_P_IP)) in recv_pack() [all …]
|
D | rarpd.c | 448 if (a->ar_op != htons(ARPOP_RREQUEST)) in serve_it() 474 if (a->ar_pro != htons(ETH_P_IP)) { in serve_it() 479 if (htons(sll.sll_hatype) != a->ar_hrd) { in serve_it() 482 if (a->ar_hrd == htons(ARPHRD_ETHER) || in serve_it() 483 a->ar_hrd == htons(ARPHRD_IEEE802)) in serve_it() 520 a->ar_op = htons(ARPOP_RREPLY); in serve_it() 638 sll.sll_protocol = htons(ETH_P_ARP); in main() 650 sll.sll_protocol = htons(ETH_P_RARP); in main()
|
/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()
|
/external/dhcpcd-6.8.2/ |
D | arp.c | 66 ar.ar_hrd = htons(ifp->family); in arp_request() 67 ar.ar_pro = htons(ETHERTYPE_IP); in arp_request() 70 ar.ar_op = htons(ARPOP_REQUEST); in arp_request() 152 if (ar.ar_hrd != htons(ifp->family)) in arp_packet() 155 if (ar.ar_pro != htons(ETHERTYPE_IP)) in arp_packet() 160 if (ar.ar_op != htons(ARPOP_REPLY) && in arp_packet() 161 ar.ar_op != htons(ARPOP_REQUEST)) in arp_packet()
|
/external/ipsec-tools/src/racoon/ |
D | isakmp_xauth.c | 159 attr->h.len = htons(tlen); 161 attr->id = htons(eay_random()); 164 typeattr->type = htons(XAUTH_TYPE | ISAKMP_GEN_TV); 165 typeattr->lorv = htons(XAUTH_TYPE_GENERIC); 168 usrattr->type = htons(XAUTH_USER_NAME | ISAKMP_GEN_TLV); 169 usrattr->lorv = htons(0); 172 pwdattr->type = htons(XAUTH_USER_PASSWORD | ISAKMP_GEN_TLV); 173 pwdattr->lorv = htons(0); 435 attr->h.len = htons(tlen); 437 attr->id = htons(id); [all …]
|
/external/ppp/pppd/plugins/pppoatm/ |
D | misc.c | 49 vs_id[5] = (htons(port) >> 8) & 255; in atm_tcpip_port_mapping() 50 vs_id[6] = htons(port) & 255; in atm_tcpip_port_mapping()
|
/external/c-ares/ |
D | ares_nowarn.h | 47 # undef htons 48 # define htons(a) aresx_htons((a)) macro
|
/external/iproute2/misc/ |
D | arpd.c | 204 dst.sin_port = htons(1025); in send_probe() 212 ah->ar_hrd = htons(ifr.ifr_hwaddr.sa_family); in send_probe() 213 ah->ar_pro = htons(ETH_P_IP); in send_probe() 216 ah->ar_op = htons(ARPOP_REQUEST); in send_probe() 227 sll.sll_protocol = htons(ETH_P_ARP); in send_probe() 509 (a->ar_op != htons(ARPOP_REQUEST) && in get_arp_pkt() 510 a->ar_op != htons(ARPOP_REPLY)) || in get_arp_pkt() 512 a->ar_pro != htons(ETH_P_IP) || in get_arp_pkt() 774 sll.sll_protocol = htons(ETH_P_ARP); in main()
|