Home
last modified time | relevance | path

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

1234567891011

/external/mtpd/
Dl2tp.c66 #define RESULT_CODE htons(1)
67 #define PROTOCOL_VERSION htons(2)
68 #define FRAMING_CAPABILITIES htons(3)
69 #define HOST_NAME htons(7)
70 #define ASSIGNED_TUNNEL htons(9)
71 #define WINDOW_SIZE htons(10)
72 #define CHALLENGE htons(11)
73 #define CHALLENGE_RESPONSE htons(13)
74 #define ASSIGNED_SESSION htons(14)
75 #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/bluetooth/hcidump/parser/
Datt.c263 uint16_t handle = btohs(htons(get_u16(frm))); in att_error_dump()
275 uint16_t client_rx_mtu = btohs(htons(get_u16(frm))); in att_mtu_req_dump()
283 uint16_t server_rx_mtu = btohs(htons(get_u16(frm))); in att_mtu_resp_dump()
291 uint16_t start = btohs(htons(get_u16(frm))); in att_find_info_req_dump()
292 uint16_t end = btohs(htons(get_u16(frm))); in att_find_info_req_dump()
308 uint16_t handle = btohs(htons(get_u16(frm))); in att_find_info_resp_dump()
309 uint16_t uuid = btohs(htons(get_u16(frm))); in att_find_info_resp_dump()
318 uint16_t handle = btohs(htons(get_u16(frm))); in att_find_info_resp_dump()
335 uint16_t start = btohs(htons(get_u16(frm))); in att_find_by_type_req_dump()
336 uint16_t end = btohs(htons(get_u16(frm))); in att_find_by_type_req_dump()
[all …]
/external/tcpdump/
Dicmp6.h373 #define NI_SUPTYPE_FLAG_COMPRESS ((u_int16_t)htons(0x1))
374 #define NI_FQDN_FLAG_VALIDTTL ((u_int16_t)htons(0x1))
377 #define NI_NODEADDR_FLAG_TRUNCATE ((u_int16_t)htons(0x1))
378 #define NI_NODEADDR_FLAG_ALL ((u_int16_t)htons(0x2))
379 #define NI_NODEADDR_FLAG_COMPAT ((u_int16_t)htons(0x4))
380 #define NI_NODEADDR_FLAG_LINKLOCAL ((u_int16_t)htons(0x8))
381 #define NI_NODEADDR_FLAG_SITELOCAL ((u_int16_t)htons(0x10))
382 #define NI_NODEADDR_FLAG_GLOBAL ((u_int16_t)htons(0x20))
383 #define NI_NODEADDR_FLAG_ANYCAST ((u_int16_t)htons(0x40)) /* just experimental. not in spec */
453 #define ICMP6_RR_RESULT_FLAGS_OOB ((u_int16_t)htons(0x0002))
[all …]
/external/qemu/slirp-android/
Dip_output.c79 ip->ip_id = htons(ip_id++); in ip_output()
98 ip->ip_len = htons((u_int16_t)ip->ip_len); in ip_output()
99 ip->ip_off = htons((u_int16_t)ip->ip_off); in ip_output()
159 mhip->ip_len = htons((u_int16_t)(len + mhlen)); in ip_output()
166 mhip->ip_off = htons((u_int16_t)mhip->ip_off); in ip_output()
179 ip->ip_len = htons((u_int16_t)m->m_len); in ip_output()
180 ip->ip_off = htons((u_int16_t)(ip->ip_off | IP_MF)); in ip_output()
/external/qemu/slirp/
Dip_output.c79 ip->ip_id = htons(ip_id++); in ip_output()
98 ip->ip_len = htons((u_int16_t)ip->ip_len); in ip_output()
99 ip->ip_off = htons((u_int16_t)ip->ip_off); in ip_output()
159 mhip->ip_len = htons((u_int16_t)(len + mhlen)); in ip_output()
166 mhip->ip_off = htons((u_int16_t)mhip->ip_off); in ip_output()
179 ip->ip_len = htons((u_int16_t)m->m_len); in ip_output()
180 ip->ip_off = htons((u_int16_t)(ip->ip_off | IP_MF)); in ip_output()
Dslirp.c626 reh->h_proto = htons(ETH_P_ARP); in arp_input()
628 rah->ar_hrd = htons(1); in arp_input()
629 rah->ar_pro = htons(ETH_P_IP); in arp_input()
632 rah->ar_op = htons(ARPOP_REPLY); in arp_input()
709 reh->h_proto = htons(ETH_P_ARP); in if_encap()
710 rah->ar_hrd = htons(1); in if_encap()
711 rah->ar_pro = htons(ETH_P_IP); in if_encap()
714 rah->ar_op = htons(ARPOP_REQUEST); in if_encap()
731 eh->h_proto = htons(ETH_P_IP); in if_encap()
768 int fport = htons(host_port); in slirp_redir_rm()
[all …]
Dtcp_subr.c73 n->ti_len = htons(sizeof (struct tcpiphdr) - sizeof (struct ip)); in tcp_template()
145 ti->ti_len = htons((u_short)(sizeof (struct tcphdr) + tlen)); in tcp_respond()
157 ti->ti_win = htons((u_int16_t) (win >> tp->rcv_scale)); in tcp_respond()
159 ti->ti_win = htons((u_int16_t)win); in tcp_respond()
811 ns->so_lport=htons(port); in tcp_emu()
816 ns->so_fport=htons(IPPORT_RESERVED-1); /* Use a fake port. */ in tcp_emu()
975 lport = htons((n5 << 8) | (n6)); in tcp_emu()
1007 lport = htons((n5 << 8) | (n6)); in tcp_emu()
1049 (so = solisten(0, so->so_laddr.s_addr, htons(lport), SS_FACCEPTONCE)) != NULL) in tcp_emu()
1064 if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL) in tcp_emu()
[all …]
/external/ppp/pppd/plugins/rp-pppoe/
Ddiscovery.c148 conn->cookie.type = htons(type); in parsePADOTags()
149 conn->cookie.length = htons(len); in parsePADOTags()
162 conn->relayId.type = htons(type); in parsePADOTags()
163 conn->relayId.length = htons(len); in parsePADOTags()
227 conn->relayId.type = htons(type); in parsePADSTags()
228 conn->relayId.length = htons(len); in parsePADSTags()
262 packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery); in sendPADI()
269 svc->length = htons(namelen); in sendPADI()
281 hostUniq.type = htons(TAG_HOST_UNIQ); in sendPADI()
282 hostUniq.length = htons(sizeof(pid)); in sendPADI()
[all …]
Dcommon.c412 packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery); in sendPADT()
426 hostUniq.type = htons(TAG_HOST_UNIQ); in sendPADT()
427 hostUniq.length = htons(sizeof(pid)); in sendPADT()
438 err.type = htons(TAG_GENERIC_ERROR); in sendPADT()
439 err.length = htons(elen); in sendPADT()
463 packet.length = htons(plen); in sendPADT()
/external/grub/netboot/
Dmain.c211 ip->len = htons (len); in udp_transmit()
220 udp->src = htons (srcsock); in udp_transmit()
221 udp->dest = htons (destsock); in udp_transmit()
222 udp->len = htons (len - sizeof (struct iphdr)); in udp_transmit()
224 udp->chksum = htons (udpchksum (ip)); in udp_transmit()
260 arpreq.hwtype = htons (1); in udp_transmit()
261 arpreq.protocol = htons (IP); in udp_transmit()
264 arpreq.opcode = htons (ARP_REQUEST); in udp_transmit()
320 tp.opcode = htons (TFTP_RRQ); in tftp()
407 tp.opcode = htons (TFTP_ERROR); in tftp()
[all …]
Dfsys_tftp.c162 tp.opcode = htons (TFTP_ERROR); in buf_fill()
213 tp.u.ack.block = htons (block = prevblock); in buf_fill()
216 tp.opcode = abort ? htons (TFTP_ERROR) : htons (TFTP_ACK); in buf_fill()
429 tp.opcode = htons (TFTP_RRQ); in tftp_dir()
/external/bluetooth/bluez/cups/
Dhcrp.c90 hdr.pid = htons(HCRP_PDU_CREDIT_GRANT); in hcrp_credit_grant()
91 hdr.tid = htons(tid); in hcrp_credit_grant()
92 hdr.plen = htons(HCRP_CREDIT_GRANT_CP_SIZE); in hcrp_credit_grant()
122 hdr.pid = htons(HCRP_PDU_CREDIT_REQUEST); in hcrp_credit_request()
123 hdr.tid = htons(tid); in hcrp_credit_request()
124 hdr.plen = htons(0); in hcrp_credit_request()
155 hdr.pid = htons(HCRP_PDU_GET_LPT_STATUS); in hcrp_get_lpt_status()
156 hdr.tid = htons(tid); in hcrp_get_lpt_status()
157 hdr.plen = htons(0); in hcrp_get_lpt_status()
/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.c221 addr.in6.sin6_port = htons(daemon->port); in iface_allowed_v6()
240 addr.in.sin_port = htons(daemon->port); in iface_allowed_v4()
277 addr.in6.sin6_port = htons(port); in create_ipv6_listener()
329 addr.in.sin_port = htons(daemon->port); in create_wildcard_listeners()
363 addr.in.sin_port = htons(TFTP_PORT); in create_wildcard_listeners()
462 iface->addr.in.sin_port = htons(TFTP_PORT); in create_bound_listeners()
501 port = htons(daemon->min_port + (port % ((unsigned short)ports_avail))); in random_sock()
576 addr->in.sin_port == htons(0)) in allocate_sfd()
582 addr->in6.sin6_port == htons(0)) in allocate_sfd()
632 addr.in.sin_port = htons(daemon->query_port); in pre_allocate_sfds()
[all …]
/external/dhcpcd/
Dlpf.c80 if ((s = socket(PF_PACKET, SOCK_DGRAM, htons(protocol))) == -1) in open_socket()
85 su.sll.sll_protocol = htons(protocol); in open_socket()
134 su.sll.sll_protocol = htons(protocol); in send_raw_packet()
139 su.sll.sll_hatype = htons(iface->family); in send_raw_packet()
Darp.c56 ar.ar_hrd = htons(iface->family); in send_arp()
57 ar.ar_pro = htons(ETHERTYPE_IP); in send_arp()
60 ar.ar_op = htons(op); in send_arp()
130 if (ar.ar_pro != htons(ETHERTYPE_IP)) in handle_arp_packet()
135 if (ar.ar_op != htons(ARPOP_REPLY) && in handle_arp_packet()
136 ar.ar_op != htons(ARPOP_REQUEST)) in handle_arp_packet()
/external/quake/quake/src/WinQuake/
Dnet_mp.cpp104 ((struct sockaddr_in *)&broadcastaddr)->sin_port = htons(net_hostport); in MPATH_Init()
163 address.sin_port = htons(port); in MPATH_OpenSocket()
236 ((struct sockaddr_in *)hostaddr)->sin_port = htons((short)port); in PartialIPAddress()
356 ((struct sockaddr_in *)addr)->sin_port = htons(hp); in MPATH_StringToAddr()
407 ((struct sockaddr_in *)addr)->sin_port = htons(net_hostport); in MPATH_GetAddrFromName()
439 ((struct sockaddr_in *)addr)->sin_port = htons(port); in MPATH_SetSocketPort()
Dnet_udp.cpp180 temp.sin_port = htons(net_hostport); in UDP_Init()
244 address.in.sin_port = htons(port); in UDP_OpenSocket()
317 ((struct sockaddr_in *)hostaddr)->sin_port = htons((short)port); in PartialIPAddress()
429 ((struct sockaddr_in *)addr)->sin_port = htons(hp); in UDP_StringToAddr()
480 ((struct sockaddr_in *)addr)->sin_port = htons(net_hostport); in UDP_GetAddrFromName()
512 ((struct sockaddr_in *)addr)->sin_port = htons(port); in UDP_SetSocketPort()
/external/kernel-headers/original/linux/byteorder/
Dgeneric.h148 #undef htons
157 extern __be16 htons(__u16);
168 #define htons(x) ___htons(x) macro
/external/webkit/Source/WebCore/platform/graphics/
DWOFFFileFormat.cpp41 #define htons(x) std_htons(x) macro
49 #define htons(x) ((uint16_t)(x)) macro
54 #define htons(x) ((uint16_t)(x)) macro
59 #define htons(x) ntohs(x) macro
100 uint16_t bigEndianValue = htons(value); in writeUInt16()
/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/kernel-headers/original/linux/
Dif_vlan.h222 veth->h_vlan_proto = htons(ETH_P_8021Q); in __vlan_put_tag()
225 veth->h_vlan_TCI = htons(vlan_tci); in __vlan_put_tag()
227 skb->protocol = htons(ETH_P_8021Q); in __vlan_put_tag()
276 if (veth->h_vlan_proto != htons(ETH_P_8021Q)) { in __vlan_get_tag()
/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);
432 attr->h.len = htons(tlen);
434 attr->id = htons(id);
[all …]
/external/libpcap/
Dpcap-linux.c601 hdrp->sll_pkttype = htons(LINUX_SLL_HOST); in pcap_read_packet()
605 hdrp->sll_pkttype = htons(LINUX_SLL_BROADCAST); in pcap_read_packet()
609 hdrp->sll_pkttype = htons(LINUX_SLL_MULTICAST); in pcap_read_packet()
613 hdrp->sll_pkttype = htons(LINUX_SLL_OTHERHOST); in pcap_read_packet()
617 hdrp->sll_pkttype = htons(LINUX_SLL_OUTGOING); in pcap_read_packet()
625 hdrp->sll_hatype = htons(from.sll_hatype); in pcap_read_packet()
626 hdrp->sll_halen = htons(from.sll_halen); in pcap_read_packet()
1406 socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)) in live_open_new()
1407 : socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_ALL)); in live_open_new()
1474 htons(ETH_P_ALL)); in live_open_new()
[all …]

1234567891011