aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-03-18 09:22:46 -0400
committerAnders Broman <a.broman58@gmail.com>2015-03-19 04:33:26 +0000
commitbaa83912e3ba3c5146342eb7e1e30f56b462587f (patch)
tree622685f69c6c41323d968af8ebc7d95bf30ec8e6 /epan
parenta1ea3ce81c0c4df17af899a1e7e20ea2e30a7459 (diff)
Eliminate decode_bitfield_value from "public" use.
This "encourages" (forces) dissectors to use the bitmask field of the header_field_info structure to get "bitmask formatting" of a field. other_decode_bitfield_value should be treated the same (eventually eliminated), but there are still replacements to be made in the dissectors. Change-Id: I8a0d829c3fef2d5e5a588667a259e231bca559e6 Reviewed-on: https://code.wireshark.org/review/7736 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/proto.c11
-rw-r--r--epan/to_str.c11
-rw-r--r--epan/to_str.h2
3 files changed, 11 insertions, 13 deletions
diff --git a/epan/proto.c b/epan/proto.c
index d22e41539a..cbc761c0e5 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -3334,6 +3334,17 @@ proto_tree_set_boolean(field_info *fi, guint64 value)
proto_tree_set_uint64(fi, value);
}
+static char *
+decode_bitfield_value(char *buf, const guint64 val, const guint64 mask, const int width)
+{
+ char *p;
+
+ p = other_decode_bitfield_value(buf, val, mask, width);
+ p = g_stpcpy(p, " = ");
+
+ return p;
+}
+
/* Add a FT_FLOAT to a proto_tree */
proto_item *
proto_tree_add_float(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
diff --git a/epan/to_str.c b/epan/to_str.c
index 64e7c666f9..ca72e2f104 100644
--- a/epan/to_str.c
+++ b/epan/to_str.c
@@ -1034,17 +1034,6 @@ other_decode_bitfield_value(char *buf, const guint64 val, const guint64 mask, co
return p;
}
-char *
-decode_bitfield_value(char *buf, const guint64 val, const guint64 mask, const int width)
-{
- char *p;
-
- p = other_decode_bitfield_value(buf, val, mask, width);
- p = g_stpcpy(p, " = ");
-
- return p;
-}
-
/*
This function is very fast and this function is called a lot.
XXX update the address_to_str stuff to use this function.
diff --git a/epan/to_str.h b/epan/to_str.h
index 3f1643bc01..4b409d6dec 100644
--- a/epan/to_str.h
+++ b/epan/to_str.h
@@ -92,8 +92,6 @@ WS_DLL_PUBLIC char *decode_bits_in_field(const guint bit_offset, const gint no_o
WS_DLL_PUBLIC char *other_decode_bitfield_value(char *buf, const guint64 val, const guint64 mask,
const int width);
-WS_DLL_PUBLIC char *decode_bitfield_value(char *buf, const guint64 val, const guint64 mask,
- const int width);
WS_DLL_PUBLIC const gchar* port_type_to_str (port_type type);