From dd5f2bd054710910788656e068ad8853089c84c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mo=C5=84?= Date: Fri, 19 Jul 2019 17:43:20 +0200 Subject: USBLL: Verify DATA packets CRC-16 Ping-Bug: 15908 Change-Id: Idda280545665184aca40c694ea6d639c9317307a Reviewed-on: https://code.wireshark.org/review/34016 Petri-Dish: Roland Knall Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/crc16-tvb.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'epan/crc16-tvb.h') diff --git a/epan/crc16-tvb.h b/epan/crc16-tvb.h index 203ca23652..454cfbc992 100644 --- a/epan/crc16-tvb.h +++ b/epan/crc16-tvb.h @@ -72,6 +72,13 @@ WS_DLL_PUBLIC guint16 crc16_ccitt_tvb_offset_seed(tvbuff_t *tvb, guint offset, @return The calculated CRC_A. */ WS_DLL_PUBLIC guint16 crc16_iso14443a_tvb_offset(tvbuff_t *tvb, guint offset, guint len); +/** Compute the 16bit CRC value of a tv buffer as defined in USB Standard. + @param tvb The tv buffer containing the data. + @param offset The offset into the tv buffer. + @param len The number of bytes to include in the computation. + @return The calculated CRC. */ +WS_DLL_PUBLIC guint16 crc16_usb_tvb_offset(tvbuff_t *tvb, guint offset, guint len); + /** Compute the "plain" CRC16 checksum of a tv buffer using the following * parameters: * Width = 16 -- cgit v1.2.3