--- libelwix/inc/elwix/acrc.h 2024/10/12 16:07:17 1.8.4.1 +++ libelwix/inc/elwix/acrc.h 2025/08/21 15:43:00 1.11 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: acrc.h,v 1.8.4.1 2024/10/12 16:07:17 misho Exp $ +* $Id: acrc.h,v 1.11 2025/08/21 15:43:00 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -58,6 +58,9 @@ struct tagCRCPoly { }; /* size 24bytes */ typedef struct tagCRCPoly crcPoly_t; +#ifdef __cplusplus +extern "C" { +#endif /* * crcReflect() - Reflect all bits of number @@ -107,10 +110,10 @@ unsigned short crc16_xy(unsigned char * __restrict buf * crcIP() - Checksum in IP communication * * @buf = Data for calculation - * @bufLen = Length of data + * @len = Length of data in bytes * return: Checksum */ -unsigned short crcIP(unsigned char * __restrict buf, int bufLen); +unsigned short crcIP(unsigned short* __restrict buf, int len); /* * crcTCP() - Checksum for TCP v4 communication * @@ -258,5 +261,8 @@ unsigned int hash_fnv1(const char *csStr, int nStrLen, */ #define hash_fnv(str, len) hash_fnv1((str), (len), 1) +#ifdef __cplusplus +} +#endif #endif