Whamcloud - gitweb
LU-4156 wireshark: Fix build against wireshark 1.10.x 79/8079/2
authorNathaniel Clark <nathaniel.l.clark@intel.com>
Mon, 28 Oct 2013 17:56:18 +0000 (13:56 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 5 Nov 2013 00:46:50 +0000 (00:46 +0000)
Some of the API changes that were depricated in 1.6 and 1.8 have been
removed in 1.10.  This patch uses the new API calls (these work in 1.6
and later).

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I83a469b973007a58d81b2460eec9da418c172b4a
Reviewed-on: http://review.whamcloud.com/8079
Tested-by: Jenkins
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Frank Heckes <Frank.Heckes@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/contrib/wireshark/packet-lnet.c
lustre/contrib/wireshark/packet-lustre.c

index 3e14eda..9fc4307 100644 (file)
@@ -576,7 +576,7 @@ dissect_lnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 }
 
 static int
-dissect_ib_lnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+dissect_ib_lnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*data)
 {
        /* We can tell if this is an LNet payload by looking at the first
         * 32-bit word for our magic number. */
@@ -833,7 +833,7 @@ dissect_lnet_message(tvbuff_t * tvb, packet_info *pinfo, proto_tree *tree)
 
                        next_tvb = tvb_new_subset (tvb, offset, payload_length, payload_length);
                        if(msg_type==LNET_MSG_PUT)
-                               dissector_try_port(subdissector_table, tvb_get_letohl(tvb,LNET_PTL_INDEX_OFFSET_PUT), next_tvb, pinfo, tree);
+                               dissector_try_uint(subdissector_table, tvb_get_letohl(tvb,LNET_PTL_INDEX_OFFSET_PUT), next_tvb, pinfo, tree);
 
                }
 
@@ -999,9 +999,9 @@ proto_reg_handoff_lnet(void)
                lnet_prefs_initialized = TRUE;
        }
        else
-               dissector_delete("tcp.port",global_lnet_tcp_port, lnet_handle);
+               dissector_delete_uint("tcp.port", global_lnet_tcp_port, lnet_handle);
 
        lnet_tcp_port = global_lnet_tcp_port;
 
-       dissector_add("tcp.port", lnet_tcp_port, lnet_handle);
+       dissector_add_uint("tcp.port", lnet_tcp_port, lnet_handle);
 }
index c2b7ab7..984cc6b 100644 (file)
@@ -11045,26 +11045,26 @@ void proto_reg_handoff_lustre(void)
   lustre_handle=create_dissector_handle(dissect_lustre, proto_lustre);
   /* we use Lustre only if we get ptl_index = One of this code (we have removed the bulk code) */
   /* in LNET we test if the message is a put or not before adding an lnet.ptl_index value */
-  dissector_add("lnet.ptl_index", MDC_REPLY_PORTAL          , lustre_handle);
-  dissector_add("lnet.ptl_index", CONNMGR_REQUEST_PORTAL    , lustre_handle);
-  dissector_add("lnet.ptl_index", CONNMGR_REPLY_PORTAL      , lustre_handle);
-  dissector_add("lnet.ptl_index", OSC_REPLY_PORTAL          , lustre_handle);
-  dissector_add("lnet.ptl_index", OST_IO_PORTAL             , lustre_handle);
-  dissector_add("lnet.ptl_index", OST_CREATE_PORTAL         , lustre_handle);
-  dissector_add("lnet.ptl_index", MDC_REPLY_PORTAL          , lustre_handle);
-  dissector_add("lnet.ptl_index", MDS_REQUEST_PORTAL        , lustre_handle);
-  dissector_add("lnet.ptl_index", LDLM_CB_REQUEST_PORTAL    , lustre_handle);
-  dissector_add("lnet.ptl_index", LDLM_CB_REPLY_PORTAL      , lustre_handle);
-  dissector_add("lnet.ptl_index", LDLM_CANCEL_REQUEST_PORTAL, lustre_handle);
-  dissector_add("lnet.ptl_index", LDLM_CANCEL_REPLY_PORTAL  , lustre_handle);
-  dissector_add("lnet.ptl_index", MDS_SETATTR_PORTAL        , lustre_handle);
-  dissector_add("lnet.ptl_index", MDS_READPAGE_PORTAL       , lustre_handle);
-  dissector_add("lnet.ptl_index", MGC_REPLY_PORTAL          , lustre_handle);
-  dissector_add("lnet.ptl_index", MGS_REQUEST_PORTAL        , lustre_handle);
-  dissector_add("lnet.ptl_index", MGS_REPLY_PORTAL          , lustre_handle);
-  dissector_add("lnet.ptl_index", OST_REQUEST_PORTAL        , lustre_handle);
-  dissector_add("lnet.ptl_index", FLD_REQUEST_PORTAL, lustre_handle);
-  dissector_add("lnet.ptl_index", SEQ_METADATA_PORTAL, lustre_handle);
-  dissector_add("lnet.ptl_index", SEQ_DATA_PORTAL, lustre_handle);
-  dissector_add("lnet.ptl_index", SEQ_CONTROLLER_PORTAL, lustre_handle);
+  dissector_add_uint("lnet.ptl_index", MDC_REPLY_PORTAL          , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", CONNMGR_REQUEST_PORTAL    , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", CONNMGR_REPLY_PORTAL      , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", OSC_REPLY_PORTAL          , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", OST_IO_PORTAL             , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", OST_CREATE_PORTAL         , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", MDC_REPLY_PORTAL          , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", MDS_REQUEST_PORTAL        , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", LDLM_CB_REQUEST_PORTAL    , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", LDLM_CB_REPLY_PORTAL      , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", LDLM_CANCEL_REQUEST_PORTAL, lustre_handle);
+  dissector_add_uint("lnet.ptl_index", LDLM_CANCEL_REPLY_PORTAL  , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", MDS_SETATTR_PORTAL        , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", MDS_READPAGE_PORTAL       , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", MGC_REPLY_PORTAL          , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", MGS_REQUEST_PORTAL        , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", MGS_REPLY_PORTAL          , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", OST_REQUEST_PORTAL        , lustre_handle);
+  dissector_add_uint("lnet.ptl_index", FLD_REQUEST_PORTAL, lustre_handle);
+  dissector_add_uint("lnet.ptl_index", SEQ_METADATA_PORTAL, lustre_handle);
+  dissector_add_uint("lnet.ptl_index", SEQ_DATA_PORTAL, lustre_handle);
+  dissector_add_uint("lnet.ptl_index", SEQ_CONTROLLER_PORTAL, lustre_handle);
 }