Lines Matching refs:fcs
104 static uint16_t Crc16(uint16_t fcs, u_char *cp, int len);
387 uint16_t fcs, lenn; in ng_pred1_compress() local
418 fcs = Crc16(PPP_INITFCS, (u_char *)&lenn, 2); in ng_pred1_compress()
419 fcs = Crc16(fcs, priv->inbuf + 2, inlen); in ng_pred1_compress()
420 fcs = ~fcs; in ng_pred1_compress()
440 (out + outlen)[0] = fcs & 0xFF; in ng_pred1_compress()
441 (out + outlen)[1] = fcs >> 8; in ng_pred1_compress()
470 uint16_t fcs; in ng_pred1_decompress() local
523 fcs = Crc16(PPP_INITFCS, (u_char *)&lenn, 2); in ng_pred1_decompress()
524 fcs = Crc16(fcs, priv->outbuf, len); in ng_pred1_decompress()
525 fcs = Crc16(fcs, priv->inbuf + inlen - 2, 2); in ng_pred1_decompress()
527 if (fcs != PPP_GOODFCS) { in ng_pred1_decompress()