summaryrefslogtreecommitdiff
path: root/src/key-value-store/crc32.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/key-value-store/crc32.h')
-rw-r--r--src/key-value-store/crc32.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/key-value-store/crc32.h b/src/key-value-store/crc32.h
new file mode 100644
index 0000000..13ffa4c
--- /dev/null
+++ b/src/key-value-store/crc32.h
@@ -0,0 +1,43 @@
+#ifndef CRC32_H
+#define CRC32_H
+
+/******************************************************************************
+ * Project Persistence key value store
+ * (c) copyright 2014
+ * Company XS Embedded GmbH
+ *****************************************************************************/
+/******************************************************************************
+ * Copyright
+ *
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
+ * with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+******************************************************************************/
+ /**
+ * @file crc32.h
+ * @ingroup Persistence key value store
+ * @author Simon Disch
+ * @brief Header of crc32 checksum generation
+ * @see
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define PERS_COM_CRC32_INTERFACE_VERSION (0x01000000U)
+#define CHKSUMBUFSIZE 64
+
+#include <string.h>
+#include <stdio.h>
+
+unsigned int pcoCrc32(unsigned int crc, const unsigned char *buf, size_t theSize);
+int pcoCalcCrc32Csum(int fd, int startOffset);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CRC32_H */