aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ymsg.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2007-05-18 17:25:26 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2007-05-18 17:25:26 +0000
commitceb34bc72a3a83060362a23a7c853479da4b89ae (patch)
treef78eacaceb1c8da987e09ec69b3ece9771389c85 /epan/dissectors/packet-ymsg.c
parentb688f9154aacf9c2f30dc6c715bc115a05e9fcef (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 svn path=/trunk/; revision=21829
Diffstat (limited to 'epan/dissectors/packet-ymsg.c')
-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;
}