--- libelwix/inc/elwix/acrc.h 2014/01/30 07:32:45 1.3.4.1 +++ libelwix/inc/elwix/acrc.h 2017/12/08 00:07:13 1.5.18.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: acrc.h,v 1.3.4.1 2014/01/30 07:32:45 misho Exp $ +* $Id: acrc.h,v 1.5.18.1 2017/12/08 00:07:13 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2014 +Copyright 2004 - 2017 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -90,6 +90,27 @@ unsigned int crcCalc(unsigned char * __restrict psBuf, * return: -1 error, !=-1 Checksum */ 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 *