| 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 <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 */
23 extern int hf_opcua_returnDiag;
24 extern int hf_opcua_returnDiag_mask_sl_symbolicId;
25 extern int hf_opcua_returnDiag_mask_sl_localizedText;
26 extern int hf_opcua_returnDiag_mask_sl_additionalinfo;
27 extern int hf_opcua_returnDiag_mask_sl_innerstatuscode;
28 extern int hf_opcua_returnDiag_mask_sl_innerdiagnostics;
29 extern int hf_opcua_returnDiag_mask_ol_symbolicId;
30 extern int hf_opcua_returnDiag_mask_ol_localizedText;
31 extern int hf_opcua_returnDiag_mask_ol_additionalinfo;
32 extern int hf_opcua_returnDiag_mask_ol_innerstatuscode;
33 extern int hf_opcua_returnDiag_mask_ol_innerdiagnostics;
34 extern int hf_opcua_nodeClassMask;
35 extern int hf_opcua_nodeClassMask_object;
36 extern int hf_opcua_nodeClassMask_variable;
37 extern int hf_opcua_nodeClassMask_method;
38 extern int hf_opcua_nodeClassMask_objecttype;
39 extern int hf_opcua_nodeClassMask_variabletype;
40 extern int hf_opcua_nodeClassMask_referencetype;
41 extern int hf_opcua_nodeClassMask_datatype;
42 extern int hf_opcua_nodeClassMask_view;
43
44/* simple types trees */
45 extern int ett_opcua_array_Boolean;
46 extern int ett_opcua_array_SByte;
47 extern int ett_opcua_array_Byte;
48 extern int ett_opcua_array_Int16;
49 extern int ett_opcua_array_UInt16;
50 extern int ett_opcua_array_Int32;
51 extern int ett_opcua_array_UInt32;
52 extern int ett_opcua_array_Int64;
53 extern int ett_opcua_array_UInt64;
54 extern int ett_opcua_array_Float;
55 extern int ett_opcua_array_Double;
56 extern int ett_opcua_array_String;
57 extern int ett_opcua_array_DateTime;
58 extern int ett_opcua_array_Guid;
59 extern int ett_opcua_array_ByteString;
60 extern int ett_opcua_array_XmlElement;
61 extern int ett_opcua_array_NodeId;
62 extern int ett_opcua_array_ExpandedNodeId;
63 extern int ett_opcua_array_StatusCode;
64 extern int ett_opcua_array_DiagnosticInfo;
65 extern int ett_opcua_array_QualifiedName;
66 extern int ett_opcua_array_LocalizedText;
67 extern int ett_opcua_array_ExtensionObject;
68 extern int ett_opcua_array_DataValue;
69 extern int ett_opcua_array_Variant;
70 extern int ett_opcua_returnDiagnostics;
71
72 enum ua_message_mode {
73 UA_MessageMode_Unknown = 0,
74 UA_MessageMode_None,
75 UA_MessageMode_Sign,
76 UA_MessageMode_SignAndEncrypt,
77 UA_MessageMode_MaybeEncrypted
78};
79
80/* simple types */
81 proto_item* parseBoolean(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
82 proto_item* parseByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
83 proto_item* parseSByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
84 proto_item* parseUInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
85 proto_item* parseInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
86 proto_item* parseUInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
87 proto_item* parseInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
88 proto_item* parseUInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
89 proto_item* parseInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
90 proto_item* parseString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
91 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);
92 proto_item* parseGuid(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
93 proto_item* parseByteString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
94 proto_item* parseXmlElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
95 proto_item* parseFloat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
96 proto_item* parseDouble(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
97 proto_item* parseDateTime(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
98 proto_item* parseStatusCode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
99/* complex types */
100 void parseLocalizedText(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
101 void parseNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
102 void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
103 void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
104 void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
105 void parseCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
106 void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
107 void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
108 void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
109 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);
110 void parseArrayEnum(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, fctEnumParser pParserFunction, const int idx);
111 void parseArrayComplex(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, fctComplexTypeParser pParserFunction, const int idx);
112 void registerSimpleTypes(int proto);
113uint32_t getExtensionObjectType(tvbuff_t *tvb, int *pOffset);
114 void parseNodeClassMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
115 void parseResultMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
116
117 void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int TypeId);
118
119#endif /* OPCUA_IDENTIFIERS_H */
_packet_info
Definition packet_info.h:43
_proto_node
Definition proto.h:907
tvbuff
Definition tvbuff-int.h:36