Home | History | Annotate | Download | only in libnetutils

Lines Matching refs:checksum

66 static uint32_t checksum(void *buffer, unsigned int count, uint32_t startsum)
112 ip.check = finish_sum(checksum(&ip, sizeof(ip), 0));
119 /* Calculate checksum for pseudo header */
120 udpsum = checksum(&ip.saddr, sizeof(ip.saddr), 0);
121 udpsum = checksum(&ip.daddr, sizeof(ip.daddr), udpsum);
123 udpsum = checksum(&temp, sizeof(temp), udpsum);
125 udpsum = checksum(&temp, sizeof(temp), udpsum);
127 /* Add in the checksum for the udp header */
128 udpsum = checksum(&udp, sizeof(udp), udpsum);
130 /* Add in the checksum for the data */
131 udpsum = checksum(msg, size, udpsum);
210 /* validate IP header checksum */
211 sum = finish_sum(checksum(&packet.ip, sizeof(packet.ip), 0));
213 ALOGW("IP header checksum failure (0x%x)", packet.ip.check);
217 * Validate the UDP checksum.
219 * to construct the pseudo header used in the checksum calculation.
232 sum = finish_sum(checksum(&packet, nread, 0));
237 ALOGW("UDP header checksum failure (0x%x should be 0x%x)", sum, temp);