Lines Matching full:fcs
106 * HDLC FCS computation. Read RFC 1171 Appendix B and CCITT X.25 section
112 u_short fcs = INITFCS; in hdlc_Fcs() local
115 fcs = (fcs >> 8) ^ fcstab[(fcs ^ *cp++) & 0xff]; in hdlc_Fcs()
117 return fcs; in hdlc_Fcs()
121 HdlcFcsBuf(u_short fcs, struct mbuf *m) in HdlcFcsBuf() argument
130 fcs = (fcs >> 8) ^ fcstab[(fcs ^ *pos++) & 0xff]; in HdlcFcsBuf()
137 return (fcs); in HdlcFcsBuf()
146 u_short fcs; in hdlc_LayerPush() local
149 fcs = HdlcFcsBuf(INITFCS, bp); in hdlc_LayerPush()
150 fcs = ~fcs; in hdlc_LayerPush()
164 *cp++ = fcs & 0377; /* Low byte first (nothing like consistency) */ in hdlc_LayerPush()
165 *cp++ = fcs >> 8; in hdlc_LayerPush()
305 u_short fcs; in hdlc_LayerPull() local
317 fcs = hdlc_Fcs(MBUF_CTOP(bp), len); in hdlc_LayerPull()
319 log_Printf(LogDEBUG, "%s: hdlc_LayerPull: fcs = %04x (%s)\n", in hdlc_LayerPull()
320 p->link.name, fcs, (fcs == GOODFCS) ? "good" : "BAD!"); in hdlc_LayerPull()
324 if (fcs != GOODFCS) { in hdlc_LayerPull()
340 bp = m_adj(bp, -2); /* discard the FCS */ in hdlc_LayerPull()
409 "%s: HDLC errors -> FCS: %u, ADDR: %u, COMD: %u, PROTO: %u\n", in hdlc_ReportTime()