diff options
author | Birol Capa <birol.capa@siemens.com> | 2017-10-02 09:49:00 +0300 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-10-02 11:45:45 +0000 |
commit | a6dec130a963753bd7431f71394b0f527147006d (patch) | |
tree | a62cc19ca0aef9510aaab312f9b0cc4e88fabc16 /plugins | |
parent | ab01a1eab1c56e131171ece6624fec9797fb42d0 (diff) |
PROFINET: Fix undecoded signal value in DCP Set Request.
According to specification, when suboption is CONTROL,
signal value is FLASH_ONCE.
Change-Id: I942579cdf3d642e636d02b778ffaad99022678e3
Reviewed-on: https://code.wireshark.org/review/23812
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/profinet/packet-pn-dcp.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/profinet/packet-pn-dcp.c b/plugins/profinet/packet-pn-dcp.c index 3e3b58a7aa..7ae72bd7a9 100644 --- a/plugins/profinet/packet-pn-dcp.c +++ b/plugins/profinet/packet-pn-dcp.c @@ -100,6 +100,7 @@ static int hf_pn_dcp_suboption_dhcp_device_id = -1; static int hf_pn_dcp_suboption_control = -1; static int hf_pn_dcp_suboption_control_response = -1; +static int hf_pn_dcp_suboption_control_signal_value = -1; static int hf_pn_dcp_suboption_deviceinitiative = -1; static int hf_pn_dcp_deviceinitiative_value = -1; @@ -252,6 +253,11 @@ static const value_string pn_dcp_suboption_ip_block_info[] = { { 0, NULL } }; +static const value_string pn_dcp_suboption_control_signal_value[] = { + {0x0100, "Flash Once"}, + {0, NULL} +}; + #define PNDCP_SUBOPTION_DEVICE_MANUF 0x01 #define PNDCP_SUBOPTION_DEVICE_NAMEOFSTATION 0x02 #define PNDCP_SUBOPTION_DEVICE_DEV_ID 0x03 @@ -800,6 +806,7 @@ dissect_PNDCP_Suboption_Control(tvbuff_t *tvb, int offset, packet_info *pinfo, guint16 block_length; guint16 block_qualifier; guint16 BlockQualifier; + guint16 u16SignalValue; gchar *info_str; guint8 block_error; proto_item *item = NULL; @@ -825,7 +832,7 @@ dissect_PNDCP_Suboption_Control(tvbuff_t *tvb, int offset, packet_info *pinfo, offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_qualifier, &block_qualifier); block_length -= 2; - offset = dissect_pn_undecoded(tvb, offset, pinfo, tree, block_length); + offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_control_signal_value, &u16SignalValue); break; case PNDCP_SUBOPTION_CONTROL_RESPONSE: proto_item_append_text(block_item, "Control/Response"); @@ -1325,6 +1332,11 @@ proto_register_pn_dcp (void) FT_UINT8, BASE_DEC, VALS(pn_dcp_option), 0x0, NULL, HFILL }}, + { &hf_pn_dcp_suboption_control_signal_value, + { "SignalValue", "pn_dcp.suboption_control_signal_value", + FT_UINT16, BASE_HEX, VALS(pn_dcp_suboption_control_signal_value), 0x0, + NULL, HFILL } }, + { &hf_pn_dcp_suboption_deviceinitiative, { "Suboption", "pn_dcp.suboption_deviceinitiative", FT_UINT8, BASE_DEC, VALS(pn_dcp_suboption_deviceinitiative), 0x0, |