Whamcloud - gitweb
LU-8499 wireshark: fix packet-lustre so it compiles 74/22074/3
authorKit Westneat <kit.westneat@gmail.com>
Tue, 23 Aug 2016 16:40:28 +0000 (12:40 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 22 Sep 2016 03:13:34 +0000 (03:13 +0000)
This patch removes a duplicate function definition for
lustre_dissect_struct_capa, and adds a definition for
ett_lustre_ladvise, which is referenced in
lustre_dissect_struct_lu_ladvise, but wasn't defined previously.

Test-Parameters: trivial

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: I700e2388175130d7274f4e3fac332cf069afbdcb
Reviewed-on: http://review.whamcloud.com/22074
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
lustre/contrib/wireshark/packet-lustre.c

index 9a10809..6f389c7 100644 (file)
@@ -432,6 +432,7 @@ static gint ett_lustre_fld_range = -1;
 static gint ett_lustre_mdt_ioepoch = -1;
 static gint ett_lustre_capa = -1;
 static gint ett_lustre_acl = -1;
+static gint ett_lustre_ladvise = -1;
 
 /* -----------------------------------------------*/
 /* Header field declarations */
@@ -8392,50 +8393,6 @@ lustre_dissect_generic_connect(tvbuff_t *tvb _U_, int offset _U_, packet_info *p
 }
 
 int
-lustre_dissect_struct_capa(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_,
-                          proto_tree *parent_tree _U_, int hf_index _U_, guint32 buf_num)
-{
-  proto_item *item = NULL;
-  proto_tree *tree = NULL;
-  int old_offset;
-  int data_len;
-
-  old_offset=offset;
-
-  data_len = LUSTRE_BUFFER_LEN(buf_num);
-  if (data_len == 0)
-    return offset;
-
-  if (parent_tree) {
-    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
-    tree = proto_item_add_subtree(item, ett_lustre_capa);
-  }
-
-  offset=lustre_dissect_struct_lu_fid(tvb,offset,pinfo,tree,hf_lustre_capa_fid);
-
-  offset=lustre_dissect_element_capa_opc(tvb,offset,pinfo,tree);
-
-  offset=dissect_uint64(tvb,offset,pinfo,tree,hf_lustre_capa_uid);
-
-  offset=dissect_uint64(tvb,offset,pinfo,tree,hf_lustre_capa_gid);
-
-  offset=lustre_dissect_element_capa_flags(tvb,offset,pinfo,tree);
-
-  offset=dissect_uint32(tvb,offset,pinfo,tree,hf_lustre_capa_keyid);
-
-  offset=dissect_uint32(tvb,offset,pinfo,tree,hf_lustre_capa_timeout);
-
-  offset=dissect_uint32(tvb,offset,pinfo,tree,hf_lustre_capa_expiry);
-
-  offset=lustre_dissect_struct_hmac(tvb,offset,pinfo,tree, hf_lustre_capa_hmac, 64);
-
-  if (item)
-    proto_item_set_len(item, offset-old_offset);
-  return offset;
-}
-
-
-int
 lustre_dissect_struct_lu_ladvise(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_,
                                 proto_tree *parent_tree _U_, int hf_index _U_, guint32 buf_num)
 {