diff options
author | Evan Huus <eapache@gmail.com> | 2013-03-29 02:34:23 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-03-29 02:34:23 +0000 |
commit | a0d107beec7608c673f584e30987afc42061a514 (patch) | |
tree | a5e51f8d72c4b147c535c49464562eb78dd07c86 /epan/value_string.c | |
parent | 37600a157ba2036a79a5ebf466b31b8eee19244e (diff) |
Remove decode_enumerated_bitfield and decode_enumerated_bitfield_shifted.
Effectively inline the only remain call (and replace a static buffer with ep
memory). Much of the NFS dissector needs to be converted to use named fields
at which point this code can go away, but that's a much bigger job.
Also, add modelines to packet-nfs.c and mark some internal value_string
functions as WS_DLL_LOCAL.
svn path=/trunk/; revision=48635
Diffstat (limited to 'epan/value_string.c')
-rw-r--r-- | epan/value_string.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/epan/value_string.c b/epan/value_string.c index 2c97801094..64eddb7480 100644 --- a/epan/value_string.c +++ b/epan/value_string.c @@ -498,42 +498,6 @@ value_string_ext_match_type_str(const value_string_ext *vse) return "[Match Type not initialized or invalid]"; } -/* Functions for bitfield generation, do they even belong here? */ - -/* Generate a string describing an enumerated bitfield (an N-bit field - with various specific values having particular names). */ -const char * -decode_enumerated_bitfield(const guint32 val, const guint32 mask, - const int width, const value_string *tab, const char *fmt) -{ - static char buf[1025]; - char *p; - - p = decode_bitfield_value(buf, val, mask, width); - g_snprintf(p, (gulong) (1024-(p-buf)), fmt, val_to_str_const(val & mask, tab, "Unknown")); - return buf; -} - -/* Generate a string describing an enumerated bitfield (an N-bit field - with various specific values having particular names). */ -const char * -decode_enumerated_bitfield_shifted(const guint32 val, const guint32 mask, - const int width, const value_string *tab, const char *fmt) -{ - static char buf[1025]; - char *p; - int shift = 0; - - /* Compute the number of bits we have to shift the bitfield right - to extract its value. */ - while ((mask & (1<<shift)) == 0) - shift++; - - p = decode_bitfield_value(buf, val, mask, width); - g_snprintf(p, (gulong) (1024-(p-buf)), fmt, val_to_str_const((val & mask) >> shift, tab, "Unknown")); - return buf; -} - /* * Editor modelines - http://www.wireshark.org/tools/modelines.html * |