]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add WPA_BSS_MASK_DELIM flag to BSS command
authorDmitry Shmidt <dimitrysh@google.com>
Thu, 28 Feb 2013 16:43:05 +0000 (18:43 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 28 Feb 2013 16:43:05 +0000 (18:43 +0200)
This flag will add ==== delimiter between to separate bss results.
Unlike the other BSS command MASK values, this delimiter is not
included by default to avoid issues with existing users of the BSS
command.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
src/common/wpa_ctrl.h
wpa_supplicant/ctrl_iface.c

index 46e8dc75b0e6fcf22ac90407113711cdc41b8520..ce1c3a6f8d54bdac19cb2a2bd9643470ce8d2b8b 100644 (file)
@@ -151,7 +151,7 @@ extern "C" {
 
 /* BSS command information masks */
 
-#define WPA_BSS_MASK_ALL               0xFFFFFFFF
+#define WPA_BSS_MASK_ALL               0xFFFDFFFF
 #define WPA_BSS_MASK_ID                        BIT(0)
 #define WPA_BSS_MASK_BSSID             BIT(1)
 #define WPA_BSS_MASK_FREQ              BIT(2)
@@ -169,6 +169,7 @@ extern "C" {
 #define WPA_BSS_MASK_P2P_SCAN          BIT(14)
 #define WPA_BSS_MASK_INTERNETW         BIT(15)
 #define WPA_BSS_MASK_WIFI_DISPLAY      BIT(16)
+#define WPA_BSS_MASK_DELIM             BIT(17)
 
 
 /* wpa_supplicant/hostapd control interface access */
index 87467b801956da11ed2f06059f0bb5f23491958f..65a769e537010098a28dbc2ed9249d0b363c842c 100644 (file)
@@ -3225,6 +3225,13 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
        }
 #endif /* CONFIG_INTERWORKING */
 
+       if (mask & WPA_BSS_MASK_DELIM) {
+               ret = os_snprintf(pos, end - pos, "====\n");
+               if (ret < 0 || ret >= end - pos)
+                       return 0;
+               pos += ret;
+       }
+
        return pos - buf;
 }