Lines Matching refs:fcs
102 static uint16_t Crc16(uint16_t fcs, u_char *cp, int len);
385 uint16_t fcs, lenn; in ng_pred1_compress() local
416 fcs = Crc16(PPP_INITFCS, (u_char *)&lenn, 2); in ng_pred1_compress()
417 fcs = Crc16(fcs, priv->inbuf + 2, inlen); in ng_pred1_compress()
418 fcs = ~fcs; in ng_pred1_compress()
438 (out + outlen)[0] = fcs & 0xFF; in ng_pred1_compress()
439 (out + outlen)[1] = fcs >> 8; in ng_pred1_compress()
468 uint16_t fcs; in ng_pred1_decompress() local
521 fcs = Crc16(PPP_INITFCS, (u_char *)&lenn, 2); in ng_pred1_decompress()
522 fcs = Crc16(fcs, priv->outbuf, len); in ng_pred1_decompress()
523 fcs = Crc16(fcs, priv->inbuf + inlen - 2, 2); in ng_pred1_decompress()
525 if (fcs != PPP_GOODFCS) { in ng_pred1_decompress()