From f17e4b94287025f8223364cb9aee9b4b780b8c10 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Mon, 27 Apr 2015 18:49:32 +0300 Subject: [PATCH] netsniff-ng mac80211: Print probe request IEs info 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 Signed-off-by: Tobias Klauser --- 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 e37397c0..d1a36b52 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.11.4.GIT