1 /******************************************************************************
4 ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
5 ** Web: http://www.ascolab.com
7 ** This program is free software; you can redistribute it and/or
8 ** modify it under the terms of the GNU General Public License
9 ** as published by the Free Software Foundation; either version 2
10 ** of the License, or (at your option) any later version.
12 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15 ** Project: OpcUa Wireshark Plugin
17 ** Description: OpcUa Enum Type Parser
19 ** This file was autogenerated on 8.5.2007 18:53:26.
20 ** DON'T MODIFY THIS FILE!
22 ******************************************************************************/
29 #include <epan/packet.h>
31 #include "opcua_enumparser.h"
34 /** NodeClass enum table */
\r
35 static const value_string g_NodeClassTable[] = {
41 { 16, "VariableType" },
42 { 32, "ReferenceType" },
47 static int hf_opcua_NodeClass = -1;
\r
49 void parseNodeClass(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
51 proto_tree_add_item(tree, hf_opcua_NodeClass, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
54 /** IdType enum table */
\r
55 static const value_string g_IdTypeTable[] = {
63 static int hf_opcua_IdType = -1;
\r
65 void parseIdType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
67 proto_tree_add_item(tree, hf_opcua_IdType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
70 /** MessageSecurityMode enum table */
\r
71 static const value_string g_MessageSecurityModeTable[] = {
74 { 2, "SignAndEncrypt" },
\r
77 static int hf_opcua_MessageSecurityMode = -1;
\r
79 void parseMessageSecurityMode(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
81 proto_tree_add_item(tree, hf_opcua_MessageSecurityMode, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
84 /** UserTokenType enum table */
\r
85 static const value_string g_UserTokenTypeTable[] = {
89 { 3, "IssuedToken" },
\r
92 static int hf_opcua_UserTokenType = -1;
\r
94 void parseUserTokenType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
96 proto_tree_add_item(tree, hf_opcua_UserTokenType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
99 /** ServerDescriptionType enum table */
\r
100 static const value_string g_ServerDescriptionTypeTable[] = {
102 { 1, "Discovery" },
\r
105 static int hf_opcua_ServerDescriptionType = -1;
\r
107 void parseServerDescriptionType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
109 proto_tree_add_item(tree, hf_opcua_ServerDescriptionType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
112 /** SecurityTokenRequestType enum table */
\r
113 static const value_string g_SecurityTokenRequestTypeTable[] = {
118 static int hf_opcua_SecurityTokenRequestType = -1;
\r
120 void parseSecurityTokenRequestType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
122 proto_tree_add_item(tree, hf_opcua_SecurityTokenRequestType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
125 /** ComplianceLevel enum table */
\r
126 static const value_string g_ComplianceLevelTable[] = {
130 { 3, "Certified" },
\r
133 static int hf_opcua_ComplianceLevel = -1;
\r
135 void parseComplianceLevel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
137 proto_tree_add_item(tree, hf_opcua_ComplianceLevel, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
140 /** RedundancySupport enum table */
\r
141 static const value_string g_RedundancySupportTable[] = {
148 static int hf_opcua_RedundancySupport = -1;
\r
150 void parseRedundancySupport(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
152 proto_tree_add_item(tree, hf_opcua_RedundancySupport, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
155 /** ServerState enum table */
\r
156 static const value_string g_ServerStateTable[] = {
159 { 3, "NoConfiguration" },
163 { 7, "CommunicationFault" },
167 static int hf_opcua_ServerState = -1;
\r
169 void parseServerState(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
171 proto_tree_add_item(tree, hf_opcua_ServerState, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
174 /** ExceptionDeviationType enum table */
\r
175 static const value_string g_ExceptionDeviationTypeTable[] = {
176 { 1, "AbsoluteValue" },
177 { 2, "PercentOfRange" },
178 { 3, "PercentOfValue" },
\r
181 static int hf_opcua_ExceptionDeviationType = -1;
\r
183 void parseExceptionDeviationType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
185 proto_tree_add_item(tree, hf_opcua_ExceptionDeviationType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
188 /** ColorsDataType enum table */
\r
189 static const value_string g_ColorsDataTypeTable[] = {
199 static int hf_opcua_ColorsDataType = -1;
\r
201 void parseColorsDataType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
203 proto_tree_add_item(tree, hf_opcua_ColorsDataType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
206 /** DiagnosticsMasks enum table */
\r
207 static const value_string g_DiagnosticsMasksTable[] = {
208 { 1, "ServiceSymbolicId" },
209 { 2, "ServiceLocalizedText" },
210 { 4, "ServiceAdditionalInfo" },
211 { 8, "ServiceInnerStatusCode" },
212 { 16, "ServiceInnerDiagnostics" },
213 { 3, "ServiceSymbolicIdAndText" },
214 { 15, "ServiceNoInnerStatus" },
215 { 31, "ServiceAll" },
216 { 32, "OperationSymbolicId" },
217 { 64, "OperationLocalizedText" },
218 { 128, "OperationAdditionalInfo" },
219 { 256, "OperationInnerStatusCode" },
220 { 512, "OperationInnerDiagnostics" },
221 { 96, "OperationSymbolicIdAndText" },
222 { 224, "OperationNoInnerStatus" },
223 { 992, "OperationAll" },
224 { 33, "SymbolicId" },
225 { 66, "LocalizedText" },
226 { 132, "AdditionalInfo" },
227 { 264, "InnerStatusCode" },
228 { 528, "InnerDiagnostics" },
229 { 99, "SymbolicIdAndText" },
230 { 239, "NoInnerStatus" },
234 static int hf_opcua_DiagnosticsMasks = -1;
\r
236 void parseDiagnosticsMasks(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
238 proto_tree_add_item(tree, hf_opcua_DiagnosticsMasks, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
241 /** EnumeratedTestType enum table */
\r
242 static const value_string g_EnumeratedTestTypeTable[] = {
248 static int hf_opcua_EnumeratedTestType = -1;
\r
250 void parseEnumeratedTestType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
252 proto_tree_add_item(tree, hf_opcua_EnumeratedTestType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
255 /** BrowseDirection enum table */
\r
256 static const value_string g_BrowseDirectionTable[] = {
262 static int hf_opcua_BrowseDirection = -1;
\r
264 void parseBrowseDirection(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
266 proto_tree_add_item(tree, hf_opcua_BrowseDirection, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
269 /** FilterOperator enum table */
\r
270 static const value_string g_FilterOperatorTable[] = {
273 { 3, "GreaterThan" },
275 { 5, "GreaterThanOrEqual" },
276 { 6, "LessThanOrEqual" },
285 { 15, "RelatedTo" },
\r
288 static int hf_opcua_FilterOperator = -1;
\r
290 void parseFilterOperator(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
292 proto_tree_add_item(tree, hf_opcua_FilterOperator, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
295 /** TimestampsToReturn enum table */
\r
296 static const value_string g_TimestampsToReturnTable[] = {
303 static int hf_opcua_TimestampsToReturn = -1;
\r
305 void parseTimestampsToReturn(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
307 proto_tree_add_item(tree, hf_opcua_TimestampsToReturn, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
310 /** MonitoringMode enum table */
\r
311 static const value_string g_MonitoringModeTable[] = {
314 { 2, "Reporting" },
\r
317 static int hf_opcua_MonitoringMode = -1;
\r
319 void parseMonitoringMode(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
321 proto_tree_add_item(tree, hf_opcua_MonitoringMode, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
324 /** DataChangeTrigger enum table */
\r
325 static const value_string g_DataChangeTriggerTable[] = {
327 { 1, "StatusValue" },
328 { 2, "StatusValueTimestamp" },
\r
331 static int hf_opcua_DataChangeTrigger = -1;
\r
333 void parseDataChangeTrigger(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
335 proto_tree_add_item(tree, hf_opcua_DataChangeTrigger, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
338 /** DeadbandType enum table */
\r
339 static const value_string g_DeadbandTypeTable[] = {
342 { 2, "Percentage" },
\r
345 static int hf_opcua_DeadbandType = -1;
\r
347 void parseDeadbandType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
\r
349 proto_tree_add_item(tree, hf_opcua_DeadbandType, tvb, *pOffset, 4, TRUE); *pOffset+=4;
\r
352 /** header field definitions */
353 static hf_register_info hf[] =
355 { &hf_opcua_NodeClass,
\r
356 { "NodeClass", "", FT_UINT32, BASE_HEX, VALS(g_NodeClassTable), 0x0, "", HFILL }
\r
358 { &hf_opcua_IdType,
\r
359 { "IdType", "", FT_UINT32, BASE_HEX, VALS(g_IdTypeTable), 0x0, "", HFILL }
\r
361 { &hf_opcua_MessageSecurityMode,
\r
362 { "MessageSecurityMode", "", FT_UINT32, BASE_HEX, VALS(g_MessageSecurityModeTable), 0x0, "", HFILL }
\r
364 { &hf_opcua_UserTokenType,
\r
365 { "UserTokenType", "", FT_UINT32, BASE_HEX, VALS(g_UserTokenTypeTable), 0x0, "", HFILL }
\r
367 { &hf_opcua_ServerDescriptionType,
\r
368 { "ServerDescriptionType", "", FT_UINT32, BASE_HEX, VALS(g_ServerDescriptionTypeTable), 0x0, "", HFILL }
\r
370 { &hf_opcua_SecurityTokenRequestType,
\r
371 { "SecurityTokenRequestType", "", FT_UINT32, BASE_HEX, VALS(g_SecurityTokenRequestTypeTable), 0x0, "", HFILL }
\r
373 { &hf_opcua_ComplianceLevel,
\r
374 { "ComplianceLevel", "", FT_UINT32, BASE_HEX, VALS(g_ComplianceLevelTable), 0x0, "", HFILL }
\r
376 { &hf_opcua_RedundancySupport,
\r
377 { "RedundancySupport", "", FT_UINT32, BASE_HEX, VALS(g_RedundancySupportTable), 0x0, "", HFILL }
\r
379 { &hf_opcua_ServerState,
\r
380 { "ServerState", "", FT_UINT32, BASE_HEX, VALS(g_ServerStateTable), 0x0, "", HFILL }
\r
382 { &hf_opcua_ExceptionDeviationType,
\r
383 { "ExceptionDeviationType", "", FT_UINT32, BASE_HEX, VALS(g_ExceptionDeviationTypeTable), 0x0, "", HFILL }
\r
385 { &hf_opcua_ColorsDataType,
\r
386 { "ColorsDataType", "", FT_UINT32, BASE_HEX, VALS(g_ColorsDataTypeTable), 0x0, "", HFILL }
\r
388 { &hf_opcua_DiagnosticsMasks,
\r
389 { "DiagnosticsMasks", "", FT_UINT32, BASE_HEX, VALS(g_DiagnosticsMasksTable), 0x0, "", HFILL }
\r
391 { &hf_opcua_EnumeratedTestType,
\r
392 { "EnumeratedTestType", "", FT_UINT32, BASE_HEX, VALS(g_EnumeratedTestTypeTable), 0x0, "", HFILL }
\r
394 { &hf_opcua_BrowseDirection,
\r
395 { "BrowseDirection", "", FT_UINT32, BASE_HEX, VALS(g_BrowseDirectionTable), 0x0, "", HFILL }
\r
397 { &hf_opcua_FilterOperator,
\r
398 { "FilterOperator", "", FT_UINT32, BASE_HEX, VALS(g_FilterOperatorTable), 0x0, "", HFILL }
\r
400 { &hf_opcua_TimestampsToReturn,
\r
401 { "TimestampsToReturn", "", FT_UINT32, BASE_HEX, VALS(g_TimestampsToReturnTable), 0x0, "", HFILL }
\r
403 { &hf_opcua_MonitoringMode,
\r
404 { "MonitoringMode", "", FT_UINT32, BASE_HEX, VALS(g_MonitoringModeTable), 0x0, "", HFILL }
\r
406 { &hf_opcua_DataChangeTrigger,
\r
407 { "DataChangeTrigger", "", FT_UINT32, BASE_HEX, VALS(g_DataChangeTriggerTable), 0x0, "", HFILL }
\r
409 { &hf_opcua_DeadbandType,
\r
410 { "DeadbandType", "", FT_UINT32, BASE_HEX, VALS(g_DeadbandTypeTable), 0x0, "", HFILL }
\r
414 /** Register enum types. */
415 void registerEnumTypes(int proto)
417 proto_register_field_array(proto, hf, array_length(hf));