aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff.h
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2014-12-31 17:05:58 -0500
committerEvan Huus <eapache@gmail.com>2015-01-02 04:07:19 +0000
commit55c385e610d5fa89d78075cce66741fb582d948b (patch)
tree071c77392903155c760347ababaff58b3ebc8a9b /epan/tvbuff.h
parent611cfd00c283e7a77a2f1fd89c01b0b9f691411b (diff)
tvb: implement endianness-paramterized getters
e.g. tvb_get_guint16(tvb, offset, ENC_LITTLE_ENDIAN) Change-Id: Iea02fd59b13678aca741d028fb1f66f334447498 Reviewed-on: https://code.wireshark.org/review/6191 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/tvbuff.h')
-rw-r--r--epan/tvbuff.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/epan/tvbuff.h b/epan/tvbuff.h
index b9e8a782d6..66fd060d13 100644
--- a/epan/tvbuff.h
+++ b/epan/tvbuff.h
@@ -325,6 +325,19 @@ WS_DLL_PUBLIC gfloat tvb_get_letohieee_float(tvbuff_t *tvb, const gint offset);
WS_DLL_PUBLIC gdouble tvb_get_letohieee_double(tvbuff_t *tvb,
const gint offset);
+WS_DLL_PUBLIC guint16 tvb_get_guint16(tvbuff_t *tvb, const gint offset, const guint encoding);
+WS_DLL_PUBLIC guint32 tvb_get_guint24(tvbuff_t *tvb, const gint offset, const guint encoding);
+WS_DLL_PUBLIC guint32 tvb_get_guint32(tvbuff_t *tvb, const gint offset, const guint encoding);
+WS_DLL_PUBLIC guint64 tvb_get_guint40(tvbuff_t *tvb, const gint offset, const guint encoding);
+WS_DLL_PUBLIC gint64 tvb_get_gint40(tvbuff_t *tvb, const gint offset, const guint encoding);
+WS_DLL_PUBLIC guint64 tvb_get_guint48(tvbuff_t *tvb, const gint offset, const guint encoding);
+WS_DLL_PUBLIC gint64 tvb_get_gint48(tvbuff_t *tvb, const gint offset, const guint encoding);
+WS_DLL_PUBLIC guint64 tvb_get_guint56(tvbuff_t *tvb, const gint offset, const guint encoding);
+WS_DLL_PUBLIC gint64 tvb_get_gint56(tvbuff_t *tvb, const gint offset, const guint encoding);
+WS_DLL_PUBLIC guint64 tvb_get_guint64(tvbuff_t *tvb, const gint offset, const guint encoding);
+WS_DLL_PUBLIC gfloat tvb_get_ieee_float(tvbuff_t *tvb, const gint offset, const guint encoding);
+WS_DLL_PUBLIC gdouble tvb_get_ieee_double(tvbuff_t *tvb, const gint offset, const guint encoding);
+
/*
* Fetch 16-bit and 32-bit values in host byte order.
* Used for some pseudo-headers in pcap/pcap-ng files, in which the
@@ -401,7 +414,7 @@ WS_DLL_PUBLIC void tvb_get_ntohguid(tvbuff_t *tvb, const gint offset,
WS_DLL_PUBLIC void tvb_get_letohguid(tvbuff_t *tvb, const gint offset,
e_guid_t *guid);
WS_DLL_PUBLIC void tvb_get_guid(tvbuff_t *tvb, const gint offset,
- e_guid_t *guid, const guint representation);
+ e_guid_t *guid, const guint encoding);
/* Fetch a specified number of bits from bit offset in a tvb. All of these
* functions are equivalent, except for the type of the return value. Note