aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/crc16.h
diff options
context:
space:
mode:
authorTomasz Moń <desowin@gmail.com>2019-07-19 17:43:20 +0200
committerAnders Broman <a.broman58@gmail.com>2019-07-25 08:58:13 +0000
commitdd5f2bd054710910788656e068ad8853089c84c5 (patch)
tree310b4d2361be39e018cb0e05d534dac3fad3cc51 /wsutil/crc16.h
parent53fdec477da233d7161990616f174deedad524b8 (diff)
USBLL: Verify DATA packets CRC-16
Ping-Bug: 15908 Change-Id: Idda280545665184aca40c694ea6d639c9317307a Reviewed-on: https://code.wireshark.org/review/34016 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wsutil/crc16.h')
-rw-r--r--wsutil/crc16.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/wsutil/crc16.h b/wsutil/crc16.h
index 922599bf7c..64b6203f13 100644
--- a/wsutil/crc16.h
+++ b/wsutil/crc16.h
@@ -55,6 +55,12 @@ WS_DLL_PUBLIC guint16 crc16_ccitt_seed(const guint8 *buf, guint len, guint16 see
@return the CRC16 checksum for the buffer */
WS_DLL_PUBLIC guint16 crc16_iso14443a(const guint8 *buf, guint len);
+/** Compute the 16bit CRC value of a buffer as defined in USB Specification.
+ @param buf The buffer containing the data.
+ @param len The number of bytes to include in the computation.
+ @return the CRC16 checksum for the buffer */
+WS_DLL_PUBLIC guint16 crc16_usb(const guint8 *buf, guint len);
+
/** Calculates a CRC16 checksum for the given buffer with the polynom
* 0x5935 using a precompiled CRC table
* @param buf a pointer to a buffer of the given length