summaryrefslogtreecommitdiff
path: root/plugins/opcua/opcua_complextypeparser.c
diff options
context:
space:
mode:
authorHannes Mezger <hannes.mezger@ascolab.com>2015-12-07 17:59:35 +0100
committerMichael Mann <mmann78@netscape.net>2015-12-08 02:18:02 +0000
commit62b64e394242597883e32baeb268ef6746a431c6 (patch)
tree60454f9e30cd19251bda8a36ce126d6630730fcb /plugins/opcua/opcua_complextypeparser.c
parent3a4d387658b9e8455ca645952a98c71d1b03b1a6 (diff)
downloadwireshark-62b64e394242597883e32baeb268ef6746a431c6.tar.gz
opcua: expand ReturnDiagnostics field of RequestHeader
The ReturnDiagnostics field of RequestHeader is a bitmask. It cannot be generated, as the information needed is not contained in our models used to generate the generated files. This is why I made a manual change to opcua_complextypeparser.c. In the future, this change has to be merged if the file gets regenerated. Change-Id: Ic7db499566e3f3d3006feaff6e25e7b37a427dca Reviewed-on: https://code.wireshark.org/review/12470 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins/opcua/opcua_complextypeparser.c')
-rw-r--r--plugins/opcua/opcua_complextypeparser.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/opcua/opcua_complextypeparser.c b/plugins/opcua/opcua_complextypeparser.c
index c1b0814b71..76090884af 100644
--- a/plugins/opcua/opcua_complextypeparser.c
+++ b/plugins/opcua/opcua_complextypeparser.c
@@ -575,12 +575,25 @@ void parseApplicationDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *p
}
void parseRequestHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
{
+ static const int *returnDiagnostics_mask[] = {
+ &hf_opcua_returnDiag_mask_sl_symbolicId,
+ &hf_opcua_returnDiag_mask_sl_localizedText,
+ &hf_opcua_returnDiag_mask_sl_additionalinfo,
+ &hf_opcua_returnDiag_mask_sl_innerstatuscode,
+ &hf_opcua_returnDiag_mask_sl_innerdiagnostics,
+ &hf_opcua_returnDiag_mask_ol_symbolicId,
+ &hf_opcua_returnDiag_mask_ol_localizedText,
+ &hf_opcua_returnDiag_mask_ol_additionalinfo,
+ &hf_opcua_returnDiag_mask_ol_innerstatuscode,
+ &hf_opcua_returnDiag_mask_ol_innerdiagnostics,
+ NULL};
+
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_RequestHeader, &ti, "%s: RequestHeader", szFieldName);
parseNodeId(subtree, tvb, pinfo, pOffset, "AuthenticationToken");
parseDateTime(subtree, tvb, pinfo, pOffset, hf_opcua_Timestamp);
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RequestHandle);
- parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_ReturnDiagnostics);
+ proto_tree_add_bitmask(subtree, tvb, *pOffset, hf_opcua_returnDiag, ett_opcua_returnDiagnostics, returnDiagnostics_mask, ENC_LITTLE_ENDIAN); *pOffset += 4;
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_AuditEntryId);
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_TimeoutHint);
parseExtensionObject(subtree, tvb, pinfo, pOffset, "AdditionalHeader");