Merge branch 'moonshot' of ssh://moonshot.suchdamage.org:822/srv/git/libeap into...
[libeap.git] / hostapd / dump_state.c
index d7c5323..bba3068 100644 (file)
  * See README and COPYING for more details.
  */
 
+#include "utils/includes.h"
 
-#include "includes.h"
-
-#include "common.h"
+#include "utils/common.h"
 #include "radius/radius_client.h"
 #include "radius/radius_server.h"
 #include "eapol_auth/eapol_auth_sm.h"
 #include "eapol_auth/eapol_auth_sm_i.h"
 #include "eap_server/eap.h"
-#include "hostapd.h"
-#include "config.h"
-#include "sta_flags.h"
-#include "sta_info.h"
+#include "ap/hostapd.h"
+#include "ap/ap_config.h"
+#include "ap/sta_info.h"
+#include "dump_state.h"
 
 
 static void fprint_char(FILE *f, char c)
@@ -107,7 +106,7 @@ static void hostapd_dump_state(struct hostapd_data *hapd)
                fprintf(f, "\nSTA=" MACSTR "\n", MAC2STR(sta->addr));
 
                fprintf(f,
-                       "  AID=%d flags=0x%x %s%s%s%s%s%s%s%s%s%s%s%s%s%s\n"
+                       "  AID=%d flags=0x%x %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n"
                        "  capability=0x%x listen_interval=%d\n",
                        sta->aid,
                        sta->flags,
@@ -127,6 +126,7 @@ static void hostapd_dump_state(struct hostapd_data *hapd)
                        (sta->flags & WLAN_STA_MFP ? "[MFP]" : ""),
                        (sta->flags & WLAN_STA_WPS ? "[WPS]" : ""),
                        (sta->flags & WLAN_STA_MAYBE_WPS ? "[MAYBE_WPS]" : ""),
+                       (sta->flags & WLAN_STA_WDS ? "[WDS]" : ""),
                        (sta->flags & WLAN_STA_NONERP ? "[NonERP]" : ""),
                        sta->capability,
                        sta->listen_interval);
@@ -156,6 +156,7 @@ static void hostapd_dump_state(struct hostapd_data *hapd)
                buf[count] = '\0';
                fprintf(f, "%s", buf);
 
+#ifdef RADIUS_SERVER
                count = radius_server_get_mib(hapd->radius_srv, buf, 4096);
                if (count < 0)
                        count = 0;
@@ -163,6 +164,8 @@ static void hostapd_dump_state(struct hostapd_data *hapd)
                        count = 4095;
                buf[count] = '\0';
                fprintf(f, "%s", buf);
+#endif /* RADIUS_SERVER */
+
                os_free(buf);
        }
 #endif /* CONFIG_NO_RADIUS */