From a653adc01d71f890d1b2b6549f34afb409485bf5 Mon Sep 17 00:00:00 2001 From: Kit Westneat Date: Tue, 23 Aug 2016 12:40:28 -0400 Subject: [PATCH] LU-8499 wireshark: fix packet-lustre so it compiles 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 Change-Id: I700e2388175130d7274f4e3fac332cf069afbdcb Reviewed-on: http://review.whamcloud.com/22074 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Amir Shehata --- lustre/contrib/wireshark/packet-lustre.c | 45 +------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/lustre/contrib/wireshark/packet-lustre.c b/lustre/contrib/wireshark/packet-lustre.c index 9a10809..6f389c7 100644 --- a/lustre/contrib/wireshark/packet-lustre.c +++ b/lustre/contrib/wireshark/packet-lustre.c @@ -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) { -- 1.8.3.1