nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /******************************************************************************
2 ** Copyright (C) 2006-2007 ascolab GmbH. All Rights Reserved.
3 ** Web: http://www.ascolab.com
4 **
5 ** This program is free software; you can redistribute it and/or
6 ** modify it under the terms of the GNU General Public License
7 ** as published by the Free Software Foundation; either version 2
8 ** of the License, or (at your option) any later version.
9 **
10 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12 **
13 ** Project: OpcUa Wireshark Plugin
14 **
15 ** Description: Implementation of OpcUa built-in type parsers.
16 ** This contains all the simple types and some complex types.
17 **
18 ** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
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  
35 /* simple types trees */
36 extern gint ett_opcua_array_Boolean;
37 extern gint ett_opcua_array_SByte;
38 extern gint ett_opcua_array_Byte;
39 extern gint ett_opcua_array_Int16;
40 extern gint ett_opcua_array_UInt16;
41 extern gint ett_opcua_array_Int32;
42 extern gint ett_opcua_array_UInt32;
43 extern gint ett_opcua_array_Int64;
44 extern gint ett_opcua_array_UInt64;
45 extern gint ett_opcua_array_Float;
46 extern gint ett_opcua_array_Double;
47 extern gint ett_opcua_array_String;
48 extern gint ett_opcua_array_DateTime;
49 extern gint ett_opcua_array_Guid;
50 extern gint ett_opcua_array_ByteString;
51 extern gint ett_opcua_array_XmlElement;
52 extern gint ett_opcua_array_NodeId;
53 extern gint ett_opcua_array_ExpandedNodeId;
54 extern gint ett_opcua_array_StatusCode;
55 extern gint ett_opcua_array_DiagnosticInfo;
56 extern gint ett_opcua_array_QualifiedName;
57 extern gint ett_opcua_array_LocalizedText;
58 extern gint ett_opcua_array_ExtensionObject;
59 extern gint ett_opcua_array_DataValue;
60 extern gint ett_opcua_array_Variant;
61 extern gint ett_opcua_returnDiagnostics;
62  
63 /* simple types */
64 proto_item* parseBoolean(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
65 proto_item* parseByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
66 proto_item* parseSByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
67 proto_item* parseUInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
68 proto_item* parseInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
69 proto_item* parseUInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
70 proto_item* parseInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
71 proto_item* parseUInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
72 proto_item* parseInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
73 proto_item* parseString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
74 proto_item* parseGuid(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
75 proto_item* parseByteString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
76 proto_item* parseXmlElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
77 proto_item* parseFloat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
78 proto_item* parseDouble(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
79 proto_item* parseDateTime(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
80 proto_item* parseStatusCode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
81 /* complex types */
82 void parseLocalizedText(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
83 void parseNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
84 void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
85 void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
86 void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
87 void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
88 void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
89 void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
90 void parseArraySimple(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName, const char *szTypeName, int hfIndex, fctSimpleTypeParser pParserFunction, const gint idx);
91 void parseArrayEnum(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName, const char *szTypeName, fctEnumParser pParserFunction, const gint idx);
92 void parseArrayComplex(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName, const char *szTypeName, fctComplexTypeParser pParserFunction, const gint idx);
93 void registerSimpleTypes(int proto);
94 guint32 getExtensionObjectType(tvbuff_t *tvb, gint *pOffset);
95  
96 void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int TypeId);
97