From c68f62210fc20890502cb84dbc2ea4321de5b791 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 22 Aug 2004 00:31:58 +0000 Subject: Add "tvb_get_ntoh64()" and "tvb_get_letoh64()" routines to fetch 64-bit integers. Make FT_INT64 and FT_UINT64 add numerical values, rather than byte-array values, to the protocol tree, and add routines to add specified 64-bit integer values to the protocol tree. Use those routines in the RSVP dissector. svn path=/trunk/; revision=11796 --- epan/proto.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'epan/proto.h') diff --git a/epan/proto.h b/epan/proto.h index 253928446c..c5ba30cf33 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -747,6 +747,32 @@ extern proto_item * proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8); +/** Add an FT_UINT64 to a proto_tree. + @param tree the tree to append this item to + @param hfindex field index + @param tvb the tv buffer of the current data + @param start start of data in tvb + @param length length of data in tvb + @param value data to display + @return the newly created item */ +extern proto_item * +proto_tree_add_uint64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, + gint length, guint64 value); + +/** Add a formatted FT_UINT64 to a proto_tree. + @param tree the tree to append this item to + @param hfindex field index + @param tvb the tv buffer of the current data + @param start start of data in tvb + @param length length of data in tvb + @param value data to display + @param format printf like format string + @param ... printf like parameters + @return the newly created item */ +extern proto_item * +proto_tree_add_uint64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, + gint length, guint64 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8); + /** Add one of FT_INT8, FT_INT16, FT_INT24 or FT_INT32 to a proto_tree. @param tree the tree to append this item to @param hfindex field index @@ -779,6 +805,32 @@ extern proto_item * proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint32 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8); +/** Add an FT_INT64 to a proto_tree. + @param tree the tree to append this item to + @param hfindex field index + @param tvb the tv buffer of the current data + @param start start of data in tvb + @param length length of data in tvb + @param value data to display + @return the newly created item */ +extern proto_item * +proto_tree_add_int64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, + gint length, gint64 value); + +/** Add a formatted FT_INT64 to a proto_tree. + @param tree the tree to append this item to + @param hfindex field index + @param tvb the tv buffer of the current data + @param start start of data in tvb + @param length length of data in tvb + @param value data to display + @param format printf like format string + @param ... printf like parameters + @return the newly created item */ +extern proto_item * +proto_tree_add_int64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, + gint length, gint64 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8); + /** Useful for quick debugging. Also sends string to STDOUT, so don't * leave call to this function in production code. @param tree the tree to append the text to -- cgit v1.2.3