]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: Print out HotSpot2 IE information.
authorBen Greear <greearb@candelatech.com>
Thu, 29 Aug 2013 22:23:47 +0000 (15:23 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 30 Aug 2013 11:50:08 +0000 (13:50 +0200)
Example:

HotSpot 2.0 Indication:
DGAF: 0

Signed-off-by: Ben Greear <greearb@candelatech.com>
scan.c

diff --git a/scan.c b/scan.c
index 5c4adb82711cfca88a46c62062869dd2e65cd34e..90df93b5d3154429eb6758ddc8c2f2403149e7f1 100644 (file)
--- a/scan.c
+++ b/scan.c
@@ -1383,8 +1383,19 @@ static inline void print_p2p(const uint8_t type, uint8_t len, const uint8_t *dat
        }
 }
 
+static inline void print_hs20_ind(const uint8_t type, uint8_t len, const uint8_t *data)
+{
+       /* I can't find the spec for this...just going off what wireshark uses. */
+       printf("\n");
+       if (len > 0)
+               printf("\t\tDGAF: %i\n", (int)(data[0] & 0x1));
+       else
+               printf("\t\tUnexpected length: %i\n", len);
+}
+
 static const struct ie_print wfa_printers[] = {
        [9] = { "P2P", print_p2p, 2, 255, BIT(PRINT_SCAN), },
+       [16] = { "HotSpot 2.0 Indication", print_hs20_ind, 1, 255, BIT(PRINT_SCAN), },
 };
 
 static void print_vendor(unsigned char len, unsigned char *data,