Lines Matching refs:checksum
245 * This procedure determines the checksum of an extended DDP datagram.
248 * the accumulator. When done, if the checksum is 0, changed into 0xFFFF.
251 * checksum = ddp_checksum(mp, offset)
258 * The DDP checksum.
268 register u_short checksum;
270 checksum = 0;
279 /* Portable checksum from 3.0 */
281 checksum += *data++;
282 checksum = (checksum & 0x8000) ?
283 ((checksum << 1) | 1) : (checksum << 1);
288 if (checksum == 0)
289 checksum = 0xffff;
291 return(checksum);
484 if (UAS_VALUE(ddp->checksum)) {
486 UAS_ASSIGN_HTON(ddp->checksum, tmp);
497 if (UAS_VALUE(tmp_ddp->checksum)) {
499 UAS_ASSIGN_HTON(ddp->checksum, tmp);
990 * if the checksum is true, then upstream wants us to calc
992 if (UAS_VALUE(ddp->checksum) &&
993 (UAS_VALUE_NTOH(ddp->checksum) != ddp_checksum(mp, 4))) {
996 ddp_checksum(mp, 4), UAS_VALUE_NTOH(ddp->checksum)));
1195 UAS_ASSIGN(ddp->checksum, 0);