summaryrefslogtreecommitdiff
path: root/package/iwinfo/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'package/iwinfo/src/include')
-rw-r--r--package/iwinfo/src/include/iwinfo.h15
-rw-r--r--package/iwinfo/src/include/iwinfo/madwifi.h2
-rw-r--r--package/iwinfo/src/include/iwinfo/nl80211.h2
-rw-r--r--package/iwinfo/src/include/iwinfo/wext.h2
-rw-r--r--package/iwinfo/src/include/iwinfo/wl.h2
5 files changed, 17 insertions, 6 deletions
diff --git a/package/iwinfo/src/include/iwinfo.h b/package/iwinfo/src/include/iwinfo.h
index 72e2333617..3c8b418831 100644
--- a/package/iwinfo/src/include/iwinfo.h
+++ b/package/iwinfo/src/include/iwinfo.h
@@ -49,6 +49,17 @@ extern const char *IWINFO_KMGMT_NAMES[];
extern const char *IWINFO_AUTH_NAMES[];
+enum iwinfo_opmode {
+ IWINFO_OPMODE_UNKNOWN = 0,
+ IWINFO_OPMODE_MASTER = 1,
+ IWINFO_OPMODE_ADHOC = 2,
+ IWINFO_OPMODE_CLIENT = 3,
+ IWINFO_OPMODE_MONITOR = 4,
+};
+
+extern const char *IWINFO_OPMODE_NAMES[];
+
+
struct iwinfo_rate_entry {
uint16_t rate;
uint8_t mcs;
@@ -90,7 +101,7 @@ struct iwinfo_crypto_entry {
struct iwinfo_scanlist_entry {
uint8_t mac[6];
uint8_t ssid[IWINFO_ESSID_MAX_SIZE+1];
- uint8_t mode[8];
+ enum iwinfo_opmode mode;
uint8_t channel;
uint8_t signal;
uint8_t quality;
@@ -131,6 +142,7 @@ extern const struct iwinfo_hardware_entry IWINFO_HARDWARE_ENTRIES[];
struct iwinfo_ops {
+ int (*mode)(const char *, int *);
int (*channel)(const char *, int *);
int (*frequency)(const char *, int *);
int (*frequency_offset)(const char *, int *);
@@ -143,7 +155,6 @@ struct iwinfo_ops {
int (*quality_max)(const char *, int *);
int (*mbssid_support)(const char *, int *);
int (*hwmodelist)(const char *, int *);
- int (*mode)(const char *, char *);
int (*ssid)(const char *, char *);
int (*bssid)(const char *, char *);
int (*country)(const char *, char *);
diff --git a/package/iwinfo/src/include/iwinfo/madwifi.h b/package/iwinfo/src/include/iwinfo/madwifi.h
index 9acbc36460..14d81352b7 100644
--- a/package/iwinfo/src/include/iwinfo/madwifi.h
+++ b/package/iwinfo/src/include/iwinfo/madwifi.h
@@ -26,7 +26,7 @@
#include "iwinfo/api/madwifi.h"
int madwifi_probe(const char *ifname);
-int madwifi_get_mode(const char *ifname, char *buf);
+int madwifi_get_mode(const char *ifname, int *buf);
int madwifi_get_ssid(const char *ifname, char *buf);
int madwifi_get_bssid(const char *ifname, char *buf);
int madwifi_get_country(const char *ifname, char *buf);
diff --git a/package/iwinfo/src/include/iwinfo/nl80211.h b/package/iwinfo/src/include/iwinfo/nl80211.h
index 7bbf0ef7bf..28545141d0 100644
--- a/package/iwinfo/src/include/iwinfo/nl80211.h
+++ b/package/iwinfo/src/include/iwinfo/nl80211.h
@@ -68,7 +68,7 @@ struct nl80211_array_buf {
};
int nl80211_probe(const char *ifname);
-int nl80211_get_mode(const char *ifname, char *buf);
+int nl80211_get_mode(const char *ifname, int *buf);
int nl80211_get_ssid(const char *ifname, char *buf);
int nl80211_get_bssid(const char *ifname, char *buf);
int nl80211_get_country(const char *ifname, char *buf);
diff --git a/package/iwinfo/src/include/iwinfo/wext.h b/package/iwinfo/src/include/iwinfo/wext.h
index 8412ef39b3..68b596ea8b 100644
--- a/package/iwinfo/src/include/iwinfo/wext.h
+++ b/package/iwinfo/src/include/iwinfo/wext.h
@@ -27,7 +27,7 @@
int wext_probe(const char *ifname);
-int wext_get_mode(const char *ifname, char *buf);
+int wext_get_mode(const char *ifname, int *buf);
int wext_get_ssid(const char *ifname, char *buf);
int wext_get_bssid(const char *ifname, char *buf);
int wext_get_country(const char *ifname, char *buf);
diff --git a/package/iwinfo/src/include/iwinfo/wl.h b/package/iwinfo/src/include/iwinfo/wl.h
index 47dda47102..db37e3759d 100644
--- a/package/iwinfo/src/include/iwinfo/wl.h
+++ b/package/iwinfo/src/include/iwinfo/wl.h
@@ -26,7 +26,7 @@
#include "iwinfo/api/broadcom.h"
int wl_probe(const char *ifname);
-int wl_get_mode(const char *ifname, char *buf);
+int wl_get_mode(const char *ifname, int *buf);
int wl_get_ssid(const char *ifname, char *buf);
int wl_get_bssid(const char *ifname, char *buf);
int wl_get_country(const char *ifname, char *buf);