aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wps.c
diff options
context:
space:
mode:
authorRichard Sharpe <realrichardsharpe@gmail.com>2017-11-09 02:44:36 -0800
committerAnders Broman <a.broman58@gmail.com>2017-11-09 12:06:35 +0000
commit74936320a43c18a2ad538c8235e410f4912f6e4c (patch)
tree62103012786f26be8b5a6b56f5a93eca031cf56a /epan/dissectors/packet-wps.c
parentdc269fcd6f1ebc41d4e164f14dbb2a078bbb6265 (diff)
802.11: Correctly handle Wi-Fi Alliance Multi-AP subtype decoding.
Introduce a dissector table and fix a bug so that it now works by calling through a dissector table. Change-Id: Ifa3f01b3f306101b3144604a51806eaccc436373 Reviewed-on: https://code.wireshark.org/review/24319 Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-wps.c')
-rw-r--r--epan/dissectors/packet-wps.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/epan/dissectors/packet-wps.c b/epan/dissectors/packet-wps.c
index 107473d798..d4c6bdc96b 100644
--- a/epan/dissectors/packet-wps.c
+++ b/epan/dissectors/packet-wps.c
@@ -39,6 +39,7 @@
#include <epan/sminmpec.h>
#include "packet-wps.h"
+#include "packet-ieee80211.h"
void proto_register_wps(void);
@@ -880,6 +881,17 @@ dissect_wps_wfa_ext(proto_tree *tree, tvbuff_t *tvb,
}
}
+static int
+dissect_wps_wfa_ext_via_dt(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
+ void *data _U_)
+{
+ gint size = tvb_reported_length(tvb);
+
+ dissect_wps_wfa_ext(tree, tvb, 0, size);
+
+ return size;
+}
+
static void
dissect_wps_vendor_ext(proto_tree *tree, tvbuff_t *tvb,
int offset, gint size)
@@ -2540,6 +2552,12 @@ proto_register_wps(void)
expert_register_field_array(expert_wps, ei, array_length(ei));
}
+void
+proto_reg_handoff_wps(void)
+{
+ dissector_add_uint("wlan.ie.wifi_alliance.subtype", WFA_SUBTYPE_IEEE1905_MULTI_AP, create_dissector_handle(dissect_wps_wfa_ext_via_dt, -1));
+}
+
/*
* Editor modelines
*