aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-portmap.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-11-10 16:39:46 +0000
committerMichael Mann <mmann78@netscape.net>2013-11-10 16:39:46 +0000
commitfe52a15217f645f09640529ce5ad1d344cafbed3 (patch)
tree624a61b433295083642c9284629ba33e79fba403 /epan/dissectors/packet-portmap.c
parent6f6d04e2f9585f603e713198938197821328c1b5 (diff)
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
Diffstat (limited to 'epan/dissectors/packet-portmap.c')
-rw-r--r--epan/dissectors/packet-portmap.c8
1 files changed, 4 insertions, 4 deletions
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 <ipaddr><protocol><port> 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;