aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rpcrdma.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-12-20 08:58:49 -0500
committerMichael Mann <mmann78@netscape.net>2016-12-20 22:15:56 +0000
commit4c50e4b5c4d794de3944c05bd8ce3ed778a13443 (patch)
treeec28f762587eaa271956de1ff98eb69137ecce74 /epan/dissectors/packet-rpcrdma.c
parentcaadaaf62317a88f99373d9095b827102999e4e3 (diff)
Improve Infiniband heuristic subdissection.
Add preference in Infiniband dissector to distinguish between heuristic and non-heuristic dissection (that uses Decode As). Remove all of the preferences in the Infiniband subdissectors that tried to put in "manual" heuristics and direct users to just use Decode As. Most subdissectors still kept some basic heuristics in their heuristic functions, but now also register with the Infiniband dissector table for "manually" forcing dissection with Decode As. Ping-Bug: 13259 Change-Id: I20d56eee38887664b439e52ec5f5b8f962c45ef1 Reviewed-on: https://code.wireshark.org/review/19362 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-rpcrdma.c')
-rw-r--r--epan/dissectors/packet-rpcrdma.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/epan/dissectors/packet-rpcrdma.c b/epan/dissectors/packet-rpcrdma.c
index 12346ee7a7..826604cc92 100644
--- a/epan/dissectors/packet-rpcrdma.c
+++ b/epan/dissectors/packet-rpcrdma.c
@@ -475,7 +475,7 @@ packet_is_rpcordma(tvbuff_t *tvb)
}
static int
-dissect_rpcrdma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+dissect_rpcrdma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
tvbuff_t *next_tvb;
proto_item *ti;
@@ -599,7 +599,7 @@ dissect_rpcrdma_ib_heur(tvbuff_t *tvb, packet_info *pinfo,
if (!packet_is_rpcordma(tvb))
return FALSE;
- dissect_rpcrdma(tvb, pinfo, tree);
+ dissect_rpcrdma(tvb, pinfo, tree, NULL);
return TRUE;
}
@@ -623,7 +623,7 @@ dissect_rpcrdma_iwarp_heur(tvbuff_t *tvb, packet_info *pinfo,
if (!packet_is_rpcordma(tvb))
return FALSE;
- dissect_rpcrdma(tvb, pinfo, tree);
+ dissect_rpcrdma(tvb, pinfo, tree, NULL);
return TRUE;
}
@@ -757,23 +757,14 @@ proto_register_rpcordma(void)
void
proto_reg_handoff_rpcordma(void)
{
- static gboolean initialized = FALSE;
+ heur_dissector_add("infiniband.payload", dissect_rpcrdma_ib_heur, "RPC-over-RDMA on Infiniband",
+ "rpcrdma_infiniband", proto_rpcordma, HEURISTIC_ENABLE);
+ dissector_add_for_decode_as("infiniband", create_dissector_handle( dissect_rpcrdma, proto_rpcordma ) );
- if (!initialized) {
- heur_dissector_add("infiniband.payload", dissect_rpcrdma_ib_heur, "RPC-over-RDMA on Infiniband",
- "rpcrdma_infiniband", proto_rpcordma, HEURISTIC_ENABLE);
- heur_dissector_add("iwarp_ddp_rdmap", dissect_rpcrdma_iwarp_heur, "RPC-over-RDMA on iWARP",
- "rpcrdma_iwarp", proto_rpcordma, HEURISTIC_ENABLE);
+ heur_dissector_add("iwarp_ddp_rdmap", dissect_rpcrdma_iwarp_heur, "RPC-over-RDMA on iWARP",
+ "rpcrdma_iwarp", proto_rpcordma, HEURISTIC_ENABLE);
- /* The following is never used: there are no known implementations, and no specification */
- heur_dissector_add("infiniband.mad.cm.private", dissect_rpcrdma_ib_heur,
- "RPC over RDMA in PrivateData of CM packets",
- "rpcordma_ib_private", proto_rpcordma, HEURISTIC_ENABLE);
-
- rpc_handler = find_dissector_add_dependency("rpc", proto_rpcordma);
-
- initialized = TRUE;
- }
+ rpc_handler = find_dissector_add_dependency("rpc", proto_rpcordma);
}
/*