aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zep.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-11-17 20:04:30 -0500
committerMichael Mann <mmann78@netscape.net>2014-11-20 16:09:09 +0000
commite77261f6593b8c25635fc32d78f0f0c3c57bb902 (patch)
treefcd6d1234ff83f86f5977f288a6de82f1da4a19b /epan/dissectors/packet-zep.c
parent9611e751aed1b1358d4f7028572004af11878469 (diff)
Eliminate proto_tree_add_text from some dissectors.
Change-Id: Ib160211198ca02f7eacf29d04568628c11f208a5 Reviewed-on: https://code.wireshark.org/review/5407 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-zep.c')
-rw-r--r--epan/dissectors/packet-zep.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/epan/dissectors/packet-zep.c b/epan/dissectors/packet-zep.c
index bf6b036223..d13685bde9 100644
--- a/epan/dissectors/packet-zep.c
+++ b/epan/dissectors/packet-zep.c
@@ -68,6 +68,8 @@ static int hf_zep_lqi = -1;
static int hf_zep_timestamp = -1;
static int hf_zep_seqno = -1;
static int hf_zep_ieee_length = -1;
+static int hf_zep_protocol_id = -1;
+static int hf_zep_reserved_field = -1;
/* Initialize protocol subtrees. */
static gint ett_zep = -1;
@@ -186,7 +188,7 @@ static void dissect_zep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
zep_tree = proto_item_add_subtree(proto_root, ett_zep);
/* Display the information in the subtree */
- proto_tree_add_text(zep_tree, tvb, 0, 2, "Protocol ID String: EX");
+ proto_tree_add_item(zep_tree, hf_zep_protocol_id, tvb, 0, 2, ENC_NA|ENC_ASCII);
if (zep_data.version==1) {
proto_tree_add_uint(zep_tree, hf_zep_version, tvb, 2, 1, zep_data.version);
proto_tree_add_uint(zep_tree, hf_zep_channel_id, tvb, 3, 1, zep_data.channel_id);
@@ -195,7 +197,7 @@ static void dissect_zep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if(!(zep_data.lqi_mode)){
proto_tree_add_uint(zep_tree, hf_zep_lqi, tvb, 7, 1, zep_data.lqi);
}
- proto_tree_add_text(zep_tree, tvb, 7+((zep_data.lqi_mode)?0:1), 7+((zep_data.lqi_mode)?1:0), "Reserved Fields");
+ proto_tree_add_item(zep_tree, hf_zep_reserved_field, tvb, 7+((zep_data.lqi_mode)?0:1), 7+((zep_data.lqi_mode)?1:0), ENC_NA);
}
else {
proto_tree_add_uint(zep_tree, hf_zep_version, tvb, 2, 1, zep_data.version);
@@ -291,6 +293,14 @@ void proto_register_zep(void)
{ &hf_zep_ieee_length,
{ "Length", "zep.length", FT_UINT8, BASE_DEC, NULL, 0x0,
"The length (in bytes) of the encapsulated IEEE 802.15.4 MAC frame.", HFILL }},
+
+ { &hf_zep_protocol_id,
+ { "Protocol ID String", "zep.seqno", FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_zep_reserved_field,
+ { "Reserved Fields", "zep.reserved_field", FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
};
static gint *ett[] = {