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 /epan/dissectors/packet-eth.c | |
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 'epan/dissectors/packet-eth.c')
-rw-r--r-- | epan/dissectors/packet-eth.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c index 1bf82b4d21..6f86193061 100644 --- a/epan/dissectors/packet-eth.c +++ b/epan/dissectors/packet-eth.c @@ -229,6 +229,7 @@ dissect_eth_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, proto_item *addr_item; proto_tree *addr_tree=NULL; ethertype_data_t ethertype_data; + heur_dtbl_entry_t *hdtbl_entry = NULL; ehdr_num++; if(ehdr_num>=4){ @@ -259,7 +260,7 @@ dissect_eth_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, * a first look before we assume that it's actually an * Ethernet packet. */ - if (dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, parent_tree, NULL)) + if (dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, parent_tree, &hdtbl_entry, NULL)) return fh_tree; if (ehdr->type <= IEEE_802_3_MAX_LEN) { @@ -578,6 +579,7 @@ add_ethernet_trailer(packet_info *pinfo, proto_tree *tree, proto_tree *fh_tree, of the trailer are an FCS. */ proto_item *item; proto_tree *checksum_tree; + heur_dtbl_entry_t *hdtbl_entry; if (trailer_tvb) { guint trailer_length, trailer_reported_length; @@ -656,7 +658,7 @@ add_ethernet_trailer(packet_info *pinfo, proto_tree *tree, proto_tree *fh_tree, we actually have a trailer. */ if (tvb_reported_length(real_trailer_tvb) != 0) { if (dissector_try_heuristic(eth_trailer_subdissector_list, - real_trailer_tvb, pinfo, tree, NULL) ) { + real_trailer_tvb, pinfo, tree, &hdtbl_entry, NULL) ) { /* If we're not sure that there is a FCS, all trailer data has been given to the ethernet-trailer dissector, so stop dissecting here */ |