diff options
-rw-r--r-- | plugins/epan/profinet/packet-pn-dcp.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/epan/profinet/packet-pn-dcp.c b/plugins/epan/profinet/packet-pn-dcp.c index 41746ac901..a7a6fb6e79 100644 --- a/plugins/epan/profinet/packet-pn-dcp.c +++ b/plugins/epan/profinet/packet-pn-dcp.c @@ -85,6 +85,7 @@ static int hf_pn_dcp_suboption_device_oem_ven_id = -1; static int hf_pn_dcp_suboption_device_oem_dev_id = -1; static int hf_pn_dcp_suboption_dhcp = -1; +static int hf_pn_dcp_suboption_dhcp_option_code = -1; static int hf_pn_dcp_suboption_dhcp_parameter_length = -1; static int hf_pn_dcp_suboption_dhcp_parameter_data = -1; static int hf_pn_dcp_suboption_dhcp_arbitrary_client_id = -1; @@ -865,6 +866,7 @@ dissect_PNDCP_Suboption_DHCP(tvbuff_t *tvb, int offset, packet_info *pinfo, guint8 service_id _U_, gboolean is_response _U_) { guint8 suboption; + guint8 option_code = 0; guint16 block_length; guint16 block_info = 0; guint16 block_qualifier = 0; @@ -906,7 +908,7 @@ dissect_PNDCP_Suboption_DHCP(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_item_append_text(block_item, ", BlockInfo: %s", val_to_str(block_info, pn_dcp_block_info, "Unknown")); } - offset += 1;//SuboptionDHCP + offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_dhcp_option_code, &option_code); offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_dhcp_parameter_length, &dhcpparameterlength); if (dhcpparameterlength > 0) { offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_dhcp_parameter_data, &dhcpparameterdata); @@ -939,7 +941,7 @@ dissect_PNDCP_Suboption_DHCP(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_item_append_text(block_item, ", BlockInfo: %s", val_to_str(block_info, pn_dcp_block_info, "Unknown")); } - offset += 1;//SuboptionDHCP + offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_dhcp_option_code, &option_code); offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_dhcp_parameter_length, &dhcpparameterlength); offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_dhcp_control_parameter_data, &dhcpcontrolparameterdata); break; @@ -1477,6 +1479,11 @@ proto_register_pn_dcp (void) FT_UINT8, BASE_DEC, VALS(pn_dcp_suboption_dhcp), 0x0, NULL, HFILL }}, + { &hf_pn_dcp_suboption_dhcp_option_code, + { "Option-Code", "pn_dcp.suboption_dhcp_option_code", + FT_UINT8, BASE_DEC, VALS(pn_dcp_suboption_dhcp), 0x0, + NULL, HFILL }}, + { &hf_pn_dcp_suboption_dhcp_arbitrary_client_id, { "Client ID", "pn_dcp.suboption_dhcp_client_id", FT_STRING, BASE_NONE, NULL, 0x0, |