NFS: We need to pass data through to the dissect_rpc_list() callback

Change-Id: Iace7c6dfb81f0a98bbae304346906a5e82c82812
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Reviewed-on: https://code.wireshark.org/review/679
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Ronnie Sahlberg 2014-03-15 08:12:34 -07:00 committed by Anders Broman
parent 5569f66084
commit 51f26ab49a
8 changed files with 26 additions and 19 deletions

View File

@ -129,7 +129,7 @@ gluster_dump_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
gluster_dump_reply_detail);
gluster_dump_reply_detail, NULL);
return offset;
}

View File

@ -845,7 +845,7 @@ glusterfs_gfs3_op_readdirp_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
offset = _glusterfs_gfs3_common_readdir_reply(tvb, tree, offset);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
glusterfs_gfs3_op_readdirp_entry);
glusterfs_gfs3_op_readdirp_entry, NULL);
return offset;
}
@ -1447,7 +1447,7 @@ glusterfs_gfs3_3_op_readdir_reply(tvbuff_t *tvb, int offset,
{
offset = _glusterfs_gfs3_common_readdir_reply(tvb, tree, offset);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
glusterfs_gfs3_3_op_readdir_entry);
glusterfs_gfs3_3_op_readdir_entry, NULL);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
return offset;
@ -1624,7 +1624,7 @@ glusterfs_gfs3_3_op_readdirp_reply(tvbuff_t *tvb, int offset,
{
offset = _glusterfs_gfs3_common_readdir_reply(tvb, tree, offset);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
glusterfs_gfs3_3_op_readdirp_entry);
glusterfs_gfs3_3_op_readdirp_entry, NULL);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
return offset;

View File

@ -243,7 +243,8 @@ dissect_mountlist(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
static int
dissect_mount_dump_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
offset = dissect_rpc_list(tvb, pinfo, tree, offset, dissect_mountlist);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_mountlist, NULL);
return offset;
}
@ -309,7 +310,8 @@ dissect_exportlist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
groups_tree = proto_item_add_subtree(groups_item, ett_mount_groups);
}
offset = dissect_rpc_list(tvb, pinfo, groups_tree, offset, dissect_group);
offset = dissect_rpc_list(tvb, pinfo, groups_tree, offset,
dissect_group, NULL);
if (groups_item) {
/* mark empty lists */
if (offset - groups_offset == 4) {
@ -336,7 +338,8 @@ dissect_exportlist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
static int
dissect_mount_export_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
offset = dissect_rpc_list(tvb, pinfo, tree, offset, dissect_exportlist);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_exportlist, NULL);
return offset;
}
@ -608,7 +611,8 @@ dissect_sgi_exportlist(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_
static int
dissect_mount_exportlist_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
offset = dissect_rpc_list(tvb, pinfo, tree, offset, dissect_sgi_exportlist);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_sgi_exportlist, NULL);
return offset;
}

View File

@ -3506,7 +3506,7 @@ dissect_nfs2_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item_append_text(tree, ", READDIR Reply");
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_readdir_entry);
dissect_readdir_entry, NULL);
eof_value = tvb_get_ntohl(tvb, offset+0);
if (tree)
proto_tree_add_uint(tree, hf_nfs_readdir_eof, tvb,
@ -5755,7 +5755,7 @@ dissect_nfs3_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
"dir_attributes");
offset = dissect_nfs3_cookie_verf(tvb, offset, tree);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_entry3);
dissect_entry3, NULL);
eof_value = tvb_get_ntohl(tvb, offset+0);
if (tree)
proto_tree_add_uint(tree, hf_nfs_readdir_eof, tvb,
@ -5856,7 +5856,7 @@ dissect_nfs3_entryplus(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 80..83 */
static int
dissect_nfs3_readdirplus_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, void *data _U_)
proto_tree *tree, void *data)
{
guint32 status;
guint32 eof_value;
@ -5871,7 +5871,7 @@ dissect_nfs3_readdirplus_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
"dir_attributes");
offset = dissect_nfs3_cookie_verf(tvb, offset, tree);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_nfs3_entryplus);
dissect_nfs3_entryplus, data);
eof_value = tvb_get_ntohl(tvb, offset+0);
if (tree)
proto_tree_add_uint(tree, hf_nfs_readdir_eof, tvb,

View File

@ -119,7 +119,7 @@ dissect_pcnfsd2_mapid_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_rpc_string(tvb, tree, hf_pcnfsd_comment, offset, NULL);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_pcnfsd2_dissect_mapreq_arg_item);
dissect_pcnfsd2_dissect_mapreq_arg_item, NULL);
return offset;
}
@ -166,7 +166,7 @@ dissect_pcnfsd2_mapid_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_rpc_string(tvb, tree, hf_pcnfsd_comment, offset, NULL);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_pcnfsd2_dissect_mapreq_res_item);
dissect_pcnfsd2_dissect_mapreq_res_item, NULL);
return offset;
}

View File

@ -267,7 +267,7 @@ dissect_dump_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_dump_entry);
dissect_dump_entry, NULL);
return offset;
}
@ -455,7 +455,8 @@ static int
dissect_rpcb3_dump_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
offset = dissect_rpc_list(tvb, pinfo, tree, offset, dissect_rpcb);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_rpcb, NULL);
return offset;
}

View File

@ -767,7 +767,7 @@ dissect_rpc_bytes(tvbuff_t *tvb, proto_tree *tree,
int
dissect_rpc_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int offset, dissect_function_t *rpc_list_dissector)
int offset, dissect_function_t *rpc_list_dissector, void *data)
{
guint32 value_follows;
@ -777,7 +777,8 @@ dissect_rpc_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset, 4, value_follows);
offset += 4;
if (value_follows == 1) {
offset = rpc_list_dissector(tvb, offset, pinfo, tree, NULL);
offset = rpc_list_dissector(tvb, offset, pinfo, tree,
data);
}
else {
break;

View File

@ -168,7 +168,8 @@ WS_DLL_PUBLIC int dissect_rpc_bytes(tvbuff_t *tvb,
proto_tree *tree, int hfindex, int offset, guint32 length,
gboolean string_data, const char **string_buffer_ret);
WS_DLL_PUBLIC int dissect_rpc_list(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, int offset, dissect_function_t *rpc_list_dissector);
proto_tree *tree, int offset, dissect_function_t *rpc_list_dissector,
void *data);
WS_DLL_PUBLIC int dissect_rpc_array(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, int offset, dissect_function_t *rpc_array_dissector,
int hfindex);