summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-frame.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-06-16 10:51:47 -0700
committerGuy Harris <guy@alum.mit.edu>2015-06-16 17:52:14 +0000
commit200c15e96dd84bdc8d6f856b262d726d752594d4 (patch)
treeb3e2034301dd85275b486ea9275d381927f5265e /epan/dissectors/packet-frame.c
parent46a9afb462380a1e0c3abc1587a8c25f89c5f9b1 (diff)
downloadwireshark-200c15e96dd84bdc8d6f856b262d726d752594d4.tar.gz
Pass the pseudo-header to wtap_encap dissectors via the "data" argument.
Have the "data" argument to dissectors registered in thw wtap_encap dissector table point to the pseudo-header for the packet. Use that argument in the Bluetooth dissector. Change-Id: I022bbfb796ef51d95df09fb952a149960170d631 Reviewed-on: https://code.wireshark.org/review/8951 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-frame.c')
-rw-r--r--epan/dissectors/packet-frame.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index df9258073b..3e03074f77 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -491,15 +491,20 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
case REC_TYPE_PACKET:
if ((force_docsis_encap) && (docsis_handle)) {
- call_dissector(docsis_handle, tvb, pinfo, parent_tree);
+ call_dissector_with_data(docsis_handle,
+ tvb, pinfo, parent_tree,
+ (void *)pinfo->pseudo_header);
} else {
- if (!dissector_try_uint(wtap_encap_dissector_table, pinfo->fd->lnk_t,
- tvb, pinfo, parent_tree)) {
-
+ if (!dissector_try_uint_new(wtap_encap_dissector_table,
+ pinfo->fd->lnk_t, tvb, pinfo,
+ parent_tree, TRUE,
+ (void *)pinfo->pseudo_header)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
col_add_fstr(pinfo->cinfo, COL_INFO, "WTAP_ENCAP = %d",
pinfo->fd->lnk_t);
- call_dissector(data_handle,tvb, pinfo, parent_tree);
+ call_dissector_with_data(data_handle,
+ tvb, pinfo, parent_tree,
+ (void *)pinfo->pseudo_header);
}
}
break;
@@ -514,8 +519,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
}
if (!dissector_try_uint(wtap_fts_rec_dissector_table, file_type_subtype,
- tvb, pinfo, parent_tree)) {
-
+ tvb, pinfo, parent_tree)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
col_add_fstr(pinfo->cinfo, COL_INFO, "WTAP_ENCAP = %d",
file_type_subtype);