Lines Matching full:checksum
55 u_int32_t checksum(unsigned char *, unsigned, u_int32_t);
59 checksum(unsigned char *buf, unsigned nbytes, u_int32_t sum) in checksum() function
63 /* Checksum all the pairs of bytes first... */ in checksum()
71 * If there's a single byte left over, checksum it, too. in checksum()
129 ip.ip_sum = wrapsum(checksum((unsigned char *)&ip, sizeof(ip), 0)); in assemble_udp_ip_header()
138 udp.uh_sum = wrapsum(checksum((unsigned char *)&udp, sizeof(udp), in assemble_udp_ip_header()
139 checksum(data, len, checksum((unsigned char *)&ip.ip_src, in assemble_udp_ip_header()
181 /* Check the IP header checksum - it should be zero. */ in decode_udp_ip_header()
183 if (wrapsum(checksum(buf + bufix, ip_len, 0)) != 0) { in decode_udp_ip_header()
202 * UDP header and the data. If the UDP checksum field is zero, in decode_udp_ip_header()
203 * we're not supposed to do a checksum. in decode_udp_ip_header()
229 sum = wrapsum(checksum((unsigned char *)udp, sizeof(*udp), in decode_udp_ip_header()
230 checksum(data, len, checksum((unsigned char *)&ip->ip_src, in decode_udp_ip_header()