summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heider <a.heider@gmail.com>2022-11-21 13:50:16 +0100
committerJo-Philipp Wich <jo@mein.io>2022-12-16 00:09:07 +0100
commit1d30df192986dc775750d09109eb386b9ff8e83e (patch)
treed9abae0378b8ce8d54ba135632a422c379da7161
parentaefd0ef68fa8c6d7a622d84f1e8085a11321887a (diff)
downloadiwinfo-1d30df192986dc775750d09109eb386b9ff8e83e.tar.gz
lib: add IWINFO_BAND_COUNT and IWINFO_BAND_NAMES
Signed-off-by: Andre Heider <a.heider@gmail.com>
-rw-r--r--include/iwinfo.h2
-rw-r--r--iwinfo_lib.c7
2 files changed, 9 insertions, 0 deletions
diff --git a/include/iwinfo.h b/include/iwinfo.h
index 71fadab..fee665c 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -35,6 +35,7 @@
#define IWINFO_BAND_5 (1 << 1)
#define IWINFO_BAND_6 (1 << 2)
#define IWINFO_BAND_60 (1 << 3)
+#define IWINFO_BAND_COUNT 4
#define IWINFO_CIPHER_NONE (1 << 0)
#define IWINFO_CIPHER_WEP40 (1 << 1)
@@ -68,6 +69,7 @@
#define IWINFO_FREQ_NO_160MHZ (1 << 5)
#define IWINFO_FREQ_NO_HE (1 << 6)
+extern const char * const IWINFO_BAND_NAMES[IWINFO_BAND_COUNT];
extern const char * const IWINFO_CIPHER_NAMES[IWINFO_CIPHER_COUNT];
extern const char * const IWINFO_KMGMT_NAMES[IWINFO_KMGMT_COUNT];
extern const char * const IWINFO_AUTH_NAMES[IWINFO_AUTH_COUNT];
diff --git a/iwinfo_lib.c b/iwinfo_lib.c
index 7fbf811..22c4ef6 100644
--- a/iwinfo_lib.c
+++ b/iwinfo_lib.c
@@ -22,6 +22,13 @@
/*
* name constants
*/
+const char * const IWINFO_BAND_NAMES[IWINFO_BAND_COUNT] = {
+ "2.4 GHz",
+ "5 GHz",
+ "6 GHz",
+ "60 GHz",
+};
+
const char * const IWINFO_CIPHER_NAMES[IWINFO_CIPHER_COUNT] = {
"NONE",
"WEP-40",