aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smb-pipe.c
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2014-05-20 12:54:20 +0200
committerAnders Broman <a.broman58@gmail.com>2014-05-21 20:17:29 +0000
commit2cfda31ff09893bd8c59acabc8faad7227f52ede (patch)
treea0bee1c33fe7bc2eeced9c2f7fe0bbe7628cebcd /epan/dissectors/packet-smb-pipe.c
parentbb01c7ac380a2978d8e1c5ca8fa7f2dd523a8323 (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-smb-pipe.c')
-rw-r--r--epan/dissectors/packet-smb-pipe.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/dissectors/packet-smb-pipe.c b/epan/dissectors/packet-smb-pipe.c
index f72e21aa35..2a3a5a45cf 100644
--- a/epan/dissectors/packet-smb-pipe.c
+++ b/epan/dissectors/packet-smb-pipe.c
@@ -3242,6 +3242,8 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree
tvbuff_t *new_tvb;
proto_item *frag_tree_item;
+ heur_dtbl_entry_t *hdtbl_entry;
+
dcerpc_set_transport_salt(fid, pinfo);
/*
@@ -3263,7 +3265,7 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree
and bail out
*/
if(!pinfo->can_desegment){
- result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, NULL);
+ result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, &hdtbl_entry, NULL);
goto clean_up_and_exit;
}
@@ -3294,7 +3296,7 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree
* Try the heuristic dissectors and see if we
* find someone that recognizes this payload.
*/
- result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, NULL);
+ result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, &hdtbl_entry, NULL);
/* no this didnt look like something we know */
if(!result){
@@ -3345,7 +3347,7 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree
tree, pinfo, d_tvb, &frag_tree_item);
/* dissect the full PDU */
- result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, NULL);
+ result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, &hdtbl_entry, NULL);
}
goto clean_up_and_exit;
}
@@ -3365,12 +3367,12 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree
/* we didnt find it, try any of the heuristic dissectors
and bail out
*/
- result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, NULL);
+ result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, &hdtbl_entry, NULL);
goto clean_up_and_exit;
}
if(!(fd_head->flags&FD_DEFRAGMENTED)){
/* we dont have a fully reassembled frame */
- result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, NULL);
+ result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, &hdtbl_entry, NULL);
goto clean_up_and_exit;
}
@@ -3394,7 +3396,7 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree
tree, pinfo, d_tvb, &frag_tree_item);
/* dissect the full PDU */
- result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, NULL);
+ result = dissector_try_heuristic(smb_transact_heur_subdissector_list, d_tvb, pinfo, parent_tree, &hdtbl_entry, NULL);