diff options
author | Thomas Wiens <th.wiens@gmx.de> | 2019-05-19 11:17:37 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-05-20 04:14:23 +0000 |
commit | ada3d9798651a31f426269d7a8e44f990607039d (patch) | |
tree | 0c166fa3cc39ccf28e21bdb8be88f9acabe07d83 /plugins/epan | |
parent | f0ccbca5d437568d116832a459ac4661c61d0c93 (diff) |
PN-DCP: Add headerfield for DHCP Option-Code
Change-Id: Id00a531355fd5e32c5b3d98388fc43a5ad71aa12
Reviewed-on: https://code.wireshark.org/review/33260
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'plugins/epan')
-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, |