aboutsummaryrefslogtreecommitdiffstats
path: root/epan/value_string.h
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-07-26 21:51:39 +0000
committerEvan Huus <eapache@gmail.com>2013-07-26 21:51:39 +0000
commit6e3a30794ef9e3270f52bbb5ea2227ff35112f21 (patch)
tree1d7592f45b40281d89259ea429600352e9560461 /epan/value_string.h
parent6580abbbc31c22060e819cfb8b1b8484028b62ec (diff)
Add 64-bit value strings and the appropriate tooling (including yet another
overloaded use of the DISPLAY field). Thanks to Jakub for pointing out I'd done this wrong the first time (months ago in r49357). Fixes severity display for collectd protocol, originally filed at: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8472 svn path=/trunk/; revision=50935
Diffstat (limited to 'epan/value_string.h')
-rw-r--r--epan/value_string.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/epan/value_string.h b/epan/value_string.h
index 1759d0dfb1..a2323e7738 100644
--- a/epan/value_string.h
+++ b/epan/value_string.h
@@ -31,8 +31,8 @@
/* VALUE TO STRING MATCHING */
typedef struct _value_string {
- guint32 value;
- const gchar *strptr;
+ guint32 value;
+ const gchar *strptr;
} value_string;
WS_DLL_PUBLIC
@@ -51,6 +51,29 @@ WS_DLL_PUBLIC
const gchar*
try_val_to_str_idx(const guint32 val, const value_string *vs, gint *idx);
+/* 64-BIT VALUE TO STRING MATCHING */
+
+typedef struct _val64_string {
+ guint64 value;
+ const gchar *strptr;
+} val64_string;
+
+WS_DLL_PUBLIC
+const gchar*
+val64_to_str(const guint64 val, const val64_string *vs, const char *fmt);
+
+WS_DLL_PUBLIC
+const gchar*
+val64_to_str_const(const guint64 val, const val64_string *vs, const char *unknown_str);
+
+WS_DLL_PUBLIC
+const gchar*
+try_val64_to_str(const guint64 val, const val64_string *vs);
+
+WS_DLL_PUBLIC
+const gchar*
+try_val64_to_str_idx(const guint64 val, const val64_string *vs, gint *idx);
+
/* STRING TO VALUE MATCHING */
WS_DLL_PUBLIC