summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-glusterd.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-glusterd.c')
-rw-r--r--epan/dissectors/packet-glusterd.c90
1 files changed, 56 insertions, 34 deletions
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);