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>
This commit is contained in:
D. Ulis 2016-06-26 22:34:03 -04:00 committed by Jaap Keuter
parent 58ccf8e6b6
commit 8c37621ca7
1 changed files with 15 additions and 6 deletions

View File

@ -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 );