diff options
author | Widok <kellingwido@aol.com> | 2014-03-05 14:18:39 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-03-05 18:53:50 +0000 |
commit | 970197c19f8e46c9c2d4c2897cc0bb52c1f27b3f (patch) | |
tree | 26607190d3bd3b00e26824f7f5504c935203b975 /plugins/profinet/packet-pn-mrp.c | |
parent | 041f844d7228d1ac41cf9b5e4629d7b7adec0e1f (diff) | |
download | wireshark-970197c19f8e46c9c2d4c2897cc0bb52c1f27b3f.tar.gz |
Corrected mrp decoding of link up and down
Added DCP decoding of reset to factory
removed unused value_strings
corrected decoding of PDSubFrameBlock
most of the length display added a dec_hex display
Signed-off-by: Widok <kellingwido@aol.com>
Change-Id: I17b59b45eff37b65047a7a3e5e275f01a37ee616
Reviewed-on: https://code.wireshark.org/review/517
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'plugins/profinet/packet-pn-mrp.c')
-rw-r--r-- | plugins/profinet/packet-pn-mrp.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/profinet/packet-pn-mrp.c b/plugins/profinet/packet-pn-mrp.c index c30a52b275..b1b72bd179 100644 --- a/plugins/profinet/packet-pn-mrp.c +++ b/plugins/profinet/packet-pn-mrp.c @@ -136,7 +136,7 @@ dissect_PNMRP_Common(tvbuff_t *tvb, int offset, static int dissect_PNMRP_Link(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item _U_) + packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 type) { guint8 mac[6]; guint16 port_role; @@ -154,7 +154,7 @@ dissect_PNMRP_Link(tvbuff_t *tvb, int offset, offset = dissect_pn_uint16_ret_item(tvb, offset, pinfo, tree, hf_pn_mrp_interval, &interval, &sub_item); if (tree) { - proto_item_append_text(sub_item," Interval for next topology change event (in ms)"); + proto_item_append_text(sub_item,"Interval for next topology change event (in ms)"); if (interval <0x07D1) proto_item_append_text(sub_item," Mandatory"); else @@ -176,7 +176,16 @@ dissect_PNMRP_Link(tvbuff_t *tvb, int offset, /* Padding */ offset = dissect_pn_align4(tvb, offset, pinfo, tree); - + if(type == 4 /* LinkDown */ ) + { + col_append_str(pinfo->cinfo, COL_INFO, "LinkDown"); + proto_item_append_text(item, "LinkDown"); + } + else + { + col_append_str(pinfo->cinfo, COL_INFO, "LinkUp"); + proto_item_append_text(item, "LinkUp"); + } return offset; } @@ -381,7 +390,7 @@ dissect_PNMRP_PDU(tvbuff_t *tvb, int offset, break; case 0x04: case 0x05: /* dissection of up and down is identical! */ - offset = dissect_PNMRP_Link(new_tvb, offset, pinfo, tree, item); + offset = dissect_PNMRP_Link(new_tvb, offset, pinfo, tree, item, type); break; case 0x7f: offset = dissect_PNMRP_Option(new_tvb, offset, pinfo, tree, item, length); |