1 /******************************************************************************
2 ** Copyright (C) 2006-2015 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: OpcUa Complex Type Parser
13 **
14 ** This file was autogenerated on 13.10.2015.
15 ** DON'T MODIFY THIS FILE!
16 **
17 ******************************************************************************/
18 
19 #include "config.h"
20 
21 #include <epan/packet.h>
22 #include "opcua_complextypeparser.h"
23 #include "opcua_enumparser.h"
24 #include "opcua_simpletypes.h"
25 #include "opcua_hfindeces.h"
26 #include "opcua_serviceparser.h"
27 
28 gint ett_opcua_ServiceFault = -1;
29 gint ett_opcua_array_ServiceFault = -1;
30 gint ett_opcua_FindServersRequest = -1;
31 gint ett_opcua_array_FindServersRequest = -1;
32 gint ett_opcua_FindServersResponse = -1;
33 gint ett_opcua_array_FindServersResponse = -1;
34 gint ett_opcua_FindServersOnNetworkRequest = -1;
35 gint ett_opcua_array_FindServersOnNetworkRequest = -1;
36 gint ett_opcua_FindServersOnNetworkResponse = -1;
37 gint ett_opcua_array_FindServersOnNetworkResponse = -1;
38 gint ett_opcua_GetEndpointsRequest = -1;
39 gint ett_opcua_array_GetEndpointsRequest = -1;
40 gint ett_opcua_GetEndpointsResponse = -1;
41 gint ett_opcua_array_GetEndpointsResponse = -1;
42 gint ett_opcua_RegisterServerRequest = -1;
43 gint ett_opcua_array_RegisterServerRequest = -1;
44 gint ett_opcua_RegisterServerResponse = -1;
45 gint ett_opcua_array_RegisterServerResponse = -1;
46 gint ett_opcua_RegisterServer2Request = -1;
47 gint ett_opcua_array_RegisterServer2Request = -1;
48 gint ett_opcua_RegisterServer2Response = -1;
49 gint ett_opcua_array_RegisterServer2Response = -1;
50 gint ett_opcua_OpenSecureChannelRequest = -1;
51 gint ett_opcua_array_OpenSecureChannelRequest = -1;
52 gint ett_opcua_OpenSecureChannelResponse = -1;
53 gint ett_opcua_array_OpenSecureChannelResponse = -1;
54 gint ett_opcua_CloseSecureChannelRequest = -1;
55 gint ett_opcua_array_CloseSecureChannelRequest = -1;
56 gint ett_opcua_CloseSecureChannelResponse = -1;
57 gint ett_opcua_array_CloseSecureChannelResponse = -1;
58 gint ett_opcua_CreateSessionRequest = -1;
59 gint ett_opcua_array_CreateSessionRequest = -1;
60 gint ett_opcua_CreateSessionResponse = -1;
61 gint ett_opcua_array_CreateSessionResponse = -1;
62 gint ett_opcua_ActivateSessionRequest = -1;
63 gint ett_opcua_array_ActivateSessionRequest = -1;
64 gint ett_opcua_ActivateSessionResponse = -1;
65 gint ett_opcua_array_ActivateSessionResponse = -1;
66 gint ett_opcua_CloseSessionRequest = -1;
67 gint ett_opcua_array_CloseSessionRequest = -1;
68 gint ett_opcua_CloseSessionResponse = -1;
69 gint ett_opcua_array_CloseSessionResponse = -1;
70 gint ett_opcua_CancelRequest = -1;
71 gint ett_opcua_array_CancelRequest = -1;
72 gint ett_opcua_CancelResponse = -1;
73 gint ett_opcua_array_CancelResponse = -1;
74 gint ett_opcua_AddNodesRequest = -1;
75 gint ett_opcua_array_AddNodesRequest = -1;
76 gint ett_opcua_AddNodesResponse = -1;
77 gint ett_opcua_array_AddNodesResponse = -1;
78 gint ett_opcua_AddReferencesRequest = -1;
79 gint ett_opcua_array_AddReferencesRequest = -1;
80 gint ett_opcua_AddReferencesResponse = -1;
81 gint ett_opcua_array_AddReferencesResponse = -1;
82 gint ett_opcua_DeleteNodesRequest = -1;
83 gint ett_opcua_array_DeleteNodesRequest = -1;
84 gint ett_opcua_DeleteNodesResponse = -1;
85 gint ett_opcua_array_DeleteNodesResponse = -1;
86 gint ett_opcua_DeleteReferencesRequest = -1;
87 gint ett_opcua_array_DeleteReferencesRequest = -1;
88 gint ett_opcua_DeleteReferencesResponse = -1;
89 gint ett_opcua_array_DeleteReferencesResponse = -1;
90 gint ett_opcua_BrowseRequest = -1;
91 gint ett_opcua_array_BrowseRequest = -1;
92 gint ett_opcua_BrowseResponse = -1;
93 gint ett_opcua_array_BrowseResponse = -1;
94 gint ett_opcua_BrowseNextRequest = -1;
95 gint ett_opcua_array_BrowseNextRequest = -1;
96 gint ett_opcua_BrowseNextResponse = -1;
97 gint ett_opcua_array_BrowseNextResponse = -1;
98 gint ett_opcua_TranslateBrowsePathsToNodeIdsRequest = -1;
99 gint ett_opcua_array_TranslateBrowsePathsToNodeIdsRequest = -1;
100 gint ett_opcua_TranslateBrowsePathsToNodeIdsResponse = -1;
101 gint ett_opcua_array_TranslateBrowsePathsToNodeIdsResponse = -1;
102 gint ett_opcua_RegisterNodesRequest = -1;
103 gint ett_opcua_array_RegisterNodesRequest = -1;
104 gint ett_opcua_RegisterNodesResponse = -1;
105 gint ett_opcua_array_RegisterNodesResponse = -1;
106 gint ett_opcua_UnregisterNodesRequest = -1;
107 gint ett_opcua_array_UnregisterNodesRequest = -1;
108 gint ett_opcua_UnregisterNodesResponse = -1;
109 gint ett_opcua_array_UnregisterNodesResponse = -1;
110 gint ett_opcua_QueryFirstRequest = -1;
111 gint ett_opcua_array_QueryFirstRequest = -1;
112 gint ett_opcua_QueryFirstResponse = -1;
113 gint ett_opcua_array_QueryFirstResponse = -1;
114 gint ett_opcua_QueryNextRequest = -1;
115 gint ett_opcua_array_QueryNextRequest = -1;
116 gint ett_opcua_QueryNextResponse = -1;
117 gint ett_opcua_array_QueryNextResponse = -1;
118 gint ett_opcua_ReadRequest = -1;
119 gint ett_opcua_array_ReadRequest = -1;
120 gint ett_opcua_ReadResponse = -1;
121 gint ett_opcua_array_ReadResponse = -1;
122 gint ett_opcua_HistoryReadRequest = -1;
123 gint ett_opcua_array_HistoryReadRequest = -1;
124 gint ett_opcua_HistoryReadResponse = -1;
125 gint ett_opcua_array_HistoryReadResponse = -1;
126 gint ett_opcua_WriteRequest = -1;
127 gint ett_opcua_array_WriteRequest = -1;
128 gint ett_opcua_WriteResponse = -1;
129 gint ett_opcua_array_WriteResponse = -1;
130 gint ett_opcua_HistoryUpdateRequest = -1;
131 gint ett_opcua_array_HistoryUpdateRequest = -1;
132 gint ett_opcua_HistoryUpdateResponse = -1;
133 gint ett_opcua_array_HistoryUpdateResponse = -1;
134 gint ett_opcua_CallRequest = -1;
135 gint ett_opcua_array_CallRequest = -1;
136 gint ett_opcua_CallResponse = -1;
137 gint ett_opcua_array_CallResponse = -1;
138 gint ett_opcua_CreateMonitoredItemsRequest = -1;
139 gint ett_opcua_array_CreateMonitoredItemsRequest = -1;
140 gint ett_opcua_CreateMonitoredItemsResponse = -1;
141 gint ett_opcua_array_CreateMonitoredItemsResponse = -1;
142 gint ett_opcua_ModifyMonitoredItemsRequest = -1;
143 gint ett_opcua_array_ModifyMonitoredItemsRequest = -1;
144 gint ett_opcua_ModifyMonitoredItemsResponse = -1;
145 gint ett_opcua_array_ModifyMonitoredItemsResponse = -1;
146 gint ett_opcua_SetMonitoringModeRequest = -1;
147 gint ett_opcua_array_SetMonitoringModeRequest = -1;
148 gint ett_opcua_SetMonitoringModeResponse = -1;
149 gint ett_opcua_array_SetMonitoringModeResponse = -1;
150 gint ett_opcua_SetTriggeringRequest = -1;
151 gint ett_opcua_array_SetTriggeringRequest = -1;
152 gint ett_opcua_SetTriggeringResponse = -1;
153 gint ett_opcua_array_SetTriggeringResponse = -1;
154 gint ett_opcua_DeleteMonitoredItemsRequest = -1;
155 gint ett_opcua_array_DeleteMonitoredItemsRequest = -1;
156 gint ett_opcua_DeleteMonitoredItemsResponse = -1;
157 gint ett_opcua_array_DeleteMonitoredItemsResponse = -1;
158 gint ett_opcua_CreateSubscriptionRequest = -1;
159 gint ett_opcua_array_CreateSubscriptionRequest = -1;
160 gint ett_opcua_CreateSubscriptionResponse = -1;
161 gint ett_opcua_array_CreateSubscriptionResponse = -1;
162 gint ett_opcua_ModifySubscriptionRequest = -1;
163 gint ett_opcua_array_ModifySubscriptionRequest = -1;
164 gint ett_opcua_ModifySubscriptionResponse = -1;
165 gint ett_opcua_array_ModifySubscriptionResponse = -1;
166 gint ett_opcua_SetPublishingModeRequest = -1;
167 gint ett_opcua_array_SetPublishingModeRequest = -1;
168 gint ett_opcua_SetPublishingModeResponse = -1;
169 gint ett_opcua_array_SetPublishingModeResponse = -1;
170 gint ett_opcua_PublishRequest = -1;
171 gint ett_opcua_array_PublishRequest = -1;
172 gint ett_opcua_PublishResponse = -1;
173 gint ett_opcua_array_PublishResponse = -1;
174 gint ett_opcua_RepublishRequest = -1;
175 gint ett_opcua_array_RepublishRequest = -1;
176 gint ett_opcua_RepublishResponse = -1;
177 gint ett_opcua_array_RepublishResponse = -1;
178 gint ett_opcua_TransferSubscriptionsRequest = -1;
179 gint ett_opcua_array_TransferSubscriptionsRequest = -1;
180 gint ett_opcua_TransferSubscriptionsResponse = -1;
181 gint ett_opcua_array_TransferSubscriptionsResponse = -1;
182 gint ett_opcua_DeleteSubscriptionsRequest = -1;
183 gint ett_opcua_array_DeleteSubscriptionsRequest = -1;
184 gint ett_opcua_DeleteSubscriptionsResponse = -1;
185 gint ett_opcua_array_DeleteSubscriptionsResponse = -1;
186 gint ett_opcua_TestStackRequest = -1;
187 gint ett_opcua_array_TestStackRequest = -1;
188 gint ett_opcua_TestStackResponse = -1;
189 gint ett_opcua_array_TestStackResponse = -1;
190 gint ett_opcua_TestStackExRequest = -1;
191 gint ett_opcua_array_TestStackExRequest = -1;
192 gint ett_opcua_TestStackExResponse = -1;
193 gint ett_opcua_array_TestStackExResponse = -1;
194 
195 void parseServiceFault(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
196 {
197   proto_item *ti;
198   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ServiceFault, &ti, "ServiceFault");
199 
200   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
201   proto_item_set_end(ti, tvb, *pOffset);
202 }
203 void parseFindServersRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
204 {
205   proto_item *ti;
206   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_FindServersRequest, &ti, "FindServersRequest");
207 
208   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
209   parseString(subtree, tvb, pinfo, pOffset, hf_opcua_EndpointUrl);
210   /* Array length field ignored: NoOfLocaleIds */
211   parseArraySimple(subtree, tvb, pinfo, pOffset, "LocaleIds", "String", hf_opcua_LocaleIds, parseString, ett_opcua_array_String);
212   /* Array length field ignored: NoOfServerUris */
213   parseArraySimple(subtree, tvb, pinfo, pOffset, "ServerUris", "String", hf_opcua_ServerUris, parseString, ett_opcua_array_String);
214   proto_item_set_end(ti, tvb, *pOffset);
215 }
216 void parseFindServersResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
217 {
218   proto_item *ti;
219   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_FindServersResponse, &ti, "FindServersResponse");
220 
221   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
222   /* Array length field ignored: NoOfServers */
223   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Servers", "ApplicationDescription", parseApplicationDescription, ett_opcua_array_ApplicationDescription);
224   proto_item_set_end(ti, tvb, *pOffset);
225 }
226 void parseFindServersOnNetworkRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
227 {
228   proto_item *ti;
229   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_FindServersOnNetworkRequest, &ti, "FindServersOnNetworkRequest");
230 
231   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
232   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_StartingRecordId);
233   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_MaxRecordsToReturn);
234   /* Array length field ignored: NoOfServerCapabilityFilter */
235   parseArraySimple(subtree, tvb, pinfo, pOffset, "ServerCapabilityFilter", "String", hf_opcua_ServerCapabilityFilter, parseString, ett_opcua_array_String);
236   proto_item_set_end(ti, tvb, *pOffset);
237 }
238 void parseFindServersOnNetworkResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
239 {
240   proto_item *ti;
241   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_FindServersOnNetworkResponse, &ti, "FindServersOnNetworkResponse");
242 
243   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
244   parseDateTime(subtree, tvb, pinfo, pOffset, hf_opcua_LastCounterResetTime);
245   /* Array length field ignored: NoOfServers */
246   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Servers", "ServerOnNetwork", parseServerOnNetwork, ett_opcua_array_ServerOnNetwork);
247   proto_item_set_end(ti, tvb, *pOffset);
248 }
249 void parseGetEndpointsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
250 {
251   proto_item *ti;
252   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_GetEndpointsRequest, &ti, "GetEndpointsRequest");
253 
254   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
255   parseString(subtree, tvb, pinfo, pOffset, hf_opcua_EndpointUrl);
256   /* Array length field ignored: NoOfLocaleIds */
257   parseArraySimple(subtree, tvb, pinfo, pOffset, "LocaleIds", "String", hf_opcua_LocaleIds, parseString, ett_opcua_array_String);
258   /* Array length field ignored: NoOfProfileUris */
259   parseArraySimple(subtree, tvb, pinfo, pOffset, "ProfileUris", "String", hf_opcua_ProfileUris, parseString, ett_opcua_array_String);
260   proto_item_set_end(ti, tvb, *pOffset);
261 }
262 void parseGetEndpointsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
263 {
264   proto_item *ti;
265   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_GetEndpointsResponse, &ti, "GetEndpointsResponse");
266 
267   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
268   /* Array length field ignored: NoOfEndpoints */
269   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Endpoints", "EndpointDescription", parseEndpointDescription, ett_opcua_array_EndpointDescription);
270   proto_item_set_end(ti, tvb, *pOffset);
271 }
272 void parseRegisterServerRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
273 {
274   proto_item *ti;
275   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterServerRequest, &ti, "RegisterServerRequest");
276 
277   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
278   parseRegisteredServer(subtree, tvb, pinfo, pOffset, "Server");
279   proto_item_set_end(ti, tvb, *pOffset);
280 }
281 void parseRegisterServerResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
282 {
283   proto_item *ti;
284   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterServerResponse, &ti, "RegisterServerResponse");
285 
286   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
287   proto_item_set_end(ti, tvb, *pOffset);
288 }
289 void parseRegisterServer2Request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
290 {
291   proto_item *ti;
292   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterServer2Request, &ti, "RegisterServer2Request");
293 
294   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
295   parseRegisteredServer(subtree, tvb, pinfo, pOffset, "Server");
296   /* Array length field ignored: NoOfDiscoveryConfiguration */
297   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiscoveryConfiguration", "ExtensionObject", parseExtensionObject, ett_opcua_array_ExtensionObject);
298   proto_item_set_end(ti, tvb, *pOffset);
299 }
300 void parseRegisterServer2Response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
301 {
302   proto_item *ti;
303   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterServer2Response, &ti, "RegisterServer2Response");
304 
305   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
306   /* Array length field ignored: NoOfConfigurationResults */
307   parseArraySimple(subtree, tvb, pinfo, pOffset, "ConfigurationResults", "StatusCode", hf_opcua_ConfigurationResults, parseStatusCode, ett_opcua_array_StatusCode);
308   /* Array length field ignored: NoOfDiagnosticInfos */
309   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
310   proto_item_set_end(ti, tvb, *pOffset);
311 }
312 void parseOpenSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
313 {
314   proto_item *ti;
315   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_OpenSecureChannelRequest, &ti, "OpenSecureChannelRequest");
316 
317   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
318   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_ClientProtocolVersion);
319   parseSecurityTokenRequestType(subtree, tvb, pinfo, pOffset);
320   parseMessageSecurityMode(subtree, tvb, pinfo, pOffset);
321   parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ClientNonce);
322   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RequestedLifetime);
323   proto_item_set_end(ti, tvb, *pOffset);
324 }
325 void parseOpenSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
326 {
327   proto_item *ti;
328   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_OpenSecureChannelResponse, &ti, "OpenSecureChannelResponse");
329 
330   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
331   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_ServerProtocolVersion);
332   parseChannelSecurityToken(subtree, tvb, pinfo, pOffset, "SecurityToken");
333   parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ServerNonce);
334   proto_item_set_end(ti, tvb, *pOffset);
335 }
336 void parseCloseSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
337 {
338   proto_item *ti;
339   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CloseSecureChannelRequest, &ti, "CloseSecureChannelRequest");
340 
341   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
342   proto_item_set_end(ti, tvb, *pOffset);
343 }
344 void parseCloseSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
345 {
346   proto_item *ti;
347   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CloseSecureChannelResponse, &ti, "CloseSecureChannelResponse");
348 
349   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
350   proto_item_set_end(ti, tvb, *pOffset);
351 }
352 void parseCreateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
353 {
354   proto_item *ti;
355   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateSessionRequest, &ti, "CreateSessionRequest");
356 
357   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
358   parseApplicationDescription(subtree, tvb, pinfo, pOffset, "ClientDescription");
359   parseString(subtree, tvb, pinfo, pOffset, hf_opcua_ServerUri);
360   parseString(subtree, tvb, pinfo, pOffset, hf_opcua_EndpointUrl);
361   parseString(subtree, tvb, pinfo, pOffset, hf_opcua_SessionName);
362   parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ClientNonce);
363   parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ClientCertificate);
364   parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_RequestedSessionTimeout);
365   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_MaxResponseMessageSize);
366   proto_item_set_end(ti, tvb, *pOffset);
367 }
368 void parseCreateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
369 {
370   proto_item *ti;
371   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateSessionResponse, &ti, "CreateSessionResponse");
372 
373   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
374   parseNodeId(subtree, tvb, pinfo, pOffset, "SessionId");
375   parseNodeId(subtree, tvb, pinfo, pOffset, "AuthenticationToken");
376   parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedSessionTimeout);
377   parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ServerNonce);
378   parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ServerCertificate);
379   /* Array length field ignored: NoOfServerEndpoints */
380   parseArrayComplex(subtree, tvb, pinfo, pOffset, "ServerEndpoints", "EndpointDescription", parseEndpointDescription, ett_opcua_array_EndpointDescription);
381   /* Array length field ignored: NoOfServerSoftwareCertificates */
382   parseArrayComplex(subtree, tvb, pinfo, pOffset, "ServerSoftwareCertificates", "SignedSoftwareCertificate", parseSignedSoftwareCertificate, ett_opcua_array_SignedSoftwareCertificate);
383   parseSignatureData(subtree, tvb, pinfo, pOffset, "ServerSignature");
384   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_MaxRequestMessageSize);
385   proto_item_set_end(ti, tvb, *pOffset);
386 }
387 void parseActivateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
388 {
389   proto_item *ti;
390   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ActivateSessionRequest, &ti, "ActivateSessionRequest");
391 
392   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
393   parseSignatureData(subtree, tvb, pinfo, pOffset, "ClientSignature");
394   /* Array length field ignored: NoOfClientSoftwareCertificates */
395   parseArrayComplex(subtree, tvb, pinfo, pOffset, "ClientSoftwareCertificates", "SignedSoftwareCertificate", parseSignedSoftwareCertificate, ett_opcua_array_SignedSoftwareCertificate);
396   /* Array length field ignored: NoOfLocaleIds */
397   parseArraySimple(subtree, tvb, pinfo, pOffset, "LocaleIds", "String", hf_opcua_LocaleIds, parseString, ett_opcua_array_String);
398   parseExtensionObject(subtree, tvb, pinfo, pOffset, "UserIdentityToken");
399   parseSignatureData(subtree, tvb, pinfo, pOffset, "UserTokenSignature");
400   proto_item_set_end(ti, tvb, *pOffset);
401 }
402 void parseActivateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
403 {
404   proto_item *ti;
405   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ActivateSessionResponse, &ti, "ActivateSessionResponse");
406 
407   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
408   parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ServerNonce);
409   /* Array length field ignored: NoOfResults */
410   parseArraySimple(subtree, tvb, pinfo, pOffset, "Results", "StatusCode", hf_opcua_Results, parseStatusCode, ett_opcua_array_StatusCode);
411   /* Array length field ignored: NoOfDiagnosticInfos */
412   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
413   proto_item_set_end(ti, tvb, *pOffset);
414 }
415 void parseCloseSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
416 {
417   proto_item *ti;
418   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CloseSessionRequest, &ti, "CloseSessionRequest");
419 
420   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
421   parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_DeleteSubscriptions);
422   proto_item_set_end(ti, tvb, *pOffset);
423 }
424 void parseCloseSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
425 {
426   proto_item *ti;
427   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CloseSessionResponse, &ti, "CloseSessionResponse");
428 
429   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
430   proto_item_set_end(ti, tvb, *pOffset);
431 }
432 void parseCancelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
433 {
434   proto_item *ti;
435   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CancelRequest, &ti, "CancelRequest");
436 
437   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
438   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RequestHandle);
439   proto_item_set_end(ti, tvb, *pOffset);
440 }
441 void parseCancelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
442 {
443   proto_item *ti;
444   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CancelResponse, &ti, "CancelResponse");
445 
446   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
447   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_CancelCount);
448   proto_item_set_end(ti, tvb, *pOffset);
449 }
450 void parseAddNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
451 {
452   proto_item *ti;
453   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_AddNodesRequest, &ti, "AddNodesRequest");
454 
455   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
456   /* Array length field ignored: NoOfNodesToAdd */
457   parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToAdd", "AddNodesItem", parseAddNodesItem, ett_opcua_array_AddNodesItem);
458   proto_item_set_end(ti, tvb, *pOffset);
459 }
460 void parseAddNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
461 {
462   proto_item *ti;
463   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_AddNodesResponse, &ti, "AddNodesResponse");
464 
465   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
466   /* Array length field ignored: NoOfResults */
467   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Results", "AddNodesResult", parseAddNodesResult, ett_opcua_array_AddNodesResult);
468   /* Array length field ignored: NoOfDiagnosticInfos */
469   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
470   proto_item_set_end(ti, tvb, *pOffset);
471 }
472 void parseAddReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
473 {
474   proto_item *ti;
475   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_AddReferencesRequest, &ti, "AddReferencesRequest");
476 
477   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
478   /* Array length field ignored: NoOfReferencesToAdd */
479   parseArrayComplex(subtree, tvb, pinfo, pOffset, "ReferencesToAdd", "AddReferencesItem", parseAddReferencesItem, ett_opcua_array_AddReferencesItem);
480   proto_item_set_end(ti, tvb, *pOffset);
481 }
482 void parseAddReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
483 {
484   proto_item *ti;
485   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_AddReferencesResponse, &ti, "AddReferencesResponse");
486 
487   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
488   /* Array length field ignored: NoOfResults */
489   parseArraySimple(subtree, tvb, pinfo, pOffset, "Results", "StatusCode", hf_opcua_Results, parseStatusCode, ett_opcua_array_StatusCode);
490   /* Array length field ignored: NoOfDiagnosticInfos */
491   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
492   proto_item_set_end(ti, tvb, *pOffset);
493 }
494 void parseDeleteNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
495 {
496   proto_item *ti;
497   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteNodesRequest, &ti, "DeleteNodesRequest");
498 
499   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
500   /* Array length field ignored: NoOfNodesToDelete */
501   parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToDelete", "DeleteNodesItem", parseDeleteNodesItem, ett_opcua_array_DeleteNodesItem);
502   proto_item_set_end(ti, tvb, *pOffset);
503 }
504 void parseDeleteNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
505 {
506   proto_item *ti;
507   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteNodesResponse, &ti, "DeleteNodesResponse");
508 
509   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
510   /* Array length field ignored: NoOfResults */
511   parseArraySimple(subtree, tvb, pinfo, pOffset, "Results", "StatusCode", hf_opcua_Results, parseStatusCode, ett_opcua_array_StatusCode);
512   /* Array length field ignored: NoOfDiagnosticInfos */
513   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
514   proto_item_set_end(ti, tvb, *pOffset);
515 }
516 void parseDeleteReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
517 {
518   proto_item *ti;
519   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteReferencesRequest, &ti, "DeleteReferencesRequest");
520 
521   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
522   /* Array length field ignored: NoOfReferencesToDelete */
523   parseArrayComplex(subtree, tvb, pinfo, pOffset, "ReferencesToDelete", "DeleteReferencesItem", parseDeleteReferencesItem, ett_opcua_array_DeleteReferencesItem);
524   proto_item_set_end(ti, tvb, *pOffset);
525 }
526 void parseDeleteReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
527 {
528   proto_item *ti;
529   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteReferencesResponse, &ti, "DeleteReferencesResponse");
530 
531   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
532   /* Array length field ignored: NoOfResults */
533   parseArraySimple(subtree, tvb, pinfo, pOffset, "Results", "StatusCode", hf_opcua_Results, parseStatusCode, ett_opcua_array_StatusCode);
534   /* Array length field ignored: NoOfDiagnosticInfos */
535   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
536   proto_item_set_end(ti, tvb, *pOffset);
537 }
538 void parseBrowseRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
539 {
540   proto_item *ti;
541   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_BrowseRequest, &ti, "BrowseRequest");
542 
543   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
544   parseViewDescription(subtree, tvb, pinfo, pOffset, "View");
545   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RequestedMaxReferencesPerNode);
546   /* Array length field ignored: NoOfNodesToBrowse */
547   parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToBrowse", "BrowseDescription", parseBrowseDescription, ett_opcua_array_BrowseDescription);
548   proto_item_set_end(ti, tvb, *pOffset);
549 }
550 void parseBrowseResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
551 {
552   proto_item *ti;
553   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_BrowseResponse, &ti, "BrowseResponse");
554 
555   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
556   /* Array length field ignored: NoOfResults */
557   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Results", "BrowseResult", parseBrowseResult, ett_opcua_array_BrowseResult);
558   /* Array length field ignored: NoOfDiagnosticInfos */
559   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
560   proto_item_set_end(ti, tvb, *pOffset);
561 }
562 void parseBrowseNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
563 {
564   proto_item *ti;
565   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_BrowseNextRequest, &ti, "BrowseNextRequest");
566 
567   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
568   parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_ReleaseContinuationPoints);
569   /* Array length field ignored: NoOfContinuationPoints */
570   parseArraySimple(subtree, tvb, pinfo, pOffset, "ContinuationPoints", "ByteString", hf_opcua_ContinuationPoints, parseByteString, ett_opcua_array_ByteString);
571   proto_item_set_end(ti, tvb, *pOffset);
572 }
573 void parseBrowseNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
574 {
575   proto_item *ti;
576   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_BrowseNextResponse, &ti, "BrowseNextResponse");
577 
578   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
579   /* Array length field ignored: NoOfResults */
580   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Results", "BrowseResult", parseBrowseResult, ett_opcua_array_BrowseResult);
581   /* Array length field ignored: NoOfDiagnosticInfos */
582   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
583   proto_item_set_end(ti, tvb, *pOffset);
584 }
585 void parseTranslateBrowsePathsToNodeIdsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
586 {
587   proto_item *ti;
588   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TranslateBrowsePathsToNodeIdsRequest, &ti, "TranslateBrowsePathsToNodeIdsRequest");
589 
590   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
591   /* Array length field ignored: NoOfBrowsePaths */
592   parseArrayComplex(subtree, tvb, pinfo, pOffset, "BrowsePaths", "BrowsePath", parseBrowsePath, ett_opcua_array_BrowsePath);
593   proto_item_set_end(ti, tvb, *pOffset);
594 }
595 void parseTranslateBrowsePathsToNodeIdsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
596 {
597   proto_item *ti;
598   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TranslateBrowsePathsToNodeIdsResponse, &ti, "TranslateBrowsePathsToNodeIdsResponse");
599 
600   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
601   /* Array length field ignored: NoOfResults */
602   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Results", "BrowsePathResult", parseBrowsePathResult, ett_opcua_array_BrowsePathResult);
603   /* Array length field ignored: NoOfDiagnosticInfos */
604   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
605   proto_item_set_end(ti, tvb, *pOffset);
606 }
607 void parseRegisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
608 {
609   proto_item *ti;
610   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterNodesRequest, &ti, "RegisterNodesRequest");
611 
612   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
613   /* Array length field ignored: NoOfNodesToRegister */
614   parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToRegister", "NodeId", parseNodeId, ett_opcua_array_NodeId);
615   proto_item_set_end(ti, tvb, *pOffset);
616 }
617 void parseRegisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
618 {
619   proto_item *ti;
620   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterNodesResponse, &ti, "RegisterNodesResponse");
621 
622   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
623   /* Array length field ignored: NoOfRegisteredNodeIds */
624   parseArrayComplex(subtree, tvb, pinfo, pOffset, "RegisteredNodeIds", "NodeId", parseNodeId, ett_opcua_array_NodeId);
625   proto_item_set_end(ti, tvb, *pOffset);
626 }
627 void parseUnregisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
628 {
629   proto_item *ti;
630   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_UnregisterNodesRequest, &ti, "UnregisterNodesRequest");
631 
632   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
633   /* Array length field ignored: NoOfNodesToUnregister */
634   parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToUnregister", "NodeId", parseNodeId, ett_opcua_array_NodeId);
635   proto_item_set_end(ti, tvb, *pOffset);
636 }
637 void parseUnregisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
638 {
639   proto_item *ti;
640   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_UnregisterNodesResponse, &ti, "UnregisterNodesResponse");
641 
642   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
643   proto_item_set_end(ti, tvb, *pOffset);
644 }
645 void parseQueryFirstRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
646 {
647   proto_item *ti;
648   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_QueryFirstRequest, &ti, "QueryFirstRequest");
649 
650   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
651   parseViewDescription(subtree, tvb, pinfo, pOffset, "View");
652   /* Array length field ignored: NoOfNodeTypes */
653   parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodeTypes", "NodeTypeDescription", parseNodeTypeDescription, ett_opcua_array_NodeTypeDescription);
654   parseContentFilter(subtree, tvb, pinfo, pOffset, "Filter");
655   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_MaxDataSetsToReturn);
656   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_MaxReferencesToReturn);
657   proto_item_set_end(ti, tvb, *pOffset);
658 }
659 void parseQueryFirstResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
660 {
661   proto_item *ti;
662   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_QueryFirstResponse, &ti, "QueryFirstResponse");
663 
664   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
665   /* Array length field ignored: NoOfQueryDataSets */
666   parseArrayComplex(subtree, tvb, pinfo, pOffset, "QueryDataSets", "QueryDataSet", parseQueryDataSet, ett_opcua_array_QueryDataSet);
667   parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ContinuationPoint);
668   /* Array length field ignored: NoOfParsingResults */
669   parseArrayComplex(subtree, tvb, pinfo, pOffset, "ParsingResults", "ParsingResult", parseParsingResult, ett_opcua_array_ParsingResult);
670   /* Array length field ignored: NoOfDiagnosticInfos */
671   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
672   parseContentFilterResult(subtree, tvb, pinfo, pOffset, "FilterResult");
673   proto_item_set_end(ti, tvb, *pOffset);
674 }
675 void parseQueryNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
676 {
677   proto_item *ti;
678   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_QueryNextRequest, &ti, "QueryNextRequest");
679 
680   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
681   parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_ReleaseContinuationPoint);
682   parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ContinuationPoint);
683   proto_item_set_end(ti, tvb, *pOffset);
684 }
685 void parseQueryNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
686 {
687   proto_item *ti;
688   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_QueryNextResponse, &ti, "QueryNextResponse");
689 
690   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
691   /* Array length field ignored: NoOfQueryDataSets */
692   parseArrayComplex(subtree, tvb, pinfo, pOffset, "QueryDataSets", "QueryDataSet", parseQueryDataSet, ett_opcua_array_QueryDataSet);
693   parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedContinuationPoint);
694   proto_item_set_end(ti, tvb, *pOffset);
695 }
696 void parseReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
697 {
698   proto_item *ti;
699   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ReadRequest, &ti, "ReadRequest");
700 
701   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
702   parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_MaxAge);
703   parseTimestampsToReturn(subtree, tvb, pinfo, pOffset);
704   /* Array length field ignored: NoOfNodesToRead */
705   parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToRead", "ReadValueId", parseReadValueId, ett_opcua_array_ReadValueId);
706   proto_item_set_end(ti, tvb, *pOffset);
707 }
708 void parseReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
709 {
710   proto_item *ti;
711   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ReadResponse, &ti, "ReadResponse");
712 
713   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
714   /* Array length field ignored: NoOfResults */
715   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Results", "DataValue", parseDataValue, ett_opcua_array_DataValue);
716   /* Array length field ignored: NoOfDiagnosticInfos */
717   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
718   proto_item_set_end(ti, tvb, *pOffset);
719 }
720 void parseHistoryReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
721 {
722   proto_item *ti;
723   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_HistoryReadRequest, &ti, "HistoryReadRequest");
724 
725   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
726   parseExtensionObject(subtree, tvb, pinfo, pOffset, "HistoryReadDetails");
727   parseTimestampsToReturn(subtree, tvb, pinfo, pOffset);
728   parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_ReleaseContinuationPoints);
729   /* Array length field ignored: NoOfNodesToRead */
730   parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToRead", "HistoryReadValueId", parseHistoryReadValueId, ett_opcua_array_HistoryReadValueId);
731   proto_item_set_end(ti, tvb, *pOffset);
732 }
733 void parseHistoryReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
734 {
735   proto_item *ti;
736   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_HistoryReadResponse, &ti, "HistoryReadResponse");
737 
738   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
739   /* Array length field ignored: NoOfResults */
740   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Results", "HistoryReadResult", parseHistoryReadResult, ett_opcua_array_HistoryReadResult);
741   /* Array length field ignored: NoOfDiagnosticInfos */
742   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
743   proto_item_set_end(ti, tvb, *pOffset);
744 }
745 void parseWriteRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
746 {
747   proto_item *ti;
748   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_WriteRequest, &ti, "WriteRequest");
749 
750   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
751   /* Array length field ignored: NoOfNodesToWrite */
752   parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToWrite", "WriteValue", parseWriteValue, ett_opcua_array_WriteValue);
753   proto_item_set_end(ti, tvb, *pOffset);
754 }
755 void parseWriteResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
756 {
757   proto_item *ti;
758   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_WriteResponse, &ti, "WriteResponse");
759 
760   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
761   /* Array length field ignored: NoOfResults */
762   parseArraySimple(subtree, tvb, pinfo, pOffset, "Results", "StatusCode", hf_opcua_Results, parseStatusCode, ett_opcua_array_StatusCode);
763   /* Array length field ignored: NoOfDiagnosticInfos */
764   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
765   proto_item_set_end(ti, tvb, *pOffset);
766 }
767 void parseHistoryUpdateRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
768 {
769   proto_item *ti;
770   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_HistoryUpdateRequest, &ti, "HistoryUpdateRequest");
771 
772   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
773   /* Array length field ignored: NoOfHistoryUpdateDetails */
774   parseArrayComplex(subtree, tvb, pinfo, pOffset, "HistoryUpdateDetails", "ExtensionObject", parseExtensionObject, ett_opcua_array_ExtensionObject);
775   proto_item_set_end(ti, tvb, *pOffset);
776 }
777 void parseHistoryUpdateResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
778 {
779   proto_item *ti;
780   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_HistoryUpdateResponse, &ti, "HistoryUpdateResponse");
781 
782   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
783   /* Array length field ignored: NoOfResults */
784   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Results", "HistoryUpdateResult", parseHistoryUpdateResult, ett_opcua_array_HistoryUpdateResult);
785   /* Array length field ignored: NoOfDiagnosticInfos */
786   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
787   proto_item_set_end(ti, tvb, *pOffset);
788 }
789 void parseCallRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
790 {
791   proto_item *ti;
792   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CallRequest, &ti, "CallRequest");
793 
794   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
795   /* Array length field ignored: NoOfMethodsToCall */
796   parseArrayComplex(subtree, tvb, pinfo, pOffset, "MethodsToCall", "CallMethodRequest", parseCallMethodRequest, ett_opcua_array_CallMethodRequest);
797   proto_item_set_end(ti, tvb, *pOffset);
798 }
799 void parseCallResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
800 {
801   proto_item *ti;
802   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CallResponse, &ti, "CallResponse");
803 
804   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
805   /* Array length field ignored: NoOfResults */
806   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Results", "CallMethodResult", parseCallMethodResult, ett_opcua_array_CallMethodResult);
807   /* Array length field ignored: NoOfDiagnosticInfos */
808   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
809   proto_item_set_end(ti, tvb, *pOffset);
810 }
811 void parseCreateMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
812 {
813   proto_item *ti;
814   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateMonitoredItemsRequest, &ti, "CreateMonitoredItemsRequest");
815 
816   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
817   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_SubscriptionId);
818   parseTimestampsToReturn(subtree, tvb, pinfo, pOffset);
819   /* Array length field ignored: NoOfItemsToCreate */
820   parseArrayComplex(subtree, tvb, pinfo, pOffset, "ItemsToCreate", "MonitoredItemCreateRequest", parseMonitoredItemCreateRequest, ett_opcua_array_MonitoredItemCreateRequest);
821   proto_item_set_end(ti, tvb, *pOffset);
822 }
823 void parseCreateMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
824 {
825   proto_item *ti;
826   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateMonitoredItemsResponse, &ti, "CreateMonitoredItemsResponse");
827 
828   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
829   /* Array length field ignored: NoOfResults */
830   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Results", "MonitoredItemCreateResult", parseMonitoredItemCreateResult, ett_opcua_array_MonitoredItemCreateResult);
831   /* Array length field ignored: NoOfDiagnosticInfos */
832   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
833   proto_item_set_end(ti, tvb, *pOffset);
834 }
835 void parseModifyMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
836 {
837   proto_item *ti;
838   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ModifyMonitoredItemsRequest, &ti, "ModifyMonitoredItemsRequest");
839 
840   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
841   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_SubscriptionId);
842   parseTimestampsToReturn(subtree, tvb, pinfo, pOffset);
843   /* Array length field ignored: NoOfItemsToModify */
844   parseArrayComplex(subtree, tvb, pinfo, pOffset, "ItemsToModify", "MonitoredItemModifyRequest", parseMonitoredItemModifyRequest, ett_opcua_array_MonitoredItemModifyRequest);
845   proto_item_set_end(ti, tvb, *pOffset);
846 }
847 void parseModifyMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
848 {
849   proto_item *ti;
850   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ModifyMonitoredItemsResponse, &ti, "ModifyMonitoredItemsResponse");
851 
852   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
853   /* Array length field ignored: NoOfResults */
854   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Results", "MonitoredItemModifyResult", parseMonitoredItemModifyResult, ett_opcua_array_MonitoredItemModifyResult);
855   /* Array length field ignored: NoOfDiagnosticInfos */
856   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
857   proto_item_set_end(ti, tvb, *pOffset);
858 }
859 void parseSetMonitoringModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
860 {
861   proto_item *ti;
862   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetMonitoringModeRequest, &ti, "SetMonitoringModeRequest");
863 
864   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
865   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_SubscriptionId);
866   parseMonitoringMode(subtree, tvb, pinfo, pOffset);
867   /* Array length field ignored: NoOfMonitoredItemIds */
868   parseArraySimple(subtree, tvb, pinfo, pOffset, "MonitoredItemIds", "UInt32", hf_opcua_MonitoredItemIds, parseUInt32, ett_opcua_array_UInt32);
869   proto_item_set_end(ti, tvb, *pOffset);
870 }
871 void parseSetMonitoringModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
872 {
873   proto_item *ti;
874   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetMonitoringModeResponse, &ti, "SetMonitoringModeResponse");
875 
876   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
877   /* Array length field ignored: NoOfResults */
878   parseArraySimple(subtree, tvb, pinfo, pOffset, "Results", "StatusCode", hf_opcua_Results, parseStatusCode, ett_opcua_array_StatusCode);
879   /* Array length field ignored: NoOfDiagnosticInfos */
880   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
881   proto_item_set_end(ti, tvb, *pOffset);
882 }
883 void parseSetTriggeringRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
884 {
885   proto_item *ti;
886   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetTriggeringRequest, &ti, "SetTriggeringRequest");
887 
888   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
889   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_SubscriptionId);
890   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_TriggeringItemId);
891   /* Array length field ignored: NoOfLinksToAdd */
892   parseArraySimple(subtree, tvb, pinfo, pOffset, "LinksToAdd", "UInt32", hf_opcua_LinksToAdd, parseUInt32, ett_opcua_array_UInt32);
893   /* Array length field ignored: NoOfLinksToRemove */
894   parseArraySimple(subtree, tvb, pinfo, pOffset, "LinksToRemove", "UInt32", hf_opcua_LinksToRemove, parseUInt32, ett_opcua_array_UInt32);
895   proto_item_set_end(ti, tvb, *pOffset);
896 }
897 void parseSetTriggeringResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
898 {
899   proto_item *ti;
900   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetTriggeringResponse, &ti, "SetTriggeringResponse");
901 
902   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
903   /* Array length field ignored: NoOfAddResults */
904   parseArraySimple(subtree, tvb, pinfo, pOffset, "AddResults", "StatusCode", hf_opcua_AddResults, parseStatusCode, ett_opcua_array_StatusCode);
905   /* Array length field ignored: NoOfAddDiagnosticInfos */
906   parseArrayComplex(subtree, tvb, pinfo, pOffset, "AddDiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
907   /* Array length field ignored: NoOfRemoveResults */
908   parseArraySimple(subtree, tvb, pinfo, pOffset, "RemoveResults", "StatusCode", hf_opcua_RemoveResults, parseStatusCode, ett_opcua_array_StatusCode);
909   /* Array length field ignored: NoOfRemoveDiagnosticInfos */
910   parseArrayComplex(subtree, tvb, pinfo, pOffset, "RemoveDiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
911   proto_item_set_end(ti, tvb, *pOffset);
912 }
913 void parseDeleteMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
914 {
915   proto_item *ti;
916   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteMonitoredItemsRequest, &ti, "DeleteMonitoredItemsRequest");
917 
918   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
919   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_SubscriptionId);
920   /* Array length field ignored: NoOfMonitoredItemIds */
921   parseArraySimple(subtree, tvb, pinfo, pOffset, "MonitoredItemIds", "UInt32", hf_opcua_MonitoredItemIds, parseUInt32, ett_opcua_array_UInt32);
922   proto_item_set_end(ti, tvb, *pOffset);
923 }
924 void parseDeleteMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
925 {
926   proto_item *ti;
927   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteMonitoredItemsResponse, &ti, "DeleteMonitoredItemsResponse");
928 
929   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
930   /* Array length field ignored: NoOfResults */
931   parseArraySimple(subtree, tvb, pinfo, pOffset, "Results", "StatusCode", hf_opcua_Results, parseStatusCode, ett_opcua_array_StatusCode);
932   /* Array length field ignored: NoOfDiagnosticInfos */
933   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
934   proto_item_set_end(ti, tvb, *pOffset);
935 }
936 void parseCreateSubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
937 {
938   proto_item *ti;
939   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateSubscriptionRequest, &ti, "CreateSubscriptionRequest");
940 
941   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
942   parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_RequestedPublishingInterval);
943   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RequestedLifetimeCount);
944   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RequestedMaxKeepAliveCount);
945   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_MaxNotificationsPerPublish);
946   parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_PublishingEnabled);
947   parseByte(subtree, tvb, pinfo, pOffset, hf_opcua_Priority);
948   proto_item_set_end(ti, tvb, *pOffset);
949 }
950 void parseCreateSubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
951 {
952   proto_item *ti;
953   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateSubscriptionResponse, &ti, "CreateSubscriptionResponse");
954 
955   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
956   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_SubscriptionId);
957   parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedPublishingInterval);
958   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedLifetimeCount);
959   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedMaxKeepAliveCount);
960   proto_item_set_end(ti, tvb, *pOffset);
961 }
962 void parseModifySubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
963 {
964   proto_item *ti;
965   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ModifySubscriptionRequest, &ti, "ModifySubscriptionRequest");
966 
967   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
968   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_SubscriptionId);
969   parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_RequestedPublishingInterval);
970   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RequestedLifetimeCount);
971   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RequestedMaxKeepAliveCount);
972   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_MaxNotificationsPerPublish);
973   parseByte(subtree, tvb, pinfo, pOffset, hf_opcua_Priority);
974   proto_item_set_end(ti, tvb, *pOffset);
975 }
976 void parseModifySubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
977 {
978   proto_item *ti;
979   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ModifySubscriptionResponse, &ti, "ModifySubscriptionResponse");
980 
981   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
982   parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedPublishingInterval);
983   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedLifetimeCount);
984   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedMaxKeepAliveCount);
985   proto_item_set_end(ti, tvb, *pOffset);
986 }
987 void parseSetPublishingModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
988 {
989   proto_item *ti;
990   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetPublishingModeRequest, &ti, "SetPublishingModeRequest");
991 
992   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
993   parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_PublishingEnabled);
994   /* Array length field ignored: NoOfSubscriptionIds */
995   parseArraySimple(subtree, tvb, pinfo, pOffset, "SubscriptionIds", "UInt32", hf_opcua_SubscriptionIds, parseUInt32, ett_opcua_array_UInt32);
996   proto_item_set_end(ti, tvb, *pOffset);
997 }
998 void parseSetPublishingModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
999 {
1000   proto_item *ti;
1001   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetPublishingModeResponse, &ti, "SetPublishingModeResponse");
1002 
1003   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
1004   /* Array length field ignored: NoOfResults */
1005   parseArraySimple(subtree, tvb, pinfo, pOffset, "Results", "StatusCode", hf_opcua_Results, parseStatusCode, ett_opcua_array_StatusCode);
1006   /* Array length field ignored: NoOfDiagnosticInfos */
1007   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
1008   proto_item_set_end(ti, tvb, *pOffset);
1009 }
1010 void parsePublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1011 {
1012   proto_item *ti;
1013   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_PublishRequest, &ti, "PublishRequest");
1014 
1015   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
1016   /* Array length field ignored: NoOfSubscriptionAcknowledgements */
1017   parseArrayComplex(subtree, tvb, pinfo, pOffset, "SubscriptionAcknowledgements", "SubscriptionAcknowledgement", parseSubscriptionAcknowledgement, ett_opcua_array_SubscriptionAcknowledgement);
1018   proto_item_set_end(ti, tvb, *pOffset);
1019 }
1020 void parsePublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1021 {
1022   proto_item *ti;
1023   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_PublishResponse, &ti, "PublishResponse");
1024 
1025   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
1026   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_SubscriptionId);
1027   /* Array length field ignored: NoOfAvailableSequenceNumbers */
1028   parseArraySimple(subtree, tvb, pinfo, pOffset, "AvailableSequenceNumbers", "UInt32", hf_opcua_AvailableSequenceNumbers, parseUInt32, ett_opcua_array_UInt32);
1029   parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_MoreNotifications);
1030   parseNotificationMessage(subtree, tvb, pinfo, pOffset, "NotificationMessage");
1031   /* Array length field ignored: NoOfResults */
1032   parseArraySimple(subtree, tvb, pinfo, pOffset, "Results", "StatusCode", hf_opcua_Results, parseStatusCode, ett_opcua_array_StatusCode);
1033   /* Array length field ignored: NoOfDiagnosticInfos */
1034   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
1035   proto_item_set_end(ti, tvb, *pOffset);
1036 }
1037 void parseRepublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1038 {
1039   proto_item *ti;
1040   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RepublishRequest, &ti, "RepublishRequest");
1041 
1042   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
1043   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_SubscriptionId);
1044   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RetransmitSequenceNumber);
1045   proto_item_set_end(ti, tvb, *pOffset);
1046 }
1047 void parseRepublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1048 {
1049   proto_item *ti;
1050   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RepublishResponse, &ti, "RepublishResponse");
1051 
1052   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
1053   parseNotificationMessage(subtree, tvb, pinfo, pOffset, "NotificationMessage");
1054   proto_item_set_end(ti, tvb, *pOffset);
1055 }
1056 void parseTransferSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1057 {
1058   proto_item *ti;
1059   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TransferSubscriptionsRequest, &ti, "TransferSubscriptionsRequest");
1060 
1061   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
1062   /* Array length field ignored: NoOfSubscriptionIds */
1063   parseArraySimple(subtree, tvb, pinfo, pOffset, "SubscriptionIds", "UInt32", hf_opcua_SubscriptionIds, parseUInt32, ett_opcua_array_UInt32);
1064   parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_SendInitialValues);
1065   proto_item_set_end(ti, tvb, *pOffset);
1066 }
1067 void parseTransferSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1068 {
1069   proto_item *ti;
1070   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TransferSubscriptionsResponse, &ti, "TransferSubscriptionsResponse");
1071 
1072   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
1073   /* Array length field ignored: NoOfResults */
1074   parseArrayComplex(subtree, tvb, pinfo, pOffset, "Results", "TransferResult", parseTransferResult, ett_opcua_array_TransferResult);
1075   /* Array length field ignored: NoOfDiagnosticInfos */
1076   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
1077   proto_item_set_end(ti, tvb, *pOffset);
1078 }
1079 void parseDeleteSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1080 {
1081   proto_item *ti;
1082   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteSubscriptionsRequest, &ti, "DeleteSubscriptionsRequest");
1083 
1084   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
1085   /* Array length field ignored: NoOfSubscriptionIds */
1086   parseArraySimple(subtree, tvb, pinfo, pOffset, "SubscriptionIds", "UInt32", hf_opcua_SubscriptionIds, parseUInt32, ett_opcua_array_UInt32);
1087   proto_item_set_end(ti, tvb, *pOffset);
1088 }
1089 void parseDeleteSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1090 {
1091   proto_item *ti;
1092   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteSubscriptionsResponse, &ti, "DeleteSubscriptionsResponse");
1093 
1094   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
1095   /* Array length field ignored: NoOfResults */
1096   parseArraySimple(subtree, tvb, pinfo, pOffset, "Results", "StatusCode", hf_opcua_Results, parseStatusCode, ett_opcua_array_StatusCode);
1097   /* Array length field ignored: NoOfDiagnosticInfos */
1098   parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
1099   proto_item_set_end(ti, tvb, *pOffset);
1100 }
1101 void parseTestStackRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1102 {
1103   proto_item *ti;
1104   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TestStackRequest, &ti, "TestStackRequest");
1105 
1106   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
1107   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_TestId);
1108   parseInt32(subtree, tvb, pinfo, pOffset, hf_opcua_Iteration);
1109   parseVariant(subtree, tvb, pinfo, pOffset, "Input");
1110   proto_item_set_end(ti, tvb, *pOffset);
1111 }
1112 void parseTestStackResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1113 {
1114   proto_item *ti;
1115   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TestStackResponse, &ti, "TestStackResponse");
1116 
1117   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
1118   parseVariant(subtree, tvb, pinfo, pOffset, "Output");
1119   proto_item_set_end(ti, tvb, *pOffset);
1120 }
1121 void parseTestStackExRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1122 {
1123   proto_item *ti;
1124   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TestStackExRequest, &ti, "TestStackExRequest");
1125 
1126   parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
1127   parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_TestId);
1128   parseInt32(subtree, tvb, pinfo, pOffset, hf_opcua_Iteration);
1129   parseCompositeTestType(subtree, tvb, pinfo, pOffset, "Input");
1130   proto_item_set_end(ti, tvb, *pOffset);
1131 }
1132 void parseTestStackExResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
1133 {
1134   proto_item *ti;
1135   proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TestStackExResponse, &ti, "TestStackExResponse");
1136 
1137   parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
1138   parseCompositeTestType(subtree, tvb, pinfo, pOffset, "Output");
1139   proto_item_set_end(ti, tvb, *pOffset);
1140 }
1141 
1142 /** Setup protocol subtree array */
1143 static gint *ett[] =
1144 {
1145   &ett_opcua_ServiceFault,
1146   &ett_opcua_array_ServiceFault,
1147   &ett_opcua_FindServersRequest,
1148   &ett_opcua_array_FindServersRequest,
1149   &ett_opcua_FindServersResponse,
1150   &ett_opcua_array_FindServersResponse,
1151   &ett_opcua_FindServersOnNetworkRequest,
1152   &ett_opcua_array_FindServersOnNetworkRequest,
1153   &ett_opcua_FindServersOnNetworkResponse,
1154   &ett_opcua_array_FindServersOnNetworkResponse,
1155   &ett_opcua_GetEndpointsRequest,
1156   &ett_opcua_array_GetEndpointsRequest,
1157   &ett_opcua_GetEndpointsResponse,
1158   &ett_opcua_array_GetEndpointsResponse,
1159   &ett_opcua_RegisterServerRequest,
1160   &ett_opcua_array_RegisterServerRequest,
1161   &ett_opcua_RegisterServerResponse,
1162   &ett_opcua_array_RegisterServerResponse,
1163   &ett_opcua_RegisterServer2Request,
1164   &ett_opcua_array_RegisterServer2Request,
1165   &ett_opcua_RegisterServer2Response,
1166   &ett_opcua_array_RegisterServer2Response,
1167   &ett_opcua_OpenSecureChannelRequest,
1168   &ett_opcua_array_OpenSecureChannelRequest,
1169   &ett_opcua_OpenSecureChannelResponse,
1170   &ett_opcua_array_OpenSecureChannelResponse,
1171   &ett_opcua_CloseSecureChannelRequest,
1172   &ett_opcua_array_CloseSecureChannelRequest,
1173   &ett_opcua_CloseSecureChannelResponse,
1174   &ett_opcua_array_CloseSecureChannelResponse,
1175   &ett_opcua_CreateSessionRequest,
1176   &ett_opcua_array_CreateSessionRequest,
1177   &ett_opcua_CreateSessionResponse,
1178   &ett_opcua_array_CreateSessionResponse,
1179   &ett_opcua_ActivateSessionRequest,
1180   &ett_opcua_array_ActivateSessionRequest,
1181   &ett_opcua_ActivateSessionResponse,
1182   &ett_opcua_array_ActivateSessionResponse,
1183   &ett_opcua_CloseSessionRequest,
1184   &ett_opcua_array_CloseSessionRequest,
1185   &ett_opcua_CloseSessionResponse,
1186   &ett_opcua_array_CloseSessionResponse,
1187   &ett_opcua_CancelRequest,
1188   &ett_opcua_array_CancelRequest,
1189   &ett_opcua_CancelResponse,
1190   &ett_opcua_array_CancelResponse,
1191   &ett_opcua_AddNodesRequest,
1192   &ett_opcua_array_AddNodesRequest,
1193   &ett_opcua_AddNodesResponse,
1194   &ett_opcua_array_AddNodesResponse,
1195   &ett_opcua_AddReferencesRequest,
1196   &ett_opcua_array_AddReferencesRequest,
1197   &ett_opcua_AddReferencesResponse,
1198   &ett_opcua_array_AddReferencesResponse,
1199   &ett_opcua_DeleteNodesRequest,
1200   &ett_opcua_array_DeleteNodesRequest,
1201   &ett_opcua_DeleteNodesResponse,
1202   &ett_opcua_array_DeleteNodesResponse,
1203   &ett_opcua_DeleteReferencesRequest,
1204   &ett_opcua_array_DeleteReferencesRequest,
1205   &ett_opcua_DeleteReferencesResponse,
1206   &ett_opcua_array_DeleteReferencesResponse,
1207   &ett_opcua_BrowseRequest,
1208   &ett_opcua_array_BrowseRequest,
1209   &ett_opcua_BrowseResponse,
1210   &ett_opcua_array_BrowseResponse,
1211   &ett_opcua_BrowseNextRequest,
1212   &ett_opcua_array_BrowseNextRequest,
1213   &ett_opcua_BrowseNextResponse,
1214   &ett_opcua_array_BrowseNextResponse,
1215   &ett_opcua_TranslateBrowsePathsToNodeIdsRequest,
1216   &ett_opcua_array_TranslateBrowsePathsToNodeIdsRequest,
1217   &ett_opcua_TranslateBrowsePathsToNodeIdsResponse,
1218   &ett_opcua_array_TranslateBrowsePathsToNodeIdsResponse,
1219   &ett_opcua_RegisterNodesRequest,
1220   &ett_opcua_array_RegisterNodesRequest,
1221   &ett_opcua_RegisterNodesResponse,
1222   &ett_opcua_array_RegisterNodesResponse,
1223   &ett_opcua_UnregisterNodesRequest,
1224   &ett_opcua_array_UnregisterNodesRequest,
1225   &ett_opcua_UnregisterNodesResponse,
1226   &ett_opcua_array_UnregisterNodesResponse,
1227   &ett_opcua_QueryFirstRequest,
1228   &ett_opcua_array_QueryFirstRequest,
1229   &ett_opcua_QueryFirstResponse,
1230   &ett_opcua_array_QueryFirstResponse,
1231   &ett_opcua_QueryNextRequest,
1232   &ett_opcua_array_QueryNextRequest,
1233   &ett_opcua_QueryNextResponse,
1234   &ett_opcua_array_QueryNextResponse,
1235   &ett_opcua_ReadRequest,
1236   &ett_opcua_array_ReadRequest,
1237   &ett_opcua_ReadResponse,
1238   &ett_opcua_array_ReadResponse,
1239   &ett_opcua_HistoryReadRequest,
1240   &ett_opcua_array_HistoryReadRequest,
1241   &ett_opcua_HistoryReadResponse,
1242   &ett_opcua_array_HistoryReadResponse,
1243   &ett_opcua_WriteRequest,
1244   &ett_opcua_array_WriteRequest,
1245   &ett_opcua_WriteResponse,
1246   &ett_opcua_array_WriteResponse,
1247   &ett_opcua_HistoryUpdateRequest,
1248   &ett_opcua_array_HistoryUpdateRequest,
1249   &ett_opcua_HistoryUpdateResponse,
1250   &ett_opcua_array_HistoryUpdateResponse,
1251   &ett_opcua_CallRequest,
1252   &ett_opcua_array_CallRequest,
1253   &ett_opcua_CallResponse,
1254   &ett_opcua_array_CallResponse,
1255   &ett_opcua_CreateMonitoredItemsRequest,
1256   &ett_opcua_array_CreateMonitoredItemsRequest,
1257   &ett_opcua_CreateMonitoredItemsResponse,
1258   &ett_opcua_array_CreateMonitoredItemsResponse,
1259   &ett_opcua_ModifyMonitoredItemsRequest,
1260   &ett_opcua_array_ModifyMonitoredItemsRequest,
1261   &ett_opcua_ModifyMonitoredItemsResponse,
1262   &ett_opcua_array_ModifyMonitoredItemsResponse,
1263   &ett_opcua_SetMonitoringModeRequest,
1264   &ett_opcua_array_SetMonitoringModeRequest,
1265   &ett_opcua_SetMonitoringModeResponse,
1266   &ett_opcua_array_SetMonitoringModeResponse,
1267   &ett_opcua_SetTriggeringRequest,
1268   &ett_opcua_array_SetTriggeringRequest,
1269   &ett_opcua_SetTriggeringResponse,
1270   &ett_opcua_array_SetTriggeringResponse,
1271   &ett_opcua_DeleteMonitoredItemsRequest,
1272   &ett_opcua_array_DeleteMonitoredItemsRequest,
1273   &ett_opcua_DeleteMonitoredItemsResponse,
1274   &ett_opcua_array_DeleteMonitoredItemsResponse,
1275   &ett_opcua_CreateSubscriptionRequest,
1276   &ett_opcua_array_CreateSubscriptionRequest,
1277   &ett_opcua_CreateSubscriptionResponse,
1278   &ett_opcua_array_CreateSubscriptionResponse,
1279   &ett_opcua_ModifySubscriptionRequest,
1280   &ett_opcua_array_ModifySubscriptionRequest,
1281   &ett_opcua_ModifySubscriptionResponse,
1282   &ett_opcua_array_ModifySubscriptionResponse,
1283   &ett_opcua_SetPublishingModeRequest,
1284   &ett_opcua_array_SetPublishingModeRequest,
1285   &ett_opcua_SetPublishingModeResponse,
1286   &ett_opcua_array_SetPublishingModeResponse,
1287   &ett_opcua_PublishRequest,
1288   &ett_opcua_array_PublishRequest,
1289   &ett_opcua_PublishResponse,
1290   &ett_opcua_array_PublishResponse,
1291   &ett_opcua_RepublishRequest,
1292   &ett_opcua_array_RepublishRequest,
1293   &ett_opcua_RepublishResponse,
1294   &ett_opcua_array_RepublishResponse,
1295   &ett_opcua_TransferSubscriptionsRequest,
1296   &ett_opcua_array_TransferSubscriptionsRequest,
1297   &ett_opcua_TransferSubscriptionsResponse,
1298   &ett_opcua_array_TransferSubscriptionsResponse,
1299   &ett_opcua_DeleteSubscriptionsRequest,
1300   &ett_opcua_array_DeleteSubscriptionsRequest,
1301   &ett_opcua_DeleteSubscriptionsResponse,
1302   &ett_opcua_array_DeleteSubscriptionsResponse,
1303   &ett_opcua_TestStackRequest,
1304   &ett_opcua_array_TestStackRequest,
1305   &ett_opcua_TestStackResponse,
1306   &ett_opcua_array_TestStackResponse,
1307   &ett_opcua_TestStackExRequest,
1308   &ett_opcua_array_TestStackExRequest,
1309   &ett_opcua_TestStackExResponse,
1310   &ett_opcua_array_TestStackExResponse,
1311 };
1312 
1313 void registerServiceTypes(void)
1314 {
1315   proto_register_subtree_array(ett, array_length(ett));
1316 }
1317 
1318