/*
* EAP-WSC server for Wi-Fi Protected Setup
- * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2007-2008, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
int registrar;
struct wpabuf *in_buf;
struct wpabuf *out_buf;
- u8 in_op_code, out_op_code;
+ enum wsc_op_code in_op_code, out_op_code;
size_t out_used;
size_t fragment_size;
struct wps_data *wps;
cfg.pin = sm->user->password;
cfg.pin_len = sm->user->password_len;
}
+ cfg.assoc_wps_ie = sm->assoc_wps_ie;
data->wps = wps_init(&cfg);
if (data->wps == NULL) {
os_free(data);
}
+static int eap_wsc_getTimeout(struct eap_sm *sm, void *priv)
+{
+ /* Recommended retransmit times: retransmit timeout 5 seconds,
+ * per-message timeout 15 seconds, i.e., 3 tries. */
+ sm->MaxRetrans = 2; /* total 3 attempts */
+ return 5;
+}
+
+
int eap_server_wsc_register(void)
{
struct eap_method *eap;
eap->process = eap_wsc_process;
eap->isDone = eap_wsc_isDone;
eap->isSuccess = eap_wsc_isSuccess;
+ eap->getTimeout = eap_wsc_getTimeout;
ret = eap_server_method_register(eap);
if (ret)