iwinfo: add support for GCMP cipher
[project/iwinfo.git] / include / iwinfo.h
index b07820d8e2a39d76a66937647ccd04424dced35b..5799c02be2c727cc7eccfa9f2fe8641c0302573c 100644 (file)
@@ -38,7 +38,8 @@
 #define IWINFO_CIPHER_WEP104 (1 << 5)
 #define IWINFO_CIPHER_AESOCB (1 << 6)
 #define IWINFO_CIPHER_CKIP   (1 << 7)
-#define IWINFO_CIPHER_COUNT  8
+#define IWINFO_CIPHER_GCMP   (1 << 8)
+#define IWINFO_CIPHER_COUNT  9
 
 #define IWINFO_KMGMT_NONE    (1 << 0)
 #define IWINFO_KMGMT_8021x   (1 << 1)
@@ -164,12 +165,44 @@ struct iwinfo_freqlist_entry {
 struct iwinfo_crypto_entry {
        uint8_t enabled;
        uint8_t wpa_version;
-       uint8_t group_ciphers;
-       uint8_t pair_ciphers;
+       uint16_t group_ciphers;
+       uint16_t pair_ciphers;
        uint8_t auth_suites;
        uint8_t auth_algs;
 };
 
+struct iwinfo_scanlist_ht_chan_entry {
+       uint8_t primary_chan;
+       uint8_t secondary_chan_off;
+       uint8_t chan_width;
+};
+
+struct iwinfo_scanlist_vht_chan_entry {
+       uint8_t chan_width;
+       uint8_t center_chan_1;
+       uint8_t center_chan_2;
+};
+
+static const char *ht_secondary_offset[4] = {
+       "no secondary",
+       "above",
+       "[reserved!]",
+       "below",
+};
+
+
+static uint16_t ht_chan_width[2] = {
+       20, /* 20 MHz */
+       2040, /* 40 MHz or higher (refer to vht if supported) */
+};
+
+static uint16_t vht_chan_width[] = {
+       [0] = 40, /* 40 MHz or lower (refer to ht to a more precise width) */
+       [1] = 80, /* 80 MHz */
+       [3] = 8080, /* 80+80 MHz */
+       [2] = 160, /* 160 MHz */
+};
+
 struct iwinfo_scanlist_entry {
        uint8_t mac[6];
        char ssid[IWINFO_ESSID_MAX_SIZE+1];
@@ -179,12 +212,8 @@ struct iwinfo_scanlist_entry {
        uint8_t quality;
        uint8_t quality_max;
        struct iwinfo_crypto_entry crypto;
-
-       /* BSS Load */
-       uint8_t has_bss_load;
-       uint8_t station_count;
-       uint8_t channel_utilization;
-       uint8_t admission_capacity;
+       struct iwinfo_scanlist_ht_chan_entry ht_chan_info;
+       struct iwinfo_scanlist_vht_chan_entry vht_chan_info;
 };
 
 struct iwinfo_country_entry {
@@ -254,6 +283,8 @@ struct iwinfo_ops {
        int (*survey)(const char *, char *, int *);
        int (*lookup_phy)(const char *, char *);
        void (*close)(void);
+       int (*center_chan1)(const char *, int *);
+       int (*center_chan2)(const char *, int *);
 };
 
 const char * iwinfo_type(const char *ifname);