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