aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-01-12 18:04:52 (GMT)
committerJouni Malinen <j@w1.fi>2008-01-12 18:04:52 (GMT)
commitc5e43b816ed90638974855894a62800fc9277664 (patch)
tree2fe62812eea22598544bf87f21cd82ab1e9c33fd /hostapd
parentda8271d7ab2779c2f6a1c27198fcbbe0346c4be1 (diff)
downloadhostap-history-c5e43b816ed90638974855894a62800fc9277664.zip
hostap-history-c5e43b816ed90638974855894a62800fc9277664.tar.gz
hostap-history-c5e43b816ed90638974855894a62800fc9277664.tar.bz2
WPS: Added more details about the Enrollee into PIN needed notifications
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/wps_hostapd.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/hostapd/wps_hostapd.c b/hostapd/wps_hostapd.c
index be12b77..08b7d5f 100644
--- a/hostapd/wps_hostapd.c
+++ b/hostapd/wps_hostapd.c
@@ -115,18 +115,23 @@ static int hostapd_wps_set_ie_cb(void *ctx, const u8 *beacon_ie,
}
-static void hostapd_wps_pin_needed_cb(void *ctx, const u8 *uuid_e)
+static void hostapd_wps_pin_needed_cb(void *ctx, const u8 *uuid_e,
+ const struct wps_device_data *dev)
{
struct hostapd_data *hapd = ctx;
- char uuid[40], txt[100];
+ char uuid[40], txt[400];
int len;
if (uuid_bin2str(uuid_e, uuid, sizeof(uuid)))
return;
wpa_printf(MSG_DEBUG, "WPS: PIN needed for E-UUID %s", uuid);
- len = os_snprintf(txt, sizeof(txt), WPS_EVENT_PIN_NEEDED "%s", uuid);
- if (len < 0 || len >= (int) sizeof(txt))
- return;
- hostapd_ctrl_iface_send(hapd, MSG_INFO, txt, len);
+ len = os_snprintf(txt, sizeof(txt), WPS_EVENT_PIN_NEEDED
+ "%s [%s|%s|%s|%s|%s|%d-%08X-%d]",
+ uuid, dev->device_name, dev->manufacturer,
+ dev->model_name, dev->model_number,
+ dev->serial_number,
+ dev->categ, dev->oui, dev->sub_categ);
+ if (len > 0 && len < (int) sizeof(txt))
+ hostapd_ctrl_iface_send(hapd, MSG_INFO, txt, len);
if (hapd->conf->wps_pin_requests) {
FILE *f;
@@ -135,9 +140,11 @@ static void hostapd_wps_pin_needed_cb(void *ctx, const u8 *uuid_e)
if (f == NULL)
return;
os_get_time(&t);
- /* TODO: add more information about Enrollee (Manufacturer,
- * Device Type, ...) */
- fprintf(f, "%ld\t%s\n", t.sec, uuid);
+ fprintf(f, "%ld\t%s\t%s\t%s\t%s\t%s\t%s\t%d-%08X-%d\n",
+ t.sec, uuid, dev->device_name, dev->manufacturer,
+ dev->model_name, dev->model_number,
+ dev->serial_number,
+ dev->categ, dev->oui, dev->sub_categ);
fclose(f);
}
}