aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-01-02 15:37:21 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-02 15:37:21 (GMT)
commit96ea74b866417ee5d185595c572d2282c10037c3 (patch)
treec0e65f3f31d25b1e807934df9199cadf475583da /hostapd
parentca3b71c14fb5df0ed8b929a41d037aea4e4a98d4 (diff)
downloadhostap-96ea74b866417ee5d185595c572d2282c10037c3.zip
hostap-96ea74b866417ee5d185595c572d2282c10037c3.tar.gz
hostap-96ea74b866417ee5d185595c572d2282c10037c3.tar.bz2
Convert EAPOL authenticator dump into easier to parse format
Use name=value entries one per each line and rename the state entries to have unique names. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/dump_state.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/hostapd/dump_state.c b/hostapd/dump_state.c
index 8d1fc05..fb25c15 100644
--- a/hostapd/dump_state.c
+++ b/hostapd/dump_state.c
@@ -20,13 +20,17 @@
#include "ap/ap_drv_ops.h"
-static void ieee802_1x_dump_state(FILE *f, const char *prefix,
- struct sta_info *sta)
+static void ieee802_1x_dump_state(FILE *f, struct sta_info *sta)
{
struct eapol_state_machine *sm = sta->eapol_sm;
+ char buf[4096];
+ int res;
+
if (sm == NULL)
return;
- eapol_auth_dump_state(f, prefix, sm);
+ res = eapol_auth_dump_state(sm, buf, sizeof(buf));
+ if (res > 0)
+ fprintf(f, "%s", buf);
}
@@ -59,7 +63,7 @@ static void hostapd_dump_state(struct hostapd_data *hapd)
for (sta = hapd->sta_list; sta != NULL; sta = sta->next) {
fprintf(f, "\nSTA=" MACSTR "\n", MAC2STR(sta->addr));
- ieee802_1x_dump_state(f, " ", sta);
+ ieee802_1x_dump_state(f, sta);
}
fclose(f);