aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cip.c
diff options
context:
space:
mode:
authorD. Ulis <daulis0@gmail.com>2016-06-26 22:34:03 -0400
committerJaap Keuter <jaap.keuter@xs4all.nl>2016-06-27 12:34:32 +0000
commit8c37621ca733a24a972e3e069a537c06e650f435 (patch)
tree854e2093e42c4ad23befd09684282ce78c4bed65 /epan/dissectors/packet-cip.c
parent58ccf8e6b65b3911426d08d28997089ce8d611a1 (diff)
CIP: Cleanup info column for MSP packets
1. Skip printing class name in info column when it was an MSP, since it's implied. 2. Don't print response status for embedded messages in info column for MSP. It makes the line too long. 3. Print the response status for embedded messages in the Service Packet tree. This makes it easier to find the packet that may have failed. Change-Id: I2c60fb9baf113a215ada7301f493cbd51e340dcd Reviewed-on: https://code.wireshark.org/review/16162 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Diffstat (limited to 'epan/dissectors/packet-cip.c')
-rw-r--r--epan/dissectors/packet-cip.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c
index 6293dc1158..d29e633395 100644
--- a/epan/dissectors/packet-cip.c
+++ b/epan/dissectors/packet-cip.c
@@ -2646,11 +2646,12 @@ static void add_cip_class_to_info_column(packet_info *pinfo, guint32 class_id, i
{
cip_req_info_t *cip_req_info;
- /* Skip printing the top level class for Unconnected Sends because it gets
- too wordy in the Info column, and it's misleading for responses. */
+ /* Skip printing the top level class for certain common messages because it gets
+ too wordy in the Info column. */
cip_req_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0);
if (cip_req_info
- && (cip_req_info->bService == SC_CM_UNCON_SEND && class_id == CI_CLS_CM))
+ && ((cip_req_info->bService == SC_CM_UNCON_SEND && class_id == CI_CLS_CM)
+ || (cip_req_info->bService == SC_MULT_SERV_PACK && class_id == CI_CLS_MR)))
{
return;
}
@@ -7166,9 +7167,17 @@ dissect_cip_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, packet_info
proto_item_append_text( status_item, "%s: ", val_to_str_ext( gen_status,
&cip_gs_vals_ext , "Unknown Response (%x)") );
- /* Add reply status to info column */
- col_append_fstr(pinfo->cinfo, COL_INFO, "%s: ",
- val_to_str_ext( gen_status, &cip_gs_vals_ext, "Unknown Response (%x)") );
+ if (is_msp_item == FALSE)
+ {
+ /* Add reply status to info column */
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s: ",
+ val_to_str_ext(gen_status, &cip_gs_vals_ext, "Unknown Response (%x)"));
+ }
+ else
+ {
+ proto_item_append_text(msp_item, "%s: ",
+ val_to_str_ext(gen_status, &cip_gs_vals_ext, "Unknown Response (%x)"));
+ }
/* Add additional status size */
add_stat_size = tvb_get_guint8( tvb, offset+3 );