ntohs 459 altq/altq_red.c sum = ~ntohs(ip->ip_sum) & 0xffff; ntohs 694 altq/altq_subr.c sum = ~ntohs(ip->ip_sum) & 0xffff; ntohs 967 dev/ic/am7990.c ntohs(eh.ether_type)); ntohs 994 dev/ic/am7990.c ntohs(eh.ether_type)); ntohs 1218 dev/ic/an.c ntohs(len) + sizeof(struct ieee80211_frame), ntohs 780 dev/ic/hme.c if (ntohs(ip->ip_len) < hlen) ntohs 782 dev/ic/hme.c if (ntohs(ip->ip_len) != pktlen) ntohs 815 dev/ic/hme.c ph.h.len = htons(ntohs(ip->ip_len) - hlen); ntohs 977 dev/ic/pgt.c ntohs(pra->pra_ether_type))); ntohs 763 dev/ic/re.c ntohs(eh->ether_type) != ETHERTYPE_IP) { ntohs 772 dev/ic/re.c ntohs(eh->ether_type)); ntohs 551 dev/ic/xl.c *ptr = ntohs(word); ntohs 231 dev/pci/if_lge.c *ptr = ntohs(word); ntohs 342 dev/pci/if_nge.c *ptr = ntohs(word); ntohs 311 dev/pci/if_sis.c *ptr = ntohs(word); ntohs 1862 dev/pci/if_sk.c if (hlen > ntohs(ip->ip_len)) ntohs 1866 dev/pci/if_sk.c if (plen != ntohs(ip->ip_len)) ntohs 1901 dev/pci/if_sk.c htonl(ntohs(ip->ip_len) - hlen + ip->ip_p) + ipd_csum); ntohs 497 dev/pci/if_ste.c *ptr = ntohs(word); ntohs 2133 dev/pci/if_tl.c *p = ntohs(*p); ntohs 247 dev/pci/if_vge.c *ptr = ntohs(word); ntohs 282 dev/pci/if_wb.c *ptr = ntohs(word); ntohs 1233 dev/pcmcia/if_ray.c et = ntohs(eh->ether_type); ntohs 180 lib/libsa/bootparam.c inet_ntoa(bp_server_addr), ntohs(bp_server_port))); ntohs 184 lib/libsa/bootparam.c (int)ntohs(bp_server_port)); ntohs 127 lib/libsa/ether.c *etype = ntohs(eh->ether_type); ntohs 76 lib/libsa/net.c inet_ntoa(d->myip), ntohs(d->myport)); ntohs 78 lib/libsa/net.c inet_ntoa(d->destip), ntohs(d->destport)); ntohs 218 lib/libsa/net.c d->myport, ntohs(uh->uh_dport)); ntohs 224 lib/libsa/net.c n = ntohs(uh->uh_ulen) + sizeof(*ip); ntohs 195 lib/libsa/rarp.c printf("bad op=0x%x\n", ntohs(ap->arp_op)); ntohs 115 lib/libsa/tftp.c switch (ntohs(t->th_opcode)) { ntohs 133 lib/libsa/tftp.c if ((unsigned) ntohs(t->th_code) >= 8) { ntohs 134 lib/libsa/tftp.c printf("illegal tftp error %d\n", ntohs(t->th_code)); ntohs 138 lib/libsa/tftp.c printf("tftp-error %d\n", ntohs(t->th_code)); ntohs 140 lib/libsa/tftp.c errno = tftperrors[ntohs(t->th_code)]; ntohs 145 lib/libsa/tftp.c printf("tftp type %d not handled\n", ntohs(t->th_opcode)); ntohs 54 net/bpf_filter.c #define EXTRACT_SHORT(p) ((u_int16_t)ntohs(*(u_int16_t *)p)) ntohs 417 net/bridgestp.c (((u_int64_t)ntohs(cpdu->cbu_rootpri)) << 48) | ntohs 426 net/bridgestp.c (((u_int64_t)ntohs(cpdu->cbu_bridgepri)) << 48) | ntohs 435 net/bridgestp.c cu->cu_message_age = ntohs(cpdu->cbu_messageage); ntohs 436 net/bridgestp.c cu->cu_max_age = ntohs(cpdu->cbu_maxage); ntohs 437 net/bridgestp.c cu->cu_hello_time = ntohs(cpdu->cbu_hellotime); ntohs 438 net/bridgestp.c cu->cu_forward_delay = ntohs(cpdu->cbu_forwarddelay); ntohs 439 net/bridgestp.c cu->cu_pv.pv_dport_id = ntohs(cpdu->cbu_portid); ntohs 605 net/bridgestp.c len = ntohs(eh->ether_type); ntohs 2087 net/if_bridge.c etype = ntohs(eh->ether_type); ntohs 2106 net/if_bridge.c etype = ntohs(llc.llc_snap.ether_type); ntohs 2390 net/if_bridge.c tdb->tdb_mtu && ntohs(ip->ip_len) > tdb->tdb_mtu && ntohs 2423 net/if_bridge.c etype = ntohs(eh->ether_type); ntohs 2442 net/if_bridge.c etype = ntohs(llc.llc_snap.ether_type); ntohs 2490 net/if_bridge.c if (ntohs(ip->ip_len) < hlen) ntohs 2493 net/if_bridge.c if (m->m_pkthdr.len < ntohs(ip->ip_len)) ntohs 2495 net/if_bridge.c if (m->m_pkthdr.len > ntohs(ip->ip_len)) { ntohs 2497 net/if_bridge.c m->m_len = ntohs(ip->ip_len); ntohs 2498 net/if_bridge.c m->m_pkthdr.len = ntohs(ip->ip_len); ntohs 2500 net/if_bridge.c m_adj(m, ntohs(ip->ip_len) - m->m_pkthdr.len); ntohs 2610 net/if_bridge.c etype = ntohs(eh->ether_type); ntohs 2769 net/if_bridge.c icp->icmp_cksum = in_cksum(m, ntohs(ip->ip_len) - hlen); ntohs 528 net/if_ethersubr.c etype = ntohs(eh->ether_type); ntohs 696 net/if_ethersubr.c ntohs(l->llc_snap.ether_type) == ETHERTYPE_AT) { ntohs 707 net/if_ethersubr.c ntohs(l->llc_snap.ether_type) == ETHERTYPE_AARP) { ntohs 408 net/if_fddisubr.c etype = ntohs(l->llc_snap.ether_type); ntohs 334 net/if_gre.c inp->ip_len = htons(ntohs(inp->ip_len) + msiz); ntohs 220 net/if_pfsync.h (d)->max_win = ntohs((s)->max_win); \ ntohs 221 net/if_pfsync.h (d)->mss = ntohs((s)->mss); \ ntohs 227 net/if_pfsync.h ntohs((s)->scrub.pfss_flags) & PFSS_TIMESTAMP; \ ntohs 449 net/if_pppoe.c session = ntohs(ph->session); ntohs 450 net/if_pppoe.c plen = ntohs(ph->plen); ntohs 472 net/if_pppoe.c tag = ntohs(pt->tag); ntohs 473 net/if_pppoe.c len = ntohs(pt->len); ntohs 765 net/if_pppoe.c session = ntohs(ph->session); ntohs 776 net/if_pppoe.c plen = ntohs(ph->plen); ntohs 506 net/if_spppsubr.c h->address, h->control, ntohs(h->protocol)); ntohs 509 net/if_spppsubr.c switch (ntohs (h->protocol)) { ntohs 519 net/if_spppsubr.c h->address, h->control, ntohs(h->protocol)); ntohs 561 net/if_spppsubr.c h->address, h->control, ntohs(h->protocol)); ntohs 564 net/if_spppsubr.c switch (ntohs (h->protocol)) { ntohs 587 net/if_spppsubr.c h->address, h->control, ntohs(h->protocol)); ntohs 690 net/if_spppsubr.c (th && (INTERACTIVE(ntohs(th->th_sport)) || ntohs 691 net/if_spppsubr.c INTERACTIVE(ntohs(th->th_dport)))))) ntohs 1219 net/if_spppsubr.c ntohs (lh->len)); ntohs 1264 net/if_spppsubr.c sppp_cp_type_name (h->type), h->ident, ntohs (h->len)); ntohs 1269 net/if_spppsubr.c if (len > ntohs (h->len)) ntohs 1270 net/if_spppsubr.c len = ntohs (h->len); ntohs 1495 net/if_spppsubr.c sppp_cp_type_name(h->type), ntohs(*((u_short *)p))); ntohs 3082 net/if_spppsubr.c if (len > ntohs (h->len)) ntohs 3083 net/if_spppsubr.c len = ntohs (h->len); ntohs 3099 net/if_spppsubr.c h->ident, ntohs(h->len)); ntohs 3112 net/if_spppsubr.c ntohs(h->len)); ntohs 3191 net/if_spppsubr.c h->ident, ntohs(h->len)); ntohs 3223 net/if_spppsubr.c h->ident, ntohs (h->len)); ntohs 3277 net/if_spppsubr.c h->type, h->ident, ntohs(h->len)); ntohs 3491 net/if_spppsubr.c if (len > ntohs (h->len)) ntohs 3492 net/if_spppsubr.c len = ntohs (h->len); ntohs 3506 net/if_spppsubr.c h->ident, ntohs(h->len)); ntohs 3519 net/if_spppsubr.c h->ident, ntohs(h->len)); ntohs 3606 net/if_spppsubr.c h->type, h->ident, ntohs(h->len)); ntohs 3845 net/if_spppsubr.c lh->ident, ntohs(lh->len)); ntohs 959 net/if_trunk.c etype = ntohs(eh->ether_type); ntohs 969 net/if_trunk.c etype = ntohs(vlan[1]); ntohs 287 net/if_vlan.c tag = EVL_VLANOFTAG(ntohs(*mtod(m, u_int16_t *))); ntohs 1125 net/pf.c p = ntohs(p); ntohs 1163 net/pf.c b = ntohs(addr->addr16[i]); ntohs 1170 net/pf.c p = ntohs(p); ntohs 2538 net/pf.c tmp_nport = ((ntohs(dport) - ntohs 2539 net/pf.c ntohs(r->dst.port[0])) % ntohs 3209 net/pf.c ntohs(h->ip_len) - off, IPPROTO_TCP, AF_INET)) ntohs 3318 net/pf.c s->src.max_win = MAX(ntohs(th->th_win), 1); ntohs 3581 net/pf.c u_int16_t win = ntohs(th->th_win); ntohs 3658 net/pf.c (*state)->src.max_win = MAX(ntohs(th->th_win), 1); ntohs 3673 net/pf.c (*state)->dst.max_win = MAX(ntohs(th->th_win), 1); ntohs 4776 net/pf.c u_int16_t fragoff = (ntohs(h->ip_off) & IP_OFFMASK) << 3; ntohs 4788 net/pf.c ntohs(h->ip_len) < off + len) { ntohs 4801 net/pf.c (ntohs(h->ip6_plen) + sizeof(struct ip6_hdr)) < ntohs 5068 net/pf.c if (ntohs(ip->ip_len) <= ifp->if_mtu) { ntohs 5412 net/pf.c pd.tot_len = ntohs(h->ip_len); ntohs 5464 net/pf.c ntohs(uh.uh_ulen) > m->m_pkthdr.len - off || ntohs 5465 net/pf.c ntohs(uh.uh_ulen) < sizeof(struct udphdr)) { ntohs 5724 net/pf.c pd.tot_len = ntohs(h->ip6_plen) + sizeof(struct ip6_hdr); ntohs 5839 net/pf.c ntohs(uh.uh_ulen) > m->m_pkthdr.len - off || ntohs 5840 net/pf.c ntohs(uh.uh_ulen) < sizeof(struct udphdr)) { ntohs 319 net/pf_norm.c #define FR_IP_OFF(fr) ((ntohs((fr)->fr_ip->ip_off) & IP_OFFMASK) << 3) ntohs 329 net/pf_norm.c u_int16_t off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3; ntohs 330 net/pf_norm.c u_int16_t ip_len = ntohs(ip->ip_len) - ip->ip_hl * 4; ntohs 379 net/pf_norm.c FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) - frep->fr_ip->ip_hl * ntohs 384 net/pf_norm.c precut = FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) - ntohs 391 net/pf_norm.c ip->ip_off = htons(ntohs(ip->ip_off) + (precut >> 3)); ntohs 392 net/pf_norm.c off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3; ntohs 404 net/pf_norm.c if (aftercut < ntohs(frea->fr_ip->ip_len) - frea->fr_ip->ip_hl ntohs 408 net/pf_norm.c htons(ntohs(frea->fr_ip->ip_len) - aftercut); ntohs 409 net/pf_norm.c frea->fr_ip->ip_off = htons(ntohs(frea->fr_ip->ip_off) + ntohs 445 net/pf_norm.c off += ntohs(frep->fr_ip->ip_len) - frep->fr_ip->ip_hl * 4; ntohs 508 net/pf_norm.c DPFPRINTF(("complete: %p(%d)\n", m, ntohs(ip->ip_len))); ntohs 525 net/pf_norm.c int ip_len = ntohs(h->ip_len) - (h->ip_hl << 2); ntohs 526 net/pf_norm.c u_int16_t off = ntohs(h->ip_off) << 3; ntohs 645 net/pf_norm.c ntohs(h->ip_len) - precut); ntohs 646 net/pf_norm.c h->ip_off = htons(ntohs(h->ip_off) + ntohs 648 net/pf_norm.c h->ip_len = htons(ntohs(h->ip_len) - precut); ntohs 702 net/pf_norm.c ntohs(h->ip_len) - aftercut); ntohs 703 net/pf_norm.c h->ip_len = htons(ntohs(h->ip_len) - aftercut); ntohs 824 net/pf_norm.c int mff = (ntohs(h->ip_off) & IP_MF); ntohs 826 net/pf_norm.c u_int16_t fragoff = (ntohs(h->ip_off) & IP_OFFMASK) << 3; ntohs 865 net/pf_norm.c if (hlen > ntohs(h->ip_len)) ntohs 889 net/pf_norm.c ip_len = ntohs(h->ip_len) - hlen; ntohs 890 net/pf_norm.c ip_off = (ntohs(h->ip_off) & IP_OFFMASK) << 3; ntohs 1170 net/pf_norm.c if (ntohs(h->ip6_plen) == 0) ntohs 1173 net/pf_norm.c plen = ntohs(h->ip6_plen); ntohs 1186 net/pf_norm.c if (ntohs(h->ip6_plen) == 0 || jumbolen) ntohs 1188 net/pf_norm.c plen = ntohs(h->ip6_plen); ntohs 1192 net/pf_norm.c fragoff = ntohs(frag.ip6f_offlg & IP6F_OFF_MASK); ntohs 1850 net/pf_norm.c if ((ntohs(*mss)) > r->max_mss) { ntohs 139 net/pf_osfp.c fp.fp_psize = ntohs(ip->ip_len); ntohs 162 net/pf_osfp.c fp.fp_psize = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen); ntohs 182 net/pf_osfp.c fp.fp_wsize = ntohs(tcp->th_win); ntohs 244 net/pf_osfp.c srcname, ntohs(tcp->th_sport), ntohs 843 net/pfvar.h (d)->mss = ntohs((s)->mss); \ ntohs 849 net/pfvar.h ntohs((s)->scrub.pfss_flags) & PFSS_TIMESTAMP; \ ntohs 157 net/slcompress.c (f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \ ntohs 160 net/slcompress.c (f) = htons(ntohs(f) + (u_int32_t)*cp++); \ ntohs 297 net/slcompress.c deltaS = ntohs(th->th_urp); ntohs 307 net/slcompress.c deltaS = (u_int16_t)(ntohs(th->th_win) - ntohs(oth->th_win)); ntohs 341 net/slcompress.c ntohs(cs->cs_ip.ip_len) == hlen) ntohs 356 net/slcompress.c deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { ntohs 364 net/slcompress.c if (deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { ntohs 372 net/slcompress.c deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id); ntohs 383 net/slcompress.c deltaA = ntohs(th->th_sum); ntohs 560 net/slcompress.c u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen; ntohs 567 net/slcompress.c th->th_seq = htonl(ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len) ntohs 588 net/slcompress.c cs->cs_ip.ip_id = htons(ntohs(cs->cs_ip.ip_id) + 1); ntohs 179 netatalk/aarp.c && (ntohs(nr->nr_firstnet) <= ntohs(sat->sat_addr.s_net)) ntohs 180 netatalk/aarp.c && (ntohs(nr->nr_lastnet) >= ntohs(sat->sat_addr.s_net))) { ntohs 339 netatalk/aarp.c if ( ntohs( ar->ar_hrd ) != AARPHRD_ETHER ) { ntohs 348 netatalk/aarp.c switch( ntohs( ar->ar_pro )) { ntohs 399 netatalk/aarp.c op = ntohs( ea->aarp_op ); ntohs 332 netatalk/at_control.c ntohs(aa->aa_firstnet), ntohs 333 netatalk/at_control.c ntohs(aa->aa_lastnet), ntohs 357 netatalk/at_control.c nnets = ntohs( nr.nr_lastnet ) - ntohs( nr.nr_firstnet ) + 1; ntohs 382 netatalk/at_control.c net = ntohs( nr.nr_firstnet ) + ntohs 385 netatalk/at_control.c net = ntohs( nr.nr_firstnet ); ntohs 388 netatalk/at_control.c if ( ntohs( sat->sat_addr.s_net ) < ntohs( nr.nr_firstnet ) || ntohs 389 netatalk/at_control.c ntohs( sat->sat_addr.s_net ) > ntohs( nr.nr_lastnet )) { ntohs 396 netatalk/at_control.c net = ntohs( sat->sat_addr.s_net ); ntohs 399 netatalk/at_control.c net = ntohs( sat->sat_addr.s_net ); ntohs 408 netatalk/at_control.c for ( i = nnets, netinc = 1; i > 0; net = ntohs( nr.nr_firstnet ) + ntohs 409 netatalk/at_control.c (( net - ntohs( nr.nr_firstnet ) + netinc ) % nnets ), i-- ) { ntohs 482 netatalk/at_control.c ntohs(aa->aa_firstnet), ntohs(aa->aa_lastnet), RTM_ADD ); ntohs 534 netatalk/at_control.c ( ntohs( sat->sat_addr.s_net ) >= ntohs( aa->aa_firstnet ) && ntohs 535 netatalk/at_control.c ntohs( sat->sat_addr.s_net ) <= ntohs( aa->aa_lastnet ))) { ntohs 611 netatalk/at_control.c ntohs(addr->s_net), addr->s_node, ntohs 612 netatalk/at_control.c ntohs(mask->s_net), mask->s_node); ntohs 264 netatalk/ddp_input.c if (( ntohs( to.sat_addr.s_net ) < ntohs( aa->aa_firstnet ) || ntohs 265 netatalk/ddp_input.c ntohs( to.sat_addr.s_net ) > ntohs( aa->aa_lastnet )) && ntohs 266 netatalk/ddp_input.c ( ntohs( to.sat_addr.s_net ) < 0xff00 || ntohs 267 netatalk/ddp_input.c ntohs( to.sat_addr.s_net ) > 0xfffe)) { ntohs 187 netatalk/ddp_output.c ntohs( net ) >= ntohs( aa->aa_firstnet ) && ntohs 188 netatalk/ddp_output.c ntohs( net ) <= ntohs( aa->aa_lastnet )) { ntohs 216 netatalk/ddp_output.c if ( ntohs( satosat( &ro->ro_dst )->sat_addr.s_net ) >= ntohs 217 netatalk/ddp_output.c ntohs( aa->aa_firstnet ) && ntohs 218 netatalk/ddp_output.c ntohs( satosat( &ro->ro_dst )->sat_addr.s_net ) <= ntohs 219 netatalk/ddp_output.c ntohs( aa->aa_lastnet )) { ntohs 226 netatalk/ddp_output.c if ( ntohs( satosat( &ro->ro_dst )->sat_addr.s_net ) >= ntohs 227 netatalk/ddp_output.c ntohs( aa->aa_firstnet ) && ntohs 228 netatalk/ddp_output.c ntohs( satosat( &ro->ro_dst )->sat_addr.s_net ) <= ntohs 229 netatalk/ddp_output.c ntohs( aa->aa_lastnet )) { ntohs 404 netatalk/ddp_usrreq.c ntohs( net ) >= ntohs( aa->aa_firstnet ) && ntohs 405 netatalk/ddp_usrreq.c ntohs( net ) <= ntohs( aa->aa_lastnet )) { ntohs 575 netatalk/ddp_usrreq.c ntohs( ddp->ddp_lsat.sat_addr.s_net ) >= ntohs 576 netatalk/ddp_usrreq.c ntohs( aa->aa_firstnet ) && ntohs 577 netatalk/ddp_usrreq.c ntohs( ddp->ddp_lsat.sat_addr.s_net ) <= ntohs 578 netatalk/ddp_usrreq.c ntohs( aa->aa_lastnet )) { ntohs 484 netinet/if_ether.c if (ntohs(ar->ar_hrd) != ARPHRD_ETHER) { ntohs 493 netinet/if_ether.c switch (ntohs(ar->ar_pro)) { ntohs 540 netinet/if_ether.c op = ntohs(ea->arp_op); ntohs 841 netinet/if_ether.c if (ntohs(ar->ar_hrd) != ARPHRD_ETHER) ntohs 845 netinet/if_ether.c switch (ntohs(ar->ar_pro)) { ntohs 879 netinet/if_ether.c op = ntohs(ar->arp_op); ntohs 143 netinet/igmp.c igmplen = ntohs(ip->ip_len) - iphlen; ntohs 122 netinet/in_pcb.c ntohs((fport)) + ntohs((lport))) & (table->inpt_hash)] ntohs 126 netinet/in_pcb.c (faddr)->s6_addr32[3]) + ntohs((fport)) + ntohs((lport))) & \ ntohs 290 netinet/in_pcb.c if (ntohs(lport) < IPPORT_RESERVED && ntohs 955 netinet/in_pcb.c ntohl(faddr.s_addr), ntohs(fport), ntohs 956 netinet/in_pcb.c ntohl(laddr.s_addr), ntohs(lport)); ntohs 995 netinet/in_pcb.c printf(" fport=%d laddr=", ntohs(fport)); ntohs 996 netinet/in_pcb.c printf(" lport=%d\n", ntohs(lport)); ntohs 1057 netinet/in_pcb.c ntohl(laddr.s_addr), ntohs(lport)); ntohs 1116 netinet/in_pcb.c ntohs(lport)); ntohs 1208 netinet/ip_ah.c iplen = htons(ntohs(iplen) + rplen + ahx->authsize); ntohs 1219 netinet/ip_ah.c iplen = htons(ntohs(iplen) + rplen + ahx->authsize); ntohs 130 netinet/ip_gre.c flags = ntohs(gip->gi_flags); ntohs 146 netinet/ip_gre.c switch (ntohs(gip->gi_ptype)) { /* ethertypes */ ntohs 285 netinet/ip_gre.c if (ntohs(mip->mh.proto) & MOB_H_SBIT) { ntohs 301 netinet/ip_gre.c mip->mi.ip_p = (ntohs(mip->mh.proto) >> 8); ntohs 312 netinet/ip_gre.c ip->ip_len = htons(ntohs(ip->ip_len) - msiz); ntohs 179 netinet/ip_icmp.c icmplen = oiplen + min(8, ntohs(oip->ip_len)); ntohs 319 netinet/ip_icmp.c icmplen = ntohs(ip->ip_len) - hlen; ntohs 756 netinet/ip_icmp.c ip->ip_len = htons(ntohs(ip->ip_len) - optlen); ntohs 788 netinet/ip_icmp.c icp->icmp_cksum = in_cksum(m, ntohs(ip->ip_len) - hlen); ntohs 897 netinet/ip_icmp.c u_long mtu = ntohs(icp->icmp_nextmtu); /* Why a long? IPv6 */ ntohs 913 netinet/ip_icmp.c mtu = ntohs(icp->icmp_ip.ip_len); ntohs 351 netinet/ip_input.c len = ntohs(ip->ip_len); ntohs 566 netinet/ip_input.c ip->ip_len = htons(ntohs(ip->ip_len) - hlen); ntohs 573 netinet/ip_input.c if (ntohs(ip->ip_len) == 0 || ntohs 574 netinet/ip_input.c (ntohs(ip->ip_len) & 0x7) != 0) { ntohs 580 netinet/ip_input.c ip->ip_off = htons(ntohs(ip->ip_off) << 3); ntohs 614 netinet/ip_input.c ip->ip_len = htons(ntohs(ip->ip_len) + hlen); ntohs 800 netinet/ip_input.c if (ntohs(q->ipqe_ip->ip_off) > ntohs(ipqe->ipqe_ip->ip_off)) ntohs 809 netinet/ip_input.c i = ntohs(p->ipqe_ip->ip_off) + ntohs(p->ipqe_ip->ip_len) - ntohs 810 netinet/ip_input.c ntohs(ipqe->ipqe_ip->ip_off); ntohs 812 netinet/ip_input.c if (i >= ntohs(ipqe->ipqe_ip->ip_len)) ntohs 816 netinet/ip_input.c htons(ntohs(ipqe->ipqe_ip->ip_off) + i); ntohs 818 netinet/ip_input.c htons(ntohs(ipqe->ipqe_ip->ip_len) - i); ntohs 827 netinet/ip_input.c ntohs(ipqe->ipqe_ip->ip_off) + ntohs(ipqe->ipqe_ip->ip_len) > ntohs 828 netinet/ip_input.c ntohs(q->ipqe_ip->ip_off); q = nq) { ntohs 829 netinet/ip_input.c i = (ntohs(ipqe->ipqe_ip->ip_off) + ntohs 830 netinet/ip_input.c ntohs(ipqe->ipqe_ip->ip_len)) - ntohs(q->ipqe_ip->ip_off); ntohs 831 netinet/ip_input.c if (i < ntohs(q->ipqe_ip->ip_len)) { ntohs 833 netinet/ip_input.c htons(ntohs(q->ipqe_ip->ip_len) - i); ntohs 835 netinet/ip_input.c htons(ntohs(q->ipqe_ip->ip_off) + i); ntohs 859 netinet/ip_input.c if (ntohs(q->ipqe_ip->ip_off) != next) ntohs 861 netinet/ip_input.c next += ntohs(q->ipqe_ip->ip_len); ntohs 1489 netinet/ip_input.c mcopy = m_copym(m, 0, min(ntohs(ip->ip_len), 68), M_DONTWAIT); ntohs 1491 netinet/ip_input.c mcopy = m_pullup(mcopy, min(ntohs(ip->ip_len), 68)); ntohs 1654 netinet/ip_mroute.c int plen = ntohs(ip->ip_len) - (ip->ip_hl << 2); ntohs 1843 netinet/ip_mroute.c ntohs(ip->ip_len)); ntohs 1851 netinet/ip_mroute.c int i, len = ntohs(ip->ip_len) + sizeof(multicast_encap_iphdr); ntohs 1906 netinet/ip_mroute.c tbf_control(vifp, mb_copy, ip, ntohs(ip_copy->ip_len)); ntohs 1984 netinet/ip_mroute.c len = ntohs(mtod(m, struct ip *)->ip_len); ntohs 2137 netinet/ip_mroute.c switch (ntohs(udp->uh_dport) & 0xc000) { ntohs 2151 netinet/ip_mroute.c ntohs(udp->uh_dport), prio); ntohs 3029 netinet/ip_mroute.c if (ntohs(ip->ip_len) <= mtu) { ntohs 3051 netinet/ip_mroute.c int len = ntohs(ip->ip_len); ntohs 3103 netinet/ip_mroute.c int len = ntohs(ip->ip_len); ntohs 3136 netinet/ip_mroute.c if (ntohs(ip->ip_off) & IP_DF) ntohs 3152 netinet/ip_mroute.c tbf_control(vifp, mb_first, ip, ntohs(ip_outer->ip_len)); ntohs 3184 netinet/ip_mroute.c datalen = ntohs(ip->ip_len) - iphlen; ntohs 3303 netinet/ip_mroute.c ntohs(encap_ip->ip_len)); ntohs 3374 netinet/ip_mroute.c pimstat.pims_rcv_registers_bytes += ntohs(encap_ip->ip_len); ntohs 550 netinet/ip_output.c if (ntohs(ip->ip_len) > ifp->if_mtu) { ntohs 604 netinet/ip_output.c ntohs(ip->ip_len) > tdb->tdb_mtu && ntohs 723 netinet/ip_output.c if (ntohs(ip->ip_len) <= mtu) { ntohs 837 netinet/ip_output.c for (off = hlen + len; off < ntohs(ip->ip_len); off += len) { ntohs 857 netinet/ip_output.c (ntohs(ip->ip_off) & ~IP_MF); ntohs 860 netinet/ip_output.c if (off + len >= ntohs(ip->ip_len)) ntohs 861 netinet/ip_output.c len = ntohs(ip->ip_len) - off; ntohs 891 netinet/ip_output.c m_adj(m, hlen + firstlen - ntohs(ip->ip_len)); ntohs 947 netinet/ip_output.c if (optlen + ntohs(ip->ip_len) > IP_MAXPACKET) ntohs 973 netinet/ip_output.c ip->ip_len = htons(ntohs(ip->ip_len) + optlen); ntohs 833 netinet/ipsec_input.c mtu = ntohs(icp->icmp_nextmtu); ntohs 894 netinet/ipsec_input.c mtu = ntohs(icp->icmp_nextmtu); ntohs 236 netinet/raw_ip.c ntohs(ip->ip_len) > m->m_pkthdr.len || ntohs 237 netinet/raw_ip.c ntohs(ip->ip_len) < ip->ip_hl << 2) { ntohs 861 netinet/tcp_subr.c mtu = (u_int)ntohs(icp->icmp_nextmtu); ntohs 230 netinet/udp_usrreq.c len = ntohs((u_int16_t)uh->uh_ulen); ntohs 239 netinet6/frag6.c (((ntohs(ip6->ip6_plen) - offset) & 0x7) != 0)) { ntohs 315 netinet6/frag6.c fragoff = ntohs(ip6f->ip6f_offlg & IP6F_OFF_MASK); ntohs 327 netinet6/frag6.c frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset; ntohs 1227 netinet6/icmp6.c qtype = ntohs(ni6->ni_qtype); ntohs 2178 netinet6/icmp6.c int icmp6len = ntohs(ip6->ip6_plen); ntohs 2635 netinet6/icmp6.c = in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), ntohs(ip6->ip6_plen)); ntohs 274 netinet6/in6_pcb.c if (ntohs(lport) < IPPORT_RESERVED && ntohs 631 netinet6/in6_src.c scopeid = ntohs(sin6->sin6_addr.s6_addr16[1]); ntohs 573 netinet6/ip6_input.c plen = (u_int32_t)ntohs(ip6->ip6_plen); ntohs 731 netinet6/ip6_input.c lim = min(m->m_pkthdr.len, ntohs(ip6->ip6_plen) + sizeof(*ip6)); ntohs 880 netinet6/ip6_input.c *rtalertp = ntohs(rtalert_val); ntohs 1834 netinet6/ip6_mroute.c ntohs(eip6->ip6_plen)); ntohs 714 netinet6/ip6_output.c origifp = ifindex2ifnet[ntohs(ip6->ip6_src.s6_addr16[1])]; ntohs 716 netinet6/ip6_output.c origifp = ifindex2ifnet[ntohs(ip6->ip6_dst.s6_addr16[1])]; ntohs 252 netinet6/mld6.c timer = ntohs(mldh->mld_maxdelay)*PR_FASTHZ/MLD_TIMER_SCALE; ntohs 785 netinet6/nd6.c ntohs(*(u_int16_t *)&addr->sin6_addr.s6_addr[2]) == ifp->if_index) ntohs 244 netinet6/nd6_rtr.c dr0.rtlifetime = ntohs(nd_ra->nd_ra_router_lifetime); ntohs 1649 nfs/nfs_subs.c (ntohs(saddr->sin_port) >= IPPORT_RESERVED || ntohs 1650 nfs/nfs_subs.c (slp->ns_so->so_type == SOCK_STREAM && ntohs(saddr->sin_port) == 20))) { ntohs 294 nfs/nfs_vfsops.c if ((proc0.p_ucred->cr_ngroups = ntohs(nd.swap_ucred.cr_ngroups)) > ntohs 246 sys/endian.h #define NTOHS(x) (x) = ntohs((u_int16_t)(x))