summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-04-27 18:49:32 +0300
committerTobias Klauser <tklauser@distanz.ch>2015-05-02 17:06:42 +0200
commitf17e4b94287025f8223364cb9aee9b4b780b8c10 (patch)
tree6e1184e61a7e365c5207a61763cb4ee33c676d63
parent9a3101878c03ef0b197a81907cadca7e56a6acd6 (diff)
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 <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--proto_80211_mac_hdr.c16
1 files 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;