diff options
author | AndersBroman <anders.broman@ericsson.com> | 2014-05-20 12:54:20 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-05-21 20:17:29 +0000 |
commit | 2cfda31ff09893bd8c59acabc8faad7227f52ede (patch) | |
tree | a0bee1c33fe7bc2eeced9c2f7fe0bbe7628cebcd /plugins/profinet | |
parent | bb01c7ac380a2978d8e1c5ca8fa7f2dd523a8323 (diff) |
Change the signature of dissector_try_heuristic() to return hdtbl_entry
which can be used to call the found heuristic dissector on the next pass.
Introduce call_heur_dissector_direct() to be used to call a heuristic
dissector which accepted the frame on the first pass.
Change-Id: I524edd717b7d92b510bd60acfeea686d5f2b4582
Reviewed-on: https://code.wireshark.org/review/1697
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'plugins/profinet')
-rw-r--r-- | plugins/profinet/packet-dcerpc-pn-io.c | 3 | ||||
-rw-r--r-- | plugins/profinet/packet-pn-rt.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/profinet/packet-dcerpc-pn-io.c b/plugins/profinet/packet-dcerpc-pn-io.c index de611d4c3c..945a4ca0ca 100644 --- a/plugins/profinet/packet-dcerpc-pn-io.c +++ b/plugins/profinet/packet-dcerpc-pn-io.c @@ -9415,13 +9415,14 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 *drep = &drep_data; guint8 u8CBAVersion; guint16 u16FrameID; + heur_dtbl_entry_t *hdtbl_entry; /* * In case the packet is a protocol encoded in the basic PNIO transport stream, * give that protocol a chance to make a heuristic dissection, before we continue * to dissect it as a normal PNIO packet. */ - if (dissector_try_heuristic(heur_pn_subdissector_list, tvb, pinfo, tree, NULL)) + if (dissector_try_heuristic(heur_pn_subdissector_list, tvb, pinfo, tree, &hdtbl_entry, NULL)) return TRUE; /* the sub tvb will NOT contain the frame_id here! */ diff --git a/plugins/profinet/packet-pn-rt.c b/plugins/profinet/packet-pn-rt.c index 996bc73062..a93a4ce2ea 100644 --- a/plugins/profinet/packet-pn-rt.c +++ b/plugins/profinet/packet-pn-rt.c @@ -495,6 +495,7 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gchar szFieldSummary[100]; tvbuff_t *next_tvb; gboolean bCyclic; + heur_dtbl_entry_t *hdtbl_entry; /* If the link-layer dissector for the protocol above us knows whether @@ -806,7 +807,7 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) next_tvb = tvb_new_subset(tvb, 2, data_len, data_len); /* ask heuristics, if some sub-dissector is interested in this packet payload */ - if (!dissector_try_heuristic(heur_subdissector_list, next_tvb, pinfo, tree, NULL)) { + if (!dissector_try_heuristic(heur_subdissector_list, next_tvb, pinfo, tree, &hdtbl_entry, NULL)) { /*col_set_str(pinfo->cinfo, COL_INFO, "Unknown");*/ /* Oh, well, we don't know this; dissect it as data. */ |