diff options
Diffstat (limited to 'epan/dissectors/packet-ieee80211-wlancap.c')
-rw-r--r-- | epan/dissectors/packet-ieee80211-wlancap.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/epan/dissectors/packet-ieee80211-wlancap.c b/epan/dissectors/packet-ieee80211-wlancap.c index ad53c78a30..a3efb2ff1f 100644 --- a/epan/dissectors/packet-ieee80211-wlancap.c +++ b/epan/dissectors/packet-ieee80211-wlancap.c @@ -72,27 +72,23 @@ static gint ett_wlancap = -1; static dissector_handle_t wlancap_handle; -void +gboolean capture_wlancap(const guchar *pd, int offset, int len, packet_counts *ld, const union wtap_pseudo_header *pseudo_header _U_) { guint32 length; - if (!BYTES_ARE_IN_FRAME(offset, len, sizeof(guint32)*2)) { - ld->other++; - return; - } + if (!BYTES_ARE_IN_FRAME(offset, len, sizeof(guint32)*2)) + return FALSE; length = pntoh32(pd+sizeof(guint32)); - if (!BYTES_ARE_IN_FRAME(offset, len, length)) { - ld->other++; - return; - } + if (!BYTES_ARE_IN_FRAME(offset, len, length)) + return FALSE; offset += length; /* 802.11 header follows */ - capture_ieee80211(pd, offset, len, ld, pseudo_header); + return capture_ieee80211(pd, offset, len, ld, pseudo_header); } /* @@ -849,7 +845,6 @@ void proto_register_ieee80211_wlancap(void) proto_register_field_array(proto_wlancap, hf_wlancap, array_length(hf_wlancap)); register_dissector("wlancap", dissect_wlancap, proto_wlancap); - register_capture_dissector(WTAP_ENCAP_IEEE_802_11_AVS, capture_wlancap, proto_wlancap); wlancap_handle = create_dissector_handle(dissect_wlancap, proto_wlancap); dissector_add_uint("wtap_encap", WTAP_ENCAP_IEEE_802_11_AVS, @@ -860,6 +855,7 @@ void proto_register_ieee80211_wlancap(void) void proto_reg_handoff_ieee80211_wlancap(void) { ieee80211_radio_handle = find_dissector("wlan_radio"); + register_capture_dissector("wtap_encap", WTAP_ENCAP_IEEE_802_11_AVS, capture_wlancap, proto_wlancap); } /* |