version 1.1.1.1.6.1, 2013/05/26 20:03:18
|
version 1.5.18.1, 2017/12/08 00:07:13
|
Line 12 terms:
|
Line 12 terms:
|
All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
|
|
Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 | Copyright 2004 - 2017 |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
|
|
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
Line 91 unsigned int crcCalc(unsigned char * __restrict psBuf,
|
Line 91 unsigned int crcCalc(unsigned char * __restrict psBuf,
|
*/ |
*/ |
unsigned short crcIP(unsigned char * __restrict buf, int bufLen); |
unsigned short crcIP(unsigned char * __restrict buf, int bufLen); |
/* |
/* |
|
* crcTCP() - Checksum for TCP v4 communication |
|
* |
|
* @buf = Data for calculation |
|
* @bufLen = Length of data |
|
* @th = TCP header |
|
* return: -1 error, !=-1 Checksum |
|
*/ |
|
unsigned short crcTCP(struct in_addr src, struct in_addr dst, |
|
unsigned char * __restrict th); |
|
/* |
|
* crcUDP() - Checksum for UDP v4 communication |
|
* |
|
* @buf = Data for calculation |
|
* @bufLen = Length of data |
|
* @uh = UDP header |
|
* return: -1 error, !=-1 Checksum |
|
*/ |
|
unsigned short crcUDP(struct in_addr src, struct in_addr dst, |
|
unsigned char * __restrict uh); |
|
|
|
/* |
* crcFletcher16() - Fletcher-16 Checksum computing |
* crcFletcher16() - Fletcher-16 Checksum computing |
* |
* |
* @nBuf = Data for calculation |
* @nBuf = Data for calculation |
Line 124 unsigned int crcAdler(unsigned char * __restrict psBuf
|
Line 145 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) |
|
|
|
/* |
|
* crc_32() - CRC32 calculation from table |
|
* |
|
* @crc = Initial crc value |
|
* @buf = Data for calculation |
|
* @len = Length of data |
|
* return: calculated CRC32 |
|
*/ |
|
unsigned int crc_32(unsigned int crc, const unsigned char * __restrict buf, unsigned int len); |
|
|
/* |
/* |
* crcPelco() - Calculate Pelco D/P CRC |
* crcPelco() - Calculate Pelco D/P CRC |