Lines Matching full:sum
50 int sum = 0, oddbyte = 0, v = 0; in in_cksum() local
56 sum += v + *cp++; in in_cksum()
61 sum += *(u_short *)cp; in in_cksum()
67 sum += *cp++ << 8; in in_cksum()
68 sum += *cp++; in in_cksum()
70 sum += *cp++; in in_cksum()
71 sum += *cp++ << 8; in in_cksum()
83 sum += v; in in_cksum()
84 sum = (sum >> 16) + (sum & 0xffff); /* add in accumulated carries */ in in_cksum()
85 sum += sum >> 16; /* add potential last carry */ in in_cksum()
86 return (0xffff & ~sum); in in_cksum()