summaryrefslogtreecommitdiff
path: root/wsutil/crc16.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-03-13 15:20:49 -0400
committerAnders Broman <a.broman58@gmail.com>2017-03-16 05:51:04 +0000
commit618ca466aae3637d641a6e3101b62f1e552a7ee1 (patch)
treea44c0e785a74b93af75e9a5763c40d5701d60cbe /wsutil/crc16.h
parent05b61a21a209f43de2926b808ed3bc151aa1991e (diff)
downloadwireshark-618ca466aae3637d641a6e3101b62f1e552a7ee1.tar.gz
Add support for verifying CIP Safety CRC values.
Change-Id: I44f7ff6980f27b1a0d4199a91f9b217aec7e4652 Reviewed-on: https://code.wireshark.org/review/20557 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wsutil/crc16.h')
-rw-r--r--wsutil/crc16.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/wsutil/crc16.h b/wsutil/crc16.h
index 11616089cc..b80c012d83 100644
--- a/wsutil/crc16.h
+++ b/wsutil/crc16.h
@@ -103,6 +103,15 @@ WS_DLL_PUBLIC guint16 crc16_0x9949_seed(const guint8 *buf, guint len, guint16 se
*/
WS_DLL_PUBLIC guint16 crc16_0x3D65_seed(const guint8 *buf, guint len, guint16 seed);
+/** Computes CRC16 checksum for the given data with the polynom 0x080F using
+ * precompiled CRC table
+ * @param buf a pointer to a buffer of the given length
+ * @param len the length of the given buffer
+ * @param seed The seed to use.
+ * @return the CRC16 checksum for the buffer
+ */
+WS_DLL_PUBLIC guint16 crc16_0x080F_seed(const guint8 *buf, guint len, guint16 seed);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */