mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 17:59:25 +01:00
monitor: parse DPP frame types
Parses the type of frame for easier debugging.
This commit is contained in:
parent
1d3455ba16
commit
bc3722060e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user