From fe52a15217f645f09640529ce5ad1d344cafbed3 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sun, 10 Nov 2013 16:39:46 +0000 Subject: Have rpc_call_info_value be passed through to (sub)dissectors instead of using pinfo->private_data. This was acheived by adding a void* data parameter to the dissect_function_t typedef in packet-rpc.h (r53213). After converting the pinfo->private_data, I'm not sure if it would be better to change the void* data pointer to be a rpc_call_info_value* explicitly. Not all "dissector functions" use it, but it would certainly save a lot of casting... svn path=/trunk/; revision=53232 --- epan/dissectors/packet-portmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'epan/dissectors/packet-portmap.c') diff --git a/epan/dissectors/packet-portmap.c b/epan/dissectors/packet-portmap.c index 1b482411c8..7b54de4102 100644 --- a/epan/dissectors/packet-portmap.c +++ b/epan/dissectors/packet-portmap.c @@ -71,7 +71,7 @@ static dissector_handle_t rpc_handle; /* Dissect a getport call */ static int dissect_getport_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, - proto_tree *tree, void* data _U_) + proto_tree *tree, void* data) { guint32 proto, version; guint32 prog; @@ -80,7 +80,7 @@ dissect_getport_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, /* make sure we remember protocol type until the reply packet */ if(!pinfo->fd->flags.visited){ - rpc_call_info_value *rpc_call=(rpc_call_info_value *)pinfo->private_data; + rpc_call_info_value *rpc_call=(rpc_call_info_value *)data; if(rpc_call){ proto = tvb_get_ntohl(tvb, offset+8); if(proto==IP_PROTO_UDP){ /* only do this for UDP */ @@ -127,13 +127,13 @@ dissect_getport_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, static int dissect_getport_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, - proto_tree *tree, void* data _U_) + proto_tree *tree, void* data) { guint32 portx; /* we might have learnt a mapping for ONC-RPC*/ if(!pinfo->fd->flags.visited){ - rpc_call_info_value *rpc_call=(rpc_call_info_value *)pinfo->private_data; + rpc_call_info_value *rpc_call=(rpc_call_info_value *)data; /* only do this for UDP, TCP does not need anything like this */ if(rpc_call && (GPOINTER_TO_UINT(rpc_call->private_data)==PT_UDP) ){ guint32 port; -- cgit v1.2.3