* Re: [PATCH v2 1/2] mpdu: fix timestamp size in mpdu frames
2022-09-15 21:18 [PATCH v2 1/2] mpdu: fix timestamp size in mpdu frames James Prestwood
@ 2022-09-15 21:16 ` Denis Kenzior
2022-09-15 21:18 ` [PATCH v2 2/2] monitor: parse probe response frames James Prestwood
1 sibling, 0 replies; 3+ messages in thread
From: Denis Kenzior @ 2022-09-15 21:16 UTC (permalink / raw)
To: James Prestwood, iwd
Hi James,
On 9/15/22 16:18, James Prestwood wrote:
> Beacons, probe responses and timing advertisements were only using
> 1 byte for the timestamps which should be 8 bytes.
> ---
> src/mpdu.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> v2:
> * Use __le64 rather than uint64_t
>
Both applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/2] mpdu: fix timestamp size in mpdu frames
@ 2022-09-15 21:18 James Prestwood
2022-09-15 21:16 ` Denis Kenzior
2022-09-15 21:18 ` [PATCH v2 2/2] monitor: parse probe response frames James Prestwood
0 siblings, 2 replies; 3+ messages in thread
From: James Prestwood @ 2022-09-15 21:18 UTC (permalink / raw)
To: iwd; +Cc: James Prestwood
Beacons, probe responses and timing advertisements were only using
1 byte for the timestamps which should be 8 bytes.
---
src/mpdu.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
v2:
* Use __le64 rather than uint64_t
diff --git a/src/mpdu.h b/src/mpdu.h
index 36fe2470..9a825f2a 100644
--- a/src/mpdu.h
+++ b/src/mpdu.h
@@ -374,7 +374,7 @@ struct mmpdu_probe_request {
/* 802.11, Section 8.3.3.10 */
struct mmpdu_probe_response {
- uint8_t timestamp;
+ __le64 timestamp;
__le16 beacon_interval;
struct mmpdu_field_capability capability;
uint8_t ies[0];
@@ -382,14 +382,14 @@ struct mmpdu_probe_response {
/* 802.11, Section 8.3.3.15 */
struct mmpdu_timing_advertisement {
- uint8_t timestamp;
+ __le64 timestamp;
struct mmpdu_field_capability capability;
uint8_t ies[0];
} __attribute__ ((packed));
/* 802.11, Section 8.3.3.2 */
struct mmpdu_beacon {
- uint8_t timestamp;
+ __le64 timestamp;
__le16 beacon_interval;
struct mmpdu_field_capability capability;
uint8_t ies[0];
--
2.34.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] monitor: parse probe response frames
2022-09-15 21:18 [PATCH v2 1/2] mpdu: fix timestamp size in mpdu frames James Prestwood
2022-09-15 21:16 ` Denis Kenzior
@ 2022-09-15 21:18 ` James Prestwood
1 sibling, 0 replies; 3+ messages in thread
From: James Prestwood @ 2022-09-15 21:18 UTC (permalink / raw)
To: iwd; +Cc: James Prestwood
---
monitor/nlmon.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/monitor/nlmon.c b/monitor/nlmon.c
index 15f4c828..5ae014e4 100644
--- a/monitor/nlmon.c
+++ b/monitor/nlmon.c
@@ -5018,6 +5018,16 @@ static void print_action_mgmt_frame(unsigned int level,
print_mmpdu_header(level + 1, mmpdu);
}
+static void print_probe_response(unsigned int level,
+ const struct mmpdu_header *mmpdu, size_t len)
+{
+ const struct mmpdu_probe_response *resp = mmpdu_body(mmpdu);
+
+ print_attr(level, "Subtype: Probe Response");
+ print_ie(level + 1, "Probe Response IEs", resp->ies,
+ (const uint8_t *) mmpdu + len - resp->ies);
+}
+
static void print_frame_type(unsigned int level, const char *label,
const void *data, uint16_t size)
{
@@ -5063,7 +5073,10 @@ static void print_frame_type(unsigned int level, const char *label,
str = "Probe request";
break;
case 0x05:
- str = "Probe response";
+ if (mpdu)
+ print_probe_response(level + 1, mpdu, size);
+ else
+ str = "Probe response";
break;
case 0x06:
str = "Timing Advertisement";
--
2.34.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-15 21:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-15 21:18 [PATCH v2 1/2] mpdu: fix timestamp size in mpdu frames James Prestwood
2022-09-15 21:16 ` Denis Kenzior
2022-09-15 21:18 ` [PATCH v2 2/2] monitor: parse probe response frames James Prestwood
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).