Lines Matching refs:ip_len
650 ip->ip_len = htons(ip->ip_len + (uint16_t)hlen); in ip_proto_dispatch_in()
678 ip->ip_len = ntohs(ip->ip_len) - (u_short)hlen; in ip_proto_dispatch_in()
834 ip->ip_len -= hlen; in ip_input_dispatch_chain()
855 ASSERT(m_pktlen(m) > ip->ip_len); in ip_input_adjust()
884 (ip->ip_len - m->m_pkthdr.csum_rx_start), in ip_input_adjust()
912 m->m_len = ip->ip_len; in ip_input_adjust()
913 m->m_pkthdr.len = ip->ip_len; in ip_input_adjust()
915 m_adj(m, ip->ip_len - m->m_pkthdr.len); in ip_input_adjust()
1016 ip->ip_len = ntohs(ip->ip_len) - (u_short)hlen; in ip_input_first_pass()
1044 ip->ip_p, ip->ip_off, ip->ip_len); in ip_input_first_pass()
1131 NTOHS(ip->ip_len); in ip_input_first_pass()
1134 if (ip->ip_len < hlen) { in ip_input_first_pass()
1152 if (m->m_pkthdr.len < ip->ip_len) { in ip_input_first_pass()
1160 if (m->m_pkthdr.len > ip->ip_len) { in ip_input_first_pass()
1557 ip->ip_len -= hlen; in ip_input_second_pass()
1786 ip->ip_len = ntohs(ip->ip_len) - (u_short)hlen; in ip_input()
1809 ip->ip_p, ip->ip_off, ip->ip_len); in ip_input()
1898 NTOHS(ip->ip_len); in ip_input()
1901 if (ip->ip_len < hlen) { in ip_input()
1915 if (m->m_pkthdr.len < ip->ip_len) { in ip_input()
1920 if (m->m_pkthdr.len > ip->ip_len) { in ip_input()
2051 ip->ip_len -= hlen; in ip_input()
2255 int32_t trailer = (m_pktlen(m) - ip->ip_len); in ip_reass()
2262 uint32_t datalen = ip->ip_len - hlen; in ip_reass()
2266 HTONS(ip->ip_len); in ip_reass()
2280 NTOHS(ip->ip_len); in ip_reass()
2306 ip->ip_len -= hlen; in ip_reass()
2312 if (ip->ip_len == 0 || (ip->ip_len & 0x7) != 0) { in ip_reass()
2413 i = GETIP(p)->ip_off + GETIP(p)->ip_len - ip->ip_off; in ip_reass()
2415 if (i >= ip->ip_len) { in ip_reass()
2421 ip->ip_len -= i; in ip_reass()
2434 for (; q != NULL && ip->ip_off + ip->ip_len > GETIP(q)->ip_off; in ip_reass()
2436 i = (ip->ip_off + ip->ip_len) - GETIP(q)->ip_off; in ip_reass()
2437 if (i < GETIP(q)->ip_len) { in ip_reass()
2438 GETIP(q)->ip_len -= i; in ip_reass()
2484 next += GETIP(q)->ip_len; in ip_reass()
2551 ip->ip_len = (u_short)((IP_VHL_HL(ip->ip_vhl) << 2) + next); in ip_reass()
3282 ip->ip_len += sizeof(struct ip); in ip_stripoptions()
3286 HTONS(ip->ip_len); in ip_stripoptions()
3292 NTOHS(ip->ip_len); in ip_stripoptions()
3295 ip->ip_len -= sizeof(struct ip); in ip_stripoptions()
3508 (int)ip->ip_len); in ip_forward()