aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cosine.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-08-01 10:08:57 -0400
committerMichael Mann <mmann78@netscape.net>2014-08-03 16:30:10 +0000
commit5db1352526e71727091ff0e1c0e97821eec4e4cb (patch)
tree01f836967616b7ae8b2840c488b500c7ff13d55c /epan/dissectors/packet-cosine.c
parent3fa5625ea074908d5617111a7edfcf6d95e6108a (diff)
Eliminate proto_tree_add_text from some dissectors.
Change-Id: I398e9cf4f6882e76644aa758e12c39a39159e95f Reviewed-on: https://code.wireshark.org/review/3319 Petri-Dish: Michael Mann <mmann78@netscape.net> Petri-Dish: Evan Huus <eapache@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-cosine.c')
-rw-r--r--epan/dissectors/packet-cosine.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/epan/dissectors/packet-cosine.c b/epan/dissectors/packet-cosine.c
index 3bc281a8bd..8e0f1d9371 100644
--- a/epan/dissectors/packet-cosine.c
+++ b/epan/dissectors/packet-cosine.c
@@ -43,6 +43,8 @@ static int hf_off = -1;
static int hf_pri = -1;
static int hf_rm = -1;
static int hf_err = -1;
+static int hf_sar = -1;
+static int hf_channel_id = -1;
static gint ett_raw = -1;
@@ -85,20 +87,18 @@ dissect_cosine(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case COSINE_ENCAP_ATM:
case COSINE_ENCAP_PPoATM:
- proto_tree_add_text(fh_tree, tvb, 0, 16, "SAR header");
+ proto_tree_add_item(fh_tree, hf_sar, tvb, 0, 16, ENC_NA);
break;
case COSINE_ENCAP_PPP:
case COSINE_ENCAP_FR:
case COSINE_ENCAP_PPoFR:
- proto_tree_add_text(fh_tree, tvb, 0, 4, "Channel handle ID");
+ proto_tree_add_item(fh_tree, hf_channel_id, tvb, 0, 4, ENC_NA);
break;
case COSINE_ENCAP_HDLC:
if (pseudo_header->cosine.direction == COSINE_DIR_TX) {
- proto_tree_add_text(fh_tree, tvb, 0, 2,
- "Channel handle ID");
+ proto_tree_add_item(fh_tree, hf_channel_id, tvb, 0, 2, ENC_NA);
} else if (pseudo_header->cosine.direction == COSINE_DIR_RX) {
- proto_tree_add_text(fh_tree, tvb, 0, 4,
- "Channel handle ID");
+ proto_tree_add_item(fh_tree, hf_channel_id, tvb, 0, 4, ENC_NA);
}
break;
default:
@@ -157,6 +157,10 @@ proto_register_cosine(void)
{ "Rate Marking", "cosine.rm", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
{ &hf_err,
{ "Error Code", "cosine.err", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ { &hf_sar,
+ { "SAR header", "cosine.sar", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ { &hf_channel_id,
+ { "Channel handle ID", "cosine.channel_id", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
};
static gint *ett[] = {