| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
opcua_simpletypes.h
1/******************************************************************************
2** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
3** Web: http://www.ascolab.com
4**
5** SPDX-License-Identifier: GPL-2.0-or-later
6**
7** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
8** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
9**
10** Project: OpcUa Wireshark Plugin
11**
12** Description: Implementation of OpcUa built-in type parsers.
13** This contains all the simple types and some complex types.
14**
15** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
16******************************************************************************/
17#ifndef OPCUA_IDENTIFIERS_H
18#define OPCUA_IDENTIFIERS_H
19
20#include "opcua_identifiers.h"
21
22/* simple header fields */
24 extern int hf_opcua_returnDiag;
25
27 extern int hf_opcua_returnDiag_mask_sl_symbolicId;
28
30 extern int hf_opcua_returnDiag_mask_sl_localizedText;
31
33 extern int hf_opcua_returnDiag_mask_sl_additionalinfo;
34
36 extern int hf_opcua_returnDiag_mask_sl_innerstatuscode;
37
39 extern int hf_opcua_returnDiag_mask_sl_innerdiagnostics;
40
42 extern int hf_opcua_returnDiag_mask_ol_symbolicId;
43
45 extern int hf_opcua_returnDiag_mask_ol_localizedText;
46
48 extern int hf_opcua_returnDiag_mask_ol_additionalinfo;
49
51 extern int hf_opcua_returnDiag_mask_ol_innerstatuscode;
52
54 extern int hf_opcua_returnDiag_mask_ol_innerdiagnostics;
55
57 extern int hf_opcua_nodeClassMask;
58
60 extern int hf_opcua_nodeClassMask_all;
61
63 extern int hf_opcua_nodeClassMask_object;
64
66 extern int hf_opcua_nodeClassMask_variable;
67
69 extern int hf_opcua_nodeClassMask_method;
70
72 extern int hf_opcua_nodeClassMask_objecttype;
73
75 extern int hf_opcua_nodeClassMask_variabletype;
76
78 extern int hf_opcua_nodeClassMask_referencetype;
79
81 extern int hf_opcua_nodeClassMask_datatype;
82
84 extern int hf_opcua_nodeClassMask_view;
85
87 extern int hf_opcua_resultMask;
88
90 extern int hf_opcua_resultMask_all;
91
93 extern int hf_opcua_resultMask_referencetype;
94
96 extern int hf_opcua_resultMask_isforward;
97
99 extern int hf_opcua_resultMask_nodeclass;
100
102 extern int hf_opcua_resultMask_browsename;
103
105 extern int hf_opcua_resultMask_displayname;
106
108 extern int hf_opcua_resultMask_typedefinition;
109
110/* simple types trees */
112 extern int ett_opcua_nodeid;
113
115 extern int ett_opcua_extensionobject;
116
118 extern int ett_opcua_array_Boolean;
119
121 extern int ett_opcua_array_SByte;
122
124 extern int ett_opcua_array_Byte;
125
127 extern int ett_opcua_array_Int16;
128
130 extern int ett_opcua_array_UInt16;
131
133 extern int ett_opcua_array_Int32;
134
136 extern int ett_opcua_array_UInt32;
137
139 extern int ett_opcua_array_Int64;
140
142 extern int ett_opcua_array_UInt64;
143
145 extern int ett_opcua_array_Float;
146
148 extern int ett_opcua_array_Double;
149
151 extern int ett_opcua_array_String;
152
154 extern int ett_opcua_array_DateTime;
155
157 extern int ett_opcua_array_Guid;
158
160 extern int ett_opcua_array_ByteString;
161
163 extern int ett_opcua_array_XmlElement;
164
166 extern int ett_opcua_array_NodeId;
167
169 extern int ett_opcua_array_ExpandedNodeId;
170
172 extern int ett_opcua_array_StatusCode;
173
175 extern int ett_opcua_array_DiagnosticInfo;
176
178 extern int ett_opcua_array_QualifiedName;
179
181 extern int ett_opcua_array_LocalizedText;
182
184 extern int ett_opcua_array_ExtensionObject;
185
187 extern int ett_opcua_array_DataValue;
188
190 extern int ett_opcua_array_Variant;
191
193 extern int ett_opcua_returnDiagnostics;
194
196 extern int ett_opcua_nodeClassMask;
197
199 extern int ett_opcua_resultMask;
200
201
205 enum ua_message_mode {
206 UA_MessageMode_Unknown = 0,
207 UA_MessageMode_None,
208 UA_MessageMode_Sign,
209 UA_MessageMode_SignAndEncrypt,
210 UA_MessageMode_MaybeEncrypted
211};
212
213/* simple types */
214
225 proto_item* parseBoolean(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
226
237 proto_item* parseByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
238
249 proto_item* parseSByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
250
261 proto_item* parseUInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
262
273 proto_item* parseInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
274
285 proto_item* parseUInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
286
297 proto_item* parseInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
298
309 proto_item* parseUInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
310
321 proto_item* parseInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
322
333 proto_item* parseString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
334
347 proto_item* parseString_ret_string_and_length(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex, const uint8_t **retval, int *lenretval);
348
359 proto_item* parseGuid(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
360
371 proto_item* parseByteString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
372
383 proto_item* parseXmlElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
384
395 proto_item* parseFloat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
396
407 proto_item* parseDouble(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
408
419 proto_item* parseDateTime(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
420
431 proto_item* parseStatusCode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
432/* complex types */
433
443 void parseLocalizedText(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
453 void parseNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
454
464 void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
465
475 void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
476
486 void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
487
497 void parseCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
498
508 void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
509
519 void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
520
530 void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
531
545 void parseArraySimple(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, int hfIndex, fctSimpleTypeParser pParserFunction, const int idx);
546
559 void parseArrayEnum(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, fctEnumParser pParserFunction, const int idx);
560
573 void parseArrayComplex(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, fctComplexTypeParser pParserFunction, const int idx);
574
580 void registerSimpleTypes(int proto);
581
589uint32_t getExtensionObjectType(tvbuff_t *tvb, int *pOffset);
590
599 void parseNodeClassMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
600
609 void parseResultMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
610
621 void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int TypeId);
622
623#endif /* OPCUA_IDENTIFIERS_H */
packet_info
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
proto_item
proto_node proto_item
Definition proto.h:927