aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/opcua/opcua_enumparser.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-02-15 15:24:39 +0000
committerEvan Huus <eapache@gmail.com>2013-02-15 15:24:39 +0000
commitf95978cf08f9d29407becbc3ac8d1491254f76ac (patch)
treeb08745b9d9b401a1d832ab505055538e7e19ccdd /plugins/opcua/opcua_enumparser.c
parentfb530b1a72e8ef64c38b73e39d51c96d0e6ff98c (diff)
From Hannes Mezger via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8327
Updates to the OPCUA plugin so that subtrees of the dissector select the appropriate number of bytes. Also fix dissection of the array dimensions field for matrix values and the highlighting for empty string fields. svn path=/trunk/; revision=47673
Diffstat (limited to 'plugins/opcua/opcua_enumparser.c')
-rw-r--r--plugins/opcua/opcua_enumparser.c226
1 files changed, 131 insertions, 95 deletions
diff --git a/plugins/opcua/opcua_enumparser.c b/plugins/opcua/opcua_enumparser.c
index e11868f72b..100db8124a 100644
--- a/plugins/opcua/opcua_enumparser.c
+++ b/plugins/opcua/opcua_enumparser.c
@@ -16,7 +16,7 @@
**
** Description: OpcUa Enum Type Parser
**
-** This file was autogenerated on 31.03.2009.
+** This file was autogenerated on 12.02.2013.
** DON'T MODIFY THIS FILE!
**
******************************************************************************/
@@ -45,21 +45,19 @@ void parseNodeIdType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{
proto_tree_add_item(tree, hf_opcua_NodeIdType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
-/** DialogConditionChoice enum table */
-static const value_string g_DialogConditionChoiceTable[] = {
- { 0, "None" },
- { 1, "Ok" },
- { 2, "Cancel" },
- { 4, "Yes" },
- { 8, "No" },
- { 16, "Abort" },
+/** OpenFileMode enum table */
+static const value_string g_OpenFileModeTable[] = {
+ { 1, "Read" },
+ { 2, "Write" },
+ { 4, "EraseExisiting" },
+ { 8, "Append" },
{ 0, NULL }
};
-static int hf_opcua_DialogConditionChoice = -1;
+static int hf_opcua_OpenFileMode = -1;
-void parseDialogConditionChoice(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
+void parseOpenFileMode(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{
- proto_tree_add_item(tree, hf_opcua_DialogConditionChoice, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+ proto_tree_add_item(tree, hf_opcua_OpenFileMode, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
/** IdType enum table */
static const value_string g_IdTypeTable[] = {
@@ -94,6 +92,20 @@ void parseNodeClass(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{
proto_tree_add_item(tree, hf_opcua_NodeClass, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
+/** ApplicationType enum table */
+static const value_string g_ApplicationTypeTable[] = {
+ { 0, "Server" },
+ { 1, "Client" },
+ { 2, "ClientAndServer" },
+ { 3, "DiscoveryServer" },
+ { 0, NULL }
+};
+static int hf_opcua_ApplicationType = -1;
+
+void parseApplicationType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
+{
+ proto_tree_add_item(tree, hf_opcua_ApplicationType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+}
/** MessageSecurityMode enum table */
static const value_string g_MessageSecurityModeTable[] = {
{ 0, "Invalid" },
@@ -122,20 +134,6 @@ void parseUserTokenType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{
proto_tree_add_item(tree, hf_opcua_UserTokenType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
-/** ApplicationType enum table */
-static const value_string g_ApplicationTypeTable[] = {
- { 0, "Server" },
- { 1, "Client" },
- { 2, "ClientAndServer" },
- { 3, "DiscoveryServer" },
- { 0, NULL }
-};
-static int hf_opcua_ApplicationType = -1;
-
-void parseApplicationType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
-{
- proto_tree_add_item(tree, hf_opcua_ApplicationType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
-}
/** SecurityTokenRequestType enum table */
static const value_string g_SecurityTokenRequestTypeTable[] = {
{ 0, "Issue" },
@@ -148,22 +146,8 @@ void parseSecurityTokenRequestType(proto_tree *tree, tvbuff_t *tvb, gint *pOffse
{
proto_tree_add_item(tree, hf_opcua_SecurityTokenRequestType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
-/** ComplianceLevel enum table */
-static const value_string g_ComplianceLevelTable[] = {
- { 0, "Untested" },
- { 1, "Partial" },
- { 2, "SelfTested" },
- { 3, "Certified" },
- { 0, NULL }
-};
-static int hf_opcua_ComplianceLevel = -1;
-
-void parseComplianceLevel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
-{
- proto_tree_add_item(tree, hf_opcua_ComplianceLevel, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
-}
-/** AttributeWriteMask enum table */
-static const value_string g_AttributeWriteMaskTable[] = {
+/** NodeAttributesMask enum table */
+static const value_string g_NodeAttributesMaskTable[] = {
{ 0, "None" },
{ 1, "AccessLevel" },
{ 2, "ArrayDimensions" },
@@ -186,20 +170,30 @@ static const value_string g_AttributeWriteMaskTable[] = {
{ 262144, "UserWriteMask" },
{ 524288, "ValueRank" },
{ 1048576, "WriteMask" },
- { 2097152, "ValueForVariableType" },
+ { 2097152, "Value" },
+ { 4194303, "All" },
+ { 1335396, "BaseNode" },
+ { 1335524, "Object" },
+ { 1337444, "ObjectTypeOrDataType" },
+ { 4026999, "Variable" },
+ { 3958902, "VariableType" },
+ { 1466724, "Method" },
+ { 1371236, "ReferenceType" },
+ { 1335532, "View" },
{ 0, NULL }
};
-static int hf_opcua_AttributeWriteMask = -1;
+static int hf_opcua_NodeAttributesMask = -1;
-void parseAttributeWriteMask(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
+void parseNodeAttributesMask(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{
- proto_tree_add_item(tree, hf_opcua_AttributeWriteMask, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+ proto_tree_add_item(tree, hf_opcua_NodeAttributesMask, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
-/** NodeAttributesMask enum table */
-static const value_string g_NodeAttributesMaskTable[] = {
+/** AttributeWriteMask enum table */
+static const value_string g_AttributeWriteMaskTable[] = {
{ 0, "None" },
{ 1, "AccessLevel" },
{ 2, "ArrayDimensions" },
+ { 4, "BrowseName" },
{ 8, "ContainsNoLoops" },
{ 16, "DataType" },
{ 32, "Description" },
@@ -210,42 +204,22 @@ static const value_string g_NodeAttributesMaskTable[] = {
{ 1024, "InverseName" },
{ 2048, "IsAbstract" },
{ 4096, "MinimumSamplingInterval" },
+ { 8192, "NodeClass" },
+ { 16384, "NodeId" },
{ 32768, "Symmetric" },
{ 65536, "UserAccessLevel" },
{ 131072, "UserExecutable" },
{ 262144, "UserWriteMask" },
{ 524288, "ValueRank" },
{ 1048576, "WriteMask" },
- { 2097152, "Value" },
- { 4194303, "All" },
- { 1335396, "BaseNode" },
- { 1335524, "Object" },
- { 1337444, "ObjectTypeOrDataType" },
- { 4026999, "Variable" },
- { 3958902, "VariableType" },
- { 1466724, "Method" },
- { 1371236, "ReferenceType" },
- { 1335532, "View" },
- { 0, NULL }
-};
-static int hf_opcua_NodeAttributesMask = -1;
-
-void parseNodeAttributesMask(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
-{
- proto_tree_add_item(tree, hf_opcua_NodeAttributesMask, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
-}
-/** EnumeratedTestType enum table */
-static const value_string g_EnumeratedTestTypeTable[] = {
- { 1, "Red" },
- { 4, "Yellow" },
- { 5, "Green" },
+ { 2097152, "ValueForVariableType" },
{ 0, NULL }
};
-static int hf_opcua_EnumeratedTestType = -1;
+static int hf_opcua_AttributeWriteMask = -1;
-void parseEnumeratedTestType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
+void parseAttributeWriteMask(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{
- proto_tree_add_item(tree, hf_opcua_EnumeratedTestType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+ proto_tree_add_item(tree, hf_opcua_AttributeWriteMask, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
/** BrowseDirection enum table */
static const value_string g_BrowseDirectionTable[] = {
@@ -280,6 +254,20 @@ void parseBrowseResultMask(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{
proto_tree_add_item(tree, hf_opcua_BrowseResultMask, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
+/** ComplianceLevel enum table */
+static const value_string g_ComplianceLevelTable[] = {
+ { 0, "Untested" },
+ { 1, "Partial" },
+ { 2, "SelfTested" },
+ { 3, "Certified" },
+ { 0, NULL }
+};
+static int hf_opcua_ComplianceLevel = -1;
+
+void parseComplianceLevel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
+{
+ proto_tree_add_item(tree, hf_opcua_ComplianceLevel, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+}
/** FilterOperator enum table */
static const value_string g_FilterOperatorTable[] = {
{ 0, "Equals" },
@@ -322,18 +310,33 @@ void parseTimestampsToReturn(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{
proto_tree_add_item(tree, hf_opcua_TimestampsToReturn, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
-/** HistoryUpdateMode enum table */
-static const value_string g_HistoryUpdateModeTable[] = {
+/** HistoryUpdateType enum table */
+static const value_string g_HistoryUpdateTypeTable[] = {
+ { 1, "Insert" },
+ { 2, "Replace" },
+ { 3, "Update" },
+ { 4, "Delete" },
+ { 0, NULL }
+};
+static int hf_opcua_HistoryUpdateType = -1;
+
+void parseHistoryUpdateType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
+{
+ proto_tree_add_item(tree, hf_opcua_HistoryUpdateType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+}
+/** PerformUpdateType enum table */
+static const value_string g_PerformUpdateTypeTable[] = {
{ 1, "Insert" },
{ 2, "Replace" },
- { 3, "InsertReplace" },
+ { 3, "Update" },
+ { 4, "Remove" },
{ 0, NULL }
};
-static int hf_opcua_HistoryUpdateMode = -1;
+static int hf_opcua_PerformUpdateType = -1;
-void parseHistoryUpdateMode(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
+void parsePerformUpdateType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{
- proto_tree_add_item(tree, hf_opcua_HistoryUpdateMode, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+ proto_tree_add_item(tree, hf_opcua_PerformUpdateType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
/** MonitoringMode enum table */
static const value_string g_MonitoringModeTable[] = {
@@ -374,6 +377,19 @@ void parseDeadbandType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{
proto_tree_add_item(tree, hf_opcua_DeadbandType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
+/** EnumeratedTestType enum table */
+static const value_string g_EnumeratedTestTypeTable[] = {
+ { 1, "Red" },
+ { 4, "Yellow" },
+ { 5, "Green" },
+ { 0, NULL }
+};
+static int hf_opcua_EnumeratedTestType = -1;
+
+void parseEnumeratedTestType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
+{
+ proto_tree_add_item(tree, hf_opcua_EnumeratedTestType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+}
/** RedundancySupport enum table */
static const value_string g_RedundancySupportTable[] = {
{ 0, "None" },
@@ -381,6 +397,7 @@ static const value_string g_RedundancySupportTable[] = {
{ 2, "Warm" },
{ 3, "Hot" },
{ 4, "Transparent" },
+ { 5, "HotAndMirrored" },
{ 0, NULL }
};
static int hf_opcua_RedundancySupport = -1;
@@ -422,6 +439,19 @@ void parseModelChangeStructureVerbMask(proto_tree *tree, tvbuff_t *tvb, gint *pO
{
proto_tree_add_item(tree, hf_opcua_ModelChangeStructureVerbMask, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
+/** AxisScaleEnumeration enum table */
+static const value_string g_AxisScaleEnumerationTable[] = {
+ { 0, "Linear" },
+ { 1, "Log" },
+ { 2, "Ln" },
+ { 0, NULL }
+};
+static int hf_opcua_AxisScaleEnumeration = -1;
+
+void parseAxisScaleEnumeration(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
+{
+ proto_tree_add_item(tree, hf_opcua_AxisScaleEnumeration, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+}
/** ExceptionDeviationFormat enum table */
static const value_string g_ExceptionDeviationFormatTable[] = {
{ 0, "AbsoluteValue" },
@@ -447,8 +477,8 @@ void registerEnumTypes(int proto)
{ &hf_opcua_NodeIdType,
{ "NodeIdType", "opcua.NodeIdType", FT_UINT32, BASE_HEX, VALS(g_NodeIdTypeTable), 0x0, NULL, HFILL }
},
- { &hf_opcua_DialogConditionChoice,
- { "DialogConditionChoice", "opcua.DialogConditionChoice", FT_UINT32, BASE_HEX, VALS(g_DialogConditionChoiceTable), 0x0, NULL, HFILL }
+ { &hf_opcua_OpenFileMode,
+ { "OpenFileMode", "opcua.OpenFileMode", FT_UINT32, BASE_HEX, VALS(g_OpenFileModeTable), 0x0, NULL, HFILL }
},
{ &hf_opcua_IdType,
{ "IdType", "opcua.IdType", FT_UINT32, BASE_HEX, VALS(g_IdTypeTable), 0x0, NULL, HFILL }
@@ -456,29 +486,23 @@ void registerEnumTypes(int proto)
{ &hf_opcua_NodeClass,
{ "NodeClass", "opcua.NodeClass", FT_UINT32, BASE_HEX, VALS(g_NodeClassTable), 0x0, NULL, HFILL }
},
+ { &hf_opcua_ApplicationType,
+ { "ApplicationType", "opcua.ApplicationType", FT_UINT32, BASE_HEX, VALS(g_ApplicationTypeTable), 0x0, NULL, HFILL }
+ },
{ &hf_opcua_MessageSecurityMode,
{ "MessageSecurityMode", "opcua.MessageSecurityMode", FT_UINT32, BASE_HEX, VALS(g_MessageSecurityModeTable), 0x0, NULL, HFILL }
},
{ &hf_opcua_UserTokenType,
{ "UserTokenType", "opcua.UserTokenType", FT_UINT32, BASE_HEX, VALS(g_UserTokenTypeTable), 0x0, NULL, HFILL }
},
- { &hf_opcua_ApplicationType,
- { "ApplicationType", "opcua.ApplicationType", FT_UINT32, BASE_HEX, VALS(g_ApplicationTypeTable), 0x0, NULL, HFILL }
- },
{ &hf_opcua_SecurityTokenRequestType,
{ "SecurityTokenRequestType", "opcua.SecurityTokenRequestType", FT_UINT32, BASE_HEX, VALS(g_SecurityTokenRequestTypeTable), 0x0, NULL, HFILL }
},
- { &hf_opcua_ComplianceLevel,
- { "ComplianceLevel", "opcua.ComplianceLevel", FT_UINT32, BASE_HEX, VALS(g_ComplianceLevelTable), 0x0, NULL, HFILL }
- },
- { &hf_opcua_AttributeWriteMask,
- { "AttributeWriteMask", "opcua.AttributeWriteMask", FT_UINT32, BASE_HEX, VALS(g_AttributeWriteMaskTable), 0x0, NULL, HFILL }
- },
{ &hf_opcua_NodeAttributesMask,
{ "NodeAttributesMask", "opcua.NodeAttributesMask", FT_UINT32, BASE_HEX, VALS(g_NodeAttributesMaskTable), 0x0, NULL, HFILL }
},
- { &hf_opcua_EnumeratedTestType,
- { "EnumeratedTestType", "opcua.EnumeratedTestType", FT_UINT32, BASE_HEX, VALS(g_EnumeratedTestTypeTable), 0x0, NULL, HFILL }
+ { &hf_opcua_AttributeWriteMask,
+ { "AttributeWriteMask", "opcua.AttributeWriteMask", FT_UINT32, BASE_HEX, VALS(g_AttributeWriteMaskTable), 0x0, NULL, HFILL }
},
{ &hf_opcua_BrowseDirection,
{ "BrowseDirection", "opcua.BrowseDirection", FT_UINT32, BASE_HEX, VALS(g_BrowseDirectionTable), 0x0, NULL, HFILL }
@@ -486,14 +510,20 @@ void registerEnumTypes(int proto)
{ &hf_opcua_BrowseResultMask,
{ "BrowseResultMask", "opcua.BrowseResultMask", FT_UINT32, BASE_HEX, VALS(g_BrowseResultMaskTable), 0x0, NULL, HFILL }
},
+ { &hf_opcua_ComplianceLevel,
+ { "ComplianceLevel", "opcua.ComplianceLevel", FT_UINT32, BASE_HEX, VALS(g_ComplianceLevelTable), 0x0, NULL, HFILL }
+ },
{ &hf_opcua_FilterOperator,
{ "FilterOperator", "opcua.FilterOperator", FT_UINT32, BASE_HEX, VALS(g_FilterOperatorTable), 0x0, NULL, HFILL }
},
{ &hf_opcua_TimestampsToReturn,
{ "TimestampsToReturn", "opcua.TimestampsToReturn", FT_UINT32, BASE_HEX, VALS(g_TimestampsToReturnTable), 0x0, NULL, HFILL }
},
- { &hf_opcua_HistoryUpdateMode,
- { "HistoryUpdateMode", "opcua.HistoryUpdateMode", FT_UINT32, BASE_HEX, VALS(g_HistoryUpdateModeTable), 0x0, NULL, HFILL }
+ { &hf_opcua_HistoryUpdateType,
+ { "HistoryUpdateType", "opcua.HistoryUpdateType", FT_UINT32, BASE_HEX, VALS(g_HistoryUpdateTypeTable), 0x0, NULL, HFILL }
+ },
+ { &hf_opcua_PerformUpdateType,
+ { "PerformUpdateType", "opcua.PerformUpdateType", FT_UINT32, BASE_HEX, VALS(g_PerformUpdateTypeTable), 0x0, NULL, HFILL }
},
{ &hf_opcua_MonitoringMode,
{ "MonitoringMode", "opcua.MonitoringMode", FT_UINT32, BASE_HEX, VALS(g_MonitoringModeTable), 0x0, NULL, HFILL }
@@ -504,6 +534,9 @@ void registerEnumTypes(int proto)
{ &hf_opcua_DeadbandType,
{ "DeadbandType", "opcua.DeadbandType", FT_UINT32, BASE_HEX, VALS(g_DeadbandTypeTable), 0x0, NULL, HFILL }
},
+ { &hf_opcua_EnumeratedTestType,
+ { "EnumeratedTestType", "opcua.EnumeratedTestType", FT_UINT32, BASE_HEX, VALS(g_EnumeratedTestTypeTable), 0x0, NULL, HFILL }
+ },
{ &hf_opcua_RedundancySupport,
{ "RedundancySupport", "opcua.RedundancySupport", FT_UINT32, BASE_HEX, VALS(g_RedundancySupportTable), 0x0, NULL, HFILL }
},
@@ -513,6 +546,9 @@ void registerEnumTypes(int proto)
{ &hf_opcua_ModelChangeStructureVerbMask,
{ "ModelChangeStructureVerbMask", "opcua.ModelChangeStructureVerbMask", FT_UINT32, BASE_HEX, VALS(g_ModelChangeStructureVerbMaskTable), 0x0, NULL, HFILL }
},
+ { &hf_opcua_AxisScaleEnumeration,
+ { "AxisScaleEnumeration", "opcua.AxisScaleEnumeration", FT_UINT32, BASE_HEX, VALS(g_AxisScaleEnumerationTable), 0x0, NULL, HFILL }
+ },
{ &hf_opcua_ExceptionDeviationFormat,
{ "ExceptionDeviationFormat", "opcua.ExceptionDeviationFormat", FT_UINT32, BASE_HEX, VALS(g_ExceptionDeviationFormatTable), 0x0, NULL, HFILL }
},