about summary refs log tree commit diff stats
path: root/src/libwifi/core/radiotap/platform.h
diff options
context:
space:
mode:
authorZduniusz <31253374+Zduniusz@users.noreply.github.com>2023-04-15 04:42:28 +0200
committerGitHub <noreply@github.com>2023-04-15 12:42:28 +1000
commit7b7e77b71449f76c262dc247785c15c6220cf890 (patch)
treebde6c303640e78293faa4f306e1dc85f64d98fb7 /src/libwifi/core/radiotap/platform.h
parentcf8c10c71a73f42b8ed113f823b4ae60db692d8a (diff)
downloadlibwifi-7b7e77b71449f76c262dc247785c15c6220cf890.tar.gz
libwifi-7b7e77b71449f76c262dc247785c15c6220cf890.tar.bz2
libwifi-7b7e77b71449f76c262dc247785c15c6220cf890.zip
Add support for ESP32 (#17)
* Add support for ESP32

* core: Check length of body before allocating

Frames with no body may be worth parsing, but should avoid the allocation
of zero-length bodies. Instead, we'll check if the body exists in the
parsed data and if that length is zero, return early with success.

Fixes #16

* misc: Run GitHub build actions on pull requests

* Add support for ESP32

---------

Co-authored-by: Zduniusz <Zduniusz@thisemaildoesnotexist.com>
Co-authored-by: Marc <marc@malloc.me>
Diffstat (limited to 'src/libwifi/core/radiotap/platform.h')
-rw-r--r--src/libwifi/core/radiotap/platform.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libwifi/core/radiotap/platform.h b/src/libwifi/core/radiotap/platform.h index e0ad99f..fd92481 100644 --- a/src/libwifi/core/radiotap/platform.h +++ b/src/libwifi/core/radiotap/platform.h
@@ -35,6 +35,10 @@
35#include <sys/types.h> 35#include <sys/types.h>
36#endif 36#endif
37 37
38#if defined(ESP_PLATFORM)
39#include "endian.h"
40#endif
41
38#ifndef le16_to_cpu 42#ifndef le16_to_cpu
39#define le16_to_cpu le16toh 43#define le16_to_cpu le16toh
40#endif 44#endif