aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-erf.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2019-04-03 14:32:30 -0700
committerAnders Broman <a.broman58@gmail.com>2019-04-04 04:03:38 +0000
commit8d3ac3af866ecc7b847dd5b621d828872fe9ba18 (patch)
tree3fa7aa1a57e1b828f636829f08d1adb9dfb5b395 /epan/dissectors/packet-erf.c
parentbdf26a35f696a1524364945a2c868e57c97d1729 (diff)
epan: Convert our PROTO_ITEM_ macros to inline functions.
Convert our various PROTO_ITEM_ macros to inline functions and document them. Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c Reviewed-on: https://code.wireshark.org/review/32706 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-erf.c')
-rw-r--r--epan/dissectors/packet-erf.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-erf.c b/epan/dissectors/packet-erf.c
index e0e89d212c..daa7c4e959 100644
--- a/epan/dissectors/packet-erf.c
+++ b/epan/dissectors/packet-erf.c
@@ -1858,12 +1858,12 @@ static void dissect_host_anchor_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* TODO: top level linking to most recent frame like we have for Host ID? */
subtree = proto_tree_add_subtree_format(tree, tvb, 0, 0, ett_erf_anchor, &pi, "Host ID: 0x%012" G_GINT64_MODIFIER "x, Anchor ID: 0x%012" G_GINT64_MODIFIER "x", host_id & ERF_EHDR_HOST_ID_MASK, anchor_id & ERF_EHDR_ANCHOR_ID_MASK);
- PROTO_ITEM_SET_GENERATED(pi);
+ proto_item_set_generated(pi);
pi = proto_tree_add_uint64(subtree, hf_erf_anchor_hostid, tvb, 0, 0, host_id & ERF_EHDR_HOST_ID_MASK);
- PROTO_ITEM_SET_GENERATED(pi);
+ proto_item_set_generated(pi);
pi = proto_tree_add_uint64(subtree, hf_erf_anchor_anchorid, tvb, 0, 0, anchor_id & ERF_EHDR_ANCHOR_ID_MASK);
- PROTO_ITEM_SET_GENERATED(pi);
+ proto_item_set_generated(pi);
anchor_info = (erf_host_anchor_info_t*)wmem_map_lookup(erf_state.host_anchor_map, &key);
@@ -1880,7 +1880,7 @@ static void dissect_host_anchor_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree
if(pinfo->num != anchored_info->frame_num) {
/* Don't list the frame itself */
pi = proto_tree_add_uint(subtree, hf_erf_anchor_linked, tvb, 0, 0, anchored_info->frame_num);
- PROTO_ITEM_SET_GENERATED(pi);
+ proto_item_set_generated(pi);
/* XXX: Need to do this each time because pinfo is discarded. Filtering does not reset visited as it does not do a full redissect.
We also might not catch all frames in the first pass (e.g. comment after record). */
mark_frame_as_depended_upon(pinfo, anchored_info->frame_num);
@@ -1918,22 +1918,22 @@ dissect_host_id_source_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
hostid_tree = proto_tree_add_subtree_format(tree, tvb, 0, 0, ett_erf_source, &pi,
"Host ID: 0x%012" G_GINT64_MODIFIER "x, Source ID: %u", host_id, source_id&0xFF);
}
- PROTO_ITEM_SET_GENERATED(pi);
+ proto_item_set_generated(pi);
pi = proto_tree_add_uint64(hostid_tree, hf_erf_hostid, tvb, 0, 0, host_id);
- PROTO_ITEM_SET_GENERATED(pi);
+ proto_item_set_generated(pi);
pi = proto_tree_add_uint(hostid_tree, hf_erf_sourceid, tvb, 0, 0, source_id);
- PROTO_ITEM_SET_GENERATED(pi);
+ proto_item_set_generated(pi);
if (fnum_next != G_MAXUINT32) {
pi = proto_tree_add_uint(hostid_tree, hf_erf_source_next, tvb, 0, 0, fnum_next);
- PROTO_ITEM_SET_GENERATED(pi);
+ proto_item_set_generated(pi);
/* XXX: Save the surrounding nearest periodic records when we do a filtered save so we keep native ERF metadata */
mark_frame_as_depended_upon(pinfo, fnum_next);
}
if (fnum != G_MAXUINT32) {
pi = proto_tree_add_uint(hostid_tree, hf_erf_source_prev, tvb, 0, 0, fnum);
- PROTO_ITEM_SET_GENERATED(pi);
+ proto_item_set_generated(pi);
mark_frame_as_depended_upon(pinfo, fnum);
}
}