Lines Matching refs:ntohs

320 			  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(frea->fr_ip->ip_len) - frea->fr_ip->ip_hl
586 htons(ntohs(frea->fr_ip->ip_len) - aftercut);
587 frea->fr_ip->ip_off = htons(ntohs(frea->fr_ip->ip_off) +
623 off += ntohs(frep->fr_ip->ip_len) - frep->fr_ip->ip_hl * 4;
685 DPFPRINTF(("complete: %p(%d)\n", m, ntohs(ip->ip_len)));
702 int ip_len = ntohs(h->ip_len) - (h->ip_hl << 2);
703 u_int16_t off = ntohs(h->ip_off) << 3;
826 ntohs(h->ip_len) - precut);
827 h->ip_off = htons(ntohs(h->ip_off) +
829 h->ip_len = htons(ntohs(h->ip_len) - precut);
883 ntohs(h->ip_len) - aftercut);
884 h->ip_len = htons(ntohs(h->ip_len) - aftercut);
997 (ntohs((fr)->fr_ip6f_opt.ip6f_offlg & IP6F_OFF_MASK))
998 #define FR_IP6_PLEN(fr) (ntohs((fr)->fr_ip6->ip6_plen))
1076 htons(ntohs(frent->fr_ip6f_opt.ip6f_offlg) +
1092 htons(ntohs(frea->fr_ip6f_opt.ip6f_offlg) +
1189 m, ntohs(ip6->ip6_plen), m->m_pkthdr.len));
1212 off = ntohs(fh->ip6f_offlg & IP6F_OFF_MASK);
1213 plen = ntohs(h->ip6_plen) - (hlen - sizeof *h);
1352 ntohs(h->ip6_plen) - precut);
1355 htons(ntohs(fh->ip6f_offlg & IP6F_OFF_MASK)
1357 h->ip6_plen = htons(ntohs(h->ip6_plen) -
1413 ntohs(h->ip6_plen) - aftercut);
1415 htons(ntohs(h->ip6_plen) - aftercut);
1534 int mff = (ntohs(h->ip_off) & IP_MF);
1536 u_int16_t fragoff = (ntohs(h->ip_off) & IP_OFFMASK) << 3;
1585 if (hlen > ntohs(h->ip_len))
1610 ip_len = ntohs(h->ip_len) - hlen;
1611 ip_off = (ntohs(h->ip_off) & IP_OFFMASK) << 3;
1646 DPFPRINTF(("reass IPv4 frag %d @ %d-%d\n", ntohs(h->ip_id),
1953 if (ntohs(h->ip6_plen) == 0)
1956 plen = ntohs(h->ip6_plen);
1969 if (ntohs(h->ip6_plen) == 0 || jumbolen)
1971 plen = ntohs(h->ip6_plen);
1975 fragoff = ntohs(frag.ip6f_offlg & IP6F_OFF_MASK);
1977 mff = ntohs(frag.ip6f_offlg & IP6F_MORE_FRAG);
2764 if ((ntohs(*mss)) > r->max_mss) {