Diff for /libelwix/inc/elwix/acrc.h between versions 1.7.36.1 and 1.10.4.1

version 1.7.36.1, 2024/10/10 23:53:00 version 1.10.4.1, 2024/12/05 12:33:49
Line 58  struct tagCRCPoly { Line 58  struct tagCRCPoly {
 };      /* size 24bytes */  };      /* size 24bytes */
 typedef struct tagCRCPoly crcPoly_t;  typedef struct tagCRCPoly crcPoly_t;
   
   #ifdef __cplusplus
   extern "C" {
   #endif
   
 /*  /*
  * crcReflect() - Reflect all bits of number    * crcReflect() - Reflect all bits of number 
Line 85  unsigned int crcCalc(unsigned char * __restrict psBuf, Line 88  unsigned int crcCalc(unsigned char * __restrict psBuf,
 #define crc_16(x, l)            crcCalc((x), (l), 16, REVOPTS_REVERTBYTE|REVOPTS_REVERTCRC, 0x0, 0x0)  #define crc_16(x, l)            crcCalc((x), (l), 16, REVOPTS_REVERTBYTE|REVOPTS_REVERTCRC, 0x0, 0x0)
 #define crc_16_ccitt(x, l)      crcCalc((x), (l), 161, 0, 0x0, 0x0)  #define crc_16_ccitt(x, l)      crcCalc((x), (l), 161, 0, 0x0, 0x0)
 #define crc_16_xmodem(x, l)     crcCalc((x), (l), 162, REVOPTS_REVERTBYTE|REVOPTS_REVERTCRC, 0x0, 0x0)  #define crc_16_xmodem(x, l)     crcCalc((x), (l), 162, REVOPTS_REVERTBYTE|REVOPTS_REVERTCRC, 0x0, 0x0)
   #define crc_8(x, l)             crcCalc((x), (l), 8, 0, 0x0, 0x0)
   
 /*  /*
  * crc16_ccitt() - Checksum calculation   * crc16_ccitt() - Checksum calculation
Line 106  unsigned short crc16_xy(unsigned char * __restrict buf Line 110  unsigned short crc16_xy(unsigned char * __restrict buf
  * crcIP() - Checksum in IP communication   * crcIP() - Checksum in IP communication
  *   *
  * @buf = Data for calculation   * @buf = Data for calculation
 * @bufLen = Length of data * @len = Length of data in bytes
  * return: Checksum   * 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   * crcTCP() - Checksum for TCP v4 communication
  *   *
Line 166  unsigned int crcAdler(unsigned char * __restrict psBuf Line 170  unsigned int crcAdler(unsigned char * __restrict psBuf
 #define crcEther(psBuf, bufLen) crcCalc((psBuf), (bufLen), 32, 3, 0xFFFFFFFF, 0xFFFFFFFF)  #define crcEther(psBuf, bufLen) crcCalc((psBuf), (bufLen), 32, 3, 0xFFFFFFFF, 0xFFFFFFFF)
   
 /*  /*
    * crc8tbl() - CRC8 calculation from table
    *
    * @crc = Initial crc value
    * @buf = Data for calculation
    * @len = Length of data
    * return: calculated CRC8
    */
   uint8_t crc8tbl(unsigned char crc, const unsigned char * __restrict buf, unsigned int len);
   /*
  * crc32tbl() - CRC32 calculation from table   * crc32tbl() - CRC32 calculation from table
  *   *
  * @crc = Initial crc value   * @crc = Initial crc value
Line 248  unsigned int hash_fnv1(const char *csStr, int nStrLen, Line 261  unsigned int hash_fnv1(const char *csStr, int nStrLen,
 */  */
 #define hash_fnv(str, len)      hash_fnv1((str), (len), 1)  #define hash_fnv(str, len)      hash_fnv1((str), (len), 1)
   
   #ifdef __cplusplus
   }
   #endif
   
 #endif  #endif

Removed from v.1.7.36.1  
changed lines
  Added in v.1.10.4.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>