aboutsummaryrefslogtreecommitdiffstats
path: root/epan/crc16-tvb.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-10-22 23:30:26 +0000
committerMichael Mann <mmann78@netscape.net>2013-10-22 23:30:26 +0000
commitcbd3194bcf87f2e5146343170b4a595ace599ff1 (patch)
tree2f2c97697f15284513824402b4dad08c413ab0eb /epan/crc16-tvb.c
parent02a8e72b436834cc097b75ad63be9a1bf4ea1a99 (diff)
Add STANAG 5066 DTS CRC routines. Bug 9217 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9217)
STANAG 5066 DTS will follow when it passes review, just trying to make the patch more manageable. svn path=/trunk/; revision=52774
Diffstat (limited to 'epan/crc16-tvb.c')
-rw-r--r--epan/crc16-tvb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/epan/crc16-tvb.c b/epan/crc16-tvb.c
index 762771dc38..b3f98179f8 100644
--- a/epan/crc16-tvb.c
+++ b/epan/crc16-tvb.c
@@ -114,3 +114,13 @@ guint16 crc16_plain_tvb_offset_seed(tvbuff_t *tvb, guint offset, guint len, guin
return crc16_plain_finalize(crc);
}
+
+guint16 crc16_0x9949_tvb_offset_seed(tvbuff_t *tvb, guint offset, guint len, guint16 seed)
+{
+ const guint8 *buf;
+
+ tvb_ensure_bytes_exist(tvb, offset, len); /* len == -1 not allowed */
+ buf = tvb_get_ptr(tvb, offset, len);
+
+ return crc16_0x9949_seed(buf, len, seed);
+}