/dragonfly/sys/netinet/ |
H A D | ip_demux.c | 150 int len, iphlen, iplen; in ip_lengthcheck() local 174 iphlen = ip->ip_hl << 2; in ip_lengthcheck() 181 if (m->m_len < hoff + iphlen) { in ip_lengthcheck() 182 m = m_pullup(m, hoff + iphlen); in ip_lengthcheck() 219 if (iplen < iphlen + sizeof(struct tcphdr)) { in ip_lengthcheck() 234 thoff + iphlen > ntohs(ip->ip_len)) { in ip_lengthcheck() 238 if (m->m_len < hoff + iphlen + thoff) { in ip_lengthcheck() 239 m = m_pullup(m, hoff + iphlen + thoff); in ip_lengthcheck() 261 if (iplen < iphlen) { in ip_lengthcheck() 289 int iphlen; in ip_hashfn() local [all …]
|
H A D | igmp.c | 178 int iphlen; in igmp_input() local 190 iphlen = *offp; in igmp_input() 196 igmplen = ntohs(ip->ip_len) - iphlen; in igmp_input() 206 minlen = iphlen + IGMP_MINLEN; in igmp_input() 216 m->m_data += iphlen; in igmp_input() 217 m->m_len -= iphlen; in igmp_input() 224 m->m_data -= iphlen; in igmp_input() 225 m->m_len += iphlen; in igmp_input()
|
H A D | udp_usrreq.c | 332 int iphlen; member 352 arg->iphlen + sizeof(struct udphdr), in udp_mcast_input() 375 int iphlen; in udp_input() local 389 iphlen = off; in udp_input() 398 if (iphlen > sizeof(struct ip)) { in udp_input() 400 iphlen = sizeof(struct ip); in udp_input() 411 uh = (struct udphdr *)((caddr_t)ip + iphlen); in udp_input() 422 ip_len = ntohs(ip->ip_len) - iphlen; in udp_input() 503 arg.iphlen = iphlen; in udp_input() 583 iphlen + sizeof(struct udphdr), &udp_in); in udp_input() [all …]
|
H A D | ip_carp.c | 935 int len, iphlen; in carp_proto_input() local 937 iphlen = *offp; in carp_proto_input() 991 len = iphlen + sizeof(*ch); in carp_proto_input() 1015 ch = (struct carp_header *)((uint8_t *)ip + iphlen); in carp_proto_input() 1018 if (in_cksum_skip(m, len, iphlen)) { in carp_proto_input()
|
/dragonfly/sys/netgraph7/tcpmss/ |
H A D | ng_tcpmss.c | 273 int iphlen, tcphlen, pktlen; in ng_tcpmss_rcvdata() local 310 iphlen = ip->ip_hl << 2; in ng_tcpmss_rcvdata() 311 if (iphlen < sizeof(struct ip) || iphlen > pktlen ) in ng_tcpmss_rcvdata() 319 M_CHECK(iphlen - sizeof(struct ip) + sizeof(struct tcphdr)); in ng_tcpmss_rcvdata() 321 tcp = (struct tcphdr *)((caddr_t )ip + iphlen); in ng_tcpmss_rcvdata() 325 if (tcphlen < sizeof(struct tcphdr) || tcphlen > pktlen - iphlen) in ng_tcpmss_rcvdata() 337 tcp = (struct tcphdr *)((caddr_t )ip + iphlen); in ng_tcpmss_rcvdata()
|
/dragonfly/sys/netgraph/pptpgre/ |
H A D | ng_pptpgre.c | 570 int iphlen, grelen, extralen; in ng_pptpgre_recv() local 595 iphlen = ip->ip_hl << 2; in ng_pptpgre_recv() 596 if (m->m_len < iphlen + sizeof(*gre)) { in ng_pptpgre_recv() 597 if ((m = m_pullup(m, iphlen + sizeof(*gre))) == NULL) { in ng_pptpgre_recv() 604 gre = (const struct greheader *)((const u_char *)ip + iphlen); in ng_pptpgre_recv() 606 if (m->m_pkthdr.len < iphlen + grelen) { in ng_pptpgre_recv() 610 if (m->m_len < iphlen + grelen) { in ng_pptpgre_recv() 611 if ((m = m_pullup(m, iphlen + grelen)) == NULL) { in ng_pptpgre_recv() 617 gre = (const struct greheader *)((const u_char *)ip + iphlen); in ng_pptpgre_recv() 622 - (iphlen + grelen + gre->hasSeq * (u_int16_t)ntohs(gre->length)); in ng_pptpgre_recv() [all …]
|
/dragonfly/sys/netgraph7/pptpgre/ |
H A D | ng_pptpgre.c | 659 int iphlen, grelen, extralen; in ng_pptpgre_rcvdata_lower() local 683 iphlen = ip->ip_hl << 2; in ng_pptpgre_rcvdata_lower() 684 if (m->m_len < iphlen + sizeof(*gre)) { in ng_pptpgre_rcvdata_lower() 685 if ((m = m_pullup(m, iphlen + sizeof(*gre))) == NULL) { in ng_pptpgre_rcvdata_lower() 691 gre = (const struct greheader *)((const u_char *)ip + iphlen); in ng_pptpgre_rcvdata_lower() 693 if (m->m_pkthdr.len < iphlen + grelen) { in ng_pptpgre_rcvdata_lower() 697 if (m->m_len < iphlen + grelen) { in ng_pptpgre_rcvdata_lower() 698 if ((m = m_pullup(m, iphlen + grelen)) == NULL) { in ng_pptpgre_rcvdata_lower() 703 gre = (const struct greheader *)((const u_char *)ip + iphlen); in ng_pptpgre_rcvdata_lower() 708 - (iphlen + grelen + gre->hasSeq * (u_int16_t)ntohs(gre->length)); in ng_pptpgre_rcvdata_lower() [all …]
|
/dragonfly/sys/net/ip_mroute/ |
H A D | ip_mroute.c | 3029 int iphlen; local 3031 iphlen = *offp; 3072 m->m_data += iphlen; 3073 m->m_len -= iphlen; 3103 m->m_data -= iphlen; 3104 m->m_len += iphlen; 3185 m->m_data += (iphlen + PIM_MINLEN); 3186 m->m_len -= (iphlen + PIM_MINLEN); 3192 m->m_data -= (iphlen + PIM_MINLEN); 3220 m_adj(m, iphlen + PIM_MINLEN); [all …]
|
/dragonfly/sys/dev/netif/em/ |
H A D | if_em.c | 4556 int iphlen, hoff, thoff, ex = 0; in em_tso_pullup() local 4563 iphlen = m->m_pkthdr.csum_iphlen; in em_tso_pullup() 4567 KASSERT(iphlen > 0, ("invalid ip hlen")); in em_tso_pullup() 4574 if (m->m_len < hoff + iphlen + thoff + ex) { in em_tso_pullup() 4575 m = m_pullup(m, hoff + iphlen + thoff + ex); in em_tso_pullup() 4593 int hoff, iphlen, thoff, hlen; in em_tso_setup() local 4596 iphlen = mp->m_pkthdr.csum_iphlen; in em_tso_setup() 4603 adapter->csum_iphlen == iphlen && in em_tso_setup() 4612 hlen = hoff + iphlen + thoff; in em_tso_setup() 4642 TXD->upper_setup.tcp_fields.tucss = hoff + iphlen; in em_tso_setup() [all …]
|
/dragonfly/sys/dev/netif/emx/ |
H A D | if_emx.c | 4348 int iphlen, hoff, thoff, ex = 0; in emx_tso_pullup() local 4355 iphlen = m->m_pkthdr.csum_iphlen; in emx_tso_pullup() 4359 KASSERT(iphlen > 0, ("invalid ip hlen")); in emx_tso_pullup() 4366 if (m->m_len < hoff + iphlen + thoff + ex) { in emx_tso_pullup() 4367 m = m_pullup(m, hoff + iphlen + thoff + ex); in emx_tso_pullup() 4385 int hoff, iphlen, thoff, hlen; in emx_tso_setup() local 4392 iphlen = mp->m_pkthdr.csum_iphlen; in emx_tso_setup() 4400 tdata->csum_iphlen == iphlen && in emx_tso_setup() 4412 hlen = hoff + iphlen + thoff; in emx_tso_setup() 4442 TXD->upper_setup.tcp_fields.tucss = hoff + iphlen; in emx_tso_setup() [all …]
|
/dragonfly/sys/net/lagg/ |
H A D | if_lagg.c | 1653 int iphlen; in lagg_hashmbuf() local 1715 iphlen = ip->ip_hl << 2; in lagg_hashmbuf() 1716 if (iphlen < sizeof(*ip)) in lagg_hashmbuf() 1718 off += iphlen; in lagg_hashmbuf()
|
/dragonfly/sys/dev/netif/igb/ |
H A D | if_igb.c | 4801 int hoff, iphlen, thoff; in igb_tso_pullup() local 4807 iphlen = m->m_pkthdr.csum_iphlen; in igb_tso_pullup() 4811 KASSERT(iphlen > 0, ("invalid ip hlen")); in igb_tso_pullup() 4815 if (__predict_false(m->m_len < hoff + iphlen + thoff)) { in igb_tso_pullup() 4816 m = m_pullup(m, hoff + iphlen + thoff); in igb_tso_pullup() 4838 int hoff, ctxd, iphlen, thoff; in igb_tso_ctx() local 4840 iphlen = m->m_pkthdr.csum_iphlen; in igb_tso_ctx() 4857 vlan_macip_lens |= iphlen; in igb_tso_ctx() 4884 *hlen = hoff + iphlen + thoff; in igb_tso_ctx()
|
/dragonfly/sys/dev/netif/bge/ |
H A D | if_bge.c | 5101 int thoff, iphlen, hoff, hlen; in bge_setup_tso() local 5108 iphlen = m->m_pkthdr.csum_iphlen; in bge_setup_tso() 5112 KASSERT(iphlen > 0, ("invalid ip header len")); in bge_setup_tso() 5115 if (__predict_false(m->m_len < hoff + iphlen + thoff)) { in bge_setup_tso() 5116 m = m_pullup(m, hoff + iphlen + thoff); in bge_setup_tso() 5124 th = mtodoff(m, struct tcphdr *, hoff + iphlen); in bge_setup_tso() 5129 ip->ip_len = htons(mss + iphlen + thoff); in bge_setup_tso() 5132 hlen = (iphlen + thoff) >> 2; in bge_setup_tso()
|
/dragonfly/sys/dev/netif/bnx/ |
H A D | if_bnx.c | 5135 int thoff, iphlen, hoff, hlen; in bnx_setup_tso() local 5142 iphlen = m->m_pkthdr.csum_iphlen; in bnx_setup_tso() 5146 KASSERT(iphlen > 0, ("invalid ip header len")); in bnx_setup_tso() 5149 if (__predict_false(m->m_len < hoff + iphlen + thoff)) { in bnx_setup_tso() 5150 m = m_pullup(m, hoff + iphlen + thoff); in bnx_setup_tso() 5158 th = mtodoff(m, struct tcphdr *, hoff + iphlen); in bnx_setup_tso() 5163 ip->ip_len = htons(mss + iphlen + thoff); in bnx_setup_tso() 5166 hlen = (iphlen + thoff) >> 2; in bnx_setup_tso()
|
/dragonfly/sys/dev/netif/jme/ |
H A D | if_jme.c | 1633 int hoff, iphlen, thoff; in jme_tso_pullup() local 1639 iphlen = m->m_pkthdr.csum_iphlen; in jme_tso_pullup() 1643 KASSERT(iphlen > 0, ("invalid ip hlen")); in jme_tso_pullup() 1647 if (__predict_false(m->m_len < hoff + iphlen + thoff)) { in jme_tso_pullup() 1648 m = m_pullup(m, hoff + iphlen + thoff); in jme_tso_pullup()
|
/dragonfly/sys/dev/virtual/amazon/ena/ |
H A D | ena.c | 2650 int iphlen; in ena_tx_csum() local 2682 iphlen = ip->ip_hl << 2; in ena_tx_csum() 2683 th = (struct tcphdr *)((caddr_t)ip + iphlen); in ena_tx_csum() 2726 ena_meta->l3_hdr_len = iphlen; in ena_tx_csum()
|
/dragonfly/sys/dev/netif/bce/ |
H A D | if_bce.c | 6605 int thoff, iphlen, hoff; in bce_tso_setup() local 6611 iphlen = m->m_pkthdr.csum_iphlen; in bce_tso_setup() 6616 KASSERT(iphlen >= sizeof(struct ip), in bce_tso_setup() 6617 ("invalid ip header len %d", iphlen)); in bce_tso_setup() 6621 if (__predict_false(m->m_len < hoff + iphlen + thoff)) { in bce_tso_setup() 6622 m = m_pullup(m, hoff + iphlen + thoff); in bce_tso_setup() 6634 flags |= (((iphlen + thoff - in bce_tso_setup()
|
/dragonfly/sys/dev/netif/mxge/ |
H A D | if_mxge.c | 1644 int hoff, iphlen, thoff; in mxge_pullup_tso() local 1650 iphlen = m->m_pkthdr.csum_iphlen; in mxge_pullup_tso() 1654 KASSERT(iphlen > 0, ("invalid ip hlen")); in mxge_pullup_tso() 1658 if (__predict_false(m->m_len < hoff + iphlen + thoff)) { in mxge_pullup_tso() 1659 m = m_pullup(m, hoff + iphlen + thoff); in mxge_pullup_tso()
|
/dragonfly/sys/dev/netif/ix/ |
H A D | if_ix.c | 1439 int hoff, iphlen, thoff; in ix_tso_pullup() local 1445 iphlen = m->m_pkthdr.csum_iphlen; in ix_tso_pullup() 1449 KASSERT(iphlen > 0, ("invalid ip hlen")); in ix_tso_pullup() 1453 if (__predict_false(m->m_len < hoff + iphlen + thoff)) { in ix_tso_pullup() 1454 m = m_pullup(m, hoff + iphlen + thoff); in ix_tso_pullup()
|