From: Vadim Kochan <[email protected]>
As probe request frame consist only with IE params so just
do a similar print of these params as it was done for beacon.
Also using mgmt_{func}_dissect naming for mgmt frame dissectors.
Signed-off-by: Vadim Kochan <[email protected]>
---
proto_80211_mac_hdr.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/proto_80211_mac_hdr.c b/proto_80211_mac_hdr.c
index e37397c..d1a36b5 100644
--- a/proto_80211_mac_hdr.c
+++ b/proto_80211_mac_hdr.c
@@ -2961,7 +2961,7 @@ static void print_inf_elements(struct pkt_buff *pkt)
}
/* Management Dissectors */
-static int8_t beacon(struct pkt_buff *pkt)
+static int8_t mgmt_beacon_dissect(struct pkt_buff *pkt)
{
struct ieee80211_mgmt_beacon *beacon;
@@ -2984,6 +2984,16 @@ static int8_t beacon(struct pkt_buff *pkt)
return 1;
}
+static int8_t mgmt_probe_request_dissect(struct pkt_buff *pkt)
+{
+ print_inf_elements(pkt);
+
+ if (pkt_len(pkt))
+ return 0;
+
+ return 1;
+}
+
static int8_t mgmt_unimplemented(struct pkt_buff *pkt __maybe_unused)
{
return 0;
@@ -3069,13 +3079,13 @@ static const char *mgt_sub(u8 subtype, struct pkt_buff
*pkt,
*get_content = mgmt_unimplemented;
return "Reassociation Response";
case 0x4:
- *get_content = mgmt_unimplemented;
+ *get_content = mgmt_probe_request_dissect;
return "Probe Request";
case 0x5:
*get_content = mgmt_unimplemented;
return "Probe Response";
case 0x8:
- *get_content = beacon;
+ *get_content = mgmt_beacon_dissect;
return "Beacon";
case 0x9:
*get_content = mgmt_unimplemented;
--
2.3.1
--
You received this message because you are subscribed to the Google Groups
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.