From 79974a41b089818c6bfd59a8b5edf3f0f595a168 Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Thu, 22 Nov 2012 12:12:12 +0000 Subject: From Wido Kelling: Updates to conform IEC 61158. major change: reassembling of PNIO fragments (only works if OpenSafty dissector is disabled) see Bug 7997 minor changes: improved handling of DFP Frames added / updated MRP Block decoding ARServerBlock ARVendorBlock PDInterfaceDataReal PDInterfaceAdjust PDPortStatistic SubdirFrameData corrected display and subblocks added PDIRGlobalData complete dissection decoding of FrameDataProperties and ARTypes updated to conform the STD removed now usuported RTC2 ranges https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8002 svn path=/trunk/; revision=46140 --- plugins/profinet/packet-pn.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugins/profinet/packet-pn.c') diff --git a/plugins/profinet/packet-pn.c b/plugins/profinet/packet-pn.c index cd5f590f71..47be00850b 100644 --- a/plugins/profinet/packet-pn.c +++ b/plugins/profinet/packet-pn.c @@ -40,6 +40,7 @@ static int hf_pn_padding = -1; static int hf_pn_undecoded_data = -1; static int hf_pn_user_data = -1; static int hf_pn_user_bytes = -1; +static int hf_pn_frag_bytes = -1; static int hf_pn_malformed = -1; @@ -212,8 +213,11 @@ dissect_pn_undecoded(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, /* "dissect" some user bytes */ int dissect_pn_user_data_bytes(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, - proto_tree *tree, guint32 length, const char *text _U_) + proto_tree *tree, guint32 length, int iSelect) { + if(iSelect == FRAG_DATA) + proto_tree_add_bytes(tree, hf_pn_frag_bytes, tvb, offset, length, tvb_get_ptr(tvb,offset, length)); + else proto_tree_add_bytes(tree, hf_pn_user_bytes, tvb, offset, length, tvb_get_ptr(tvb,offset, length)); return offset + length; @@ -291,6 +295,8 @@ init_pn (int proto) { "User Data", "pn.user_data", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_pn_user_bytes, { "Substitute Data", "pn.user_bytes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_pn_frag_bytes, + { "Fragment Data", "pn.frag_bytes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_pn_malformed, { "Malformed", "pn_rt.malformed", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }} }; -- cgit v1.2.3