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

123

/xnu-2422.115.4/osfmk/i386/
H A Dendian.h52 #if !defined(ntohs)
53 static __inline__ unsigned short ntohs(unsigned short);
56 ntohs(unsigned short w_int) function
64 #define htons ntohs
89 #define NTOHS(x) (x) = ntohs((unsigned short)x)
/xnu-2422.115.4/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)
/xnu-2422.115.4/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 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.c325 ip->ip_len = htons(ntohs(ip->ip_len) - siz);
423 ip->ip_len = htons(ntohs(ip->ip_len) - taillen);
446 ntohs(encap_uh->uh_sport) != sav->remote_ike_port) {
447 sav->remote_ike_port = ntohs(encap_uh->uh_sport);
617 ip->ip_len = htons(ntohs(ip->ip_len) - stripsiz);
763 if (ntohs(ip6->ip6_plen) == 0) {
876 ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - siz);
970 ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - taillen);
1149 ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - stripsiz);
H A Dudp6_usrreq.c266 plen = ntohs(ip6->ip6_plen) - off + sizeof (*ip6);
268 ulen = ntohs((u_short)uh->uh_ulen);
493 ntohs(uh->uh_dport),
495 ntohs(uh->uh_sport));
500 ntohs(uh->uh_dport),
502 ntohs(uh->uh_sport)));
H A Dah_input.c328 ip->ip_len = ntohs(ip->ip_len) - hlen;
329 ip->ip_off = ntohs(ip->ip_off);
571 ip->ip_len = htons(ntohs(ip->ip_len) - stripsiz);
659 if (ntohs(ip6->ip6_plen) == 0) {
995 ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - stripsiz);
H A Dah_output.c322 if (ahlen < (IP_MAXPACKET - ntohs(ip->ip_len)))
323 ip->ip_len = htons(ntohs(ip->ip_len) + ahlen);
H A Dscope6.c284 zoneid = ntohs(sin6->sin6_addr.s6_addr16[1]);
/xnu-2422.115.4/bsd/netinet/
H A Dtcp_lro.h78 (((faddr) ^ ((laddr) >> 16) ^ ntohs((lport) ^ (fport))) & (mask))
H A Dip_fw2.c1244 ip_off = ntohs(ip->ip_off);
1245 ip_len = ntohs(ip->ip_len);
1257 ntohs(tcp->th_sport),
1259 ntohs(tcp->th_dport));
1270 ntohs(udp->uh_sport),
1272 ntohs(udp->uh_dport));
1301 ntohs(ip->ip_id), ip_len - (ip->ip_hl << 2),
1901 ip->ip_len = ntohs(ip->ip_len);
1902 ip->ip_off = ntohs(ip->ip_off);
2100 ntohs(arg
[all...]
H A Dtcp_debug.c216 len = ntohs((u_short)len);
H A Dudp_usrreq.c356 len = ntohs((u_short)uh->uh_ulen);
590 uh->uh_dport == ntohs((u_short)esp_udp_encap_port)) {
647 ntohs(uh->uh_dport), inet_ntop(AF_INET,
649 ntohs(uh->uh_sport));
656 ntohs(uh->uh_dport), inet_ntop(AF_INET,
658 ntohs(uh->uh_sport)))
/xnu-2422.115.4/osfmk/kdp/
H A Dkdp_udp.h60 #define ntohs(x) OSSwapBigToHostInt16(x) macro
H A Dkdp_udp.c855 switch(ntohs(ea->arp_op)) {
899 if(ntohs(ea->arp_op) != ARPOP_REQUEST)
968 if (ntohs(eh->ether_type) == ETHERTYPE_ARP)
980 if (ntohs(eh->ether_type) != ETHERTYPE_IP) {
1001 if (ntohs(ui->ui_dport) != KDP_REMOTE_PORT) {
1002 if (panicd_port == (ntohs(ui->ui_dport)) &&
1033 pkt.len = ntohs((u_short)ui->ui_ulen) - (unsigned int)sizeof (struct kdp_udphdr);
1736 uint16_t opcode64 = ntohs(th->th_opcode);
1751 if (ntohs(th->th_opcode) == KDP_ACK && ntohl(th->th_block) == panic_block) {
1754 if (ntohs(t
[all...]
/xnu-2422.115.4/bsd/dev/dtrace/scripts/
H A Dip.d53 dport = (P != NULL) ? ntohs(P->inp_fport) : 0;
54 sport = (P != NULL) ? ntohs(P->inp_lport) : 0;
81 (ntohs(ip->ip_len) - (((*(uint8_t *) ip) & 0x0f) << 2)) : 0;
89 ip_plength = (ip6 != NULL) ? (ntohs(ip6->ip6_ctlun.ip6_un1.ip6_un1_plen)) : 0;
103 ntohs(((struct ip *)i)->ip_len) -
106 ntohs(((struct ip6_hdr *)i)->ip6_ctlun.ip6_un1.ip6_un1_plen) : 0)) : 0;
162 ipv4_length = (ip != NULL) ? ntohs(ip->ip_len) : 0;
164 ipv4_flags = (ip != NULL) ? (ntohs(ip->ip_off) & 0xe000) : 0;
165 ipv4_offset = (ip != NULL) ? (ntohs(ip->ip_off) & 0x1fff) : 0;
178 ipv4_checksum = (ip != NULL) ? ntohs(i
[all...]
H A Dtcp.d131 tcp_sport = ntohs(T->th_sport);
132 tcp_dport = ntohs(T->th_dport);
137 tcp_window = ntohs(T->th_win);
138 tcp_checksum = ntohs(T->th_sum);
139 tcp_urgent = ntohs(T->th_urp);
/xnu-2422.115.4/bsd/net/
H A Dpf_norm.c320 ntohs(frag->fr_id),
343 ntohs(frag->fr_id),
503 #define FR_IP_OFF(fr) ((ntohs((fr)->fr_ip->ip_off) & IP_OFFMASK) << 3)
513 u_int16_t off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3;
514 u_int16_t ip_len = ntohs(ip->ip_len) - ip->ip_hl * 4;
564 FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) - frep->fr_ip->ip_hl *
568 precut = FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) -
575 ip->ip_off = htons(ntohs(ip->ip_off) + (precut >> 3));
576 off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3;
587 if (aftercut < ntohs(fre
[all...]
H A Dether_if_module.c401 ntohs(evl->evl_proto) == ETHERTYPE_VLAN ||
402 EVL_VLANOFTAG(ntohs(evl->evl_tag)) != 0) {
425 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.c661 code = ntohs(code);
1830 b = ntohs(addr->addr16[i]);
1856 printf("[%u]", ntohs(sh->xport.call_id));
1861 printf("[%u]", ntohs(sh->xport.port));
1874 printf("[%u]", ntohs(p));
3237 if (ntohs(sxport->port) == PF_IKE_PORT) {
3655 ((ntohs(dxport->port) -
3656 ntohs(r->dst.xport.range.
4634 len = ntohs(h4->ip_len) - off;
4639 len = ntohs(h
[all...]
/xnu-2422.115.4/bsd/net/classq/
H A Dclassq_util.c179 sum = ~ntohs(ip->ip_sum) & 0xffff;
265 sum = ~ntohs(ip->ip_sum) & 0xffff;

Completed in 109 milliseconds

123