aboutsummaryrefslogtreecommitdiffstats
path: root/doc
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 /doc
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 'doc')
-rw-r--r--doc/README.dissector18
-rw-r--r--doc/README.request_response_tracking6
2 files changed, 12 insertions, 12 deletions
diff --git a/doc/README.dissector b/doc/README.dissector
index 2dd67304b3..68515603cc 100644
--- a/doc/README.dissector
+++ b/doc/README.dissector
@@ -2229,9 +2229,9 @@ proto_tree_add_bitmask() and proto_tree_add_bitmask_text() may not:
than the packet it was called to interpret.
-PROTO_ITEM_SET_GENERATED()
+proto_item_set_generated()
--------------------------
-PROTO_ITEM_SET_GENERATED is used to mark fields as not being read from the
+proto_item_set_generated is used to mark fields as not being read from the
captured data directly, but inferred from one or more values.
One of the primary uses of this is the presentation of verification of
@@ -2243,9 +2243,9 @@ indicating a generated field.
Header checksum: 0x3d42 [correct]
[Checksum Status: Good (1)]
-PROTO_ITEM_SET_HIDDEN()
+proto_item_set_hidden()
-----------------------
-PROTO_ITEM_SET_HIDDEN is used to hide fields, which have already been added
+proto_item_set_hidden is used to hide fields, which have already been added
to the tree, from being visible in the displayed tree.
NOTE that creating hidden fields is actually quite a bad idea from a UI design
@@ -2269,7 +2269,7 @@ Rings are 3-digit hex numbers, and bridges are single hex digits:
In the case of RIF, the programmer should use a field with no value and
use proto_tree_add_none_format() to build the above representation. The
programmer can then add the ring and bridge values, one-by-one, with
-proto_tree_add_item() and hide them with PROTO_ITEM_SET_HIDDEN() so that the
+proto_tree_add_item() and hide them with proto_item_set_hidden() so that the
user can then filter on or search for a particular ring or bridge. Here's a
skeleton of how the programmer might code this.
@@ -2283,14 +2283,14 @@ skeleton of how the programmer might code this.
pi = proto_tree_add_item(tree, hf_tr_rif_ring, ...,
ENC_BIG_ENDIAN);
- PROTO_ITEM_SET_HIDDEN(pi);
+ proto_item_set_hidden(pi);
}
for(i = 0; i < num_rings - 1; i++) {
proto_item *pi;
pi = proto_tree_add_item(tree, hf_tr_rif_bridge, ...,
ENC_BIG_ENDIAN);
- PROTO_ITEM_SET_HIDDEN(pi);
+ proto_item_set_hidden(pi);
}
The logical tree has these items:
@@ -2310,9 +2310,9 @@ filter is then possible:
tr.rif_ring eq 0x013
-PROTO_ITEM_SET_URL
+proto_item_set_url
------------------
-PROTO_ITEM_SET_URL is used to mark fields as containing a URL. This can only
+proto_item_set_url is used to mark fields as containing a URL. This can only
be done with fields of type FT_STRING(Z). If these fields are presented they
are underlined, as could be done in a browser. These fields are sensitive to
clicks as well, launching the configured browser with this URL as parameter.
diff --git a/doc/README.request_response_tracking b/doc/README.request_response_tracking
index d29d78836c..519c0bc97e 100644
--- a/doc/README.request_response_tracking
+++ b/doc/README.request_response_tracking
@@ -136,7 +136,7 @@ actual dissector.
it = proto_tree_add_uint(pana_tree, hf_pana_response_in,
tvb, 0, 0, pana_trans->rep_frame);
- PROTO_ITEM_SET_GENERATED(it);
+ proto_item_set_generated(it);
}
} else {
/* This is a reply */
@@ -146,11 +146,11 @@ actual dissector.
it = proto_tree_add_uint(pana_tree, hf_pana_response_to,
tvb, 0, 0, pana_trans->req_frame);
- PROTO_ITEM_SET_GENERATED(it);
+ proto_item_set_generated(it);
nstime_delta(&ns, &pinfo->fd->abs_ts, &pana_trans->req_time);
it = proto_tree_add_time(pana_tree, hf_pana_response_time, tvb, 0, 0, &ns);
- PROTO_ITEM_SET_GENERATED(it);
+ proto_item_set_generated(it);
}
}