aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorHannes Mezger <hannes.mezger@ascolab.com>2014-06-10 13:09:24 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-06-11 12:59:48 +0000
commit2ab3b2ac2b6300fd10df046e2d75acf6328ac332 (patch)
treee5e8726d27329d7984bf2e1fc8b98e91884b8762 /plugins
parentbaa58887886c6bbe24f2894e40a4c0e1bccd5314 (diff)
Improve display of Open/CloseSecureChannel requests and responses
- Return the ServiceId of the service calls for displaying if it's a request or response - Add the missing parsing code for CloseSecureChannel, some fields were missing Change-Id: Id9b1e1986e222a77ad979fb615adc6ac62a4ced8 Reviewed-on: https://code.wireshark.org/review/2125 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/opcua/opcua_transport_layer.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/plugins/opcua/opcua_transport_layer.c b/plugins/opcua/opcua_transport_layer.c
index b9ef5139b5..7d3e3a0fbf 100644
--- a/plugins/opcua/opcua_transport_layer.c
+++ b/plugins/opcua/opcua_transport_layer.c
@@ -232,15 +232,37 @@ int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
dispatchService(encobj_tree, tvb, pOffset, ServiceId);
proto_item_set_end(ti, tvb, *pOffset);
- return -1;
+ return ServiceId;
}
int parseCloseSecureChannel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
{
+ proto_item *ti;
+ proto_item *ti_inner;
+ proto_tree *encobj_tree;
+ proto_tree *nodeid_tree;
+ int ServiceId = 0;
+
proto_tree_add_item(tree, hf_opcua_transport_type, tvb, *pOffset, 3, ENC_ASCII|ENC_NA); *pOffset+=3;
proto_tree_add_item(tree, hf_opcua_transport_chunk, tvb, *pOffset, 1, ENC_ASCII|ENC_NA); *pOffset+=1;
proto_tree_add_item(tree, hf_opcua_transport_size, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_scid, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
- return -1;
+
+ parseSecurityLayer(tree, tvb, pOffset);
+
+ /* add encodeable object subtree */
+ ti = proto_tree_add_text(tree, tvb, *pOffset, -1, "Message : Encodeable Object");
+ encobj_tree = proto_item_add_subtree(ti, ett_opcua_extensionobject);
+
+ /* add nodeid subtree */
+ ti_inner = proto_tree_add_text(encobj_tree, tvb, *pOffset, -1, "TypeId : ExpandedNodeId");
+ nodeid_tree = proto_item_add_subtree(ti_inner, ett_opcua_nodeid);
+ ServiceId = parseServiceNodeId(nodeid_tree, tvb, pOffset);
+ proto_item_set_end(ti_inner, tvb, *pOffset);
+
+ dispatchService(encobj_tree, tvb, pOffset, ServiceId);
+
+ proto_item_set_end(ti, tvb, *pOffset);
+ return ServiceId;
}