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/ethercat | |
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/ethercat')
-rw-r--r-- | plugins/ethercat/packet-ethercat-datagram.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/ethercat/packet-ethercat-datagram.c b/plugins/ethercat/packet-ethercat-datagram.c index 62f8ec9ed3..2c55934a24 100644 --- a/plugins/ethercat/packet-ethercat-datagram.c +++ b/plugins/ethercat/packet-ethercat-datagram.c @@ -452,6 +452,7 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree const guint datagram_length = tvb_length_remaining(tvb, offset); guint datagram_padding_bytes = 0; EcParserHDR ecHdr; + heur_dtbl_entry_t *hdtbl_entry; col_set_str(pinfo->cinfo, COL_PROTOCOL, "ECAT"); @@ -732,7 +733,7 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree init_dc_measure(pDC, tvb, suboffset); /* Allow sub dissectors to have a chance with this data */ - if(!dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, ecat_datagram_tree, NULL)) + if(!dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, ecat_datagram_tree, &hdtbl_entry, NULL)) { /* No sub dissector did recognize this data, dissect it as data only */ aitem = proto_tree_add_item(ecat_datagram_tree, hf_ecat_data, tvb, suboffset, ecHdr.len & 0x07ff, ENC_NA); @@ -815,7 +816,7 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree if ( dataLength > 0 ) { /* Allow sub dissectors to have a chance with this data */ - if(!dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, ecat_datagram_tree, NULL)) + if(!dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, ecat_datagram_tree, &hdtbl_entry, NULL)) { /* No sub dissector did recognize this data, dissect it as data only */ proto_tree_add_item(ecat_datagram_tree, hf_ecat_data, tvb, startOfData, dataLength, ENC_NA); @@ -833,7 +834,7 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree if( tree ) { /* Allow sub dissectors to have a chance with this data */ - if(!dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, ecat_datagram_tree, NULL)) + if(!dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, ecat_datagram_tree, &hdtbl_entry, NULL)) { /* No sub dissector did recognize this data, dissect it as data only */ proto_tree_add_item(ecat_datagram_tree, hf_ecat_data, tvb, suboffset, ecHdr.len & 0x07ff, ENC_NA); |