1 /******************************************************************************
4 ** Copyright (C) 2006-2009 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 12.02.2013.
20 ** DON'T MODIFY THIS FILE!
22 ******************************************************************************/
27 #include <epan/packet.h>
29 #include "opcua_enumparser.h"
31 /** NodeIdType enum table */
32 static const value_string g_NodeIdTypeTable
[] = {
42 static int hf_opcua_NodeIdType
= -1;
44 void parseNodeIdType(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
46 proto_tree_add_item(tree
, hf_opcua_NodeIdType
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
48 /** OpenFileMode enum table */
49 static const value_string g_OpenFileModeTable
[] = {
52 { 4, "EraseExisiting" },
56 static int hf_opcua_OpenFileMode
= -1;
58 void parseOpenFileMode(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
60 proto_tree_add_item(tree
, hf_opcua_OpenFileMode
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
62 /** IdType enum table */
63 static const value_string g_IdTypeTable
[] = {
70 static int hf_opcua_IdType
= -1;
72 void parseIdType(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
74 proto_tree_add_item(tree
, hf_opcua_IdType
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
76 /** NodeClass enum table */
77 static const value_string g_NodeClassTable
[] = {
83 { 16, "VariableType" },
84 { 32, "ReferenceType" },
89 static int hf_opcua_NodeClass
= -1;
91 void parseNodeClass(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
93 proto_tree_add_item(tree
, hf_opcua_NodeClass
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
95 /** ApplicationType enum table */
96 static const value_string g_ApplicationTypeTable
[] = {
99 { 2, "ClientAndServer" },
100 { 3, "DiscoveryServer" },
103 static int hf_opcua_ApplicationType
= -1;
105 void parseApplicationType(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
107 proto_tree_add_item(tree
, hf_opcua_ApplicationType
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
109 /** MessageSecurityMode enum table */
110 static const value_string g_MessageSecurityModeTable
[] = {
114 { 3, "SignAndEncrypt" },
117 static int hf_opcua_MessageSecurityMode
= -1;
119 void parseMessageSecurityMode(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
121 proto_tree_add_item(tree
, hf_opcua_MessageSecurityMode
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
123 /** UserTokenType enum table */
124 static const value_string g_UserTokenTypeTable
[] = {
127 { 2, "Certificate" },
128 { 3, "IssuedToken" },
131 static int hf_opcua_UserTokenType
= -1;
133 void parseUserTokenType(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
135 proto_tree_add_item(tree
, hf_opcua_UserTokenType
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
137 /** SecurityTokenRequestType enum table */
138 static const value_string g_SecurityTokenRequestTypeTable
[] = {
143 static int hf_opcua_SecurityTokenRequestType
= -1;
145 void parseSecurityTokenRequestType(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
147 proto_tree_add_item(tree
, hf_opcua_SecurityTokenRequestType
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
149 /** NodeAttributesMask enum table */
150 static const value_string g_NodeAttributesMaskTable
[] = {
152 { 1, "AccessLevel" },
153 { 2, "ArrayDimensions" },
155 { 8, "ContainsNoLoops" },
157 { 32, "Description" },
158 { 64, "DisplayName" },
159 { 128, "EventNotifier" },
160 { 256, "Executable" },
161 { 512, "Historizing" },
162 { 1024, "InverseName" },
163 { 2048, "IsAbstract" },
164 { 4096, "MinimumSamplingInterval" },
165 { 8192, "NodeClass" },
167 { 32768, "Symmetric" },
168 { 65536, "UserAccessLevel" },
169 { 131072, "UserExecutable" },
170 { 262144, "UserWriteMask" },
171 { 524288, "ValueRank" },
172 { 1048576, "WriteMask" },
173 { 2097152, "Value" },
175 { 1335396, "BaseNode" },
176 { 1335524, "Object" },
177 { 1337444, "ObjectTypeOrDataType" },
178 { 4026999, "Variable" },
179 { 3958902, "VariableType" },
180 { 1466724, "Method" },
181 { 1371236, "ReferenceType" },
185 static int hf_opcua_NodeAttributesMask
= -1;
187 void parseNodeAttributesMask(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
189 proto_tree_add_item(tree
, hf_opcua_NodeAttributesMask
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
191 /** AttributeWriteMask enum table */
192 static const value_string g_AttributeWriteMaskTable
[] = {
194 { 1, "AccessLevel" },
195 { 2, "ArrayDimensions" },
197 { 8, "ContainsNoLoops" },
199 { 32, "Description" },
200 { 64, "DisplayName" },
201 { 128, "EventNotifier" },
202 { 256, "Executable" },
203 { 512, "Historizing" },
204 { 1024, "InverseName" },
205 { 2048, "IsAbstract" },
206 { 4096, "MinimumSamplingInterval" },
207 { 8192, "NodeClass" },
209 { 32768, "Symmetric" },
210 { 65536, "UserAccessLevel" },
211 { 131072, "UserExecutable" },
212 { 262144, "UserWriteMask" },
213 { 524288, "ValueRank" },
214 { 1048576, "WriteMask" },
215 { 2097152, "ValueForVariableType" },
218 static int hf_opcua_AttributeWriteMask
= -1;
220 void parseAttributeWriteMask(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
222 proto_tree_add_item(tree
, hf_opcua_AttributeWriteMask
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
224 /** BrowseDirection enum table */
225 static const value_string g_BrowseDirectionTable
[] = {
231 static int hf_opcua_BrowseDirection
= -1;
233 void parseBrowseDirection(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
235 proto_tree_add_item(tree
, hf_opcua_BrowseDirection
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
237 /** BrowseResultMask enum table */
238 static const value_string g_BrowseResultMaskTable
[] = {
240 { 1, "ReferenceTypeId" },
244 { 16, "DisplayName" },
245 { 32, "TypeDefinition" },
247 { 3, "ReferenceTypeInfo" },
248 { 60, "TargetInfo" },
251 static int hf_opcua_BrowseResultMask
= -1;
253 void parseBrowseResultMask(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
255 proto_tree_add_item(tree
, hf_opcua_BrowseResultMask
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
257 /** ComplianceLevel enum table */
258 static const value_string g_ComplianceLevelTable
[] = {
265 static int hf_opcua_ComplianceLevel
= -1;
267 void parseComplianceLevel(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
269 proto_tree_add_item(tree
, hf_opcua_ComplianceLevel
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
271 /** FilterOperator enum table */
272 static const value_string g_FilterOperatorTable
[] = {
275 { 2, "GreaterThan" },
277 { 4, "GreaterThanOrEqual" },
278 { 5, "LessThanOrEqual" },
289 { 16, "BitwiseAnd" },
293 static int hf_opcua_FilterOperator
= -1;
295 void parseFilterOperator(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
297 proto_tree_add_item(tree
, hf_opcua_FilterOperator
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
299 /** TimestampsToReturn enum table */
300 static const value_string g_TimestampsToReturnTable
[] = {
307 static int hf_opcua_TimestampsToReturn
= -1;
309 void parseTimestampsToReturn(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
311 proto_tree_add_item(tree
, hf_opcua_TimestampsToReturn
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
313 /** HistoryUpdateType enum table */
314 static const value_string g_HistoryUpdateTypeTable
[] = {
321 static int hf_opcua_HistoryUpdateType
= -1;
323 void parseHistoryUpdateType(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
325 proto_tree_add_item(tree
, hf_opcua_HistoryUpdateType
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
327 /** PerformUpdateType enum table */
328 static const value_string g_PerformUpdateTypeTable
[] = {
335 static int hf_opcua_PerformUpdateType
= -1;
337 void parsePerformUpdateType(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
339 proto_tree_add_item(tree
, hf_opcua_PerformUpdateType
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
341 /** MonitoringMode enum table */
342 static const value_string g_MonitoringModeTable
[] = {
348 static int hf_opcua_MonitoringMode
= -1;
350 void parseMonitoringMode(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
352 proto_tree_add_item(tree
, hf_opcua_MonitoringMode
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
354 /** DataChangeTrigger enum table */
355 static const value_string g_DataChangeTriggerTable
[] = {
357 { 1, "StatusValue" },
358 { 2, "StatusValueTimestamp" },
361 static int hf_opcua_DataChangeTrigger
= -1;
363 void parseDataChangeTrigger(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
365 proto_tree_add_item(tree
, hf_opcua_DataChangeTrigger
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
367 /** DeadbandType enum table */
368 static const value_string g_DeadbandTypeTable
[] = {
374 static int hf_opcua_DeadbandType
= -1;
376 void parseDeadbandType(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
378 proto_tree_add_item(tree
, hf_opcua_DeadbandType
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
380 /** EnumeratedTestType enum table */
381 static const value_string g_EnumeratedTestTypeTable
[] = {
387 static int hf_opcua_EnumeratedTestType
= -1;
389 void parseEnumeratedTestType(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
391 proto_tree_add_item(tree
, hf_opcua_EnumeratedTestType
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
393 /** RedundancySupport enum table */
394 static const value_string g_RedundancySupportTable
[] = {
399 { 4, "Transparent" },
400 { 5, "HotAndMirrored" },
403 static int hf_opcua_RedundancySupport
= -1;
405 void parseRedundancySupport(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
407 proto_tree_add_item(tree
, hf_opcua_RedundancySupport
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
409 /** ServerState enum table */
410 static const value_string g_ServerStateTable
[] = {
413 { 2, "NoConfiguration" },
417 { 6, "CommunicationFault" },
421 static int hf_opcua_ServerState
= -1;
423 void parseServerState(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
425 proto_tree_add_item(tree
, hf_opcua_ServerState
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
427 /** ModelChangeStructureVerbMask enum table */
428 static const value_string g_ModelChangeStructureVerbMaskTable
[] = {
430 { 2, "NodeDeleted" },
431 { 4, "ReferenceAdded" },
432 { 8, "ReferenceDeleted" },
433 { 16, "DataTypeChanged" },
436 static int hf_opcua_ModelChangeStructureVerbMask
= -1;
438 void parseModelChangeStructureVerbMask(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
440 proto_tree_add_item(tree
, hf_opcua_ModelChangeStructureVerbMask
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
442 /** AxisScaleEnumeration enum table */
443 static const value_string g_AxisScaleEnumerationTable
[] = {
449 static int hf_opcua_AxisScaleEnumeration
= -1;
451 void parseAxisScaleEnumeration(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
453 proto_tree_add_item(tree
, hf_opcua_AxisScaleEnumeration
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
455 /** ExceptionDeviationFormat enum table */
456 static const value_string g_ExceptionDeviationFormatTable
[] = {
457 { 0, "AbsoluteValue" },
458 { 1, "PercentOfRange" },
459 { 2, "PercentOfValue" },
460 { 3, "PercentOfEURange" },
464 static int hf_opcua_ExceptionDeviationFormat
= -1;
466 void parseExceptionDeviationFormat(proto_tree
*tree
, tvbuff_t
*tvb
, gint
*pOffset
)
468 proto_tree_add_item(tree
, hf_opcua_ExceptionDeviationFormat
, tvb
, *pOffset
, 4, ENC_LITTLE_ENDIAN
); *pOffset
+=4;
471 /** Register enum types. */
472 void registerEnumTypes(int proto
)
474 /** header field definitions */
475 static hf_register_info hf
[] =
477 { &hf_opcua_NodeIdType
,
478 { "NodeIdType", "opcua.NodeIdType", FT_UINT32
, BASE_HEX
, VALS(g_NodeIdTypeTable
), 0x0, NULL
, HFILL
}
480 { &hf_opcua_OpenFileMode
,
481 { "OpenFileMode", "opcua.OpenFileMode", FT_UINT32
, BASE_HEX
, VALS(g_OpenFileModeTable
), 0x0, NULL
, HFILL
}
484 { "IdType", "opcua.IdType", FT_UINT32
, BASE_HEX
, VALS(g_IdTypeTable
), 0x0, NULL
, HFILL
}
486 { &hf_opcua_NodeClass
,
487 { "NodeClass", "opcua.NodeClass", FT_UINT32
, BASE_HEX
, VALS(g_NodeClassTable
), 0x0, NULL
, HFILL
}
489 { &hf_opcua_ApplicationType
,
490 { "ApplicationType", "opcua.ApplicationType", FT_UINT32
, BASE_HEX
, VALS(g_ApplicationTypeTable
), 0x0, NULL
, HFILL
}
492 { &hf_opcua_MessageSecurityMode
,
493 { "MessageSecurityMode", "opcua.MessageSecurityMode", FT_UINT32
, BASE_HEX
, VALS(g_MessageSecurityModeTable
), 0x0, NULL
, HFILL
}
495 { &hf_opcua_UserTokenType
,
496 { "UserTokenType", "opcua.UserTokenType", FT_UINT32
, BASE_HEX
, VALS(g_UserTokenTypeTable
), 0x0, NULL
, HFILL
}
498 { &hf_opcua_SecurityTokenRequestType
,
499 { "SecurityTokenRequestType", "opcua.SecurityTokenRequestType", FT_UINT32
, BASE_HEX
, VALS(g_SecurityTokenRequestTypeTable
), 0x0, NULL
, HFILL
}
501 { &hf_opcua_NodeAttributesMask
,
502 { "NodeAttributesMask", "opcua.NodeAttributesMask", FT_UINT32
, BASE_HEX
, VALS(g_NodeAttributesMaskTable
), 0x0, NULL
, HFILL
}
504 { &hf_opcua_AttributeWriteMask
,
505 { "AttributeWriteMask", "opcua.AttributeWriteMask", FT_UINT32
, BASE_HEX
, VALS(g_AttributeWriteMaskTable
), 0x0, NULL
, HFILL
}
507 { &hf_opcua_BrowseDirection
,
508 { "BrowseDirection", "opcua.BrowseDirection", FT_UINT32
, BASE_HEX
, VALS(g_BrowseDirectionTable
), 0x0, NULL
, HFILL
}
510 { &hf_opcua_BrowseResultMask
,
511 { "BrowseResultMask", "opcua.BrowseResultMask", FT_UINT32
, BASE_HEX
, VALS(g_BrowseResultMaskTable
), 0x0, NULL
, HFILL
}
513 { &hf_opcua_ComplianceLevel
,
514 { "ComplianceLevel", "opcua.ComplianceLevel", FT_UINT32
, BASE_HEX
, VALS(g_ComplianceLevelTable
), 0x0, NULL
, HFILL
}
516 { &hf_opcua_FilterOperator
,
517 { "FilterOperator", "opcua.FilterOperator", FT_UINT32
, BASE_HEX
, VALS(g_FilterOperatorTable
), 0x0, NULL
, HFILL
}
519 { &hf_opcua_TimestampsToReturn
,
520 { "TimestampsToReturn", "opcua.TimestampsToReturn", FT_UINT32
, BASE_HEX
, VALS(g_TimestampsToReturnTable
), 0x0, NULL
, HFILL
}
522 { &hf_opcua_HistoryUpdateType
,
523 { "HistoryUpdateType", "opcua.HistoryUpdateType", FT_UINT32
, BASE_HEX
, VALS(g_HistoryUpdateTypeTable
), 0x0, NULL
, HFILL
}
525 { &hf_opcua_PerformUpdateType
,
526 { "PerformUpdateType", "opcua.PerformUpdateType", FT_UINT32
, BASE_HEX
, VALS(g_PerformUpdateTypeTable
), 0x0, NULL
, HFILL
}
528 { &hf_opcua_MonitoringMode
,
529 { "MonitoringMode", "opcua.MonitoringMode", FT_UINT32
, BASE_HEX
, VALS(g_MonitoringModeTable
), 0x0, NULL
, HFILL
}
531 { &hf_opcua_DataChangeTrigger
,
532 { "DataChangeTrigger", "opcua.DataChangeTrigger", FT_UINT32
, BASE_HEX
, VALS(g_DataChangeTriggerTable
), 0x0, NULL
, HFILL
}
534 { &hf_opcua_DeadbandType
,
535 { "DeadbandType", "opcua.DeadbandType", FT_UINT32
, BASE_HEX
, VALS(g_DeadbandTypeTable
), 0x0, NULL
, HFILL
}
537 { &hf_opcua_EnumeratedTestType
,
538 { "EnumeratedTestType", "opcua.EnumeratedTestType", FT_UINT32
, BASE_HEX
, VALS(g_EnumeratedTestTypeTable
), 0x0, NULL
, HFILL
}
540 { &hf_opcua_RedundancySupport
,
541 { "RedundancySupport", "opcua.RedundancySupport", FT_UINT32
, BASE_HEX
, VALS(g_RedundancySupportTable
), 0x0, NULL
, HFILL
}
543 { &hf_opcua_ServerState
,
544 { "ServerState", "opcua.ServerState", FT_UINT32
, BASE_HEX
, VALS(g_ServerStateTable
), 0x0, NULL
, HFILL
}
546 { &hf_opcua_ModelChangeStructureVerbMask
,
547 { "ModelChangeStructureVerbMask", "opcua.ModelChangeStructureVerbMask", FT_UINT32
, BASE_HEX
, VALS(g_ModelChangeStructureVerbMaskTable
), 0x0, NULL
, HFILL
}
549 { &hf_opcua_AxisScaleEnumeration
,
550 { "AxisScaleEnumeration", "opcua.AxisScaleEnumeration", FT_UINT32
, BASE_HEX
, VALS(g_AxisScaleEnumerationTable
), 0x0, NULL
, HFILL
}
552 { &hf_opcua_ExceptionDeviationFormat
,
553 { "ExceptionDeviationFormat", "opcua.ExceptionDeviationFormat", FT_UINT32
, BASE_HEX
, VALS(g_ExceptionDeviationFormatTable
), 0x0, NULL
, HFILL
}
557 proto_register_field_array(proto
, hf
, array_length(hf
));