pfcp: change to utilize proto_tree_add_bitmask_list

This commit is contained in:
Joakim Karlsson 2022-07-05 11:47:17 +02:00 committed by A Wireshark GitLab Utility
parent b97556fabf
commit bf8577b88c
4 changed files with 132 additions and 797 deletions

File diff suppressed because it is too large Load Diff

View File

@ -12157,6 +12157,20 @@ proto_tree_add_bitmask_list(proto_tree *tree, tvbuff_t *tvb, const guint offset,
}
}
WS_DLL_PUBLIC void
proto_tree_add_bitmask_list_ret_uint64(proto_tree *tree, tvbuff_t *tvb, const guint offset,
const int len, int * const *fields, const guint encoding, guint64 *retval)
{
guint64 value;
if (tree) {
value = get_uint64_value(tree, tvb, offset, len, encoding);
proto_item_add_bitmask_tree(NULL, tvb, offset, len, -1, fields,
BMT_NO_APPEND, FALSE, TRUE, tree, value);
*retval = value;
}
}
WS_DLL_PUBLIC void
proto_tree_add_bitmask_list_value(proto_tree *tree, tvbuff_t *tvb, const guint offset,
const int len, int * const *fields, const guint64 value)

View File

@ -2987,6 +2987,25 @@ WS_DLL_PUBLIC void
proto_tree_add_bitmask_list(proto_tree *tree, tvbuff_t *tvb, const guint offset,
const int len, int * const *fields, const guint encoding);
/** This function will dissect a value that describe a bitmask. Similar to proto_tree_add_bitmask_list(),
but with a return value
@param tree the tree to append this item to
@param tvb the tv buffer of the current data
@param offset start of data in tvb
@param len number of bytes of data
@param fields an array of pointers to int that lists all the fields of the
bitmask. These fields can be either of the type FT_BOOLEAN for flags
or another integer of the same type/size as hf_hdr with a mask specified.
This array is terminated by a NULL entry.
FT_BOOLEAN bits that are set to 1 will have the name added to the expansion.
FT_integer fields that have a value_string attached will have the
matched string displayed on the expansion line.
@param encoding big or little endian byte representation (ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN/ENC_HOST_ENDIAN)
@param return_value if a pointer is passed here the value is returned. */
WS_DLL_PUBLIC void
proto_tree_add_bitmask_list_ret_uint64(proto_tree *tree, tvbuff_t *tvb, const guint offset,
const int len, int * const *fields, const guint encoding, guint64 *retval);
/** This function will dissect a value that describe a bitmask. Similar to proto_tree_add_bitmask_list(),
but with a passed in value (presumably because it can't be retrieved directly from tvb)
@param tree the tree to append this item to

View File

@ -1239,6 +1239,7 @@ libwireshark.so.0 libwireshark0 #MINVER#
proto_tree_add_bitmask@Base 1.9.1
proto_tree_add_bitmask_len@Base 1.9.1
proto_tree_add_bitmask_list@Base 1.99.4
proto_tree_add_bitmask_list_ret_uint64@Base 3.7.1
proto_tree_add_bitmask_list_value@Base 2.1.0
proto_tree_add_bitmask_ret_uint64@Base 2.1.0
proto_tree_add_bitmask_text@Base 1.9.1