Wireshark 4.7.0
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 <[email protected]>
16******************************************************************************/
17#ifndef OPCUA_IDENTIFIERS_H
18#define OPCUA_IDENTIFIERS_H
19
20#include "opcua_identifiers.h"
21
22/* simple header fields */
24extern int hf_opcua_returnDiag;
25
27extern int hf_opcua_returnDiag_mask_sl_symbolicId;
28
30extern int hf_opcua_returnDiag_mask_sl_localizedText;
31
33extern int hf_opcua_returnDiag_mask_sl_additionalinfo;
34
36extern int hf_opcua_returnDiag_mask_sl_innerstatuscode;
37
39extern int hf_opcua_returnDiag_mask_sl_innerdiagnostics;
40
42extern int hf_opcua_returnDiag_mask_ol_symbolicId;
43
45extern int hf_opcua_returnDiag_mask_ol_localizedText;
46
48extern int hf_opcua_returnDiag_mask_ol_additionalinfo;
49
51extern int hf_opcua_returnDiag_mask_ol_innerstatuscode;
52
54extern int hf_opcua_returnDiag_mask_ol_innerdiagnostics;
55
57extern int hf_opcua_nodeClassMask;
58
60extern int hf_opcua_nodeClassMask_all;
61
63extern int hf_opcua_nodeClassMask_object;
64
66extern int hf_opcua_nodeClassMask_variable;
67
69extern int hf_opcua_nodeClassMask_method;
70
72extern int hf_opcua_nodeClassMask_objecttype;
73
75extern int hf_opcua_nodeClassMask_variabletype;
76
78extern int hf_opcua_nodeClassMask_referencetype;
79
81extern int hf_opcua_nodeClassMask_datatype;
82
84extern int hf_opcua_nodeClassMask_view;
85
87extern int hf_opcua_resultMask;
88
90extern int hf_opcua_resultMask_all;
91
93extern int hf_opcua_resultMask_referencetype;
94
96extern int hf_opcua_resultMask_isforward;
97
99extern int hf_opcua_resultMask_nodeclass;
100
102extern int hf_opcua_resultMask_browsename;
103
105extern int hf_opcua_resultMask_displayname;
106
108extern int hf_opcua_resultMask_typedefinition;
109
110/* simple types trees */
112extern int ett_opcua_nodeid;
113
115extern int ett_opcua_extensionobject;
116
118extern int ett_opcua_array_Boolean;
119
121extern int ett_opcua_array_SByte;
122
124extern int ett_opcua_array_Byte;
125
127extern int ett_opcua_array_Int16;
128
130extern int ett_opcua_array_UInt16;
131
133extern int ett_opcua_array_Int32;
134
136extern int ett_opcua_array_UInt32;
137
139extern int ett_opcua_array_Int64;
140
142extern int ett_opcua_array_UInt64;
143
145extern int ett_opcua_array_Float;
146
148extern int ett_opcua_array_Double;
149
151extern int ett_opcua_array_String;
152
154extern int ett_opcua_array_DateTime;
155
157extern int ett_opcua_array_Guid;
158
160extern int ett_opcua_array_ByteString;
161
163extern int ett_opcua_array_XmlElement;
164
166extern int ett_opcua_array_NodeId;
167
169extern int ett_opcua_array_ExpandedNodeId;
170
172extern int ett_opcua_array_StatusCode;
173
175extern int ett_opcua_array_DiagnosticInfo;
176
178extern int ett_opcua_array_QualifiedName;
179
181extern int ett_opcua_array_LocalizedText;
182
184extern int ett_opcua_array_ExtensionObject;
185
187extern int ett_opcua_array_DataValue;
188
190extern int ett_opcua_array_Variant;
191
193extern int ett_opcua_returnDiagnostics;
194
196extern int ett_opcua_nodeClassMask;
197
199extern int ett_opcua_resultMask;
200
201
205enum 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
225proto_item* parseBoolean(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
226
237proto_item* parseByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
238
249proto_item* parseSByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
250
261proto_item* parseUInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
262
273proto_item* parseInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
274
285proto_item* parseUInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
286
297proto_item* parseInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
298
309proto_item* parseUInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
310
321proto_item* parseInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
322
333proto_item* parseString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
334
347proto_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
359proto_item* parseGuid(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
360
371proto_item* parseByteString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
372
383proto_item* parseXmlElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
384
395proto_item* parseFloat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
396
407proto_item* parseDouble(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
408
419proto_item* parseDateTime(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
420
431proto_item* parseStatusCode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
432/* complex types */
433
443void parseLocalizedText(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
453void parseNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
454
464void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
465
475void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
476
486void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
487
497void parseCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
498
508void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
509
519void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
520
530void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
531
545void 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
559void parseArrayEnum(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, fctEnumParser pParserFunction, const int idx);
560
573void parseArrayComplex(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, fctComplexTypeParser pParserFunction, const int idx);
574
580void registerSimpleTypes(int proto);
581
589uint32_t getExtensionObjectType(tvbuff_t *tvb, int *pOffset);
590
599void parseNodeClassMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
600
609void parseResultMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
610
621void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int TypeId);
622
623#endif /* OPCUA_IDENTIFIERS_H */
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
Definition proto.h:909
Core tvbuff (testy virtual buffer) structure representing a region of packet data,...
Definition tvbuff-int.h:95