aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff.h
diff options
context:
space:
mode:
authorGerasimos Dimitriadis <dimeg@intracom.gr>2009-11-14 20:13:43 +0000
committerGerasimos Dimitriadis <dimeg@intracom.gr>2009-11-14 20:13:43 +0000
commit9b36fc784e8edf1c018157bb43d64f5a24216c73 (patch)
tree46f8b3fb06f393d6cc6ee0bc58816df0ba5e28b5 /epan/tvbuff.h
parent81fe22f0d160849972f25572a975552416110c83 (diff)
From yy:
About GSM system information type 2quater Modified to use newly defined tvb_get_bits() in tvbuff.c https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4219 svn path=/trunk/; revision=30962
Diffstat (limited to 'epan/tvbuff.h')
-rw-r--r--epan/tvbuff.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/epan/tvbuff.h b/epan/tvbuff.h
index c60db6441f..a6cd3df8c6 100644
--- a/epan/tvbuff.h
+++ b/epan/tvbuff.h
@@ -349,6 +349,13 @@ extern guint16 tvb_get_bits16(tvbuff_t *tvb, gint bit_offset, gint no_of_bits, g
extern guint32 tvb_get_bits32(tvbuff_t *tvb, gint bit_offset, gint no_of_bits, gboolean little_endian);
extern guint64 tvb_get_bits64(tvbuff_t *tvb, gint bit_offset, gint no_of_bits, gboolean little_endian);
+/* Fetch a specified number of bits from bit offset in a tvb, but allow number
+ * of bits to range between 1 and 32. If the requested number of bits is known
+ * beforehand, or its range can be handled by a single function of the group
+ * above, use one of them instead.
+ */
+extern guint32 tvb_get_bits(tvbuff_t *tvb, gint bit_offset, gint no_of_bits, gboolean little_endian);
+
/** Returns target for convenience. Does not suffer from possible
* expense of tvb_get_ptr(), since this routine is smart enough
* to copy data in chunks if the request range actually exists in