summaryrefslogtreecommitdiff
path: root/plugins/profinet/packet-pn-dcp.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2009-10-04 19:31:02 +0000
committerAnders Broman <anders.broman@ericsson.com>2009-10-04 19:31:02 +0000
commit7bff8c664baade4dcdff0191cca578fd665f45ab (patch)
tree7619d6d2edec318a8506fd5cc16901071d29b815 /plugins/profinet/packet-pn-dcp.c
parentf0aaa035a4cc40c3844cd29060971cf46900b674 (diff)
downloadwireshark-7bff8c664baade4dcdff0191cca578fd665f45ab.tar.gz
From Benjamin Meyer:
PROFINET DCP ResetFactorySettings not decoded. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4090 svn path=/trunk/; revision=30320
Diffstat (limited to 'plugins/profinet/packet-pn-dcp.c')
-rw-r--r--plugins/profinet/packet-pn-dcp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/profinet/packet-pn-dcp.c b/plugins/profinet/packet-pn-dcp.c
index 6d625dfb3e..6f0d4a2856 100644
--- a/plugins/profinet/packet-pn-dcp.c
+++ b/plugins/profinet/packet-pn-dcp.c
@@ -251,6 +251,7 @@ static const value_string pn_dcp_suboption_dhcp[] = {
#define PNDCP_SUBOPTION_CONTROL_END_TRANS 0x02
#define PNDCP_SUBOPTION_CONTROL_SIGNAL 0x03
#define PNDCP_SUBOPTION_CONTROL_RESPONSE 0x04
+#define PNDCP_SUBOPTION_CONTROL_FACT_RESET 0x05
static const value_string pn_dcp_suboption_control[] = {
{ 0x00, "Reserved" },
@@ -258,6 +259,7 @@ static const value_string pn_dcp_suboption_control[] = {
{ PNDCP_SUBOPTION_CONTROL_END_TRANS, "End Transaction" },
{ PNDCP_SUBOPTION_CONTROL_SIGNAL, "Signal" },
{ PNDCP_SUBOPTION_CONTROL_RESPONSE, "Response" },
+ { PNDCP_SUBOPTION_CONTROL_FACT_RESET, "Reset Factory Settings" },
/*0x05 - 0xff reserved */
{ 0, NULL }
};
@@ -663,7 +665,12 @@ dissect_PNDCP_Suboption_Control(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item_append_text(block_item, ", BlockError: %s", val_to_str(block_error, pn_dcp_block_error, "Unknown"));
break;
- /* XXX - add PNDCP_SUBOPTION_CONTROL_FACTORY_RESET */
+ case(PNDCP_SUBOPTION_CONTROL_FACT_RESET):
+ pn_append_info(pinfo, dcp_item, ", Reset FactorySettings");
+ proto_item_append_text(block_item, "Control/Reset FactorySettings");
+ offset += 2;
+ block_length -= 2;
+ break;
default:
offset = dissect_pn_undecoded(tvb, offset, pinfo, tree, block_length);
}