aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/profinet
diff options
context:
space:
mode:
authorBirol Capa <birol.capa@siemens.com>2015-06-04 07:35:35 +0300
committerMichael Mann <mmann78@netscape.net>2015-06-04 12:15:19 +0000
commit539418c91732b71985117a01e1db42436baa83cc (patch)
tree6238d37dc21769f363122e3ec9453f8093df766e /plugins/profinet
parent97255b3a7c937f2a1bbcfe7d44184401146a1e50 (diff)
Profinet: Add Fiber Optic Diagnosis Info.
This make reading fiber optic diagnosis data possible. Change-Id: I90b49443ffa1b69912d37cbf7a751328eec9d590 Reviewed-on: https://code.wireshark.org/review/8750 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins/profinet')
-rw-r--r--plugins/profinet/packet-dcerpc-pn-io.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/profinet/packet-dcerpc-pn-io.c b/plugins/profinet/packet-dcerpc-pn-io.c
index 44fef1b21b..665982b048 100644
--- a/plugins/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/profinet/packet-dcerpc-pn-io.c
@@ -814,6 +814,7 @@ static const value_string pn_io_block_type[] = {
{ 0x0225, "Adjust DCPBoundary"},
{ 0x0226, "Adjust PreambleLength"},
{ 0x0227, "Adjust FastForwardingBoundary"},
+ { 0x0228, "Reading real fiber optic diagnosis data"},
{ 0x022A, "PDIRSubframeData"},
{ 0x022B, "SubframeBlock"},
{ 0x0230, "PDNCDataCheck"},
@@ -5304,6 +5305,30 @@ dissect_FiberOpticManufacturerSpecific_block(tvbuff_t *tvb, int offset,
}
+/* dissect the FiberOpticDiagnosisInfo block */
+static int
+dissect_FiberOpticDiagnosisInfo_block(tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+{
+ guint32 u32FiberOpticPowerBudget;
+
+
+ if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
+ expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
+ "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
+ return offset;
+ }
+
+ offset = dissect_pn_padding(tvb, offset, pinfo, tree, 2);
+
+ /* decode the u32FiberOpticPowerBudget better */
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
+ hf_pn_io_maintenance_required_power_budget, &u32FiberOpticPowerBudget);
+
+ return offset;
+}
+
+
/* dissect the PDPortFODataAdjust block */
static int
dissect_PDPortFODataAdjust_block(tvbuff_t *tvb, int offset,
@@ -8413,6 +8438,9 @@ dissect_block(tvbuff_t *tvb, int offset,
case(0x0226):
dissect_AdjustPreambleLength_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
break;
+ case(0x0228):
+ dissect_FiberOpticDiagnosisInfo_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
+ break;
case(0x022A):
dissect_PDIRSubframeData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
break;