diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-12-04 02:54:59 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-12-04 02:54:59 +0000 |
commit | 64a099a65208dd02197e2d16a68eaa37f0eb606c (patch) | |
tree | 39381e6392b6375e860bf8a7f83c71b3e1ab386a /plugins/opcua/opcua_transport_layer.c | |
parent | 4f6ea6ef475c4a27a8233c7ed93ea42f29db534c (diff) |
From Gerhard Gappmeier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5429 :
Until now the info column only shows the OPC UA transport protocol type (Hello,
Ack, Secure Conversion message).
After connections establishment has finished this column shows only Secure
Conversion message, because every service is sent over the secure channel.
This patch adds the useful support of displaying the service type in the info
column. This makes it easier to find specific service calls in huge capture
files.
svn path=/trunk/; revision=35119
Diffstat (limited to 'plugins/opcua/opcua_transport_layer.c')
-rw-r--r-- | plugins/opcua/opcua_transport_layer.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/plugins/opcua/opcua_transport_layer.c b/plugins/opcua/opcua_transport_layer.c index e35dd99369..426f6835fc 100644 --- a/plugins/opcua/opcua_transport_layer.c +++ b/plugins/opcua/opcua_transport_layer.c @@ -125,7 +125,7 @@ void registerTransportLayerTypes(int proto) } /* Transport Layer: message parsers */ -void parseHello(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) +int parseHello(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) { proto_tree_add_item(tree, hf_opcua_transport_type, tvb, *pOffset, 3, TRUE); *pOffset+=3; proto_tree_add_item(tree, hf_opcua_transport_chunk, tvb, *pOffset, 1, TRUE); *pOffset+=1; @@ -136,9 +136,10 @@ void parseHello(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) proto_tree_add_item(tree, hf_opcua_transport_mms, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_mcc, tvb, *pOffset, 4, TRUE); *pOffset+=4; parseString(tree, tvb, pOffset, hf_opcua_transport_endpoint); + return -1; } -void parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) +int parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) { proto_tree_add_item(tree, hf_opcua_transport_type, tvb, *pOffset, 3, TRUE); *pOffset+=3; proto_tree_add_item(tree, hf_opcua_transport_chunk, tvb, *pOffset, 1, TRUE); *pOffset+=1; @@ -148,18 +149,20 @@ void parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) proto_tree_add_item(tree, hf_opcua_transport_sbs, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_mms, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_mcc, tvb, *pOffset, 4, TRUE); *pOffset+=4; + return -1; } -void parseError(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) +int parseError(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) { proto_tree_add_item(tree, hf_opcua_transport_type, tvb, *pOffset, 3, TRUE); *pOffset+=3; proto_tree_add_item(tree, hf_opcua_transport_chunk, tvb, *pOffset, 1, TRUE); *pOffset+=1; proto_tree_add_item(tree, hf_opcua_transport_size, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_error, tvb, *pOffset, 4, TRUE); *pOffset+=4; parseString(tree, tvb, pOffset, hf_opcua_transport_reason); + return -1; } -void parseMessage(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) +int parseMessage(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) { proto_item *ti; proto_tree *encobj_tree; @@ -188,9 +191,10 @@ void parseMessage(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) ServiceId = parseServiceNodeId(nodeid_tree, tvb, pOffset, "NodeId"); dispatchService(encobj_tree, tvb, pOffset, ServiceId); + return ServiceId; } -void parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) +int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) { proto_item *ti; proto_tree *encobj_tree; @@ -217,13 +221,15 @@ void parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) ServiceId = parseServiceNodeId(nodeid_tree, tvb, pOffset, "NodeId"); dispatchService(encobj_tree, tvb, pOffset, ServiceId); + return -1; } -void parseCloseSecureChannel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) +int parseCloseSecureChannel(proto_tree *tree, tvbuff_t *tvb, gint *pOffset) { proto_tree_add_item(tree, hf_opcua_transport_type, tvb, *pOffset, 3, TRUE); *pOffset+=3; proto_tree_add_item(tree, hf_opcua_transport_chunk, tvb, *pOffset, 1, TRUE); *pOffset+=1; proto_tree_add_item(tree, hf_opcua_transport_size, tvb, *pOffset, 4, TRUE); *pOffset+=4; proto_tree_add_item(tree, hf_opcua_transport_scid, tvb, *pOffset, 4, TRUE); *pOffset+=4; + return -1; } |