Searched refs:sum (Results 1 – 4 of 4) sorted by relevance
68 uint32_t sum = startsum; in checksum() local72 sum += *up++; in checksum()76 sum += (uint16_t) *(uint8_t *)up; in checksum()78 while ((upper16 = (sum >> 16)) != 0) { in checksum()79 sum = (sum & 0xffff) + upper16; in checksum()81 return sum; in checksum()84 static uint32_t finish_sum(uint32_t sum) in finish_sum() argument86 return ~sum & 0xffff; in finish_sum()166 uint32_t sum; in receive_packet() local210 sum = finish_sum(checksum(&packet.ip, sizeof(packet.ip), 0)); in receive_packet()[all …]
1133 UINT32 sum=0; in wdrv_IpChecksumCalc() local1140 sum = sum + (UINT32) word16; in wdrv_IpChecksumCalc()1145 sum = (sum & 0x0000ffff)+((sum & 0xffff0000)>>16); in wdrv_IpChecksumCalc()1147 sum = ~sum; in wdrv_IpChecksumCalc()1149 return ((UINT16) sum); in wdrv_IpChecksumCalc()1162 UINT32 sum=0; in wdrv_TcpChecksumCalc() local1176 sum = sum + (UINT32) word16; in wdrv_TcpChecksumCalc()1185 sum = sum + (UINT32) word16; in wdrv_TcpChecksumCalc()1187 sum = sum + (UINT32) word16; in wdrv_TcpChecksumCalc()1189 sum = sum + (UINT32) word16; in wdrv_TcpChecksumCalc()[all …]
19 int sum; in hd_main() local63 sum = 0; in hd_main()75 sum += buf[i]; in hd_main()90 printf("sum %x\n", sum); in hd_main()
191 unsigned sum; in send_packet() local198 sum = 0; in send_packet()200 sum += *x++; in send_packet()202 p->msg.data_check = sum; in send_packet()998 unsigned count, sum; in check_data() local1003 sum = 0; in check_data()1005 sum += *x++; in check_data()1008 if(sum != p->msg.data_check) { in check_data()