aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2007-05-18 17:25:26 +0000
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2007-05-18 17:25:26 +0000
commit89cc38926c7171784fef1d4012c106969deb36f3 (patch)
treef78eacaceb1c8da987e09ec69b3ece9771389c85
parent37587842ed44e3011357e3babedd125e01d5388a (diff)
- show service val in protocol tree label (there can be multiple of them)
- use fences so that multiple summaries can appear together in the info column git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21829 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-ymsg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ymsg.c b/epan/dissectors/packet-ymsg.c
index 1c2420b926..0c1f653b96 100644
--- a/epan/dissectors/packet-ymsg.c
+++ b/epan/dissectors/packet-ymsg.c
@@ -303,7 +303,7 @@ static const value_string ymsg_service_vals[] = {
static const value_string ymsg_status_vals[] = {
{YPACKET_STATUS_DISCONNECTED,"Disconnected"},
- {YPACKET_STATUS_DEFAULT,""},
+ {YPACKET_STATUS_DEFAULT,"Default"},
{YPACKET_STATUS_SERVERACK,"Server Ack"},
{YPACKET_STATUS_GAME,"Playing Game"},
{YPACKET_STATUS_AWAY, "Away"},
@@ -383,7 +383,7 @@ dissect_ymsg_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = 0;
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO,
- "%s, %s",
+ "%s (status=%s) ",
val_to_str(tvb_get_ntohs(tvb, offset + 10),
ymsg_service_vals, "Unknown Service: %u"),
val_to_str(tvb_get_ntohl(tvb, offset + 12),
@@ -409,6 +409,11 @@ dissect_ymsg_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 2;
/* Service */
+ proto_item_append_text(ti, " (%s)",
+ val_to_str(tvb_get_ntohs(tvb, offset),
+ ymsg_service_vals,
+ "Unknown"));
+
proto_tree_add_item(ymsg_tree, hf_ymsg_service, tvb, offset, 2, FALSE);
offset += 2;
@@ -472,6 +477,8 @@ dissect_ymsg_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
+ col_set_fence(pinfo->cinfo, COL_INFO);
+
return;
}