From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 6/6] monitor: parse DPP frame types
Date: Wed, 5 Oct 2022 15:46:32 -0700 [thread overview]
Message-ID: <20221005224632.780575-6-prestwoj@gmail.com> (raw)
In-Reply-To: <20221005224632.780575-1-prestwoj@gmail.com>
Parses the type of frame for easier debugging.
---
monitor/nlmon.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/monitor/nlmon.c b/monitor/nlmon.c
index 2e232130..2222db09 100644
--- a/monitor/nlmon.c
+++ b/monitor/nlmon.c
@@ -4724,6 +4724,36 @@ static void print_anqp_frame(unsigned int level, const uint8_t *anqp,
}
}
+static void print_dpp_public_action_frame(unsigned int level,
+ const uint8_t *data, size_t len)
+{
+ print_attr(level, "DPP Action Frame");
+
+ print_attr(level + 1, "Crypto Suite: %u", *data);
+ data++;
+
+ switch (*data) {
+ case 0:
+ print_attr(level + 1, "Type: Authentication Request");
+ break;
+ case 1:
+ print_attr(level + 1, "Type: Authentication Response");
+ break;
+ case 2:
+ print_attr(level + 1, "Type: Authentication Confirm");
+ break;
+ case 11:
+ print_attr(level + 1, "Type: Configuration Result");
+ break;
+ case 13:
+ print_attr(level + 1, "Type: Presence Announcement");
+ break;
+ default:
+ print_attr(level + 1, "Type: Unknown (%u)", *data);
+ break;
+ }
+}
+
static void print_public_action_frame(unsigned int level, const uint8_t *body,
size_t body_len)
{
@@ -4791,6 +4821,12 @@ static void print_public_action_frame(unsigned int level, const uint8_t *body,
print_p2p_public_action_frame(level + 1, body + 5,
body_len - 5);
+ } else if (!memcmp(oui, wifi_alliance_oui, 3) && oui[3] == 0x1a) {
+ if (!print_oui(level, oui))
+ return;
+
+ print_dpp_public_action_frame(level + 1, body + 5,
+ body_len - 5);
} else if (body[0] == 0x0a) {
if (body_len < 9)
return;
--
2.34.3
next prev parent reply other threads:[~2022-10-05 22:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 22:46 [PATCH 1/6] station: add two debug events for FT James Prestwood
2022-10-05 22:46 ` [PATCH 2/6] hwsim: fix early bail out processing rules James Prestwood
2022-10-05 22:46 ` [PATCH 3/6] auto-t: remove rekey timeouts from autotests James Prestwood
2022-10-05 22:46 ` [PATCH 4/6] auto-t: remove old debug print from wpas.py James Prestwood
2022-10-05 22:46 ` [PATCH 5/6] auto-t: add two tests for new FT behavior James Prestwood
2022-10-05 22:46 ` James Prestwood [this message]
2022-10-06 14:02 ` [PATCH 1/6] station: add two debug events for FT Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221005224632.780575-6-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).