MCPcopy Create free account
hub / github.com/F-Stack/f-stack / Crc16

Function Crc16

freebsd/netgraph/ng_pred1.c:675–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673 */
674
675static uint16_t
676Crc16(uint16_t crc, u_char *cp, int len)
677{
678 while (len--)
679 crc = (crc >> 8) ^ Crc16Table[(crc ^ *cp++) & 0xff];
680 return (crc);
681}
682
683static const uint16_t Crc16Table[256] = {
684/* 00 */ 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,

Callers 2

ng_pred1_compressFunction · 0.85
ng_pred1_decompressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected