aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-collectd.c
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/dissectors/packet-collectd.c
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/dissectors/packet-collectd.c')
-rw-r--r--epan/dissectors/packet-collectd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-collectd.c b/epan/dissectors/packet-collectd.c
index 7983dd225b..a740f87461 100644
--- a/epan/dissectors/packet-collectd.c
+++ b/epan/dissectors/packet-collectd.c
@@ -138,7 +138,7 @@ static const value_string valuetypenames[] = {
#define SEVERITY_FAILURE 0x01
#define SEVERITY_WARNING 0x02
#define SEVERITY_OKAY 0x04
-static const value_string severity_names[] = {
+static const val64_string severity_names[] = {
{ SEVERITY_FAILURE, "FAILURE" },
{ SEVERITY_WARNING, "WARNING" },
{ SEVERITY_OKAY, "OKAY" },
@@ -1304,7 +1304,7 @@ dissect_collectd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item_set_text (pi,
"collectd SEVERITY segment: "
"%s (%"G_GINT64_MODIFIER"u)",
- val_to_str_const ((gint32)ndispatch.severity, severity_names, "UNKNOWN"),
+ val64_to_str_const (ndispatch.severity, severity_names, "UNKNOWN"),
ndispatch.severity);
}
@@ -1470,7 +1470,7 @@ void proto_register_collectd(void)
NULL, 0x0, NULL, HFILL }
},
{ &hf_collectd_data_severity,
- { "Severity", "collectd.data.severity", FT_UINT64, BASE_HEX,
+ { "Severity", "collectd.data.severity", FT_UINT64, BASE_HEX | BASE_VAL64_STRING,
VALS(severity_names),
0x0, NULL, HFILL }
},