Home
last modified time | relevance | path

Searched refs:htons (Results 1 – 25 of 266) sorted by relevance

1234567891011

/external/mtpd/
Dl2tp.c67 #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 …]
Dpptp.c62 #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/
Ddiscovery.c161 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 …]
Dpppoe-discovery.c124 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 …]
Dcommon.c112 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/
Darping.c104 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 …]
Ddhcp6.c178 *((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/
Dbpf.c188 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()
Dnetwork.c226 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/
Dlibxt_HMARK.c225 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 …]
Dlibip6t_MASQUERADE.c55 = 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()
Dlibipt_MASQUERADE.c56 = 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()
Dlibip6t_REDIRECT.c55 = 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/
Dtipc_config.h282 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/
Dclatd_microbenchmark.c88 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()
Dtranslate.c113 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/
Dtftpd.c366 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()
Darping.c279 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 …]
Drarpd.c448 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/
Df_flower.c69 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/
Darp.c66 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/
Disakmp_xauth.c159 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/
Dmisc.c49 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/
Dares_nowarn.h47 # undef htons
48 # define htons(a) aresx_htons((a)) macro
/external/iproute2/misc/
Darpd.c204 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()

1234567891011