aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rpc.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-07-01 07:33:02 -0400
committerAnders Broman <a.broman58@gmail.com>2015-07-02 08:54:10 +0000
commitb68a0ed42e26aaa7f30b47657311c187c8e02114 (patch)
tree0731ab045fd6d7a43c2a9a8d280d0c4a9e2ac3e7 /epan/dissectors/packet-rpc.c
parent9d8b81012700bda095418dd7f1f7d15b94809cab (diff)
Replace RPC "dissect_function_t" function signature with "new style" dissector function signature.
This paves the way for using dissector tables. Change-Id: I88ac165ef9aa5bf5c05e1115f7321e18e734d683 Reviewed-on: https://code.wireshark.org/review/9453 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rpc.c')
-rw-r--r--epan/dissectors/packet-rpc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c
index 6596084976..9a6a336afc 100644
--- a/epan/dissectors/packet-rpc.c
+++ b/epan/dissectors/packet-rpc.c
@@ -1534,12 +1534,12 @@ dissect_auth_gssapi_data(tvbuff_t *tvb, proto_tree *tree, int offset)
static int
call_dissect_function(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- int offset, dissect_function_t* dissect_function, const char *progname,
+ int offset, new_dissector_t dissect_function, const char *progname,
rpc_call_info_value *rpc_call)
{
const char *saved_proto;
+ tvbuff_t *next_tvb;
- tvb_ensure_captured_length_remaining(tvb, offset);
if (dissect_function != NULL) {
/* set the current protocol name */
saved_proto = pinfo->current_proto;
@@ -1547,7 +1547,8 @@ call_dissect_function(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
pinfo->current_proto = progname;
/* call the dissector for the next level */
- offset = dissect_function(tvb, offset, pinfo, tree, rpc_call);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
+ offset += dissect_function(next_tvb, pinfo, tree, rpc_call);
/* restore the protocol name */
pinfo->current_proto = saved_proto;
@@ -1560,7 +1561,7 @@ call_dissect_function(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static int
dissect_rpc_authgss_integ_data(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, int offset,
- dissect_function_t* dissect_function,
+ new_dissector_t dissect_function,
const char *progname, rpc_call_info_value *rpc_call)
{
guint32 length, rounded_length, seq;
@@ -1644,7 +1645,7 @@ dissect_rpc_indir_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
rpc_proc_info_key key;
rpc_proc_info_value *value;
rpc_call_info_value *rpc_call;
- dissect_function_t *dissect_function = NULL;
+ new_dissector_t dissect_function = NULL;
rpc_conv_info_t *rpc_conv_info=NULL;
guint32 xid;
@@ -1791,7 +1792,7 @@ dissect_rpc_indir_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static address null_address = { AT_NONE, 0, NULL };
rpc_call_info_value *rpc_call;
const char *procname=NULL;
- dissect_function_t *dissect_function = NULL;
+ new_dissector_t dissect_function = NULL;
rpc_conv_info_t *rpc_conv_info=NULL;
guint32 xid;
@@ -2018,7 +2019,7 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static address null_address = { AT_NONE, 0, NULL };
nstime_t ns;
- dissect_function_t *dissect_function = NULL;
+ new_dissector_t dissect_function = NULL;
gboolean dissect_rpc_flag = TRUE;
rpc_conv_info_t *rpc_conv_info=NULL;