Searched refs:htons (Results 1 - 25 of 79) sorted by relevance

1234

/darwin-on-arm/xnu/osfmk/i386/
H A Dendian.h64 #if !defined(htons)
65 unsigned short htons(unsigned short);
66 #define htons ntohs macro
89 #define HTONS(x) (x) = htons((unsigned short)x)
/darwin-on-arm/xnu/bsd/sys/
H A D_endian.h103 __uint16_t htons(__uint16_t);
113 #define htons(x) ((__uint16_t)(x))
127 #define htons(x) __DARWIN_OSSwapInt16(x)
136 #define HTONS(x) (x) = htons((__uint16_t)x)
/darwin-on-arm/xnu/bsd/netat/
H A Dddp_sip.c141 *(u_short *)resp = htons(SIP_DRIVER_VERSION);
145 ubytes.responder_version = htons(SIP_RESPONDER_VERSION);
162 *(u_short *)resp = htons(SIP_DRIVER_VERSION);
166 ubytes.responder_version = htons(SIP_RESPONDER_VERSION);
172 ubytes.responder_version = htons(SIP_RESPONDER_VERSION);
H A Dappletalk.h82 #define UAS_ASSIGN_HTON(x,s) *(unsigned short *) &(x[0]) = htons((unsigned short) (s))
84 #define UAS_VALUE_HTON(x) htons((*(unsigned short *) &(x[0])))
92 #define NET_ASSIGN(x,s) *(unsigned short *)&(x[0]) = htons((unsigned short)(s))
H A Dddp_aarp.c555 new_pkt->aarp_cmd = htons(AARP_RESP_CMD);
597 pkt->aarp_cmd = htons(AARP_REQ_CMD);
640 pkt->aarp_cmd = htons(AARP_PROBE_CMD);
781 pkt->hardware_type = htons(AARP_ETHER_HW_TYPE);
782 pkt->stack_type = htons(AARP_AT_PROTO);
H A Daurp_aurpd.c333 sin.sin_addr.s_addr = htons(aurp_global.src_addr);
334 sin.sin_port = htons(aurp_global.udp_port);
/darwin-on-arm/xnu/bsd/net/
H A Dether_inet_pr_module.c194 if (eh->ether_type == htons(ETHERTYPE_IP)) {
210 if (eh->ether_type == htons(ETHERTYPE_ARP))
253 u_int16_t ethertype_ip = htons(ETHERTYPE_IP);
444 eh->ether_type = htons(ETHERTYPE_ARP);
451 ea->arp_pro = htons(ETHERTYPE_IP);
454 ea->arp_hrd = htons(ARPHRD_ETHER);
455 ea->arp_op = htons(arpop);
537 u_short en_native = htons(ETHERTYPE_IP);
538 u_short arp_native = htons(ETHERTYPE_ARP);
H A Dether_inet6_pr_module.c119 if (ether_type == htons(ETHERTYPE_IPV6)) {
165 u_int16_t ethertype_ipv6 = htons(ETHERTYPE_IPV6);
246 u_short en_6native = htons(ETHERTYPE_IPV6);
H A Dpf_norm.c571 ip->ip_off = htons(ntohs(ip->ip_off) + (precut >> 3));
574 ip->ip_len = htons(ip_len);
586 htons(ntohs(frea->fr_ip->ip_len) - aftercut);
587 frea->fr_ip->ip_off = htons(ntohs(frea->fr_ip->ip_off) +
672 ip->ip_len = htons(off + hlen);
827 h->ip_off = htons(ntohs(h->ip_off) +
829 h->ip_len = htons(ntohs(h->ip_len) - precut);
884 h->ip_len = htons(ntohs(h->ip_len) - aftercut);
1076 htons(ntohs(frent->fr_ip6f_opt.ip6f_offlg) +
1080 ip6->ip6_plen = htons(ple
[all...]
H A Dether_at_pr_module.c167 *(u_short *)type = htons(m->m_pkthdr.len);
/darwin-on-arm/xnu/tools/tests/libMicro/
H A Dgetsockname.c91 adds.sin_port = htons(j++);
H A Dlisten.c94 adds.sin_port = htons(j++);
H A Dgetpeername.c96 adds.sin_port = htons(j++);
H A Dbind.c129 ts->ts_adds[i].sin_port = (optz ? 0 : htons(j++));
H A Dclose_tcp.c129 ts->ts_adds[i].sin_port = htons(j++);
/darwin-on-arm/xnu/osfmk/kdp/
H A Dkdp_udp.c494 ui->ui_len = htons((u_short)pkt.len + sizeof (struct udphdr));
498 ui->ui_sport = htons(KDP_REMOTE_PORT);
508 ip->ip_len = htons(sizeof (struct udpiphdr) + pkt.len);
510 ip->ip_id = htons(ip_id++);
514 ip->ip_sum = htons(~ip_sum((unsigned char *)ip, ip->ip_hl));
527 eh->ether_type = htons(ETHERTYPE_IP);
565 ui->ui_len = htons((u_short)pkt.len + sizeof (struct udphdr));
568 ui->ui_sport = htons(KDP_REMOTE_PORT);
578 ip->ip_len = htons(sizeof (struct udpiphdr) + pkt.len);
580 ip->ip_id = htons(ip_i
[all...]
H A Dkdp_udp.h136 #define htons(x) OSSwapHostToBigInt16(x) macro
/darwin-on-arm/xnu/bsd/netinet6/
H A Dah_output.c284 ahdr->ah_reserve = htons(0);
294 ahdr->ah_reserve = htons(0);
323 ip->ip_len = htons(ntohs(ip->ip_len) + ahlen);
461 ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr));
493 ahdr->ah_reserve = htons(0);
504 ahdr->ah_reserve = htons(0);
H A Desp_output.c421 if (sav->remote_ike_port == htons(udp->uh_dport)) {
481 ip->ip_len = htons(ntohs(ip->ip_len) + esphlen);
671 ip->ip_len = htons(ntohs(ip->ip_len) + extendsiz);
785 ip->ip_len = htons(ntohs(ip->ip_len) + siz);
807 udp->uh_ulen = htons(ntohs(ip->ip_len) - (IP_VHL_HL(ip->ip_vhl) << 2));
H A Droute6.c264 ip6->ip6_dst.s6_addr16[1] = htons(m->m_pkthdr.rcvif->if_index);
/darwin-on-arm/xnu/tools/tests/libMicro/apple/
H A Dlmbench_select_tcp.c295 s.sin_port = htons(-prog);
357 sin.sin_port = htons(port);
396 s.sin_port = htons(save_port);
398 s.sin_port = htons(-prog);
/darwin-on-arm/xnu/bsd/netinet/
H A Din_dhcp.c191 pkt->ip.ip_len = htons(pkt_size);
193 pkt->udp.uh_sport = htons(IPPORT_BOOTPC);
194 pkt->udp.uh_dport = htons(IPPORT_BOOTPS);
196 pkt->udp.uh_ulen = htons(pkt_size - sizeof(pkt->ip));
309 dest.sin_port = htons(IPPORT_BOOTPS);
536 = htons((u_short)
542 request->ip.ip_id = htons(ip_id++);
737 = htons((u_short)(current_time.tv_sec
743 request->ip.ip_id = htons(ip_id++);
887 sin.sin_port = htons(IPPORT_BOOTP
[all...]
H A Dip_id.c195 return htons(ip_id++);
/darwin-on-arm/xnu/bsd/net/classq/
H A Dclassq_util.c183 ip->ip_sum = htons(~sum & 0xffff);
268 ip->ip_sum = htons(~sum & 0xffff);
/darwin-on-arm/xnu/bsd/nfs/
H A Dkrpc_subr.c169 *portp = htons(PMAPPORT);
186 sin->sin_port = htons(PMAPPORT);
277 sin->sin_port = htons(tport);

Completed in 151 milliseconds

1234