Lines Matching refs:checksum
65 static uint32_t checksum(void *buffer, unsigned int count, uint32_t startsum)
111 ip.check = finish_sum(checksum(&ip, sizeof(ip), 0));
118 /* Calculate checksum for pseudo header */
119 udpsum = checksum(&ip.saddr, sizeof(ip.saddr), 0);
120 udpsum = checksum(&ip.daddr, sizeof(ip.daddr), udpsum);
122 udpsum = checksum(&temp, sizeof(temp), udpsum);
124 udpsum = checksum(&temp, sizeof(temp), udpsum);
126 /* Add in the checksum for the udp header */
127 udpsum = checksum(&udp, sizeof(udp), udpsum);
129 /* Add in the checksum for the data */
130 udpsum = checksum(msg, size, udpsum);
209 /* validate IP header checksum */
210 sum = finish_sum(checksum(&packet.ip, sizeof(packet.ip), 0));
212 ALOGW("IP header checksum failure (0x%x)", packet.ip.check);
216 * Validate the UDP checksum.
218 * to construct the pseudo header used in the checksum calculation.
231 sum = finish_sum(checksum(&packet, nread, 0));
234 ALOGW("UDP header checksum failure (0x%x should be 0x%x)", sum, temp);