Lines Matching refs:sum
80 ip_cksum(mblk_t *mp, int offset, uint_t sum) in ip_cksum() argument
134 sum = ip_ocsum(w, mlen >> 1, sum); in ip_cksum()
165 sum += psum; in ip_cksum()
177 return (ip_ocsum(w, mlen >> 1, sum)); in ip_cksum()
242 sum += ((psum << 8) & 0xffff) in ip_cksum()
247 sum += psum; in ip_cksum()
287 sum += *(uchar_t *)w << 8; in ip_cksum()
289 sum += *(uchar_t *)w; in ip_cksum()
297 sum = ip_ocsum(w, mlen>>1, sum); in ip_cksum()
308 sum += *(uchar_t *)w; in ip_cksum()
310 sum += *(uchar_t *)w << 8; in ip_cksum()
317 sum += *(uchar_t *)w; in ip_cksum()
319 sum += *(uchar_t *)w << 8; in ip_cksum()
326 sum += ((swsum << 8) & 0xffff) | (swsum >> 8); in ip_cksum()
338 sum += *(uchar_t *)w << 8; in ip_cksum()
340 sum += *(uchar_t *)w; in ip_cksum()
376 sum = (sum & 0xFFFF) + (sum >> 16); in ip_cksum()
377 sum = (sum & 0xFFFF) + (sum >> 16); in ip_cksum()
379 "ip_cksum_end:(%S) type %d (%X)", "ip_cksum", 1, sum); in ip_cksum()
380 return (sum); in ip_cksum()
407 uint32_t sum; in ip_csum_hdr() local
413 sum = uph[0] + uph[1] + uph[2] + uph[3] + uph[4] + in ip_csum_hdr()
417 sum += uph[10]; in ip_csum_hdr()
418 sum += uph[11]; in ip_csum_hdr()
422 sum = (sum & 0xFFFF) + (sum >> 16); in ip_csum_hdr()
423 sum = ~(sum + (sum >> 16)) & 0xFFFF; in ip_csum_hdr()
424 if (sum == 0xffff) in ip_csum_hdr()
425 sum = 0; in ip_csum_hdr()
426 return ((uint16_t)sum); in ip_csum_hdr()