diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-06-18 13:12:43 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-06-18 20:13:50 +0000 |
commit | d9b36c46d025519a309bf34c1255e1f9a2856a41 (patch) | |
tree | c4058af3b6ab611043dff9a26364ae2232a1f984 /epan/dissectors/packet-ieee80211-radio.c | |
parent | f00e6fbefe073bd74e934c2e5f2494e0d0da13ff (diff) | |
download | wireshark-d9b36c46d025519a309bf34c1255e1f9a2856a41.tar.gz |
Pass the 802.11 pseudo-header as an argument.
Rather than accessing it through pinfo->pseudo_header, have it passed as
an argument.
This means we no longer tweak the pseudo-header filled in by libwiretap,
but instead construct our own pseudo-header, which is a bit cleaner.
It also opens up the possibility of other dissectors passing radio
information down to the 802.11 dissector, so it can display it in a
better-organized format than the raw metadata headers for
radiotap/PPI/Prism/AVS/etc., and having some of the options for 802.11
dissection (Atheros padding, Centrino stuff, etc.) also passed in
through that pseudo-header so we have fewer arguments to
dissect_ieee80211_common().
Change-Id: I470300a0407ebf029c542f7ca5878593563a70a9
Reviewed-on: https://code.wireshark.org/review/8980
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ieee80211-radio.c')
-rw-r--r-- | epan/dissectors/packet-ieee80211-radio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ieee80211-radio.c b/epan/dissectors/packet-ieee80211-radio.c index da32cfd376..f965396e14 100644 --- a/epan/dissectors/packet-ieee80211-radio.c +++ b/epan/dissectors/packet-ieee80211-radio.c @@ -464,8 +464,8 @@ static gint ett_radio = -1; * Dissect 802.11 with a variable-length link-layer header and a pseudo- * header containing radio information. */ -static void -dissect_radio (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) +static int +dissect_radio (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void *data) { proto_item *ti = NULL; proto_tree *radio_tree = NULL; @@ -590,7 +590,7 @@ dissect_radio (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) /* dissect the 802.11 header next */ pinfo->current_proto = "IEEE 802.11"; - call_dissector(ieee80211_handle, tvb, pinfo, tree); + return call_dissector_with_data(ieee80211_handle, tvb, pinfo, tree, data); } static hf_register_info hf_radio[] = { @@ -652,7 +652,7 @@ void proto_reg_handoff_ieee80211_radio(void) dissector_handle_t radio_handle; /* Register handoff to radio-header dissectors */ - radio_handle = create_dissector_handle(dissect_radio, proto_radio); + radio_handle = new_create_dissector_handle(dissect_radio, proto_radio); dissector_add_uint("wtap_encap", WTAP_ENCAP_IEEE_802_11_WITH_RADIO, radio_handle); ieee80211_handle = find_dissector("wlan"); |