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>
This commit is contained in:
Michael Mann 2015-03-18 09:22:46 -04:00 committed by Anders Broman
parent a1ea3ce81c
commit baa83912e3
4 changed files with 11 additions and 14 deletions

View File

@ -223,7 +223,6 @@ libwireshark.so.0 libwireshark0 #MINVER#
decode_as_default_populate_list@Base 1.12.0~rc1
decode_as_default_reset@Base 1.12.0~rc1
decode_as_list@Base 1.12.0~rc1
decode_bitfield_value@Base 1.9.1
decode_bits_in_field@Base 1.9.1
decode_dcerpc_add_show_list@Base 1.12.0~rc1
decode_dcerpc_reset_all@Base 1.12.0~rc1

View File

@ -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,

View File

@ -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.

View File

@ -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);