aboutsummaryrefslogtreecommitdiffstats
path: root/package/iwinfo/src/include/iwinfo.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-02-23 13:16:09 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-02-23 13:16:09 +0000
commit76bb0f3309862e021d454783a957306b63613a9a (patch)
treec23c154a552ba0fd7f2e2d2a2eff3ea72dc7708d /package/iwinfo/src/include/iwinfo.h
parentb1af9a779fda99262632d69c085aea16e17ac809 (diff)
downloadupstream-76bb0f3309862e021d454783a957306b63613a9a.tar.gz
upstream-76bb0f3309862e021d454783a957306b63613a9a.tar.bz2
upstream-76bb0f3309862e021d454783a957306b63613a9a.zip
iwinfo: replace internal constant mode strings with enums
SVN-Revision: 30692
Diffstat (limited to 'package/iwinfo/src/include/iwinfo.h')
-rw-r--r--package/iwinfo/src/include/iwinfo.h15
1 files changed, 13 insertions, 2 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 *);