Lines Matching refs:sum

42     unsigned int sum);
81 ip_cksum(mblk_t *mp, int offset, uint_t sum) in ip_cksum() argument
135 sum = ip_ocsum(w, mlen >> 1, sum); in ip_cksum()
166 sum += psum; in ip_cksum()
178 return (ip_ocsum(w, mlen >> 1, sum)); in ip_cksum()
243 sum += ((psum << 8) & 0xffff) in ip_cksum()
248 sum += psum; in ip_cksum()
288 sum += *(uchar_t *)w << 8; in ip_cksum()
290 sum += *(uchar_t *)w; in ip_cksum()
298 sum = ip_ocsum(w, mlen>>1, sum); in ip_cksum()
309 sum += *(uchar_t *)w; in ip_cksum()
311 sum += *(uchar_t *)w << 8; in ip_cksum()
318 sum += *(uchar_t *)w; in ip_cksum()
320 sum += *(uchar_t *)w << 8; in ip_cksum()
327 sum += ((swsum << 8) & 0xffff) | (swsum >> 8); in ip_cksum()
339 sum += *(uchar_t *)w << 8; in ip_cksum()
341 sum += *(uchar_t *)w; in ip_cksum()
377 sum = (sum & 0xFFFF) + (sum >> 16); in ip_cksum()
378 sum = (sum & 0xFFFF) + (sum >> 16); in ip_cksum()
380 "ip_cksum_end:(%S) type %d (%X)", "ip_cksum", 1, sum); in ip_cksum()
381 return (sum); in ip_cksum()
424 ip_md_cksum(pdesc_t *pd, int offset, uint_t sum) in ip_md_cksum() argument
459 sum += *(uchar_t *)w << 8; in ip_md_cksum()
461 sum += *(uchar_t *)w; in ip_md_cksum()
472 sum = ip_ocsum(w, mlen >> 1, sum); in ip_md_cksum()
483 sum += *(uchar_t *)w; in ip_md_cksum()
485 sum += *(uchar_t *)w << 8; in ip_md_cksum()
492 sum += *(uchar_t *)w; in ip_md_cksum()
494 sum += *(uchar_t *)w << 8; in ip_md_cksum()
501 sum += ((swsum << 8) & 0xffff) | (swsum >> 8); in ip_md_cksum()
513 sum += *(uchar_t *)w << 8; in ip_md_cksum()
515 sum += *(uchar_t *)w; in ip_md_cksum()
527 sum = (sum & 0xffff) + (sum >> 16); in ip_md_cksum()
528 sum = (sum & 0xffff) + (sum >> 16); in ip_md_cksum()
530 return (sum); in ip_md_cksum()
538 uint32_t sum; in ip_csum_hdr() local
544 sum = uph[0] + uph[1] + uph[2] + uph[3] + uph[4] + in ip_csum_hdr()
548 sum += uph[10]; in ip_csum_hdr()
549 sum += uph[11]; in ip_csum_hdr()
553 sum = (sum & 0xFFFF) + (sum >> 16); in ip_csum_hdr()
554 sum = ~(sum + (sum >> 16)) & 0xFFFF; in ip_csum_hdr()
555 if (sum == 0xffff) in ip_csum_hdr()
556 sum = 0; in ip_csum_hdr()
557 return ((uint16_t)sum); in ip_csum_hdr()