Searched refs:ntohs (Results 1 - 25 of 71) sorted by relevance

123

/darwin-on-arm/xnu/osfmk/i386/
H A Dendian.h52 #if !defined(ntohs)
53 static __inline__ unsigned short ntohs(unsigned short);
56 ntohs(unsigned short w_int) function
66 #define htons ntohs
87 #define NTOHS(x) (x) = ntohs((unsigned short)x)
/darwin-on-arm/xnu/bsd/sys/
H A D_endian.h102 __uint16_t ntohs(__uint16_t);
111 #define ntohs(x) ((__uint16_t)(x))
126 #define ntohs(x) __DARWIN_OSSwapInt16(x)
134 #define NTOHS(x) (x) = ntohs((__uint16_t)x)
/darwin-on-arm/xnu/bsd/netinet6/
H A Dmld6.h82 #define MLD_MRC_EXP(x) ((ntohs((x)) >> 12) & 0x0007)
83 #define MLD_MRC_MANT(x) (ntohs((x)) & 0x0fff)
H A Desp_output.c480 if (esphlen < (IP_MAXPACKET - ntohs(ip->ip_len)))
481 ip->ip_len = htons(ntohs(ip->ip_len) + esphlen);
648 udp->uh_sport = ntohs((u_short)esp_udp_encap_port);
649 udp->uh_dport = ntohs(sav->remote_ike_port);
670 if (extendsiz < (IP_MAXPACKET - ntohs(ip->ip_len)))
671 ip->ip_len = htons(ntohs(ip->ip_len) + extendsiz);
784 if (siz < (IP_MAXPACKET - ntohs(ip->ip_len)))
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 Dipcomp_input.c128 cpi = ntohs(ipcomp->comp_cpi);
156 ip->ip_len = htons(ntohs(ip->ip_len) - sizeof(struct ipcomp));
185 len = ntohs(ip->ip_len);
280 cpi = ntohs(ipcomp->comp_cpi);
H A Dudp6_usrreq.c228 plen = ntohs(ip6->ip6_plen) - off + sizeof(*ip6);
230 ulen = ntohs((u_short)uh->uh_ulen);
480 buf, ntohs(uh->uh_dport),
481 ip6_sprintf(&ip6->ip6_src), ntohs(uh->uh_sport));
486 buf, ntohs(uh->uh_dport),
487 ip6_sprintf(&ip6->ip6_src), ntohs(uh->uh_sport)));
H A Dip6_fw.c308 len = ntohs(ip6->ip6_plen) + sizeof(struct ip6_hdr);
480 ntohs(tcp6->th_sport));
487 ntohs(tcp6->th_dport));
494 ntohs(udp->uh_sport));
501 ntohs(udp->uh_dport));
571 u_int16_t ignport = ntohs(*cookie);
698 src_port = ntohs(tcp6->th_sport);
699 dst_port = ntohs(tcp6->th_dport);
720 src_port = ntohs(udp->uh_sport);
721 dst_port = ntohs(ud
[all...]
H A Desp_input.c326 ip->ip_len = htons(ntohs(ip->ip_len) - siz);
424 ip->ip_len = htons(ntohs(ip->ip_len) - taillen);
447 ntohs(encap_uh->uh_sport) != sav->remote_ike_port) {
448 sav->remote_ike_port = ntohs(encap_uh->uh_sport);
618 ip->ip_len = htons(ntohs(ip->ip_len) - stripsiz);
762 if (ntohs(ip6->ip6_plen) == 0) {
874 ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - siz);
968 ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - taillen);
1147 ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - stripsiz);
H A Dah_input.c329 ip->ip_len = ntohs(ip->ip_len) - hlen;
330 ip->ip_off = ntohs(ip->ip_off);
572 ip->ip_len = htons(ntohs(ip->ip_len) - stripsiz);
658 if (ntohs(ip6->ip6_plen) == 0) {
993 ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - stripsiz);
H A Dfrag6.c239 (((ntohs(ip6->ip6_plen) - offset) & 0x7) != 0)) {
318 fragoff = ntohs(ip6f->ip6f_offlg & IP6F_OFF_MASK);
330 frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset;
H A Dah_output.c322 if (ahlen < (IP_MAXPACKET - ntohs(ip->ip_len)))
323 ip->ip_len = htons(ntohs(ip->ip_len) + ahlen);
/darwin-on-arm/xnu/bsd/netinet/
H A Dtcp_lro.h78 (((faddr) ^ ((laddr) >> 16) ^ ntohs((lport) ^ (fport))) & (mask))
H A Din_pcb.h533 (((faddr) ^ ((faddr) >> 16) ^ ntohs((lport) ^ (fport))) & (mask))
535 (ntohs((lport)) & (mask))
H A Dip_fw2.c1165 ip_off = ntohs(ip->ip_off);
1166 ip_len = ntohs(ip->ip_len);
1178 ntohs(tcp->th_sport),
1180 ntohs(tcp->th_dport));
1191 ntohs(udp->uh_sport),
1193 ntohs(udp->uh_dport));
1222 ntohs(ip->ip_id), ip_len - (ip->ip_hl << 2),
1821 ip->ip_len = ntohs(ip->ip_len);
1822 ip->ip_off = ntohs(ip->ip_off);
2021 ntohs(arg
[all...]
H A Dtcp_debug.c216 len = ntohs((u_short)len);
/darwin-on-arm/xnu/bsd/net/
H A Diso88025.h72 #define TR_RCF_RIFLEN(x) ((ntohs(x) & TR_RCF_LEN_MASK) >> 8)
H A Dpf_norm.c320 ntohs(frag->fr_id), frag));
341 ntohs(frag->fr_id), frag));
499 #define FR_IP_OFF(fr) ((ntohs((fr)->fr_ip->ip_off) & IP_OFFMASK) << 3)
509 u_int16_t off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3;
510 u_int16_t ip_len = ntohs(ip->ip_len) - ip->ip_hl * 4;
560 FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) - frep->fr_ip->ip_hl *
564 precut = FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) -
571 ip->ip_off = htons(ntohs(ip->ip_off) + (precut >> 3));
572 off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3;
583 if (aftercut < ntohs(fre
[all...]
H A Dether_if_module.c423 || ntohs(evl->evl_proto) == ETHERTYPE_VLAN
424 || EVL_VLANOFTAG(ntohs(evl->evl_tag)) != 0) {
447 if (ntohs(ether_type) <= 1500) {
H A Dether_inet_pr_module.c128 if (ntohs(ea->arp_hrd) != ARPHRD_ETHER ||
129 ntohs(ea->arp_pro) != ETHERTYPE_IP ||
159 arp_ip_handle_input(ifp, ntohs(ea->arp_op), &sender_hw, &sender_ip,
H A Dpf_osfp.c137 fp.fp_psize = ntohs(ip->ip_len);
147 fp.fp_psize = sizeof (struct ip6_hdr) + ntohs(ip6->ip6_plen);
157 fp.fp_wsize = ntohs(tcp->th_win);
223 srcname, ntohs(tcp->th_sport),
H A Dpf.c648 code = ntohs(code);
1810 b = ntohs(addr->addr16[i]);
1836 printf("[%u]", ntohs(sh->xport.call_id));
1841 printf("[%u]", ntohs(sh->xport.port));
1854 printf("[%u]", ntohs(p));
3198 if (ntohs(sxport->port) == PF_IKE_PORT) {
3610 ((ntohs(dxport->port) -
3611 ntohs(r->dst.xport.range.
4588 len = ntohs(h4->ip_len) - off;
4593 len = ntohs(h
[all...]
/darwin-on-arm/xnu/bsd/netat/
H A Dappletalk.h83 #define UAS_ASSIGN_NTOH(x,s) *(unsigned short *) &(x[0]) = ntohs((unsigned short) (s))
85 #define UAS_VALUE_NTOH(x) ntohs((*(unsigned short *) &(x[0])))
95 #define NET_VALUE(x) ntohs((*(unsigned short *) &(x[0])))
/darwin-on-arm/xnu/osfmk/kdp/
H A Dkdp_udp.h134 #define ntohs(x) OSSwapBigToHostInt16(x) macro
H A Dkdp_udp.c743 switch(ntohs(ea->arp_op)) {
787 if(ntohs(ea->arp_op) != ARPOP_REQUEST)
856 if (ntohs(eh->ether_type) == ETHERTYPE_ARP)
868 if (ntohs(eh->ether_type) != ETHERTYPE_IP) {
889 if (ntohs(ui->ui_dport) != KDP_REMOTE_PORT) {
890 if (panicd_port == (ntohs(ui->ui_dport)) &&
921 pkt.len = ntohs((u_short)ui->ui_ulen) - (unsigned int)sizeof (struct udphdr);
1634 uint16_t opcode64 = ntohs(th->th_opcode);
1649 if (ntohs(th->th_opcode) == KDP_ACK && ntohl(th->th_block) == panic_block) {
1652 if (ntohs(t
[all...]
/darwin-on-arm/xnu/bsd/net/classq/
H A Dclassq_util.c178 sum = ~ntohs(ip->ip_sum) & 0xffff;
264 sum = ~ntohs(ip->ip_sum) & 0xffff;

Completed in 191 milliseconds

123