summaryrefslogtreecommitdiff
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
parent9d8b81012700bda095418dd7f1f7d15b94809cab (diff)
downloadwireshark-b68a0ed42e26aaa7f30b47657311c187c8e02114.tar.gz
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>
-rw-r--r--epan/dissectors/packet-bootparams.c44
-rw-r--r--epan/dissectors/packet-fmp.c181
-rw-r--r--epan/dissectors/packet-fmp_notify.c66
-rw-r--r--epan/dissectors/packet-gluster.h2
-rw-r--r--epan/dissectors/packet-gluster_cli.c61
-rw-r--r--epan/dissectors/packet-gluster_pmap.c19
-rw-r--r--epan/dissectors/packet-glusterd.c90
-rw-r--r--epan/dissectors/packet-glusterfs.c310
-rw-r--r--epan/dissectors/packet-glusterfs_hndsk.c51
-rw-r--r--epan/dissectors/packet-hclnfsd.c124
-rw-r--r--epan/dissectors/packet-klm.c23
-rw-r--r--epan/dissectors/packet-mount.c36
-rw-r--r--epan/dissectors/packet-nfs.c287
-rw-r--r--epan/dissectors/packet-nfsacl.c86
-rw-r--r--epan/dissectors/packet-nisplus.c83
-rw-r--r--epan/dissectors/packet-nlm.c76
-rw-r--r--epan/dissectors/packet-pcnfsd.c12
-rw-r--r--epan/dissectors/packet-portmap.c59
-rw-r--r--epan/dissectors/packet-rpc.c15
-rw-r--r--epan/dissectors/packet-rpc.h8
-rw-r--r--epan/dissectors/packet-rquota.c11
-rw-r--r--epan/dissectors/packet-rwall.c6
-rw-r--r--epan/dissectors/packet-spray.c10
-rw-r--r--epan/dissectors/packet-stat-notify.c3
-rw-r--r--epan/dissectors/packet-stat.c35
-rw-r--r--epan/dissectors/packet-teklink.c65
-rw-r--r--epan/dissectors/packet-vxi11.c64
-rw-r--r--epan/dissectors/packet-ypbind.c14
-rw-r--r--epan/dissectors/packet-yppasswd.c9
-rw-r--r--epan/dissectors/packet-ypserv.c136
30 files changed, 1091 insertions, 895 deletions
diff --git a/epan/dissectors/packet-bootparams.c b/epan/dissectors/packet-bootparams.c
index 6e280c7edb..f04f16baef 100644
--- a/epan/dissectors/packet-bootparams.c
+++ b/epan/dissectors/packet-bootparams.c
@@ -86,50 +86,44 @@ dissect_bp_address(tvbuff_t *tvb, int offset, proto_tree *tree, int hfindex)
static int
-dissect_getfile_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_getfile_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- if ( tree )
- {
- offset = dissect_rpc_string(tvb, tree, hf_bootparams_host, offset, NULL);
- offset = dissect_rpc_string(tvb, tree, hf_bootparams_fileid, offset, NULL);
- }
+ int offset = 0;
+
+ offset = dissect_rpc_string(tvb, tree, hf_bootparams_host, offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_bootparams_fileid, offset, NULL);
return offset;
}
static int
-dissect_getfile_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_getfile_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- if ( tree )
- {
- offset = dissect_rpc_string(tvb, tree, hf_bootparams_host, offset, NULL);
- offset = dissect_bp_address(tvb, offset, tree, hf_bootparams_hostaddr);
- offset = dissect_rpc_string(tvb, tree, hf_bootparams_filepath, offset, NULL);
- }
+ int offset = 0;
+
+ offset = dissect_rpc_string(tvb, tree, hf_bootparams_host, offset, NULL);
+ offset = dissect_bp_address(tvb, offset, tree, hf_bootparams_hostaddr);
+ offset = dissect_rpc_string(tvb, tree, hf_bootparams_filepath, offset, NULL);
return offset;
}
static int
-dissect_whoami_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_whoami_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- if ( tree )
- {
- offset = dissect_bp_address(tvb, offset, tree, hf_bootparams_hostaddr);
- }
+ int offset = dissect_bp_address(tvb, 0, tree, hf_bootparams_hostaddr);
return offset;
}
static int
-dissect_whoami_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_whoami_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- if ( tree )
- {
- offset = dissect_rpc_string(tvb, tree, hf_bootparams_host, offset, NULL);
- offset = dissect_rpc_string(tvb, tree, hf_bootparams_domain, offset, NULL);
- offset = dissect_bp_address(tvb, offset, tree, hf_bootparams_routeraddr);
- }
+ int offset = 0;
+
+ offset = dissect_rpc_string(tvb, tree, hf_bootparams_host, offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_bootparams_domain, offset, NULL);
+ offset = dissect_bp_address(tvb, offset, tree, hf_bootparams_routeraddr);
return offset;
}
diff --git a/epan/dissectors/packet-fmp.c b/epan/dissectors/packet-fmp.c
index aac5c4eee5..1b4be65db9 100644
--- a/epan/dissectors/packet-fmp.c
+++ b/epan/dissectors/packet-fmp.c
@@ -853,9 +853,10 @@ dissect_fmp_attrs(tvbuff_t *tvb, int offset, proto_tree *tree)
static int
-dissect_FMP_SessionCreate_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_SessionCreate_request(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
offset, NULL);
offset = dissect_fmp_timeval(tvb, offset, pinfo, tree, hf_fmp_btime,
@@ -866,10 +867,11 @@ dissect_FMP_SessionCreate_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_SessionCreate_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_SessionCreate_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -887,28 +889,26 @@ dissect_FMP_SessionCreate_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_HeartBeat_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_HeartBeat_request(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
-
- return offset;
+ return dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle, 0);
}
static int
-dissect_FMP_HeartBeat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_HeartBeat_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- return offset;
+
+ return dissect_fmp_status(tvb, 0, tree, &rval);
}
static int
-dissect_FMP_Mount_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_Mount_request(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
offset);
offset = dissect_fmp_capability(tvb, offset, tree);
@@ -917,10 +917,11 @@ dissect_FMP_Mount_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_Mount_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_Mount_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -935,9 +936,10 @@ dissect_FMP_Mount_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_Open_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_Open_request(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
offset);
offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
@@ -945,10 +947,11 @@ dissect_FMP_Open_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_Open_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_Open_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -966,19 +969,22 @@ dissect_FMP_Open_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_FMP_Close_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_Close_request(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
return offset;
}
static int
-dissect_FMP_Close_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_Close_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -990,8 +996,9 @@ dissect_FMP_Close_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_FMP_OpenGetMap_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_FMP_OpenGetMap_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
offset);
@@ -1005,10 +1012,11 @@ dissect_FMP_OpenGetMap_request(tvbuff_t *tvb, int offset, packet_info *pinfo, pr
}
static int
-dissect_FMP_OpenGetMap_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_OpenGetMap_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1029,25 +1037,23 @@ dissect_FMP_OpenGetMap_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_OpenAllocSpace_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_FMP_OpenAllocSpace_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_data(tvb , tree, hf_fmp_sessionHandle,
- offset);
+ int offset = 0;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle, offset);
offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
- offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
return offset;
}
static int
-dissect_FMP_OpenAllocSpace_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_OpenAllocSpace_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1067,9 +1073,10 @@ dissect_FMP_OpenAllocSpace_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_GetMap_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_GetMap_request(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
@@ -1081,10 +1088,11 @@ dissect_FMP_GetMap_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_FMP_GetMap_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_GetMap_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1101,9 +1109,10 @@ dissect_FMP_GetMap_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_AllocSpace_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_AllocSpace_request(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
@@ -1115,10 +1124,11 @@ dissect_FMP_AllocSpace_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_
}
static int
-dissect_FMP_AllocSpace_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_AllocSpace_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1135,9 +1145,10 @@ dissect_FMP_AllocSpace_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_Flush_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_Flush_request(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
offset = dissect_fmp_flushCmd(tvb, offset, tree);
@@ -1147,10 +1158,11 @@ dissect_FMP_Flush_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_Flush_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_Flush_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1161,9 +1173,10 @@ dissect_FMP_Flush_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_FMP_CancelReq_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_CancelReq_request(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
@@ -1171,10 +1184,11 @@ dissect_FMP_CancelReq_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_FMP_CancelReq_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_CancelReq_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1185,19 +1199,21 @@ dissect_FMP_CancelReq_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_FMP_PlugIn_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_PlugIn_request(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_plugInID(tvb, offset, tree);
offset = dissect_rpc_data(tvb, tree, hf_fmp_plugInBuf, offset);
return offset;
}
static int
-dissect_FMP_PlugIn_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_PlugIn_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1208,27 +1224,23 @@ dissect_FMP_PlugIn_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_FMP_SessionTerminate_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_SessionTerminate_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
- return offset;
+ return dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle, 0);
}
static int
-dissect_FMP_SessionTerminate_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_SessionTerminate_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- return offset;
+ return dissect_fmp_status(tvb, 0,tree, &rval);
}
static int
-dissect_FMP_SessionCreateEx_request(tvbuff_t *tvb, int offset,packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_FMP_SessionCreateEx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
offset, NULL);
@@ -1259,10 +1271,10 @@ dissect_FMP_SessionCreateEx_request(tvbuff_t *tvb, int offset,packet_info *pinfo
static int
-dissect_FMP_SessionCreateEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_FMP_SessionCreateEx_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
-
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset, tree, &rval);
if (rval == 0) {
@@ -1298,9 +1310,9 @@ dissect_FMP_SessionCreateEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
-dissect_FMP_ReportClientError_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_ReportClientError_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_string(tvb, tree, hf_fmp_description,
offset, NULL);
@@ -1309,19 +1321,19 @@ dissect_FMP_ReportClientError_request(tvbuff_t *tvb, int offset,
}
static int
-dissect_FMP_ReportClientError_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_ReportClientError_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
return offset;
}
static int
-dissect_FMP_GetAttr_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_GetAttr_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
@@ -1331,10 +1343,10 @@ dissect_FMP_GetAttr_request(tvbuff_t *tvb, int offset,
static int
-dissect_FMP_GetAttr_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_GetAttr_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
@@ -1346,9 +1358,9 @@ dissect_FMP_GetAttr_reply(tvbuff_t *tvb, int offset,
}
static int
-dissect_FMP_OpenGetAttr_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_FMP_OpenGetAttr_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
offset);
@@ -1360,10 +1372,10 @@ dissect_FMP_OpenGetAttr_request(tvbuff_t *tvb, int offset,
static int
-dissect_FMP_OpenGetAttr_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_OpenGetAttr_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset, tree, &rval);
@@ -1381,9 +1393,9 @@ dissect_FMP_OpenGetAttr_reply(tvbuff_t *tvb, int offset,
static int
-dissect_FMP_FlushGetAttr_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_FMP_FlushGetAttr_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
@@ -1399,10 +1411,10 @@ dissect_FMP_FlushGetAttr_request(tvbuff_t *tvb, int offset,
static int
-dissect_FMP_FlushGetAttr_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_FlushGetAttr_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1416,9 +1428,9 @@ dissect_FMP_FlushGetAttr_reply(tvbuff_t *tvb, int offset,
static int
-dissect_FMP_GetVolumeInfo_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_GetVolumeInfo_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_topVolumeId, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cursor, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
@@ -1428,10 +1440,10 @@ dissect_FMP_GetVolumeInfo_request(tvbuff_t *tvb, int offset,
static int
-dissect_FMP_GetVolumeInfo_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_GetVolumeInfo_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1443,9 +1455,9 @@ dissect_FMP_GetVolumeInfo_reply(tvbuff_t *tvb, int offset,
}
static int
-dissect_FMP_OpenGetMapEx_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_FMP_OpenGetMapEx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
offset);
offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
@@ -1458,10 +1470,11 @@ dissect_FMP_OpenGetMapEx_request(tvbuff_t *tvb, int offset,
static int
-dissect_FMP_OpenGetMapEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_OpenGetMapEx_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
@@ -1482,9 +1495,10 @@ dissect_FMP_OpenGetMapEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_
static int
-dissect_FMP_OpenAllocSpaceEx_request(tvbuff_t *tvb, int offset,
+dissect_FMP_OpenAllocSpaceEx_request(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb , tree, hf_fmp_sessionHandle,
offset);
offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
@@ -1497,10 +1511,11 @@ dissect_FMP_OpenAllocSpaceEx_request(tvbuff_t *tvb, int offset,
static int
-dissect_FMP_OpenAllocSpaceEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_OpenAllocSpaceEx_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1520,9 +1535,10 @@ dissect_FMP_OpenAllocSpaceEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
}
static int
-dissect_FMP_GetMapEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_GetMapEx_request(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
@@ -1534,10 +1550,11 @@ dissect_FMP_GetMapEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
static int
-dissect_FMP_GetMapEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_GetMapEx_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1555,9 +1572,10 @@ dissect_FMP_GetMapEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
-dissect_FMP_AllocSpaceEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_AllocSpaceEx_request(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
@@ -1569,10 +1587,11 @@ dissect_FMP_AllocSpaceEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo _
static int
-dissect_FMP_AllocSpaceEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_AllocSpaceEx_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -1589,9 +1608,10 @@ dissect_FMP_AllocSpaceEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_FlushEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_FMP_FlushEx_request(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
offset = dissect_fmp_flushCmd(tvb, offset, tree);
@@ -1601,10 +1621,11 @@ dissect_FMP_FlushEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_FMP_FlushEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_FMP_FlushEx_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_status(tvb, offset,tree, &rval);
if (rval == 0) {
diff --git a/epan/dissectors/packet-fmp_notify.c b/epan/dissectors/packet-fmp_notify.c
index 626a6d510d..4035711b12 100644
--- a/epan/dissectors/packet-fmp_notify.c
+++ b/epan/dissectors/packet-fmp_notify.c
@@ -201,10 +201,9 @@ dissect_handleList(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_FMP_NOTIFY_DownGrade_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_NOTIFY_DownGrade_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
-
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
offset);
@@ -217,19 +216,17 @@ dissect_FMP_NOTIFY_DownGrade_request(tvbuff_t *tvb, int offset,
}
static int
-dissect_FMP_NOTIFY_DownGrade_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_NOTIFY_DownGrade_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
- offset = dissect_fmp_notify_status(tvb, offset,tree, &rval);
- return offset;
+ return dissect_fmp_notify_status(tvb, 0,tree, &rval);
}
static int
-dissect_FMP_NOTIFY_RevokeList_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_NOTIFY_RevokeList_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
offset);
@@ -242,19 +239,18 @@ dissect_FMP_NOTIFY_RevokeList_request(tvbuff_t *tvb, int offset,
}
static int
-dissect_FMP_NOTIFY_RevokeList_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_FMP_NOTIFY_RevokeList_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
- offset = dissect_fmp_notify_status(tvb, offset,tree, &rval);
- return offset;
+ return dissect_fmp_notify_status(tvb, 0, tree, &rval);
}
static int
-dissect_FMP_NOTIFY_RevokeAll_request(tvbuff_t *tvb, int offset,
+dissect_FMP_NOTIFY_RevokeAll_request(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
offset);
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
@@ -263,19 +259,19 @@ dissect_FMP_NOTIFY_RevokeAll_request(tvbuff_t *tvb, int offset,
}
static int
-dissect_FMP_NOTIFY_RevokeAll_reply(tvbuff_t *tvb, int offset,
+dissect_FMP_NOTIFY_RevokeAll_reply(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
- offset = dissect_fmp_notify_status(tvb, offset,tree, &rval);
- return offset;
+ return dissect_fmp_notify_status(tvb, 0, tree, &rval);
}
static int
-dissect_FMP_NOTIFY_FileSetEof_request(tvbuff_t *tvb, int offset,
+dissect_FMP_NOTIFY_FileSetEof_request(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
offset);
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
@@ -285,20 +281,20 @@ dissect_FMP_NOTIFY_FileSetEof_request(tvbuff_t *tvb, int offset,
}
static int
-dissect_FMP_NOTIFY_FileSetEof_reply(tvbuff_t *tvb, int offset,
+dissect_FMP_NOTIFY_FileSetEof_reply(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
- offset = dissect_fmp_notify_status(tvb, offset,tree, &rval);
- return offset;
+ return dissect_fmp_notify_status(tvb, 0, tree, &rval);
}
static int
-dissect_FMP_NOTIFY_RequestDone_request(tvbuff_t *tvb, int offset,
+dissect_FMP_NOTIFY_RequestDone_request(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
int rval;
+ int offset = 0;
offset = dissect_fmp_notify_status(tvb, offset,tree, &rval);
if (rval == 0) {
@@ -316,19 +312,20 @@ dissect_FMP_NOTIFY_RequestDone_request(tvbuff_t *tvb, int offset,
}
static int
-dissect_FMP_NOTIFY_RequestDone_reply(tvbuff_t *tvb, int offset,
+dissect_FMP_NOTIFY_RequestDone_reply(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
- offset = dissect_fmp_notify_status(tvb, offset,tree, &rval);
- return offset;
+ return dissect_fmp_notify_status(tvb, 0, tree, &rval);
}
static int
-dissect_FMP_NOTIFY_volFreeze_request(tvbuff_t *tvb, int offset,
+dissect_FMP_NOTIFY_volFreeze_request(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID, offset);
@@ -336,20 +333,20 @@ dissect_FMP_NOTIFY_volFreeze_request(tvbuff_t *tvb, int offset,
}
static int
-dissect_FMP_NOTIFY_volFreeze_reply(tvbuff_t *tvb, int offset,
+dissect_FMP_NOTIFY_volFreeze_reply(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
- offset = dissect_fmp_notify_status(tvb, offset,tree, &rval);
- return offset;
+ return dissect_fmp_notify_status(tvb, 0, tree, &rval);
}
static int
-dissect_FMP_NOTIFY_revokeHandleList_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo,
- proto_tree *tree, void* data _U_)
+dissect_FMP_NOTIFY_revokeHandleList_request(tvbuff_t *tvb,
+ packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
offset);
offset = dissect_revokeHandleListReason(tvb, offset, tree);
@@ -358,13 +355,12 @@ dissect_FMP_NOTIFY_revokeHandleList_request(tvbuff_t *tvb, int offset,
}
static int
-dissect_FMP_NOTIFY_revokeHandleList_reply(tvbuff_t *tvb, int offset,
+dissect_FMP_NOTIFY_revokeHandleList_reply(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
- offset = dissect_fmp_notify_status(tvb, offset,tree, &rval);
- return offset;
+ return dissect_fmp_notify_status(tvb, 0, tree, &rval);
}
/*
diff --git a/epan/dissectors/packet-gluster.h b/epan/dissectors/packet-gluster.h
index a00d8dc7f1..9faf2d3d12 100644
--- a/epan/dissectors/packet-gluster.h
+++ b/epan/dissectors/packet-gluster.h
@@ -450,7 +450,7 @@ extern int
gluster_dissect_common_reply(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, void* data _U_);
extern int
-glusterfs_gfs3_3_op_common_reply(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_common_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_);
#endif /* __PACKET_GLUSTER_H__ */
diff --git a/epan/dissectors/packet-gluster_cli.c b/epan/dissectors/packet-gluster_cli.c
index 33a9e8c5d0..2e0756f951 100644
--- a/epan/dissectors/packet-gluster_cli.c
+++ b/epan/dissectors/packet-gluster_cli.c
@@ -63,18 +63,18 @@ static gint ett_gluster_cli = -1;
/* CLI Operations */
static int
-gluster_cli_2_common_call(tvbuff_t *tvb, int offset,
+gluster_cli_2_common_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = gluster_rpc_dissect_dict(tree, tvb, hf_gluster_dict, offset);
-
- return offset;
+ return gluster_rpc_dissect_dict(tree, tvb, hf_gluster_dict, 0);
}
static int
-gluster_cli_2_common_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_cli_2_common_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_string(tvb, tree, hf_gluster_op_errstr, offset,
NULL);
@@ -84,9 +84,11 @@ gluster_cli_2_common_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_cli_2_probe_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_cli_2_probe_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_port, offset);
offset = dissect_rpc_string(tvb, tree, hf_gluster_hostname, offset,
@@ -98,9 +100,11 @@ gluster_cli_2_probe_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_cli_2_probe_call(tvbuff_t *tvb, int offset,
+gluster_cli_2_probe_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_string(tvb, tree, hf_gluster_hostname, offset,
NULL);
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_port, offset);
@@ -109,9 +113,10 @@ gluster_cli_2_probe_call(tvbuff_t *tvb, int offset,
}
static int
-gluster_cli_2_deprobe_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_cli_2_deprobe_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_string(tvb, tree, hf_gluster_hostname, offset,
NULL);
@@ -120,9 +125,10 @@ gluster_cli_2_deprobe_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_cli_2_deprobe_call(tvbuff_t *tvb, int offset,
+gluster_cli_2_deprobe_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_string(tvb, tree, hf_gluster_hostname, offset,
NULL);
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_port, offset);
@@ -132,18 +138,18 @@ gluster_cli_2_deprobe_call(tvbuff_t *tvb, int offset,
}
static int
-gluster_cli_2_fsm_log_call(tvbuff_t *tvb, int offset,
+gluster_cli_2_fsm_log_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_string(tvb, tree, hf_gluster_wd, offset, NULL);
-
- return offset;
+ return dissect_rpc_string(tvb, tree, hf_gluster_wd, 0, NULL);
}
static int
-gluster_cli_2_getwd_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_cli_2_getwd_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_string(tvb, tree, hf_gluster_wd, offset, NULL);
@@ -151,18 +157,18 @@ gluster_cli_2_getwd_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_cli_2_getwd_call(tvbuff_t *tvb, int offset,
+gluster_cli_2_getwd_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_gluster_unused, offset);
-
- return offset;
+ return dissect_rpc_uint32(tvb, tree, hf_gluster_unused, 0);
}
static int
-gluster_cli_2_mount_call(tvbuff_t *tvb, int offset,
+gluster_cli_2_mount_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_string(tvb, tree, hf_gluster_label, offset,
NULL);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_gluster_dict, offset);
@@ -171,9 +177,11 @@ gluster_cli_2_mount_call(tvbuff_t *tvb, int offset,
}
static int
-gluster_cli_2_mount_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_cli_2_mount_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_string(tvb, tree, hf_gluster_path, offset, NULL);
@@ -181,15 +189,24 @@ gluster_cli_2_mount_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_cli_2_umount_call(tvbuff_t *tvb, int offset,
+gluster_cli_2_umount_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_lazy, offset);
offset = dissect_rpc_string(tvb, tree, hf_gluster_path, offset, NULL);
return offset;
}
+static int
+gluster_cli_dissect_common_reply(tvbuff_t *tvb,
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ return gluster_dissect_common_reply(tvb, 0, pinfo, tree, data);
+}
+
/* procedures for GLUSTER_CLI_PROGRAM */
static const vsff gluster_cli_proc[] = {
{ GLUSTER_CLI_NULL, "NULL", NULL, NULL },
@@ -354,7 +371,7 @@ static const vsff gluster_cli_2_proc[] = {
},
{
GLUSTER_CLI_2_UMOUNT, "UMOUNT",
- gluster_cli_2_umount_call, gluster_dissect_common_reply
+ gluster_cli_2_umount_call, gluster_cli_dissect_common_reply
},
{
GLUSTER_CLI_2_HEAL_VOLUME, "HEAL_VOLUME",
diff --git a/epan/dissectors/packet-gluster_pmap.c b/epan/dissectors/packet-gluster_pmap.c
index d9f6f8b952..be12d63931 100644
--- a/epan/dissectors/packet-gluster_pmap.c
+++ b/epan/dissectors/packet-gluster_pmap.c
@@ -67,9 +67,10 @@ static gint ett_gluster_dump_detail = -1;
/* PMAP PORTBYBRICK */
static int
-gluster_pmap_portbybrick_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_pmap_portbybrick_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_brick_status, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_brick_port, offset);
@@ -78,12 +79,10 @@ gluster_pmap_portbybrick_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_pmap_portbybrick_call(tvbuff_t *tvb, int offset,
+gluster_pmap_portbybrick_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_string(tvb, tree, hf_gluster_brick, offset,
- NULL);
- return offset;
+ return dissect_rpc_string(tvb, tree, hf_gluster_brick, 0, NULL);
}
/* Based on rpc/rpc-lib/src/rpc-common.c, but xdr encoding/decoding is broken.
@@ -117,9 +116,11 @@ gluster_dump_reply_detail(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-gluster_dump_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_dump_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_uint64(tvb, tree, hf_gluster_gfsid, offset);
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
@@ -131,12 +132,10 @@ gluster_dump_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* DUMP request */
static int
-gluster_dump_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+gluster_dump_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_uint64(tvb, tree, hf_gluster_gfsid, offset);
-
- return offset;
+ return dissect_rpc_uint64(tvb, tree, hf_gluster_gfsid, 0);
}
/* GLUSTER_PMAP_PROGRAM from xlators/mgmt/glusterd/src/glusterd-pmap.c */
diff --git a/epan/dissectors/packet-glusterd.c b/epan/dissectors/packet-glusterd.c
index 9cc348ba60..c142d6b440 100644
--- a/epan/dissectors/packet-glusterd.c
+++ b/epan/dissectors/packet-glusterd.c
@@ -118,9 +118,11 @@ gluster_gd_mgmt_dissect_uuid(tvbuff_t *tvb, proto_tree *tree, int hfindex,
}
static int
-gluster_gd_mgmt_probe_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_gd_mgmt_probe_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterd_hostname, offset,
@@ -132,9 +134,10 @@ gluster_gd_mgmt_probe_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_gd_mgmt_probe_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+gluster_gd_mgmt_probe_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterd_hostname, offset,
@@ -145,9 +148,11 @@ gluster_gd_mgmt_probe_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-gluster_gd_mgmt_friend_add_reply(tvbuff_t *tvb, int offset,
+gluster_gd_mgmt_friend_add_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterd_hostname, offset,
@@ -159,9 +164,11 @@ gluster_gd_mgmt_friend_add_reply(tvbuff_t *tvb, int offset,
}
static int
-gluster_gd_mgmt_friend_add_call(tvbuff_t *tvb, int offset,
+gluster_gd_mgmt_friend_add_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterd_hostname, offset,
@@ -174,9 +181,11 @@ gluster_gd_mgmt_friend_add_call(tvbuff_t *tvb, int offset,
/* gluster_gd_mgmt_cluster_lock_reply is used for LOCK and UNLOCK */
static int
-gluster_gd_mgmt_cluster_lock_reply(tvbuff_t *tvb, int offset,
+gluster_gd_mgmt_cluster_lock_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
@@ -186,19 +195,17 @@ gluster_gd_mgmt_cluster_lock_reply(tvbuff_t *tvb, int offset,
/* gluster_gd_mgmt_cluster_lock_call is used for LOCK and UNLOCK */
static int
-gluster_gd_mgmt_cluster_lock_call(tvbuff_t *tvb, int offset,
+gluster_gd_mgmt_cluster_lock_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
- offset);
-
- return offset;
+ return gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid, 0);
}
static int
-gluster_gd_mgmt_stage_op_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_gd_mgmt_stage_op_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
@@ -209,9 +216,10 @@ gluster_gd_mgmt_stage_op_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_gd_mgmt_stage_op_call(tvbuff_t *tvb, int offset,
+gluster_gd_mgmt_stage_op_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
@@ -221,9 +229,10 @@ gluster_gd_mgmt_stage_op_call(tvbuff_t *tvb, int offset,
}
static int
-gluster_gd_mgmt_commit_op_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_gd_mgmt_commit_op_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
@@ -234,9 +243,10 @@ gluster_gd_mgmt_commit_op_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_gd_mgmt_commit_op_call(tvbuff_t *tvb, int offset,
+gluster_gd_mgmt_commit_op_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
@@ -247,9 +257,10 @@ gluster_gd_mgmt_commit_op_call(tvbuff_t *tvb, int offset,
}
static int
-gluster_gd_mgmt_friend_update_reply(tvbuff_t *tvb, int offset,
+gluster_gd_mgmt_friend_update_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
@@ -259,9 +270,10 @@ gluster_gd_mgmt_friend_update_reply(tvbuff_t *tvb, int offset,
}
static int
-gluster_gd_mgmt_friend_update_call(tvbuff_t *tvb, int offset,
+gluster_gd_mgmt_friend_update_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterd_vols,
@@ -273,9 +285,10 @@ gluster_gd_mgmt_friend_update_call(tvbuff_t *tvb, int offset,
/* Below procedure is used for version 2 */
static int
-glusterd_mgmt_2_cluster_lock_reply(tvbuff_t *tvb, int offset,
+glusterd_mgmt_2_cluster_lock_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
@@ -285,19 +298,17 @@ glusterd_mgmt_2_cluster_lock_reply(tvbuff_t *tvb, int offset,
/* glusterd__mgmt_2_cluster_lock_call is used for LOCK and UNLOCK */
static int
-glusterd_mgmt_2_cluster_lock_call(tvbuff_t *tvb, int offset,
+glusterd_mgmt_2_cluster_lock_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
- offset);
-
- return offset;
+ return gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid, 0);
}
static int
-glusterd_mgmt_2_stage_op_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterd_mgmt_2_stage_op_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
@@ -310,9 +321,10 @@ glusterd_mgmt_2_stage_op_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterd_mgmt_2_stage_op_call(tvbuff_t *tvb, int offset,
+glusterd_mgmt_2_stage_op_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
@@ -322,9 +334,10 @@ glusterd_mgmt_2_stage_op_call(tvbuff_t *tvb, int offset,
}
static int
-glusterd_mgmt_2_commit_op_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterd_mgmt_2_commit_op_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
@@ -337,9 +350,10 @@ glusterd_mgmt_2_commit_op_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterd_mgmt_2_commit_op_call(tvbuff_t *tvb, int offset,
+glusterd_mgmt_2_commit_op_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
@@ -350,9 +364,10 @@ glusterd_mgmt_2_commit_op_call(tvbuff_t *tvb, int offset,
/* glusterd_mgmt_3_lock_call is used for LOCK and UNLOCK */
static int
-glusterd_mgmt_3_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+glusterd_mgmt_3_lock_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_tnx_id,
@@ -364,9 +379,10 @@ glusterd_mgmt_3_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-glusterd_mgmt_3_lock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+glusterd_mgmt_3_lock_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_tnx_id,
@@ -377,9 +393,10 @@ glusterd_mgmt_3_lock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-glusterd_mgmt_3_pre_val_call(tvbuff_t *tvb, int offset,
+glusterd_mgmt_3_pre_val_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
@@ -389,9 +406,10 @@ glusterd_mgmt_3_pre_val_call(tvbuff_t *tvb, int offset,
}
static int
-glusterd_mgmt_3_pre_val_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterd_mgmt_3_pre_val_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
@@ -403,9 +421,10 @@ glusterd_mgmt_3_pre_val_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterd_mgmt_3_commit_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterd_mgmt_3_commit_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
@@ -417,9 +436,10 @@ glusterd_mgmt_3_commit_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterd_mgmt_3_post_val_call(tvbuff_t *tvb, int offset,
+glusterd_mgmt_3_post_val_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_gd_mgmt_dissect_uuid(tvb, tree, hf_glusterd_uuid,
offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
@@ -433,9 +453,10 @@ glusterd_mgmt_3_post_val_call(tvbuff_t *tvb, int offset,
/* Brick management common function */
static int
-glusterd_brick_2_common_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterd_brick_2_common_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_string(tvb, tree, hf_glusterd_op_errstr, offset,
NULL);
@@ -445,9 +466,10 @@ glusterd_brick_2_common_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterd_brick_2_common_call(tvbuff_t *tvb, int offset,
+glusterd_brick_2_common_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_string(tvb, tree, hf_glusterd_name, offset,
NULL);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterd_op, offset);
diff --git a/epan/dissectors/packet-glusterfs.c b/epan/dissectors/packet-glusterfs.c
index a064b03910..e072143d06 100644
--- a/epan/dissectors/packet-glusterfs.c
+++ b/epan/dissectors/packet-glusterfs.c
@@ -604,6 +604,13 @@ gluster_dissect_common_reply(tvbuff_t *tvb, int offset,
}
static int
+gluster_local_dissect_common_reply(tvbuff_t *tvb,
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ return gluster_dissect_common_reply(tvb, 0, pinfo, tree, data);
+}
+
+static int
_glusterfs_gfs3_common_readdir_reply(tvbuff_t *tvb, proto_tree *tree, int offset)
{
proto_item *errno_item;
@@ -628,9 +635,11 @@ _glusterfs_gfs3_common_readdir_reply(tvbuff_t *tvb, proto_tree *tree, int offset
}
static int
-glusterfs_gfs3_op_unlink_reply(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_op_unlink_reply(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb,
hf_glusterfs_preparent_iatt, offset);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb,
@@ -640,9 +649,11 @@ glusterfs_gfs3_op_unlink_reply(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_op_unlink_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_op_unlink_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_pargfid, offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_path, offset, NULL);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_bname, offset, NULL);
@@ -650,18 +661,22 @@ glusterfs_gfs3_op_unlink_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_op_statfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_op_statfs_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_statfs(tree, tvb, offset);
return offset;
}
static int
-glusterfs_gfs3_op_statfs_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_op_statfs_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_path, offset, NULL);
@@ -669,18 +684,22 @@ glusterfs_gfs3_op_statfs_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_op_flush_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_op_flush_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
return offset;
}
static int
-glusterfs_gfs3_op_setxattr_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_op_setxattr_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -690,18 +709,22 @@ glusterfs_gfs3_op_setxattr_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_op_opendir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_op_opendir_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
return offset;
}
static int
-glusterfs_gfs3_op_opendir_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_op_opendir_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_path, offset, NULL);
@@ -710,9 +733,11 @@ glusterfs_gfs3_op_opendir_call(tvbuff_t *tvb, int offset,
/* rpc/xdr/src/glusterfs3-xdr.c:xdr_gfs3_create_rsp */
static int
-glusterfs_gfs3_op_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_op_create_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb, hf_glusterfs_iatt,
offset);
@@ -727,9 +752,10 @@ glusterfs_gfs3_op_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* rpc/xdr/src/glusterfs3-xdr.c:xdr_gfs3_create_req */
static int
-glusterfs_gfs3_op_create_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_op_create_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_pargfid, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
offset = glusterfs_rpc_dissect_mode(tree, tvb, hf_glusterfs_mode, offset);
@@ -741,9 +767,10 @@ glusterfs_gfs3_op_create_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_op_lookup_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_op_lookup_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb, hf_glusterfs_iatt,
offset);
@@ -755,9 +782,10 @@ glusterfs_gfs3_op_lookup_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterfs_gfs3_op_lookup_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_op_lookup_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_pargfid, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
@@ -769,12 +797,13 @@ glusterfs_gfs3_op_lookup_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_op_inodelk_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_op_inodelk_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
proto_item *flock_item;
proto_tree *flock_tree;
int start_offset;
+ int offset = 0;
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_cmd, offset);
@@ -845,9 +874,10 @@ glusterfs_gfs3_3_op_readdirp_entry(tvbuff_t *tvb, int offset,
/* details in xlators/storage/posix/src/posix.c:posix_fill_readdir() */
static int
-glusterfs_gfs3_op_readdirp_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_op_readdirp_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = _glusterfs_gfs3_common_readdir_reply(tvb, tree, offset);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
glusterfs_gfs3_op_readdirp_entry, NULL);
@@ -856,9 +886,10 @@ glusterfs_gfs3_op_readdirp_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterfs_gfs3_op_readdirp_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_op_readdirp_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_offset, offset);
@@ -868,9 +899,11 @@ glusterfs_gfs3_op_readdirp_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_op_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_op_setattr_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb,
hf_glusterfs_preop_iatt, offset);
@@ -904,8 +937,10 @@ glusterfs_rpc_dissect_setattr(proto_tree *tree, tvbuff_t *tvb, int offset)
}
static int
-glusterfs_gfs3_op_setattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+glusterfs_gfs3_op_setattr_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid,
offset);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb, hf_glusterfs_iatt,
@@ -919,9 +954,11 @@ glusterfs_gfs3_op_setattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_
/*GlusterFS 3_3 fops */
static int
-glusterfs_gfs3_3_op_stat_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_stat_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
return offset;
@@ -929,9 +966,11 @@ glusterfs_gfs3_3_op_stat_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_stat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_3_op_stat_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb, hf_glusterfs_iatt,
offset);
@@ -943,9 +982,11 @@ glusterfs_gfs3_3_op_stat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* glusterfs_gfs3_3_op_mknod_reply() is also used as a ..mkdir_reply() */
static int
-glusterfs_gfs3_3_op_mknod_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_3_op_mknod_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb, hf_glusterfs_iatt,
offset);
@@ -960,9 +1001,11 @@ glusterfs_gfs3_3_op_mknod_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterfs_gfs3_3_op_mknod_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_mknod_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_pargfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_offset, offset);
offset = glusterfs_rpc_dissect_mode(tree, tvb, hf_glusterfs_mode, offset);
@@ -974,10 +1017,12 @@ glusterfs_gfs3_3_op_mknod_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_mkdir_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_mkdir_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
const char *name = NULL;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_pargfid, offset);
offset = glusterfs_rpc_dissect_mode(tree, tvb, hf_glusterfs_mode, offset);
offset = glusterfs_rpc_dissect_mode(tree, tvb, hf_glusterfs_umask, offset);
@@ -989,9 +1034,10 @@ glusterfs_gfs3_3_op_mkdir_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_readlink_reply(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_readlink_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb, hf_glusterfs_iatt,
offset);
@@ -1003,9 +1049,10 @@ glusterfs_gfs3_3_op_readlink_reply(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_readlink_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_readlink_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_size, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1015,9 +1062,11 @@ glusterfs_gfs3_3_op_readlink_call(tvbuff_t *tvb, int offset,
/* glusterfs_gfs3_3_op_unlink_reply() is also used for ...rmdir_reply() */
static int
-glusterfs_gfs3_3_op_unlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_3_op_unlink_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb,
hf_glusterfs_preparent_iatt, offset);
@@ -1029,10 +1078,11 @@ glusterfs_gfs3_3_op_unlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterfs_gfs3_3_op_unlink_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_unlink_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint xflags;
+ int offset = 0;
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_pargfid, offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_bname, offset, NULL);
@@ -1045,10 +1095,11 @@ glusterfs_gfs3_3_op_unlink_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_rmdir_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_rmdir_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint xflags;
+ int offset = 0;
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_pargfid, offset);
xflags = tvb_get_ntohl(tvb, offset);
@@ -1061,9 +1112,11 @@ glusterfs_gfs3_3_op_rmdir_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_symlink_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_symlink_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_pargfid, offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_bname, offset, NULL);
offset = glusterfs_rpc_dissect_mode(tree, tvb, hf_glusterfs_umask, offset);
@@ -1075,9 +1128,11 @@ glusterfs_gfs3_3_op_symlink_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_rename_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_rename_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_oldgfid, offset);
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_newgfid, offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_oldbname, offset, NULL);
@@ -1088,12 +1143,13 @@ glusterfs_gfs3_3_op_rename_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_3_op_rename_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
proto_tree *old_tree, *new_tree;
proto_item *old_item, *new_item;
int start_offset;
+ int offset = 0;
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb, hf_glusterfs_iatt,
@@ -1122,9 +1178,11 @@ glusterfs_gfs3_3_op_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterfs_gfs3_3_op_link_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_link_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_oldgfid, offset);
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_newgfid, offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_newbname, offset, NULL);
@@ -1134,9 +1192,11 @@ glusterfs_gfs3_3_op_link_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_truncate_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_truncate_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_offset, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1145,9 +1205,11 @@ glusterfs_gfs3_3_op_truncate_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_open_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_3_op_open_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1155,9 +1217,10 @@ glusterfs_gfs3_3_op_open_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterfs_gfs3_3_op_open_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_open_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1166,9 +1229,11 @@ glusterfs_gfs3_3_op_open_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_3_op_read_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb, hf_glusterfs_iatt,
offset);
@@ -1180,9 +1245,11 @@ glusterfs_gfs3_3_op_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterfs_gfs3_3_op_read_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_read_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_offset, offset);
@@ -1194,9 +1261,11 @@ glusterfs_gfs3_3_op_read_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_write_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_write_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_offset, offset);
@@ -1208,9 +1277,11 @@ glusterfs_gfs3_3_op_write_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_statfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_3_op_statfs_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_statfs(tree, tvb, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1219,9 +1290,11 @@ glusterfs_gfs3_3_op_statfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterfs_gfs3_3_op_statfs_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_statfs_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1229,9 +1302,11 @@ glusterfs_gfs3_3_op_statfs_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_flush_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_flush_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1240,9 +1315,11 @@ glusterfs_gfs3_3_op_flush_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_setxattr_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_setxattr_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1252,9 +1329,11 @@ glusterfs_gfs3_3_op_setxattr_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_getxattr_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_getxattr_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_namelen, offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_name, offset, NULL);
@@ -1265,9 +1344,11 @@ glusterfs_gfs3_3_op_getxattr_call(tvbuff_t *tvb, int offset,
static int
-glusterfs_gfs3_3_op_getxattr_reply(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_getxattr_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1276,9 +1357,11 @@ glusterfs_gfs3_3_op_getxattr_reply(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_removexattr_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_removexattr_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_name, offset, NULL);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1287,7 +1370,7 @@ glusterfs_gfs3_3_op_removexattr_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_fsync_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_fsync_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
static const int *flag_bits[] = {
@@ -1295,12 +1378,12 @@ glusterfs_gfs3_3_op_fsync_call(tvbuff_t *tvb, int offset,
&hf_glusterfs_fsync_flag_unknown,
NULL
};
+ int offset = 0;
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
- if (tree)
- proto_tree_add_bitmask(tree, tvb, offset,
+ proto_tree_add_bitmask(tree, tvb, offset,
hf_glusterfs_fsync_flags,
ett_glusterfs_fsync_flags, flag_bits, ENC_NA);
offset += 4;
@@ -1311,9 +1394,11 @@ glusterfs_gfs3_3_op_fsync_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_opendir_reply(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_opendir_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1322,9 +1407,10 @@ glusterfs_gfs3_3_op_opendir_reply(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_opendir_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_opendir_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1332,9 +1418,11 @@ glusterfs_gfs3_3_op_opendir_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_3_op_create_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb, hf_glusterfs_iatt,
offset);
@@ -1350,10 +1438,12 @@ glusterfs_gfs3_3_op_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
-glusterfs_gfs3_3_op_create_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_create_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
const char *name = NULL;
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_pargfid, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
offset = glusterfs_rpc_dissect_mode(tree, tvb, hf_glusterfs_mode, offset);
@@ -1366,9 +1456,11 @@ glusterfs_gfs3_3_op_create_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_ftruncate_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_ftruncate_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_offset, offset);
@@ -1378,9 +1470,11 @@ glusterfs_gfs3_3_op_ftruncate_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_fstat_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_fstat_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1389,9 +1483,11 @@ glusterfs_gfs3_3_op_fstat_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_fstat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_3_op_fstat_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb, hf_glusterfs_iatt,
offset);
@@ -1402,9 +1498,11 @@ glusterfs_gfs3_3_op_fstat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterfs_gfs3_3_op_lk_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_lk_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_cmd, offset);
@@ -1416,9 +1514,11 @@ glusterfs_gfs3_3_op_lk_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_lk_reply(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_lk_reply(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_2_flock(tree, tvb, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1427,9 +1527,11 @@ glusterfs_gfs3_3_op_lk_reply(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_access_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_access_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_mask, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1437,11 +1539,13 @@ glusterfs_gfs3_3_op_access_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_lookup_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_lookup_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
const char *name = NULL;
int length;
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_pargfid, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
@@ -1457,9 +1561,11 @@ glusterfs_gfs3_3_op_lookup_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_readdir_reply(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_readdir_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = _glusterfs_gfs3_common_readdir_reply(tvb, tree, offset);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
glusterfs_gfs3_3_op_readdir_entry, NULL);
@@ -1469,9 +1575,11 @@ glusterfs_gfs3_3_op_readdir_reply(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_readdir_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_readdir_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_offset, offset);
@@ -1482,9 +1590,11 @@ glusterfs_gfs3_3_op_readdir_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_inodelk_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_inodelk_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_cmd, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_type, offset);
@@ -1496,9 +1606,11 @@ glusterfs_gfs3_3_op_inodelk_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_finodelk_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_finodelk_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
@@ -1513,9 +1625,11 @@ glusterfs_gfs3_3_op_finodelk_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_entrylk_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_entrylk_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_cmd, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_type, offset);
@@ -1528,9 +1642,11 @@ glusterfs_gfs3_3_op_entrylk_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_fentrylk_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_fentrylk_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_cmd, offset);
@@ -1544,9 +1660,11 @@ glusterfs_gfs3_3_op_fentrylk_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_xattrop_reply(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_xattrop_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1555,9 +1673,11 @@ glusterfs_gfs3_3_op_xattrop_reply(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_xattrop_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_xattrop_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1567,9 +1687,11 @@ glusterfs_gfs3_3_op_xattrop_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_fxattrop_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_fxattrop_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
@@ -1580,9 +1702,11 @@ glusterfs_gfs3_3_op_fxattrop_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_fgetxattr_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_fgetxattr_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_glusterfs_namelen, offset);
@@ -1593,9 +1717,11 @@ glusterfs_gfs3_3_op_fgetxattr_call(tvbuff_t *tvb, int offset,
}
static int
-gluter_gfs3_3_op_fsetxattr_call(tvbuff_t *tvb, int offset,
+gluter_gfs3_3_op_fsetxattr_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
@@ -1606,9 +1732,11 @@ gluter_gfs3_3_op_fsetxattr_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_3_op_setattr_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb,
hf_glusterfs_preop_iatt, offset);
@@ -1620,9 +1748,11 @@ glusterfs_gfs3_3_op_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-glusterfs_gfs3_3_op_setattr_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_setattr_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid,
offset);
offset = glusterfs_rpc_dissect_gf_iatt(tree, tvb, hf_glusterfs_iatt,
@@ -1634,9 +1764,11 @@ glusterfs_gfs3_3_op_setattr_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_readdirp_reply(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_readdirp_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = _glusterfs_gfs3_common_readdir_reply(tvb, tree, offset);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
glusterfs_gfs3_3_op_readdirp_entry, NULL);
@@ -1647,9 +1779,11 @@ glusterfs_gfs3_3_op_readdirp_reply(tvbuff_t *tvb, int offset,
/* READDIRP and DISCARD both use this */
static int
-glusterfs_gfs3_3_op_readdirp_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_readdirp_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_offset, offset);
@@ -1660,9 +1794,11 @@ glusterfs_gfs3_3_op_readdirp_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_release_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_release_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1671,9 +1807,11 @@ glusterfs_gfs3_3_op_release_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_releasedir_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_releasedir_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1682,9 +1820,11 @@ glusterfs_gfs3_3_op_releasedir_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_fremovexattr_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_fremovexattr_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_name, offset, NULL);
@@ -1694,9 +1834,11 @@ glusterfs_gfs3_3_op_fremovexattr_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_fallocate_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_fallocate_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
@@ -1708,9 +1850,11 @@ glusterfs_gfs3_3_op_fallocate_call(tvbuff_t *tvb, int offset,
}
static int
-glusterfs_gfs3_3_op_zerofill_call(tvbuff_t *tvb, int offset,
+glusterfs_gfs3_3_op_zerofill_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_fd, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_glusterfs_offset, offset);
@@ -1722,9 +1866,11 @@ glusterfs_gfs3_3_op_zerofill_call(tvbuff_t *tvb, int offset,
/* This function is for common replay. RELEASE , RELEASEDIR and some other function use this method */
int
-glusterfs_gfs3_3_op_common_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+glusterfs_gfs3_3_op_common_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
@@ -1760,12 +1906,12 @@ static const vsff glusterfs3_1_fop_proc[] = {
},
{
GFS3_OP_FLUSH, "FLUSH",
- glusterfs_gfs3_op_flush_call, gluster_dissect_common_reply
+ glusterfs_gfs3_op_flush_call, gluster_local_dissect_common_reply
},
{ GFS3_OP_FSYNC, "FSYNC", NULL, NULL },
{
GFS3_OP_SETXATTR, "SETXATTR",
- glusterfs_gfs3_op_setxattr_call, gluster_dissect_common_reply
+ glusterfs_gfs3_op_setxattr_call, gluster_local_dissect_common_reply
},
{ GFS3_OP_GETXATTR, "GETXATTR", NULL, NULL },
{ GFS3_OP_REMOVEXATTR, "REMOVEXATTR", NULL, NULL },
@@ -1789,7 +1935,7 @@ static const vsff glusterfs3_1_fop_proc[] = {
{ GFS3_OP_READDIR, "READDIR", NULL, NULL },
{
GFS3_OP_INODELK, "INODELK",
- glusterfs_gfs3_op_inodelk_call, gluster_dissect_common_reply
+ glusterfs_gfs3_op_inodelk_call, gluster_local_dissect_common_reply
},
{ GFS3_OP_FINODELK, "FINODELK", NULL, NULL },
{ GFS3_OP_ENTRYLK, "ENTRYLK", NULL, NULL },
diff --git a/epan/dissectors/packet-glusterfs_hndsk.c b/epan/dissectors/packet-glusterfs_hndsk.c
index cf9635812c..bc6f407afa 100644
--- a/epan/dissectors/packet-glusterfs_hndsk.c
+++ b/epan/dissectors/packet-glusterfs_hndsk.c
@@ -64,9 +64,10 @@ static gint ett_gluster_hndsk = -1;
/* procedures for GLUSTER_HNDSK_PROGRAM */
static int
-gluster_hndsk_setvolume_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_hndsk_setvolume_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_gluster_hndsk_dict,
offset);
@@ -74,18 +75,17 @@ gluster_hndsk_setvolume_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_hndsk_setvolume_call(tvbuff_t *tvb, int offset,
+gluster_hndsk_setvolume_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = gluster_rpc_dissect_dict(tree, tvb, hf_gluster_hndsk_dict,
- offset);
- return offset;
+ return gluster_rpc_dissect_dict(tree, tvb, hf_gluster_hndsk_dict, 0);
}
static int
-gluster_hndsk_2_setvolume_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_hndsk_2_setvolume_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_gluster_hndsk_dict,
offset);
@@ -93,18 +93,17 @@ gluster_hndsk_2_setvolume_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_hndsk_2_setvolume_call(tvbuff_t *tvb, int offset,
+gluster_hndsk_2_setvolume_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = gluster_rpc_dissect_dict(tree, tvb, hf_gluster_hndsk_dict,
- offset);
- return offset;
+ return gluster_rpc_dissect_dict(tree, tvb, hf_gluster_hndsk_dict, 0);
}
static int
-gluster_hndsk_2_getspec_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_hndsk_2_getspec_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_string(tvb, tree, hf_gluster_hndsk_spec, offset,
NULL);
@@ -114,11 +113,12 @@ gluster_hndsk_2_getspec_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-gluster_hndsk_2_getspec_call(tvbuff_t *tvb, int offset,
+gluster_hndsk_2_getspec_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- if (tree)
- proto_tree_add_item(tree, hf_gluster_hndsk_flags, tvb, offset,
+ int offset = 0;
+
+ proto_tree_add_item(tree, hf_gluster_hndsk_flags, tvb, offset,
4, ENC_BIG_ENDIAN);
offset += 4;
offset = dissect_rpc_string(tvb, tree, hf_gluster_hndsk_key, offset,
@@ -129,18 +129,21 @@ gluster_hndsk_2_getspec_call(tvbuff_t *tvb, int offset,
}
static int
-gluster_hndsk_2_set_lk_ver_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+gluster_hndsk_2_set_lk_ver_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = dissect_rpc_uint32(tvb, tree,hf_gluster_hndsk_lk_ver, offset);
return offset;
}
static int
-gluster_hndsk_2_set_lk_ver_call(tvbuff_t *tvb, int offset,
+gluster_hndsk_2_set_lk_ver_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_string(tvb, tree, hf_gluster_hndsk_uid, offset,
NULL);
offset = dissect_rpc_uint32(tvb, tree,hf_gluster_hndsk_lk_ver, offset);
@@ -148,9 +151,11 @@ gluster_hndsk_2_set_lk_ver_call(tvbuff_t *tvb, int offset,
}
static int
-gluster_hndsk_2_event_notify_call(tvbuff_t *tvb, int offset,
+gluster_hndsk_2_event_notify_call(tvbuff_t *tvb,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_hndsk_event_op,
offset);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_gluster_hndsk_dict,
@@ -161,15 +166,23 @@ gluster_hndsk_2_event_notify_call(tvbuff_t *tvb, int offset,
/* In rpc/xdr/src/glusterfs3-xdr.c. xdr_gf_event_notify_rsp */
static int
-gluster_hndsk_2_event_notify_reply(tvbuff_t *tvb, int offset,
+gluster_hndsk_2_event_notify_reply(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree, data);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_gluster_hndsk_dict,
offset);
return offset;
}
+static int
+gluster_hndsk_dissect_common_reply(tvbuff_t *tvb,
+ packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ return gluster_dissect_common_reply(tvb, 0, pinfo, tree, data);
+}
+
static const vsff gluster_hndsk_proc[] = {
{ GF_HNDSK_NULL, "NULL", NULL, NULL },
{
@@ -177,7 +190,7 @@ static const vsff gluster_hndsk_proc[] = {
gluster_hndsk_setvolume_call, gluster_hndsk_setvolume_reply
},
{ GF_HNDSK_GETSPEC, "GETSPEC", NULL, NULL },
- { GF_HNDSK_PING, "PING", NULL, gluster_dissect_common_reply },
+ { GF_HNDSK_PING, "PING", NULL, gluster_hndsk_dissect_common_reply },
{ 0, NULL, NULL, NULL }
};
diff --git a/epan/dissectors/packet-hclnfsd.c b/epan/dissectors/packet-hclnfsd.c
index 0986d09233..c4a249987d 100644
--- a/epan/dissectors/packet-hclnfsd.c
+++ b/epan/dissectors/packet-hclnfsd.c
@@ -137,8 +137,9 @@ dissect_hclnfsd_gids(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tr
}
static int
-dissect_hclnfsd_spool_inquire_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data)
+dissect_hclnfsd_spool_inquire_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "spool filehandle", NULL, (rpc_call_info_value*)data);
@@ -148,8 +149,10 @@ dissect_hclnfsd_spool_inquire_call(tvbuff_t *tvb, int offset, packet_info *pinfo
static int
-dissect_hclnfsd_spool_file_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_spool_file_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_printername, offset, NULL);
offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_filename, offset, NULL);
@@ -190,7 +193,7 @@ hclnfsd_decode_obscure(const char *ident, int ident_len)
static int
-dissect_hclnfsd_authorize_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_authorize_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint32 request_type;
const char *ident = NULL;
@@ -201,6 +204,7 @@ dissect_hclnfsd_authorize_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_
int newoffset;
proto_item *ident_item = NULL;
proto_tree *ident_tree = NULL;
+ int offset = 0;
proto_tree_add_item(tree, hf_hclnfsd_server_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
@@ -244,9 +248,10 @@ dissect_hclnfsd_authorize_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_
static int
-dissect_hclnfsd_authorize_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_authorize_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint32 status;
+ int offset = 0;
status = tvb_get_ntohl(tvb, offset);
if (!tree)
@@ -268,43 +273,36 @@ dissect_hclnfsd_authorize_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U
}
static int
-dissect_hclnfsd_grp_name_to_numb_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_grp_name_to_numb_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_grpname, offset, NULL);
-
- return offset;
+ return dissect_rpc_string(tvb, tree, hf_hclnfsd_grpname, 0, NULL);
}
static int
-dissect_hclnfsd_grp_name_to_numb_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_grp_name_to_numb_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_gid, offset);
-
- return offset;
+ return dissect_rpc_uint32(tvb, tree, hf_hclnfsd_gid, 0);
}
static int
-dissect_hclnfsd_grp_to_number_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_grp_to_number_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
-
- offset = dissect_hclnfsd_gids(tvb, offset, pinfo, tree);
-
- return offset;
+ return dissect_hclnfsd_gids(tvb, 0, pinfo, tree);
}
static int
-dissect_hclnfsd_grp_to_number_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_grp_to_number_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- return dissect_rpc_string(tvb, tree, hf_hclnfsd_grpname, offset,
- NULL);
+ return dissect_rpc_string(tvb, tree, hf_hclnfsd_grpname, 0, NULL);
}
static int
-dissect_hclnfsd_return_host_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_return_host_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_tree_add_item(tree, hf_hclnfsd_host_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
@@ -313,20 +311,19 @@ dissect_hclnfsd_return_host_call(tvbuff_t *tvb, int offset, packet_info *pinfo _
static int
-dissect_hclnfsd_return_host_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_return_host_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_hostname, offset, NULL);
-
- return offset;
+ return dissect_rpc_string(tvb, tree, hf_hclnfsd_hostname, 0, NULL);
}
static int
-dissect_hclnfsd_uid_to_name_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_uid_to_name_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint32 nuids, nuids_i;
proto_tree *uidtree = NULL;
proto_item *uiditem = NULL;
+ int offset = 0;
nuids = tvb_get_ntohl(tvb, offset);
if (tree)
@@ -346,11 +343,12 @@ dissect_hclnfsd_uid_to_name_call(tvbuff_t *tvb, int offset, packet_info *pinfo _
static int
-dissect_hclnfsd_uid_to_name_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_uid_to_name_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint32 nusers, nusers_i;
proto_tree *usertree = NULL;
proto_item *useritem = NULL;
+ int offset = 0;
nusers = tvb_get_ntohl(tvb, offset);
if (tree)
@@ -374,32 +372,27 @@ dissect_hclnfsd_uid_to_name_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
static int
-dissect_hclnfsd_name_to_uid_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_name_to_uid_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_username, offset, NULL);
-
- return offset;
+ return dissect_rpc_string(tvb, tree, hf_hclnfsd_username, 0, NULL);
}
static int
-dissect_hclnfsd_name_to_uid_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_name_to_uid_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_uid, offset);
-
- return offset;
+ return dissect_rpc_uint32(tvb, tree, hf_hclnfsd_uid, 0);
}
static int
-dissect_hclnfsd_share_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data)
+dissect_hclnfsd_share_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
guint32 request_type;
+ int offset = 0;
- request_type = tvb_get_ntohl(tvb, offset);
- if (tree)
- proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
- 4, request_type);
+ proto_tree_add_item_ret_uint(tree, hf_hclnfsd_request_type, tvb, offset,
+ 4, ENC_BIG_ENDIAN, &request_type);
offset += 4;
offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
@@ -421,9 +414,10 @@ dissect_hclnfsd_share_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_
static int
-dissect_hclnfsd_share_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_share_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint32 request_type;
+ int offset = 0;
request_type = tvb_get_ntohl(tvb, offset);
if (tree)
@@ -440,22 +434,24 @@ dissect_hclnfsd_share_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, p
static int
-dissect_hclnfsd_unshare_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_unshare_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- return dissect_hclnfsd_share_call(tvb, offset, pinfo, tree, data);
+ return dissect_hclnfsd_share_call(tvb, pinfo, tree, data);
}
static int
-dissect_hclnfsd_unshare_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_unshare_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- return dissect_hclnfsd_share_reply(tvb, offset, pinfo, tree, data);
+ return dissect_hclnfsd_share_reply(tvb, pinfo, tree, data);
}
static int
-dissect_hclnfsd_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data)
+dissect_hclnfsd_lock_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
+ int offset = 0;
+
offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_status, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
offset += 4; /* skip unused uint */
@@ -479,14 +475,13 @@ dissect_hclnfsd_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t
static int
-dissect_hclnfsd_lock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_lock_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint request_type;
+ guint32 request_type;
+ int offset = 0;
- request_type = tvb_get_ntohl(tvb, offset);
- if (tree)
- proto_tree_add_uint(tree, hf_hclnfsd_request_type, tvb, offset,
- 4, request_type);
+ proto_tree_add_item_ret_uint(tree, hf_hclnfsd_request_type, tvb, offset,
+ 4, ENC_BIG_ENDIAN, &request_type);
offset += 4;
offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
@@ -497,8 +492,9 @@ dissect_hclnfsd_lock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, pr
static int
-dissect_hclnfsd_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_remove_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_lockname, offset, NULL);
offset += 4; /* skip unused */
@@ -508,8 +504,9 @@ dissect_hclnfsd_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, p
static int
-dissect_hclnfsd_unlock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data)
+dissect_hclnfsd_unlock_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
+ int offset = 0;
offset += 4; /* skip unused */
offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_cookie, offset);
@@ -530,27 +527,25 @@ dissect_hclnfsd_unlock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto
static int
-dissect_hclnfsd_unlock_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_unlock_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- return dissect_hclnfsd_lock_reply(tvb, offset, pinfo, tree, data);
+ return dissect_hclnfsd_lock_reply(tvb, pinfo, tree, data);
}
static int
-dissect_hclnfsd_get_printers_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_get_printers_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint nqueues, nqueues_i;
proto_item *queuesitem = NULL;
proto_tree *queuestree = NULL;
+ int offset = 0;
nqueues = tvb_get_ntohl(tvb, offset);
if (tree)
{
queuesitem = proto_tree_add_item(tree, hf_hclnfsd_print_queues, tvb, offset, 4, ENC_BIG_ENDIAN);
-
- if (queuesitem)
- queuestree = proto_item_add_subtree(queuesitem,
- ett_hclnfsd_printqueues);
+ queuestree = proto_item_add_subtree(queuesitem, ett_hclnfsd_printqueues);
}
offset += 4;
@@ -573,8 +568,10 @@ dissect_hclnfsd_get_printers_reply(tvbuff_t *tvb, int offset, packet_info *pinfo
static int
-dissect_hclnfsd_get_printq_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_get_printq_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_queuename, offset, NULL);
offset = dissect_rpc_string(tvb, tree, hf_hclnfsd_username, offset, NULL);
@@ -584,13 +581,14 @@ dissect_hclnfsd_get_printq_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U
static int
-dissect_hclnfsd_get_printq_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_hclnfsd_get_printq_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint datafollows;
proto_item *queueitem = NULL;
proto_tree *queuetree = NULL;
proto_item *jobitem;
proto_tree *jobtree;
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_hclnfsd_printqueuenumber, offset);
diff --git a/epan/dissectors/packet-klm.c b/epan/dissectors/packet-klm.c
index 30a861dc5e..5538cd67dd 100644
--- a/epan/dissectors/packet-klm.c
+++ b/epan/dissectors/packet-klm.c
@@ -112,26 +112,21 @@ dissect_lock(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, rp
}
static int
-dissect_klm_unlock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data)
+dissect_klm_unlock_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
- offset = dissect_lock(tvb, pinfo, tree, offset, (rpc_call_info_value*)data);
-
- return offset;
+ return dissect_lock(tvb, pinfo, tree, 0, (rpc_call_info_value*)data);
}
static int
-dissect_klm_stat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_klm_stat_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
-
- offset = dissect_rpc_uint32(tvb, tree,
- hf_klm_stats, offset);
-
- return offset;
+ return dissect_rpc_uint32(tvb, tree, hf_klm_stats, 0);
}
static int
-dissect_klm_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data)
+dissect_klm_lock_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
+ int offset = 0;
offset = dissect_rpc_bool( tvb, tree,
hf_klm_block, offset);
@@ -144,9 +139,10 @@ dissect_klm_lock_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
}
static int
-dissect_klm_test_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_klm_test_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
gint32 stats;
+ int offset = 0;
stats = tvb_get_ntohl(tvb, offset);
@@ -161,8 +157,9 @@ dissect_klm_test_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_
}
static int
-dissect_klm_test_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data)
+dissect_klm_test_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
+ int offset = 0;
offset = dissect_rpc_bool( tvb, tree,
hf_klm_exclusive, offset);
diff --git a/epan/dissectors/packet-mount.c b/epan/dissectors/packet-mount.c
index cd7caf8912..cb3dec6e29 100644
--- a/epan/dissectors/packet-mount.c
+++ b/epan/dissectors/packet-mount.c
@@ -152,10 +152,11 @@ dissect_fhstatus(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
static int
-dissect_mount_dirpath_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_mount_dirpath_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
const char *mountpoint=NULL;
+ int offset = 0;
if((!pinfo->fd->flags.visited) && nfs_file_name_snooping){
rpc_call_info_value *civ=(rpc_call_info_value *)data;
@@ -193,11 +194,9 @@ dissect_mount_dirpath_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* RFC 1094, Page 25,26 */
static int
-dissect_mount1_mnt_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data)
+dissect_mount1_mnt_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
- offset = dissect_fhstatus(tvb,offset,pinfo,tree,(rpc_call_info_value*)data);
-
- return offset;
+ return dissect_fhstatus(tvb,0,pinfo,tree,(rpc_call_info_value*)data);
}
@@ -237,12 +236,10 @@ dissect_mountlist(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
/* RFC 1094, Page 26 */
/* RFC 1813, Page 110 */
static int
-dissect_mount_dump_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_mount_dump_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_list(tvb, pinfo, tree, offset,
+ return dissect_rpc_list(tvb, pinfo, tree, 0,
dissect_mountlist, NULL);
-
- return offset;
}
@@ -329,12 +326,10 @@ dissect_exportlist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
/* RFC 1094, Page 26 */
/* RFC 1813, Page 113 */
static int
-dissect_mount_export_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_mount_export_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_list(tvb, pinfo, tree, offset,
+ return dissect_rpc_list(tvb, pinfo, tree, 0,
dissect_exportlist, NULL);
-
- return offset;
}
@@ -403,7 +398,7 @@ static const true_false_string tos_error_vdisable = {
static int
-dissect_mount_pathconf_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_mount_pathconf_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint32 pc_mask;
static const int * flags[] = {
@@ -419,6 +414,7 @@ dissect_mount_pathconf_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
&hf_mount_pathconf_error_vdisable,
NULL
};
+ int offset = 0;
/*
* Extract the mask first, so we know which other fields the
@@ -502,12 +498,13 @@ dissect_mountstat3(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, int offs
/* RFC 1831, Page 109 */
static int
-dissect_mount3_mnt_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data)
+dissect_mount3_mnt_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
guint32 status;
guint32 auth_flavors;
guint32 auth_flavor;
guint32 auth_flavor_i;
+ int offset = 0;
offset = dissect_mountstat3(pinfo,tvb,tree,offset,hf_mount3_status,&status);
@@ -572,12 +569,10 @@ 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_)
+dissect_mount_exportlist_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_list(tvb, pinfo, tree, offset,
+ return dissect_rpc_list(tvb, pinfo, tree, 0,
dissect_sgi_exportlist, NULL);
-
- return offset;
}
#define ST_RDONLY 0x00000001
@@ -618,7 +613,7 @@ static const true_false_string tos_st_local = {
};
static int
-dissect_mount_statvfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_mount_statvfs_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
static const int * flags[] = {
&hf_mount_statvfs_flag_rdonly,
@@ -629,6 +624,7 @@ dissect_mount_statvfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, p
&hf_mount_statvfs_flag_local,
NULL
};
+ int offset = 0;
dissect_rpc_uint32(tvb, tree, hf_mount_statvfs_bsize, offset);
offset += 4;
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index 2abc63d557..1e7ef7cd95 100644
--- a/epan/dissectors/packet-nfs.c
+++ b/epan/dissectors/packet-nfs.c
@@ -2331,10 +2331,11 @@ dissect_nfs2_status(tvbuff_t *tvb, int offset, proto_tree *tree, guint32 *status
/* NFSv2 RFC 1094, Page 12..14 */
static int
-dissect_nfs2_rmdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_nfs2_rmdir_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
@@ -2352,10 +2353,11 @@ dissect_nfs2_rmdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, prot
static int
-dissect_nfs2_symlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_nfs2_symlink_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
@@ -2373,10 +2375,11 @@ dissect_nfs2_symlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, pr
static int
-dissect_nfs2_link_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_nfs2_link_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
@@ -2394,10 +2397,11 @@ dissect_nfs2_link_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto
static int
-dissect_nfs2_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_nfs2_rename_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
@@ -2415,10 +2419,11 @@ dissect_nfs2_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, pro
static int
-dissect_nfs2_remove_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_nfs2_remove_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
@@ -2501,9 +2506,10 @@ dissect_fhandle(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
/* NFSv2 RFC 1094, Page 15 */
static int
-dissect_nfs2_statfs_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void *data)
+dissect_nfs2_statfs_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash;
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "object", &hash, (rpc_call_info_value*)data);
@@ -2515,9 +2521,10 @@ dissect_nfs2_statfs_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
static int
-dissect_nfs2_readlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void *data)
+dissect_nfs2_readlink_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash;
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "object", &hash, (rpc_call_info_value*)data);
@@ -2529,9 +2536,10 @@ dissect_nfs2_readlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_
static int
-dissect_nfs2_getattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void *data)
+dissect_nfs2_getattr_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash;
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "object", &hash, (rpc_call_info_value*)data);
@@ -2770,31 +2778,25 @@ dissect_attrstat(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo
/* NFSv2 RFC 1094, Page 17,18 */
static int
-dissect_nfs2_write_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_nfs2_write_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
- offset = dissect_attrstat(tvb, offset, tree, pinfo, "WRITE");
-
- return offset;
+ return dissect_attrstat(tvb, 0, tree, pinfo, "WRITE");
}
/* NFSv2 RFC 1094, Page 18 */
static int
-dissect_nfs2_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_nfs2_setattr_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
- offset = dissect_attrstat(tvb, offset, tree, pinfo, "SETATTR");
-
- return offset;
+ return dissect_attrstat(tvb, 0, tree, pinfo, "SETATTR");
}
/* NFSv2 RFC 1094, Page 18 */
static int
-dissect_nfs2_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_nfs2_getattr_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
- offset = dissect_attrstat(tvb, offset, tree, pinfo, "GETATTR");
-
- return offset;
+ return dissect_attrstat(tvb, 0, tree, pinfo, "GETATTR");
}
@@ -2837,10 +2839,11 @@ dissect_diropargs(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
/* NFSv2 RFC 1094, Page 18 */
static int
-dissect_nfs2_rmdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void *data)
+dissect_nfs2_rmdir_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash;
const char *name = NULL;
+ int offset = 0;
offset = dissect_diropargs(tvb, offset, pinfo, tree, "where", &hash, &name, (rpc_call_info_value*)data);
@@ -2853,10 +2856,11 @@ dissect_nfs2_rmdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tre
/* NFSv2 RFC 1094, Page 18 */
static int
-dissect_nfs2_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void *data)
+dissect_nfs2_remove_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash;
const char *name = NULL;
+ int offset = 0;
offset = dissect_diropargs(tvb, offset, pinfo, tree, "where", &hash, &name, (rpc_call_info_value*)data);
@@ -2869,10 +2873,11 @@ dissect_nfs2_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
/* NFSv2 RFC 1094, Page 18 */
static int
-dissect_nfs2_lookup_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void *data)
+dissect_nfs2_lookup_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash;
const char *name = NULL;
+ int offset = 0;
offset = dissect_diropargs(tvb, offset, pinfo, tree, "where", &hash, &name, (rpc_call_info_value*)data);
@@ -2922,38 +2927,36 @@ dissect_nfsdata(tvbuff_t *tvb, int offset, proto_tree *tree, int hf)
/* NFSv2 RFC 1094, Page 18 */
static int
-dissect_nfs2_mkdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_mkdir_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
- offset = dissect_diropres(tvb, offset, pinfo, tree, "MKDIR", (rpc_call_info_value*)data);
- return offset;
+ return dissect_diropres(tvb, 0, pinfo, tree, "MKDIR", (rpc_call_info_value*)data);
}
static int
-dissect_nfs2_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_create_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data _U_)
{
- offset = dissect_diropres(tvb, offset, pinfo, tree, "CREATE", (rpc_call_info_value*)data);
- return offset;
+ return dissect_diropres(tvb, 0, pinfo, tree, "CREATE", (rpc_call_info_value*)data);
}
static int
-dissect_nfs2_lookup_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_lookup_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data _U_)
{
- offset = dissect_diropres(tvb, offset, pinfo, tree, "LOOKUP", (rpc_call_info_value*)data);
- return offset;
+ return dissect_diropres(tvb, 0, pinfo, tree, "LOOKUP", (rpc_call_info_value*)data);
}
/* RFC 1094, Page 6 */
static int
-dissect_nfs2_setattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_setattr_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 hash;
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "file", &hash, (rpc_call_info_value*)data);
offset = dissect_nfs2_sattr (tvb, offset, tree, "attributes");
@@ -2966,12 +2969,13 @@ dissect_nfs2_setattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv2 RFC 1094, Page 6 */
static int
-dissect_nfs2_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs2_readlink_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
const char *name = NULL;
+ int offset = 0;
offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
@@ -2993,13 +2997,14 @@ dissect_nfs2_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv2 RFC 1094, Page 7 */
static int
-dissect_nfs2_read_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_read_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 offset_value;
guint32 count;
guint32 totalcount;
guint32 hash;
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "file", &hash, (rpc_call_info_value*)data);
proto_tree_add_item_ret_uint(tree, hf_nfs2_read_offset, tvb,
@@ -3021,11 +3026,12 @@ dissect_nfs2_read_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv2 RFC 1094, Page 7 */
static int
-dissect_nfs2_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs2_read_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
@@ -3047,13 +3053,14 @@ dissect_nfs2_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv2 RFC 1094, Page 8 */
static int
-dissect_nfs2_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_write_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 beginoffset;
guint32 offset_value;
guint32 totalcount;
guint32 hash;
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "file", &hash, (rpc_call_info_value*)data);
@@ -3078,11 +3085,12 @@ dissect_nfs2_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv2 RFC 1094, Page 8 */
static int
-dissect_nfs2_mkdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_mkdir_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 hash;
const char *name = NULL;
+ int offset = 0;
offset = dissect_diropargs(tvb, offset, pinfo, tree, "where", &hash, &name, (rpc_call_info_value*)data);
offset = dissect_nfs2_sattr (tvb, offset, tree, "attributes");
@@ -3094,11 +3102,12 @@ dissect_nfs2_mkdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
static int
-dissect_nfs2_create_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_create_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 hash;
const char *name = NULL;
+ int offset = 0;
offset = dissect_diropargs(tvb, offset, pinfo, tree, "where", &hash, &name, (rpc_call_info_value*)data);
offset = dissect_nfs2_sattr (tvb, offset, tree, "attributes");
@@ -3112,13 +3121,14 @@ dissect_nfs2_create_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv2 RFC 1094, Page 9 */
static int
-dissect_nfs2_rename_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_rename_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 from_hash;
const char *from_name = NULL;
guint32 to_hash;
const char *to_name = NULL;
+ int offset = 0;
offset = dissect_diropargs(tvb, offset, pinfo, tree, "from", &from_hash, &from_name, (rpc_call_info_value*)data);
offset = dissect_diropargs(tvb, offset, pinfo, tree, "to", &to_hash, &to_name, (rpc_call_info_value*)data);
@@ -3134,12 +3144,13 @@ dissect_nfs2_rename_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv2 RFC 1094, Page 9 */
static int
-dissect_nfs2_link_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_link_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 from_hash;
guint32 to_hash;
const char *to_name = NULL;
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "from", &from_hash, (rpc_call_info_value*)data);
offset = dissect_diropargs(tvb, offset, pinfo, tree, "to", &to_hash, &to_name, (rpc_call_info_value*)data);
@@ -3155,12 +3166,13 @@ dissect_nfs2_link_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv2 RFC 1094, Page 10 */
static int
-dissect_nfs2_symlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_symlink_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 from_hash;
const char *from_name = NULL;
const char *to_name = NULL;
+ int offset = 0;
offset = dissect_diropargs(tvb, offset, pinfo, tree, "from", &from_hash, &from_name, (rpc_call_info_value*)data);
offset = dissect_path(tvb, offset, tree, hf_nfs_symlink_to, &to_name);
@@ -3177,10 +3189,11 @@ dissect_nfs2_symlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv2 RFC 1094, Page 11 */
static int
-dissect_nfs2_readdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_readdir_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 hash;
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "dir", &hash, (rpc_call_info_value*)data);
@@ -3235,12 +3248,13 @@ dissect_readdir_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv2 RFC 1094, Page 11 */
static int
-dissect_nfs2_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs2_readdir_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data _U_)
{
guint32 status;
guint32 eof_value;
const char *err;
+ int offset = 0;
offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
@@ -3249,10 +3263,8 @@ dissect_nfs2_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
dissect_readdir_entry, NULL);
- eof_value = tvb_get_ntohl(tvb, offset+0);
- if (tree)
- proto_tree_add_uint(tree, hf_nfs_readdir_eof, tvb,
- offset+ 0, 4, eof_value);
+ proto_tree_add_item_ret_uint(tree, hf_nfs_readdir_eof, tvb,
+ offset, 4, ENC_BIG_ENDIAN, &eof_value);
offset += 4;
break;
default:
@@ -3268,11 +3280,12 @@ dissect_nfs2_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv2 RFC 1094, Page 12 */
static int
-dissect_nfs2_statfs_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs2_statfs_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs2_status(tvb, offset, tree, &status);
switch (status) {
@@ -4218,11 +4231,12 @@ dissect_diropargs3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
static int
-dissect_nfs3_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_remove_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 hash = 0;
const char *name = NULL;
+ int offset = 0;
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "object", &hash, &name, (rpc_call_info_value*)data);
@@ -4234,31 +4248,32 @@ dissect_nfs3_remove_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
-dissect_nfs3_null_call(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_,
+dissect_nfs3_null_call(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
proto_tree *tree, void *data _U_)
{
proto_item_append_text(tree, ", NULL Call");
- return offset;
+ return 0;
}
static int
-dissect_nfs3_null_reply(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_,
+dissect_nfs3_null_reply(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
proto_tree *tree, void *data _U_)
{
proto_item_append_text(tree, ", NULL Reply");
- return offset;
+ return 0;
}
static int
-dissect_nfs3_rmdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_rmdir_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 hash = 0;
const char *name = NULL;
+ int offset = 0;
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "object", &hash, &name, (rpc_call_info_value*)data);
@@ -4271,10 +4286,11 @@ dissect_nfs3_rmdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 32,33 */
static int
-dissect_nfs3_getattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_getattr_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &hash, (rpc_call_info_value*)data);
@@ -4287,11 +4303,12 @@ dissect_nfs3_getattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 32,33 */
static int
-dissect_nfs3_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs3_getattr_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
proto_item_append_text(tree, ", GETATTR Reply");
@@ -4352,10 +4369,11 @@ dissect_sattrguard3(tvbuff_t *tvb, int offset, proto_tree *tree, const char *nam
/* NFSv3 RFC 1813, Page 33..36 */
static int
-dissect_nfs3_setattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_setattr_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_fh (tvb, offset, pinfo, tree, "object", &hash, (rpc_call_info_value*)data);
offset = dissect_nfs3_sattr (tvb, offset, tree, "new_attributes");
@@ -4370,11 +4388,12 @@ dissect_nfs3_setattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 33..36 */
static int
-dissect_nfs3_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs3_setattr_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -4397,11 +4416,12 @@ dissect_nfs3_setattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv3 RFC 1813, Page 37..39 */
static int
-dissect_nfs3_lookup_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_lookup_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 hash = 0;
const char *name = NULL;
+ int offset = 0;
offset = dissect_diropargs3 (tvb, offset, pinfo, tree, "what", &hash, &name, (rpc_call_info_value*)data);
@@ -4414,12 +4434,13 @@ dissect_nfs3_lookup_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 37..39 */
static int
-dissect_nfs3_lookup_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_lookup_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 status;
const char *err;
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -4641,8 +4662,9 @@ dissect_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
/* NFSv3 RFC 1813, Page 40..43 */
static int
-dissect_nfs3_access_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void *data)
+dissect_nfs3_access_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
+ int offset = 0;
guint32 fhhash = 0, *acc_request, amask;
rpc_call_info_value *civ = (rpc_call_info_value*)data;
@@ -4666,11 +4688,12 @@ dissect_nfs3_access_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
/* NFSv3 RFC 1813, Page 40..43 */
static int
-dissect_nfs3_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs3_access_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree,
@@ -4690,10 +4713,11 @@ dissect_nfs3_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv3 RFC 1813, Page 44,45 */
static int
-dissect_nfs3_readlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_readlink_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &hash, (rpc_call_info_value*)data);
@@ -4705,12 +4729,13 @@ dissect_nfs3_readlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
-dissect_nfs3_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs3_readlink_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
const char *name = NULL;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -4739,12 +4764,13 @@ dissect_nfs3_readlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv3 RFC 1813, Page 46..48 */
static int
-dissect_nfs3_read_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_read_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint64 off;
guint32 len;
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "file", &hash, (rpc_call_info_value*)data);
@@ -4766,12 +4792,13 @@ dissect_nfs3_read_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 46..48 */
static int
-dissect_nfs3_read_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs3_read_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void *data _U_)
{
guint32 status;
guint32 len;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -4825,13 +4852,13 @@ dissect_stable_how(tvbuff_t *tvb, int offset, proto_tree *tree, int hfindex)
/* NFSv3 RFC 1813, Page 49..54 */
static int
-dissect_nfs3_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_write_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint64 off;
guint32 len;
guint32 stable;
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "file", &hash, (rpc_call_info_value*)data);
@@ -4857,13 +4884,13 @@ dissect_nfs3_write_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 49..54 */
static int
-dissect_nfs3_write_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_)
+dissect_nfs3_write_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
guint32 len;
guint32 stable;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -4921,12 +4948,12 @@ dissect_createmode3(tvbuff_t *tvb, int offset, proto_tree *tree, guint32* mode)
/* NFSv3 RFC 1813, Page 54..58 */
static int
-dissect_nfs3_create_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_create_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 mode;
guint32 hash = 0;
const char *name = NULL;
+ int offset = 0;
offset = dissect_diropargs3 (tvb, offset, pinfo, tree, "where", &hash, &name, (rpc_call_info_value*)data);
offset = dissect_createmode3(tvb, offset, tree, &mode);
@@ -4951,11 +4978,11 @@ dissect_nfs3_create_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 54..58 */
static int
-dissect_nfs3_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_create_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -4981,11 +5008,11 @@ dissect_nfs3_create_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 58..60 */
static int
-dissect_nfs3_mkdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_mkdir_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash = 0;
const char *name = NULL;
+ int offset = 0;
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "where", &hash, &name, (rpc_call_info_value*)data);
offset = dissect_nfs3_sattr (tvb, offset, tree, "attributes");
@@ -4998,11 +5025,11 @@ dissect_nfs3_mkdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
-dissect_nfs3_mkdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_mkdir_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5028,12 +5055,12 @@ dissect_nfs3_mkdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 61..63 */
static int
-dissect_nfs3_symlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_symlink_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 from_hash = 0;
const char *from_name = NULL;
const char *to_name = NULL;
+ int offset = 0;
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "where", &from_hash, &from_name, (rpc_call_info_value*)data);
offset = dissect_nfs3_sattr (tvb, offset, tree, "symlink_attributes");
@@ -5049,11 +5076,11 @@ dissect_nfs3_symlink_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
-dissect_nfs3_symlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_symlink_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5079,13 +5106,13 @@ dissect_nfs3_symlink_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 63..66 */
static int
-dissect_nfs3_mknod_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_mknod_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 type;
guint32 hash = 0;
const char *name = NULL;
const char *type_str;
+ int offset = 0;
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "where", &hash, &name, (rpc_call_info_value*)data);
offset = dissect_ftype3(tvb, offset, tree, hf_nfs3_ftype, &type);
@@ -5113,11 +5140,11 @@ dissect_nfs3_mknod_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
-dissect_nfs3_mknod_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_mknod_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5143,11 +5170,11 @@ dissect_nfs3_mknod_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 67..69 */
static int
-dissect_nfs3_remove_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_)
+dissect_nfs3_remove_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5168,11 +5195,11 @@ dissect_nfs3_remove_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
static int
-dissect_nfs3_rmdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_)
+dissect_nfs3_rmdir_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5194,13 +5221,13 @@ dissect_nfs3_rmdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv3 RFC 1813, Page 71..74 */
static int
-dissect_nfs3_rename_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_rename_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 from_hash = 0;
const char *from_name = NULL;
guint32 to_hash = 0;
const char *to_name = NULL;
+ int offset = 0;
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "from", &from_hash, &from_name, (rpc_call_info_value*)data);
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "to", &to_hash, &to_name, (rpc_call_info_value*)data);
@@ -5216,11 +5243,12 @@ dissect_nfs3_rename_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 71..74 */
static int
-dissect_nfs3_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfs3_rename_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5245,12 +5273,12 @@ dissect_nfs3_rename_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv3 RFC 1813, Page 74..76 */
static int
-dissect_nfs3_link_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_link_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 from_hash = 0;
guint32 to_hash = 0;
const char *to_name = NULL;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "file", &from_hash, (rpc_call_info_value*)data);
offset = dissect_diropargs3(tvb, offset, pinfo, tree, "link", &to_hash, &to_name, (rpc_call_info_value*)data);
@@ -5266,11 +5294,11 @@ dissect_nfs3_link_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 74..76 */
static int
-dissect_nfs3_link_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_)
+dissect_nfs3_link_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5297,10 +5325,10 @@ dissect_nfs3_link_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv3 RFC 1813, Page 76..80 */
static int
-dissect_nfs3_readdir_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_readdir_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "dir", &hash, (rpc_call_info_value*)data);
offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_cookie, offset);
@@ -5350,12 +5378,13 @@ dissect_entry3(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv3 RFC 1813, Page 76..80 */
static int
-dissect_nfs3_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_readdir_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data _U_)
{
guint32 status;
guint32 eof_value;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5389,10 +5418,11 @@ dissect_nfs3_readdir_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 80..83 */
static int
-dissect_nfs3_readdirplus_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs3_readdirplus_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "dir", &hash, (rpc_call_info_value*)data);
offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_cookie, offset);
@@ -5466,12 +5496,12 @@ 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)
+dissect_nfs3_readdirplus_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 status;
guint32 eof_value;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5505,10 +5535,10 @@ dissect_nfs3_readdirplus_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 84..86 */
static int
-dissect_nfs3_fsstat_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_fsstat_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &hash, (rpc_call_info_value*)data);
@@ -5519,12 +5549,12 @@ dissect_nfs3_fsstat_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
-dissect_nfs3_fsstat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_)
+dissect_nfs3_fsstat_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
guint32 invarsec;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5576,10 +5606,10 @@ static const true_false_string tfs_nfs_pathconf =
/* NFSv3 RFC 1813, Page 86..90 */
static int
-dissect_nfs3_fsinfo_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_fsinfo_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &hash, (rpc_call_info_value*)data);
@@ -5590,8 +5620,7 @@ dissect_nfs3_fsinfo_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
-dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_)
+dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
static const int *properties[] = {
@@ -5601,6 +5630,7 @@ dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
&hf_nfs3_fsinfo_properties_hardlinks,
NULL
};
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5651,10 +5681,10 @@ dissect_nfs3_fsinfo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv3 RFC 1813, Page 90..92 */
static int
-dissect_nfs3_pathconf_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_pathconf_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "object", &hash, (rpc_call_info_value*)data);
@@ -5665,13 +5695,13 @@ dissect_nfs3_pathconf_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
-dissect_nfs3_pathconf_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_)
+dissect_nfs3_pathconf_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
guint32 linkmax;
guint32 name_max;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -5715,10 +5745,10 @@ dissect_nfs3_pathconf_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* NFSv3 RFC 1813, Page 92..95 */
static int
-dissect_nfs3_commit_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void *data)
+dissect_nfs3_commit_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
guint32 hash = 0;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "file", &hash, (rpc_call_info_value*)data);
offset = dissect_rpc_uint64(tvb, tree, hf_nfs3_offset, offset);
@@ -5733,11 +5763,11 @@ dissect_nfs3_commit_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* NFSv3 RFC 1813, Page 92..95 */
static int
-dissect_nfs3_commit_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, void *data _U_)
+dissect_nfs3_commit_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
guint32 status;
const char *err;
+ int offset = 0;
offset = dissect_nfs3_status(tvb, offset, tree, &status);
switch (status) {
@@ -9227,9 +9257,10 @@ dissect_nfs4_request_op(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tre
static int
-dissect_nfs4_compound_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void *data)
+dissect_nfs4_compound_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
const char *tag = NULL;
+ int offset = 0;
offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_tag, &tag);
/*
@@ -9253,9 +9284,8 @@ dissect_nfs4_secinfo_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_item *fitem;
proto_tree *secftree;
- flavor = tvb_get_ntohl(tvb, offset);
- fitem = proto_tree_add_uint(tree, hf_nfs4_secinfo_flavor, tvb, offset, 4,
- flavor);
+ fitem = proto_tree_add_item_ret_uint(tree, hf_nfs4_secinfo_flavor, tvb, offset, 4,
+ ENC_BIG_ENDIAN, &flavor);
offset += 4;
switch (flavor)
@@ -9645,11 +9675,12 @@ dissect_nfs4_response_op(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
static int
-dissect_nfs4_compound_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs4_compound_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data)
{
guint32 status;
const char *tag = NULL;
+ int offset = 0;
offset = dissect_nfs4_status(tvb, offset, tree, &status);
offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_tag, &tag);
@@ -10131,9 +10162,10 @@ dissect_nfs4_cb_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tre
static int
-dissect_nfs4_cb_compound_call(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void *data)
+dissect_nfs4_cb_compound_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
const char *tag = NULL;
+ int offset = 0;
offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_tag, &tag);
@@ -10227,11 +10259,12 @@ dissect_nfs4_cb_resp_op(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tre
static int
-dissect_nfs4_cb_compound_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nfs4_cb_compound_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data _U_)
{
guint32 status;
const char *tag = NULL;
+ int offset = 0;
offset = dissect_nfs4_status(tvb, offset, tree, &status);
offset = dissect_nfs_utf8string(tvb, offset, tree, hf_nfs4_tag, &tag);
diff --git a/epan/dissectors/packet-nfsacl.c b/epan/dissectors/packet-nfsacl.c
index c980025ebe..f0494a42ee 100644
--- a/epan/dissectors/packet-nfsacl.c
+++ b/epan/dissectors/packet-nfsacl.c
@@ -213,23 +213,23 @@ static const value_string nfsacl1_proc_vals[] = {
};
static int
-dissect_nfsacl2_getacl_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl2_getacl_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data)
{
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
offset = dissect_nfsacl_mask(tvb, offset, tree);
return offset;
}
static int
-dissect_nfsacl2_getacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl2_getacl_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
guint32 status;
+ int offset = 0;
- status = tvb_get_ntohl(tvb, offset + 0);
-
- proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4, status);
+ proto_tree_add_item_ret_uint(tree, hf_nfs_status, tvb, offset, 4, ENC_BIG_ENDIAN, &status);
offset += 4;
@@ -243,9 +243,10 @@ dissect_nfsacl2_getacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_nfsacl2_setacl_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl2_setacl_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data)
{
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
offset = dissect_nfsacl_secattr(tvb, offset, pinfo, tree);
@@ -253,14 +254,13 @@ dissect_nfsacl2_setacl_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_nfsacl2_setacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl2_setacl_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
guint32 status;
+ int offset = 0;
- status = tvb_get_ntohl(tvb, offset + 0);
-
- proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4, status);
+ proto_tree_add_item_ret_uint(tree, hf_nfs_status, tvb, offset + 0, 4, ENC_BIG_ENDIAN, &status);
offset += 4;
@@ -271,29 +271,26 @@ dissect_nfsacl2_setacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_nfsacl2_getattr_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl2_getattr_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data)
{
- offset = dissect_fhandle(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
-
- return offset;
+ return dissect_fhandle(tvb, 0, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
}
static int
-dissect_nfsacl2_getattr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl2_getattr_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
- offset = dissect_nfs2_fattr(tvb, offset, tree, "attr");
-
- return offset;
+ return dissect_nfs2_fattr(tvb, 0, tree, "attr");
}
static int
-dissect_nfsacl2_access_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl2_access_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data)
{
guint32 *acc_request, amask;
rpc_call_info_value *civ = (rpc_call_info_value*)data;
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "fhandle", NULL, civ);
@@ -309,10 +306,11 @@ dissect_nfsacl2_access_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_nfsacl2_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl2_access_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data)
{
guint32 status;
+ int offset = 0;
status = tvb_get_ntohl(tvb, offset + 0);
@@ -330,9 +328,9 @@ dissect_nfsacl2_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_nfsacl2_getxattrdir_call(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data)
+dissect_nfsacl2_getxattrdir_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data)
{
+ int offset = 0;
offset = dissect_fhandle(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
offset = dissect_rpc_bool(tvb, tree, hf_nfsacl_create, offset);
@@ -340,10 +338,10 @@ dissect_nfsacl2_getxattrdir_call(tvbuff_t *tvb, int offset,
}
static int
-dissect_nfsacl2_getxattrdir_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data)
+dissect_nfsacl2_getxattrdir_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data)
{
guint32 status;
+ int offset = 0;
status = tvb_get_ntohl(tvb, offset + 0);
@@ -386,9 +384,10 @@ static const value_string nfsacl2_proc_vals[] = {
};
static int
-dissect_nfsacl3_getacl_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl3_getacl_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data)
{
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
offset = dissect_nfsacl_mask(tvb, offset, tree);
@@ -396,17 +395,15 @@ dissect_nfsacl3_getacl_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_nfsacl3_getacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl3_getacl_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
guint32 status;
proto_item *entry_item;
proto_tree *entry_tree;
+ int offset = 0;
- status = tvb_get_ntohl(tvb, offset + 0);
-
- proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4,
- status);
+ proto_tree_add_item_ret_uint(tree, hf_nfs_status, tvb, offset, 4, ENC_BIG_ENDIAN, &status);
offset += 4;
@@ -425,12 +422,13 @@ dissect_nfsacl3_getacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_nfsacl3_setacl_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl3_setacl_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data)
{
proto_item *acl_item;
proto_tree *acl_tree;
+ int offset = 0;
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
@@ -444,15 +442,13 @@ dissect_nfsacl3_setacl_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_nfsacl3_setacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nfsacl3_setacl_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
- guint32 status = tvb_get_ntohl(tvb, offset + 0);
-
- if (tree)
- proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4,
- status);
+ guint32 status;
+ int offset = 0;
+ proto_tree_add_item_ret_uint(tree, hf_nfs_status, tvb, offset, 4, ENC_BIG_ENDIAN, &status);
offset += 4;
offset = dissect_nfs3_post_op_attr(tvb, offset, pinfo, tree, "attr");
@@ -461,10 +457,11 @@ dissect_nfsacl3_setacl_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_nfsacl3_getxattrdir_call(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data)
+dissect_nfsacl3_getxattrdir_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data)
{
+ int offset = 0;
+
offset = dissect_nfs3_fh(tvb, offset, pinfo, tree, "fhandle", NULL, (rpc_call_info_value*)data);
offset = dissect_rpc_bool(tvb, tree, hf_nfsacl_create, offset);
@@ -472,17 +469,12 @@ dissect_nfsacl3_getxattrdir_call(tvbuff_t *tvb, int offset,
}
static int
-dissect_nfsacl3_getxattrdir_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data)
+dissect_nfsacl3_getxattrdir_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data)
{
guint32 status;
+ int offset = 0;
- status = tvb_get_ntohl(tvb, offset + 0);
-
- if (tree)
- proto_tree_add_uint(tree, hf_nfs_status, tvb, offset + 0, 4,
- status);
-
+ proto_tree_add_item_ret_uint(tree, hf_nfs_status, tvb, offset, 4, ENC_BIG_ENDIAN, &status);
offset += 4;
if (status == ACL3_OK)
diff --git a/epan/dissectors/packet-nisplus.c b/epan/dissectors/packet-nisplus.c
index 1eb41cbb87..d2bba0af28 100644
--- a/epan/dissectors/packet-nisplus.c
+++ b/epan/dissectors/packet-nisplus.c
@@ -705,8 +705,9 @@ dissect_nisplus_object(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
static int
-dissect_ns_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_ns_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_string(tvb, tree,
hf_nisplus_object_name, offset, NULL);
@@ -717,8 +718,10 @@ dissect_ns_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
}
static int
-dissect_ib_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_ib_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_string(tvb, tree,
hf_nisplus_object_name, offset, NULL);
@@ -744,8 +747,10 @@ dissect_ib_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
}
static int
-dissect_fd_args(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_fd_args(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_string(tvb, tree,
hf_nisplus_fd_dirname, offset, NULL);
@@ -778,17 +783,17 @@ dissect_nisplus_tag(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tre
}
static int
-dissect_nisplus_taglist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_nisplus_taglist(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_array(tvb, pinfo, tree, offset,
+ return dissect_rpc_array(tvb, pinfo, tree, 0,
dissect_nisplus_tag, hf_nisplus_taglist);
-
- return offset;
}
static int
-dissect_dump_args(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_dump_args(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_string(tvb, tree,
hf_nisplus_dump_dir, offset, NULL);
@@ -802,26 +807,23 @@ dissect_dump_args(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
}
static int
-dissect_netobj(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_netobj(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_data(tvb, tree,
- hf_nisplus_dummy, offset);
-
- return offset;
+ return dissect_rpc_data(tvb, tree, hf_nisplus_dummy, 0);
}
static int
-dissect_nisname(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_nisname(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_string(tvb, tree,
- hf_nisplus_object_name, offset, NULL);
-
- return offset;
+ return dissect_rpc_string(tvb, tree,
+ hf_nisplus_object_name, 0, NULL);
}
static int
-dissect_ping_args(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_ping_args(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_string(tvb, tree,
hf_nisplus_ping_dir, offset, NULL);
@@ -933,8 +935,10 @@ static const value_string nis_error[] = {
};
static int
-dissect_nisplus_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_nisplus_result(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_uint32(tvb, tree,
hf_nisplus_error, offset);
@@ -960,8 +964,10 @@ dissect_nisplus_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
}
static int
-dissect_fd_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_fd_result(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_uint32(tvb, tree,
hf_nisplus_error, offset);
@@ -1032,8 +1038,10 @@ dissect_log_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
}
static int
-dissect_log_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_log_result(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_uint32(tvb, tree,
hf_nisplus_error, offset);
@@ -1047,26 +1055,22 @@ dissect_log_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
}
static int
-dissect_callback_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_callback_result(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_bool(tvb, tree, hf_nisplus_callback_status,
- offset);
-
- return offset;
+ return dissect_rpc_bool(tvb, tree, hf_nisplus_callback_status, 0);
}
static int
-dissect_change_time(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_change_time(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_nisplus_time(tvb, offset, tree,
- hf_nisplus_log_time);
-
- return offset;
+ return dissect_nisplus_time(tvb, 0, tree, hf_nisplus_log_time);
}
static int
-dissect_cp_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_cp_result(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_uint32(tvb, tree,
hf_nisplus_cp_status, offset);
@@ -1080,12 +1084,9 @@ dissect_cp_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
}
static int
-dissect_nisplus_error(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_nisplus_error(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_uint32(tvb, tree,
- hf_nisplus_error, offset);
-
- return offset;
+ return dissect_rpc_uint32(tvb, tree, hf_nisplus_error, 0);
}
/* proc number, "proc name", dissect_request, dissect_reply */
@@ -1872,12 +1873,10 @@ dissect_cb_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *
}
static int
-dissect_cback_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_cback_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_array(tvb, pinfo, tree, offset,
+ return dissect_rpc_array(tvb, pinfo, tree, 0,
dissect_cb_entry, hf_nispluscb_entries);
-
- return offset;
}
/* proc number, "proc name", dissect_request, dissect_reply */
diff --git a/epan/dissectors/packet-nlm.c b/epan/dissectors/packet-nlm.c
index 8515a1a226..ef93817be2 100644
--- a/epan/dissectors/packet-nlm.c
+++ b/epan/dissectors/packet-nlm.c
@@ -681,10 +681,11 @@ dissect_nlm_freeall(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* This function is identical for all NLM protocol versions (1-4)*/
static int
-dissect_nlm_gen_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_nlm_gen_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data)
{
guint32 nlm_stat;
+ int offset = 0;
if(nlm_match_msgres){
rpc_call_info_value *rpc_call=(rpc_call_info_value *)data;
@@ -717,134 +718,133 @@ dissect_nlm_gen_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_nlm1_test(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm1_test(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_test(tvb,offset,pinfo,tree,1,(rpc_call_info_value*)data);
+ return dissect_nlm_test(tvb,0,pinfo,tree,1,(rpc_call_info_value*)data);
}
static int
-dissect_nlm4_test(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm4_test(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_test(tvb,offset,pinfo,tree,4,(rpc_call_info_value*)data);
+ return dissect_nlm_test(tvb,0,pinfo,tree,4,(rpc_call_info_value*)data);
}
static int
-dissect_nlm1_lock(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm1_lock(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_lock(tvb,offset,pinfo,tree,1,(rpc_call_info_value*)data);
+ return dissect_nlm_lock(tvb,0,pinfo,tree,1,(rpc_call_info_value*)data);
}
static int
-dissect_nlm4_lock(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm4_lock(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_lock(tvb,offset,pinfo,tree,4,(rpc_call_info_value*)data);
+ return dissect_nlm_lock(tvb,0,pinfo,tree,4,(rpc_call_info_value*)data);
}
static int
-dissect_nlm1_cancel(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm1_cancel(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_cancel(tvb,offset,pinfo,tree,1,(rpc_call_info_value*)data);
+ return dissect_nlm_cancel(tvb,0,pinfo,tree,1,(rpc_call_info_value*)data);
}
static int
-dissect_nlm4_cancel(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm4_cancel(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_cancel(tvb,offset,pinfo,tree,4,(rpc_call_info_value*)data);
+ return dissect_nlm_cancel(tvb,0,pinfo,tree,4,(rpc_call_info_value*)data);
}
static int
-dissect_nlm1_unlock(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm1_unlock(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_unlock(tvb,offset,pinfo,tree,1,(rpc_call_info_value*)data);
+ return dissect_nlm_unlock(tvb,0,pinfo,tree,1,(rpc_call_info_value*)data);
}
static int
-dissect_nlm4_unlock(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm4_unlock(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_unlock(tvb,offset,pinfo,tree,4,(rpc_call_info_value*)data);
+ return dissect_nlm_unlock(tvb,0,pinfo,tree,4,(rpc_call_info_value*)data);
}
static int
-dissect_nlm1_granted(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm1_granted(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_granted(tvb,offset,pinfo,tree,1,(rpc_call_info_value*)data);
+ return dissect_nlm_granted(tvb,0,pinfo,tree,1,(rpc_call_info_value*)data);
}
static int
-dissect_nlm4_granted(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm4_granted(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_granted(tvb,offset,pinfo,tree,4,(rpc_call_info_value*)data);
+ return dissect_nlm_granted(tvb,0,pinfo,tree,4,(rpc_call_info_value*)data);
}
static int
-dissect_nlm1_test_res(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm1_test_res(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_test_res(tvb,offset,pinfo,tree,1,(rpc_call_info_value*)data);
+ return dissect_nlm_test_res(tvb,0,pinfo,tree,1,(rpc_call_info_value*)data);
}
static int
-dissect_nlm4_test_res(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm4_test_res(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data)
{
- return dissect_nlm_test_res(tvb,offset,pinfo,tree,4,(rpc_call_info_value*)data);
+ return dissect_nlm_test_res(tvb,0,pinfo,tree,4,(rpc_call_info_value*)data);
}
static int
-dissect_nlm3_share(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm3_share(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
- return dissect_nlm_share(tvb,offset,pinfo,tree,3,(rpc_call_info_value*)data);
+ return dissect_nlm_share(tvb,0,pinfo,tree,3,(rpc_call_info_value*)data);
}
static int
-dissect_nlm4_share(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm4_share(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
- return dissect_nlm_share(tvb,offset,pinfo,tree,4,(rpc_call_info_value*)data);
+ return dissect_nlm_share(tvb,0,pinfo,tree,4,(rpc_call_info_value*)data);
}
static int
-dissect_nlm3_shareres(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm3_shareres(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
- return dissect_nlm_shareres(tvb,offset,pinfo,tree,3);
+ return dissect_nlm_shareres(tvb,0,pinfo,tree,3);
}
static int
-dissect_nlm4_shareres(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void* data _U_)
+dissect_nlm4_shareres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- return dissect_nlm_shareres(tvb,offset,pinfo,tree,4);
+ return dissect_nlm_shareres(tvb,0,pinfo,tree,4);
}
static int
-dissect_nlm3_freeall(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm3_freeall(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
- return dissect_nlm_freeall(tvb,offset,pinfo,tree,3);
+ return dissect_nlm_freeall(tvb,0,pinfo,tree,3);
}
static int
-dissect_nlm4_freeall(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_nlm4_freeall(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
- return dissect_nlm_freeall(tvb,offset,pinfo,tree,4);
+ return dissect_nlm_freeall(tvb,0,pinfo,tree,4);
}
diff --git a/epan/dissectors/packet-pcnfsd.c b/epan/dissectors/packet-pcnfsd.c
index 6f596dacb7..0e7602e981 100644
--- a/epan/dissectors/packet-pcnfsd.c
+++ b/epan/dissectors/packet-pcnfsd.c
@@ -98,9 +98,10 @@ dissect_pcnfsd2_dissect_mapreq_arg_item(tvbuff_t *tvb, int offset,
}
static int
-dissect_pcnfsd2_mapid_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_pcnfsd2_mapid_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_string(tvb, tree, hf_pcnfsd_comment, offset, NULL);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
@@ -139,9 +140,10 @@ dissect_pcnfsd2_dissect_mapreq_res_item(tvbuff_t *tvb, int offset,
}
static int
-dissect_pcnfsd2_mapid_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_pcnfsd2_mapid_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_string(tvb, tree, hf_pcnfsd_comment, offset, NULL);
offset = dissect_rpc_list(tvb, pinfo, tree, offset,
@@ -168,7 +170,7 @@ pcnfsd_decode_obscure(const char* data, int len)
/* "NFS Illustrated" 14.7.13 */
static int
-dissect_pcnfsd2_auth_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_pcnfsd2_auth_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
int newoffset;
@@ -179,6 +181,7 @@ dissect_pcnfsd2_auth_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
const char *password = NULL;
proto_item *password_item = NULL;
proto_tree *password_tree = NULL;
+ int offset = 0;
offset = dissect_rpc_string(tvb, tree,
hf_pcnfsd_auth_client, offset, NULL);
@@ -244,12 +247,13 @@ dissect_pcnfsd2_auth_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* "NFS Illustrated" 14.7.13 */
static int
-dissect_pcnfsd2_auth_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_pcnfsd2_auth_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
int gids_count;
proto_tree *gtree;
int gids_i;
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_status, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_uid, offset);
diff --git a/epan/dissectors/packet-portmap.c b/epan/dissectors/packet-portmap.c
index 6a385b5bb2..86d5c2f78b 100644
--- a/epan/dissectors/packet-portmap.c
+++ b/epan/dissectors/packet-portmap.c
@@ -68,13 +68,14 @@ static dissector_handle_t rpc_handle;
/* Dissect a getport call */
static int
-dissect_getport_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_getport_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data)
{
guint32 proto, version;
guint32 prog;
const char *prog_name;
const char *proto_name;
+ int offset = 0;
/* make sure we remember protocol type until the reply packet */
if(!pinfo->fd->flags.visited){
@@ -124,10 +125,11 @@ 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_,
+dissect_getport_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data)
{
guint32 portx;
+ int offset = 0;
/* we might have learnt a <ipaddr><protocol><port> mapping for ONC-RPC*/
if(!pinfo->fd->flags.visited){
@@ -164,11 +166,12 @@ dissect_getport_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* Dissect a 'set' call */
static int
-dissect_set_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_set_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
guint32 proto;
guint32 prog;
+ int offset = 0;
if ( tree )
{
@@ -192,11 +195,12 @@ dissect_set_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* Dissect a 'unset' call */
static int
-dissect_unset_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_unset_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
guint32 proto;
guint32 prog;
+ int offset = 0;
if ( tree )
{
@@ -219,12 +223,10 @@ dissect_unset_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_set_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_set_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_bool(tvb, tree, hf_portmap_answer,
- offset);
- return offset;
+ return dissect_rpc_bool(tvb, tree, hf_portmap_answer, 0);
}
static int
@@ -260,20 +262,19 @@ dissect_dump_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
-dissect_dump_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_dump_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_list(tvb, pinfo, tree, offset,
- dissect_dump_entry, NULL);
- return offset;
+ return dissect_rpc_list(tvb, pinfo, tree, 0, dissect_dump_entry, NULL);
}
/* Dissect a callit call */
static int
-dissect_callit_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_callit_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
guint32 prog, vers, proc;
+ int offset = 0;
prog = tvb_get_ntohl(tvb, offset+0);
if ( tree )
@@ -312,14 +313,13 @@ dissect_callit_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Dissect a callit reply */
static int
-dissect_callit_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_callit_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
- if ( tree )
- {
- proto_tree_add_item(tree, hf_portmap_port, tvb,
+ int offset = 0;
+
+ proto_tree_add_item(tree, hf_portmap_port, tvb,
offset, 4, ENC_BIG_ENDIAN);
- }
offset += 4;
/* Dissect the result of this procedure.
@@ -423,42 +423,37 @@ dissect_rpcb(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree
/* RFC 1833, Page 7 */
static int
-dissect_rpcb3_getaddr_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_rpcb3_getaddr_call(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpcb(tvb, offset, pinfo, tree, data);
-
- return offset;
+ return dissect_rpcb(tvb, 0, pinfo, tree, data);
}
/* RFC 1833, Page 7 */
static int
-dissect_rpcb3_getaddr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_rpcb3_getaddr_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_string(tvb, tree,
- hf_portmap_uaddr, offset, NULL);
-
- return offset;
+ return dissect_rpc_string(tvb, tree, hf_portmap_uaddr, 0, NULL);
}
/* RFC 1833, Page 7 */
static int
-dissect_rpcb3_dump_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
+dissect_rpcb3_dump_reply(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_list(tvb, pinfo, tree, offset,
- dissect_rpcb, NULL);
- return offset;
+ return dissect_rpc_list(tvb, pinfo, tree, 0, dissect_rpcb, NULL);
}
/* RFC 1833, page 4 */
static int
-dissect_rpcb_rmtcallres(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+dissect_rpcb_rmtcallres(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
/* Dissect the remote universal address. */
offset = dissect_rpc_string(tvb, tree,
hf_portmap_rpcb_addr, offset, NULL);
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;
diff --git a/epan/dissectors/packet-rpc.h b/epan/dissectors/packet-rpc.h
index 187445fe32..2a74a2eeb2 100644
--- a/epan/dissectors/packet-rpc.h
+++ b/epan/dissectors/packet-rpc.h
@@ -136,8 +136,8 @@ typedef int (dissect_function_t)(tvbuff_t *tvb, int offset, packet_info *pinfo,
typedef struct _vsff {
guint32 value;
const gchar *strptr;
- dissect_function_t *dissect_call;
- dissect_function_t *dissect_reply;
+ new_dissector_t dissect_call;
+ new_dissector_t dissect_reply;
} vsff;
extern const value_string rpc_auth_flavor[];
@@ -213,8 +213,8 @@ typedef struct _rpc_proc_info_key {
typedef struct _rpc_proc_info_value {
const gchar *name;
- dissect_function_t *dissect_call;
- dissect_function_t *dissect_reply;
+ new_dissector_t dissect_call;
+ new_dissector_t dissect_reply;
} rpc_proc_info_value;
/* rpc_procs is also used in tap. With MSVC and a
diff --git a/epan/dissectors/packet-rquota.c b/epan/dissectors/packet-rquota.c
index 286dec412d..2fbb91c3c7 100644
--- a/epan/dissectors/packet-rquota.c
+++ b/epan/dissectors/packet-rquota.c
@@ -112,9 +112,10 @@ dissect_rquota(tvbuff_t *tvb, int offset, proto_tree *tree)
}
static int
-dissect_getquota_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_getquota_result(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
gint32 status;
+ int offset = 0;
status = tvb_get_ntohl(tvb, offset);
@@ -129,8 +130,10 @@ dissect_getquota_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto
}
static int
-dissect_getquota_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_getquota_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_string(tvb, tree,
hf_rquota_pathp, offset, NULL);
@@ -164,8 +167,10 @@ static const value_string rquota1_proc_vals[] = {
static int
-dissect_getquota2_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_getquota2_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
offset = dissect_rpc_string(tvb, tree,
hf_rquota_pathp, offset, NULL);
diff --git a/epan/dissectors/packet-rwall.c b/epan/dissectors/packet-rwall.c
index 6c1a5fd41f..c6a6306370 100644
--- a/epan/dissectors/packet-rwall.c
+++ b/epan/dissectors/packet-rwall.c
@@ -49,11 +49,9 @@ static header_field_info hfi_rwall_message RWALL_HFI_INIT = {
static gint ett_rwall = -1;
static int
-dissect_rwall_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_rwall_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_string(tvb, tree, hfi_rwall_message.id, offset, NULL);
-
- return offset;
+ return dissect_rpc_string(tvb, tree, hfi_rwall_message.id, 0, NULL);
}
static const vsff rwall1_proc[] = {
diff --git a/epan/dissectors/packet-spray.c b/epan/dissectors/packet-spray.c
index 82bdce3c55..2287506a96 100644
--- a/epan/dissectors/packet-spray.c
+++ b/epan/dissectors/packet-spray.c
@@ -41,10 +41,11 @@ static gint ett_spray_clock = -1;
static int
-dissect_get_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_get_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
proto_item* lock_item = NULL;
proto_tree* lock_tree = NULL;
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree,
hf_spray_counter, offset);
@@ -64,12 +65,9 @@ dissect_get_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
}
static int
-dissect_spray_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_spray_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_data(tvb, tree,
- hf_spray_sprayarr, offset);
-
- return offset;
+ return dissect_rpc_data(tvb, tree, hf_spray_sprayarr, 0);
}
/* proc number, "proc name", dissect_request, dissect_reply */
diff --git a/epan/dissectors/packet-stat-notify.c b/epan/dissectors/packet-stat-notify.c
index d488b76317..579c2107d4 100644
--- a/epan/dissectors/packet-stat-notify.c
+++ b/epan/dissectors/packet-stat-notify.c
@@ -39,8 +39,9 @@ static gint ett_statnotify = -1;
static int
-dissect_statnotify_mon(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_statnotify_mon(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_string(tvb,tree,hf_statnotify_name,offset,NULL);
diff --git a/epan/dissectors/packet-stat.c b/epan/dissectors/packet-stat.c
index ff61c80f6a..e4a574cbf0 100644
--- a/epan/dissectors/packet-stat.c
+++ b/epan/dissectors/packet-stat.c
@@ -165,22 +165,18 @@ mon_id_len(tvbuff_t *tvb, int offset)
}
static int
-dissect_stat_stat(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_stat_stat(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
- if (tree)
- {
- offset = dissect_rpc_string(tvb,tree,hfi_stat_mon_name.id,offset,NULL);
- }
-
- return offset;
+ return dissect_rpc_string(tvb,tree,hfi_stat_mon_name.id,0,NULL);
}
static int
-dissect_stat_stat_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_stat_stat_res(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
proto_item *sub_item;
proto_tree *sub_tree;
gint32 res;
+ int offset = 0;
sub_item = proto_tree_add_item(tree, &hfi_stat_stat_res, tvb,
offset, -1, ENC_NA);
@@ -217,10 +213,11 @@ dissect_stat_my_id(tvbuff_t *tvb, int offset, proto_tree *tree)
}
static int
-dissect_stat_mon_id(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_stat_mon_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
proto_item *sub_item;
proto_tree *sub_tree;
+ int offset = 0;
sub_item = proto_tree_add_item(tree, &hfi_stat_mon, tvb,
offset, mon_id_len(tvb,offset), ENC_NA);
@@ -243,28 +240,26 @@ dissect_stat_priv(tvbuff_t *tvb, int offset, proto_tree *tree)
}
static int
-dissect_stat_mon(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void *data _U_)
+dissect_stat_mon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
-
- offset = dissect_stat_mon_id(tvb,offset,pinfo,tree,data);
+ int offset = dissect_stat_mon_id(tvb,pinfo,tree,data);
offset = dissect_stat_priv(tvb,offset,tree);
return offset;
}
static int
-dissect_stat_state(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_stat_state(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
- offset = dissect_rpc_uint32(tvb,tree,hfi_stat_state.id,offset);
-
- return offset;
+ return dissect_rpc_uint32(tvb,tree,hfi_stat_state.id,0);
}
static int
-dissect_stat_notify(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_stat_notify(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
proto_item *sub_item;
proto_tree *sub_tree;
+ int offset = 0;
int start_offset = offset;
sub_item = proto_tree_add_item(tree, &hfi_stat_stat_chge, tvb,
@@ -282,11 +277,9 @@ dissect_stat_notify(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tre
}
static int
-dissect_stat_umon_all(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+dissect_stat_umon_all(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
- offset = dissect_stat_my_id(tvb,offset,tree);
-
- return offset;
+ return dissect_stat_my_id(tvb,0,tree);
}
/* proc number, "proc name", dissect_request, dissect_reply */
diff --git a/epan/dissectors/packet-teklink.c b/epan/dissectors/packet-teklink.c
index 5a6bfc4bab..4a7e183600 100644
--- a/epan/dissectors/packet-teklink.c
+++ b/epan/dissectors/packet-teklink.c
@@ -170,9 +170,10 @@ static const value_string teklink_vtc_modes[] = {
{ 0, NULL },
};
-static int dissect_teklink_tlaframeopen_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_tlaframeopen_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
@@ -180,32 +181,32 @@ static int dissect_teklink_tlaframeopen_call(tvbuff_t *tvb, int offset, packet_i
return offset;
}
-static int dissect_teklink_tlaframeclose_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_tlaframeclose_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
- return offset;
+ return dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, 0);
}
-static int dissect_teklink_tlaframeclose_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_tlaframeclose_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
- return offset;
+ return dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, 0);
}
-static int dissect_teklink_tlaframeopen_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_tlaframeopen_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
return offset;
}
-static int dissect_teklink_get_software_version_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_get_software_version_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
offset = dissect_rpc_string(tvb, tree, hf_teklink_unknown_string, offset, NULL);
@@ -213,9 +214,10 @@ static int dissect_teklink_get_software_version_reply(tvbuff_t *tvb, int offset,
return offset;
}
-static int dissect_teklink_call65_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_call65_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_cmd, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
@@ -225,16 +227,16 @@ static int dissect_teklink_call65_call(tvbuff_t *tvb, int offset, packet_info *p
return offset;
}
-static int dissect_teklink_call65_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_call65_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
- return offset;
+ return dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, 0);
}
-static int dissect_teklink_info_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_info_reply(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_locked, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_tla_type, offset);
@@ -247,34 +249,38 @@ static int dissect_teklink_info_reply(tvbuff_t *tvb, int offset, packet_info *pi
return offset;
}
-static int dissect_teklink_info_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_info_call(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
return offset;
}
-static int dissect_teklink_vtc_ident(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_vtc_ident(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
return offset;
}
-static int dissect_teklink_vtc_sigstatall(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_vtc_sigstatall(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
return offset;
}
-static int dissect_teklink_vtc_outen(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_vtc_outen(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
guint32 sig = tvb_get_ntohl(tvb, offset);
guint32 sigon = tvb_get_ntohl(tvb, offset + 4);
@@ -287,10 +293,11 @@ static int dissect_teklink_vtc_outen(tvbuff_t *tvb, int offset, packet_info *pin
return offset;
}
-static int dissect_teklink_vtc_map(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_vtc_map(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
guint32 src, dst;
+ int offset = 0;
src = tvb_get_ntohl(tvb, offset);
dst = tvb_get_ntohl(tvb, offset + 4);
@@ -304,10 +311,11 @@ static int dissect_teklink_vtc_map(tvbuff_t *tvb, int offset, packet_info *pinfo
return offset;
}
-static int dissect_teklink_vtc_clk(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_vtc_clk(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
guint32 sig, clksource, clkedge, clkmode;
+ int offset = 0;
sig = tvb_get_ntohl(tvb, offset);
clksource = tvb_get_ntohl(tvb, offset + 4);
@@ -327,10 +335,11 @@ static int dissect_teklink_vtc_clk(tvbuff_t *tvb, int offset, packet_info *pinfo
return offset;
}
-static int dissect_teklink_vtc_mode(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_vtc_mode(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
guint32 sig, edge, mode;
+ int offset = 0;
sig = tvb_get_ntohl(tvb, offset);
edge = tvb_get_ntohl(tvb, offset + 4);
@@ -348,10 +357,11 @@ static int dissect_teklink_vtc_mode(tvbuff_t *tvb, int offset, packet_info *pinf
return offset;
}
-static int dissect_teklink_vtc_outsetup(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_vtc_outsetup(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
guint32 sig, en, pol, feedback;
+ int offset = 0;
sig = tvb_get_ntohl(tvb, offset);
en = tvb_get_ntohl(tvb, offset + 4);
@@ -371,9 +381,10 @@ static int dissect_teklink_vtc_outsetup(tvbuff_t *tvb, int offset, packet_info *
return offset;
}
-static int dissect_teklink_vtc_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_vtc_res(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
guint32 sig = tvb_get_ntohl(tvb, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_vtc_dstnames, offset);
@@ -383,18 +394,18 @@ static int dissect_teklink_vtc_res(tvbuff_t *tvb, int offset, packet_info *pinfo
return offset;
}
-static int dissect_teklink_vtl_spinbits(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_vtl_spinbits(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
return offset;
}
-static int dissect_teklink_vtl_zmode(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+static int dissect_teklink_vtl_zmode(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, offset);
- return offset;
+ return dissect_rpc_uint32(tvb, tree, hf_teklink_unknown_long, 0);
}
static const vsff teklink_proc[] = {
diff --git a/epan/dissectors/packet-vxi11.c b/epan/dissectors/packet-vxi11.c
index 1a5f867c85..eb5ee3426e 100644
--- a/epan/dissectors/packet-vxi11.c
+++ b/epan/dissectors/packet-vxi11.c
@@ -324,21 +324,18 @@ dissect_reason(tvbuff_t *tvb, int offset, proto_tree *tree)
static int
dissect_create_link_parms(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
const char *str;
+ int offset = 0;
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_client_id, offset);
offset = dissect_rpc_bool(tvb, tree, hf_vxi11_core_lock_device, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_lock_timeout, offset);
offset = dissect_rpc_string(tvb, tree, hf_vxi11_core_device, offset, &str);
- if (tree)
- {
- proto_item_append_text(tree, " (Create_LinkParms) %s", str);
- }
+ proto_item_append_text(tree, " (Create_LinkParms) %s", str);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", str);
return offset;
@@ -346,11 +343,11 @@ dissect_create_link_parms(tvbuff_t *tvb,
static int
dissect_create_link_resp(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
guint32 error, lid;
+ int offset = 0;
offset = dissect_error(tvb, offset, pinfo, tree, "Create_LinkResp", &error);
@@ -362,10 +359,7 @@ dissect_create_link_resp(tvbuff_t *tvb,
if (error == VXI11_CORE_ERROR_NO_ERROR)
{
- if (tree)
- {
- proto_item_append_text(tree, " LID=%d", lid);
- }
+ proto_item_append_text(tree, " LID=%d", lid);
col_append_fstr(pinfo->cinfo, COL_INFO, " LID=%d", lid);
}
@@ -374,28 +368,24 @@ dissect_create_link_resp(tvbuff_t *tvb,
static int
dissect_device_SRQ_parms(tvbuff_t *tvb,
- int offset,
packet_info *pinfo _U_,
proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_opaque_data(tvb, offset, tree, NULL, hf_vxi11_intr_handle, FALSE, 0, FALSE, NULL, NULL);
+ int offset = dissect_rpc_opaque_data(tvb, 0, tree, NULL, hf_vxi11_intr_handle, FALSE, 0, FALSE, NULL, NULL);
- if (tree)
- {
- proto_item_append_text(tree, " (Device_SrqParms)");
- }
+ proto_item_append_text(tree, " (Device_SrqParms)");
return offset;
}
static int
dissect_device_docmd_parms(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
guint32 lid, cmd;
const gchar *cmdstr;
+ int offset = 0;
lid = tvb_get_ntohl(tvb, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_lid, offset);
@@ -423,11 +413,11 @@ dissect_device_docmd_parms(tvbuff_t *tvb,
static int
dissect_device_docmd_resp(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
guint32 error;
+ int offset = 0;
offset = dissect_error(tvb, offset, pinfo, tree, "Device_DocmdResp", &error);
offset = dissect_rpc_opaque_data(tvb, offset, tree, NULL, hf_vxi11_core_data, FALSE, 0, FALSE, NULL, NULL);
@@ -437,10 +427,10 @@ dissect_device_docmd_resp(tvbuff_t *tvb,
static int
dissect_device_enable_SRQ_parms(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
guint32 lid = tvb_get_ntohl(tvb, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_lid, offset);
@@ -458,21 +448,20 @@ dissect_device_enable_SRQ_parms(tvbuff_t *tvb,
static int
dissect_device_error(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
guint32 error;
- return dissect_error(tvb, offset, pinfo, tree, "Device_Error", &error);
+ return dissect_error(tvb, 0, pinfo, tree, "Device_Error", &error);
}
static int
dissect_device_generic_parms(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
guint32 lid = tvb_get_ntohl(tvb, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_lid, offset);
@@ -491,10 +480,10 @@ dissect_device_generic_parms(tvbuff_t *tvb,
static int
dissect_device_link(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
guint32 lid = tvb_get_ntohl(tvb, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_lid, offset);
@@ -510,10 +499,10 @@ dissect_device_link(tvbuff_t *tvb,
static int
dissect_device_lock_parms(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
guint32 lid = tvb_get_ntohl(tvb, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_lid, offset);
@@ -531,10 +520,10 @@ dissect_device_lock_parms(tvbuff_t *tvb,
static int
dissect_device_read_parms(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
+ int offset = 0;
guint32 lid = tvb_get_ntohl(tvb, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_lid, offset);
@@ -544,10 +533,7 @@ dissect_device_read_parms(tvbuff_t *tvb,
offset = dissect_flags(tvb, offset, tree);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_term_char, offset);
- if (tree)
- {
- proto_item_append_text(tree, " (Device_ReadParms) LID=%d", lid);
- }
+ proto_item_append_text(tree, " (Device_ReadParms) LID=%d", lid);
col_append_fstr(pinfo->cinfo, COL_INFO, " LID=%d", lid);
return offset;
@@ -555,11 +541,11 @@ dissect_device_read_parms(tvbuff_t *tvb,
static int
dissect_device_read_resp(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
guint32 error;
+ int offset = 0;
guint32 datalength = 0;
offset = dissect_error(tvb, offset, pinfo, tree, "Device_ReadResp", &error);
@@ -577,11 +563,11 @@ dissect_device_read_resp(tvbuff_t *tvb,
static int
dissect_device_readstb_resp(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
guint32 error, stb;
+ int offset = 0;
offset = dissect_error(tvb, offset, pinfo, tree, "Device_ReadStbResp", &error);
@@ -590,10 +576,7 @@ dissect_device_readstb_resp(tvbuff_t *tvb,
if (error == VXI11_CORE_ERROR_NO_ERROR)
{
- if (tree)
- {
- proto_item_append_text(tree, " STB=0x%02x", stb);
- }
+ proto_item_append_text(tree, " STB=0x%02x", stb);
col_append_fstr(pinfo->cinfo, COL_INFO, " STB=0x%02x", stb);
}
@@ -602,12 +585,12 @@ dissect_device_readstb_resp(tvbuff_t *tvb,
static int
dissect_device_remote_func(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
guint32 port;
const gchar *addrstr;
+ int offset = 0;
addrstr = tvb_ip_to_str(tvb, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_host_addr, offset);
@@ -619,10 +602,7 @@ dissect_device_remote_func(tvbuff_t *tvb,
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_prog_vers, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_prog_family, offset);
- if (tree)
- {
- proto_item_append_text(tree, " (Device_RemoteFunc) %s:%d", addrstr, port);
- }
+ proto_item_append_text(tree, " (Device_RemoteFunc) %s:%d", addrstr, port);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s:%d", addrstr, port);
return offset;
@@ -630,11 +610,11 @@ dissect_device_remote_func(tvbuff_t *tvb,
static int
dissect_device_write_parms(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
guint32 datalength = 0;
+ int offset = 0;
guint32 lid = tvb_get_ntohl(tvb, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_lid, offset);
@@ -659,11 +639,11 @@ dissect_device_write_parms(tvbuff_t *tvb,
static int
dissect_device_write_resp(tvbuff_t *tvb,
- int offset,
packet_info *pinfo,
proto_tree *tree, void* data _U_)
{
guint32 error;
+ int offset = 0;
offset = dissect_error(tvb, offset, pinfo, tree, "Device_WriteResp", &error);
offset = dissect_rpc_uint32(tvb, tree, hf_vxi11_core_size, offset);
diff --git a/epan/dissectors/packet-ypbind.c b/epan/dissectors/packet-ypbind.c
index 8bc5bbfbc6..16baa0b993 100644
--- a/epan/dissectors/packet-ypbind.c
+++ b/epan/dissectors/packet-ypbind.c
@@ -46,13 +46,10 @@ static gint ett_ypbind = -1;
static int
-dissect_ypbind_domain_v2_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_ypbind_domain_v2_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
/* domain */
- offset = dissect_rpc_string(tvb, tree,
- hf_ypbind_domain, offset, NULL);
-
- return offset;
+ return dissect_rpc_string(tvb, tree, hf_ypbind_domain, 0, NULL);
}
#define YPBIND_RESP_TYPE_SUCC_VAL 1
@@ -76,9 +73,10 @@ static const value_string error_vals[] = {
#endif
static int
-dissect_ypbind_domain_v2_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_ypbind_domain_v2_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint32 type;
+ int offset = 0;
/* response type */
type=tvb_get_ntohl(tvb, offset);
@@ -107,8 +105,10 @@ dissect_ypbind_domain_v2_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_
}
static int
-dissect_ypbind_setdomain_v2_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_ypbind_setdomain_v2_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
+
/* domain */
offset = dissect_rpc_string(tvb, tree,
hf_ypbind_domain, offset, NULL);
diff --git a/epan/dissectors/packet-yppasswd.c b/epan/dissectors/packet-yppasswd.c
index fd8291b8ae..051f337409 100644
--- a/epan/dissectors/packet-yppasswd.c
+++ b/epan/dissectors/packet-yppasswd.c
@@ -45,10 +45,11 @@ static gint ett_yppasswd = -1;
static gint ett_yppasswd_newpw = -1;
static int
-dissect_yppasswd_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_yppasswd_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
proto_item *lock_item = NULL;
proto_tree *lock_tree = NULL;
+ int offset = 0;
offset = dissect_rpc_string(tvb, tree, hf_yppasswd_oldpass,
offset, NULL);
@@ -77,11 +78,9 @@ dissect_yppasswd_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_t
}
static int
-dissect_yppasswd_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_yppasswd_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_yppasswd_status, offset);
-
- return offset;
+ return dissect_rpc_uint32(tvb, tree, hf_yppasswd_status, 0);
}
/* proc number, "proc name", dissect_request, dissect_reply */
diff --git a/epan/dissectors/packet-ypserv.c b/epan/dissectors/packet-ypserv.c
index 4c752f52a6..78f86c6f81 100644
--- a/epan/dissectors/packet-ypserv.c
+++ b/epan/dissectors/packet-ypserv.c
@@ -114,47 +114,33 @@ dissect_ypserv_status(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_t
}
static int
-dissect_domain_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_domain_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
proto_item_append_text(tree, " DOMAIN call");
- if ( tree )
- {
- offset = dissect_rpc_string(tvb,tree,hf_ypserv_domain,offset,NULL);
- }
-
- return offset;
+ return dissect_rpc_string(tvb,tree,hf_ypserv_domain,0,NULL);
}
static int
-dissect_domain_nonack_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_domain_nonack_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
proto_item_append_text(tree, " DOMAIN_NONACK call");
- if ( tree )
- {
- offset = dissect_rpc_string(tvb,tree,hf_ypserv_domain,offset,NULL);
- }
-
- return offset;
+ return dissect_rpc_string(tvb,tree,hf_ypserv_domain,0,NULL);
}
static int
-dissect_maplist_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_maplist_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
proto_item_append_text(tree, " MAPLIST call");
- if ( tree )
- {
- offset = dissect_rpc_string(tvb,tree,hf_ypserv_domain,offset,NULL);
- }
-
- return offset;
+ return dissect_rpc_string(tvb,tree,hf_ypserv_domain,0,NULL);
}
static int
-dissect_domain_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_domain_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " DOMAIN reply");
proto_tree_add_item(tree, hf_ypserv_servesdomain, tvb,
@@ -165,8 +151,9 @@ dissect_domain_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tr
}
static int
-dissect_domain_nonack_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_domain_nonack_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " DOMAIN_NONACK reply");
proto_tree_add_item(tree, hf_ypserv_servesdomain, tvb,
@@ -177,9 +164,10 @@ dissect_domain_nonack_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, p
}
static int
-dissect_match_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_match_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
const char *str;
+ int offset = 0;
proto_item_append_text(tree, " MATCH call");
@@ -202,25 +190,23 @@ dissect_match_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
}
static int
-dissect_match_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_match_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
gint32 status;
const char *str;
+ int offset = 0;
proto_item_append_text(tree, " MATCH reply");
- if ( tree )
- {
- offset = dissect_ypserv_status(tvb, offset, pinfo, tree, &status);
+ offset = dissect_ypserv_status(tvb, offset, pinfo, tree, &status);
- if(status>=0){
- offset = dissect_rpc_string(tvb, tree, hf_ypserv_value,offset, &str);
- col_append_fstr(pinfo->cinfo, COL_INFO," %s", str);
- proto_item_append_text(tree, " %s", str);
+ if(status>=0){
+ offset = dissect_rpc_string(tvb, tree, hf_ypserv_value,offset, &str);
+ col_append_fstr(pinfo->cinfo, COL_INFO," %s", str);
+ proto_item_append_text(tree, " %s", str);
- } else {
- offset = dissect_rpc_string(tvb, tree, hf_ypserv_value,offset, NULL);
- }
+ } else {
+ offset = dissect_rpc_string(tvb, tree, hf_ypserv_value,offset, NULL);
}
return offset;
@@ -228,8 +214,9 @@ dissect_match_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *t
static int
-dissect_first_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_first_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " FIRST call");
/*
@@ -250,69 +237,61 @@ dissect_first_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
* is buggy.
*/
- if ( tree )
- {
- offset = dissect_rpc_string(tvb, tree, hf_ypserv_domain, offset, NULL);
- offset = dissect_rpc_string(tvb, tree, hf_ypserv_map, offset, NULL);
- }
+ offset = dissect_rpc_string(tvb, tree, hf_ypserv_domain, offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_ypserv_map, offset, NULL);
return offset;
}
static int
-dissect_first_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_first_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " FIRST reply");
- if ( tree )
- {
- offset = dissect_ypserv_status(tvb, offset, pinfo, tree, NULL);
+ offset = dissect_ypserv_status(tvb, offset, pinfo, tree, NULL);
- offset = dissect_rpc_string(tvb, tree, hf_ypserv_value, offset, NULL);
- offset = dissect_rpc_string(tvb, tree, hf_ypserv_key, offset, NULL);
- }
+ offset = dissect_rpc_string(tvb, tree, hf_ypserv_value, offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_ypserv_key, offset, NULL);
return offset;
}
static int
-dissect_next_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_next_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " NEXT reply");
- if ( tree )
- {
- offset = dissect_ypserv_status(tvb, offset, pinfo, tree, NULL);
+ offset = dissect_ypserv_status(tvb, offset, pinfo, tree, NULL);
- offset = dissect_rpc_string(tvb, tree, hf_ypserv_value, offset, NULL);
- offset = dissect_rpc_string(tvb, tree, hf_ypserv_key, offset, NULL);
- }
+ offset = dissect_rpc_string(tvb, tree, hf_ypserv_value, offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_ypserv_key, offset, NULL);
return offset;
}
static int
-dissect_next_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_next_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " NEXT call");
- if ( tree )
- {
- offset = dissect_rpc_string(tvb, tree, hf_ypserv_domain, offset, NULL);
- offset = dissect_rpc_string(tvb, tree, hf_ypserv_map, offset, NULL);
- offset = dissect_rpc_string(tvb, tree, hf_ypserv_key, offset, NULL);
- }
+ offset = dissect_rpc_string(tvb, tree, hf_ypserv_domain, offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_ypserv_map, offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_ypserv_key, offset, NULL);
return offset;
}
static int
-dissect_xfr_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_xfr_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
proto_item *sub_item=NULL;
proto_tree *sub_tree=NULL;
+ int offset = 0;
int start_offset = offset;
proto_item_append_text(tree, " XFR call");
@@ -345,24 +324,26 @@ dissect_xfr_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *
}
static int
-dissect_clear_call(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_clear_call(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " CLEAR call");
return offset;
}
static int
-dissect_clear_reply(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_clear_reply(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
proto_item_append_text(tree, " CLEAR reply");
- return offset;
+ return 0;
}
static int
-dissect_xfr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_xfr_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " XFR reply");
proto_tree_add_item(tree, hf_ypserv_transid, tvb, offset, 4, ENC_BIG_ENDIAN);
@@ -374,9 +355,10 @@ dissect_xfr_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
}
static int
-dissect_order_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_order_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
const char *str;
+ int offset = 0;
proto_item_append_text(tree, " ORDER call");
@@ -394,8 +376,9 @@ dissect_order_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
}
static int
-dissect_all_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_all_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " ALL call");
offset = dissect_rpc_string(tvb, tree, hf_ypserv_domain, offset, NULL);
@@ -406,8 +389,9 @@ dissect_all_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *
}
static int
-dissect_master_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_master_call(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " MASTER call");
offset = dissect_rpc_string(tvb, tree, hf_ypserv_domain, offset, NULL);
@@ -418,9 +402,10 @@ dissect_master_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tre
}
static int
-dissect_all_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_all_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint32 more;
+ int offset = 0;
proto_item_append_text(tree, " ALL reply");
@@ -440,8 +425,9 @@ dissect_all_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
}
static int
-dissect_master_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_master_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " MASTER reply");
offset = dissect_ypserv_status(tvb, offset, pinfo, tree, NULL);
@@ -453,9 +439,10 @@ dissect_master_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
static int
-dissect_order_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_order_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint32 num;
+ int offset = 0;
proto_item_append_text(tree, " ORDER reply");
@@ -472,8 +459,9 @@ dissect_order_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *t
static int
-dissect_maplist_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_maplist_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
+ int offset = 0;
proto_item_append_text(tree, " MAPLIST reply");
offset = dissect_ypserv_status(tvb, offset, pinfo, tree, NULL);