/*
 * Copyright (c) 2004 Endace Technology Ltd, Hamilton, New Zealand.
 * All rights reserved.
 *
 * This source code is proprietary to Endace Technology Limited and no part
 * of it may be redistributed, published or disclosed except as outlined in
 * the written contract supplied with this product.
 *
 * $Id: dagcrc.h 8180 2008-01-16 02:35:01Z jomi $
 */

/* Function declarations */

#ifndef _DAGCRCH
#define _DAGCRCH

unsigned long crc32_calc (unsigned char *buf, int len);
unsigned long crc32_append (unsigned long crc, unsigned char *buf, int len);
unsigned long crc32_reflect (unsigned long crc);
unsigned long crc32_init ();
unsigned short int crc16_update (unsigned short int crc, unsigned char *data, int len);
unsigned short int crc16_init ();

unsigned short int  daggen_infiniband_vcrc16(unsigned short int  crc, const unsigned char* buf, int len);
unsigned int 
daggen_infiniband_icrc(unsigned int crc, const unsigned char* buf1, int len1, const unsigned char* buf2, int len2);

#endif
