Lines Matching refs:checksum
55 u_int32_t checksum(unsigned char *, unsigned, u_int32_t);
59 checksum(unsigned char *buf, unsigned nbytes, u_int32_t sum)
71 * If there's a single byte left over, checksum it, too.
129 ip.ip_sum = wrapsum(checksum((unsigned char *)&ip, sizeof(ip), 0));
135 * byte order. In both cases, the checksum has to be correct, so this
149 udp.uh_sum = wrapsum(checksum((unsigned char *)&udp, sizeof(udp),
150 checksum(data, len, checksum((unsigned char *)&ip.ip_src,
191 /* Check the IP header checksum - it should be zero. */
193 if (wrapsum(checksum(buf + bufix, ip_len, 0)) != 0) {
212 * UDP header and the data. If the UDP checksum field is zero,
213 * we're not supposed to do a checksum.
239 sum = wrapsum(checksum((unsigned char *)udp, sizeof(*udp),
240 checksum(data, len, checksum((unsigned char *)&ip->ip_src,