[PATCH] Re: hostapd/wpa_supplicant - new development release v0.4.3
Leonardo Maccari
maccari-thisaintpartofmyaddress-
Fri Jul 8 08:22:38 PDT 2005
On Fri, Jul 08, 2005 at 05:05:46PM +0200, Henrik Brix Andersen wrote:
> On Fri, 2005-07-08 at 17:02 +0200, Leonardo Maccari wrote:
> > holidays compatible feedback? :)
>
> Can you please provide the patch in unified diff format?
>
of course, sorry.
ciao,
leonardo.
--
Key fingerprint = 3129 C583 F03B 2E73 0115 C040 3489 0185 B592 19FE
Obviously -thisaintpartofmyaddress- is not part of my real email address
-------------- next part --------------
Common subdirectories: wpa_supplicant-0.4.3/doc and wpa_supplicant-0.4.3-dev/doc
diff -u -x cscope.out -x tags -x '*swp' -N wpa_supplicant-0.4.3/preauth.c wpa_supplicant-0.4.3-dev/preauth.c
--- wpa_supplicant-0.4.3/preauth.c 2005-06-26 05:27:00.000000000 +0200
+++ wpa_supplicant-0.4.3-dev/preauth.c 2005-07-08 15:52:40.000000000 +0200
@@ -30,7 +30,6 @@
#include "config.h"
#include "l2_packet.h"
#include "eapol_sm.h"
-#include "wpa_supplicant_s.h"
#include "preauth.h"
#include "wpa_i.h"
@@ -38,6 +37,7 @@
#define PMKID_CANDIDATE_PRIO_SCAN 1000
static const int pmksa_cache_max_entries = 32;
+extern struct preauth_interface preauth_i;
struct rsn_pmksa_candidate {
struct rsn_pmksa_candidate *next;
@@ -90,8 +90,8 @@
wpa_printf(MSG_DEBUG, "RSN: removed current PMKSA entry");
sm->cur_pmksa = NULL;
memset(sm->pmk, 0, sizeof(sm->pmk));
- wpa_supplicant_deauthenticate(sm->ctx, REASON_UNSPECIFIED);
- wpa_supplicant_req_scan(sm->ctx, 0, 0);
+ preauth_i.deauthenticate(sm->ctx, REASON_UNSPECIFIED);
+ preauth_i.req_scan(sm->ctx, 0, 0);
}
}
@@ -220,7 +220,7 @@
wpa_printf(MSG_DEBUG, "RSN: removed the oldest PMKSA cache "
"entry (for " MACSTR ") to make room for new one",
MAC2STR(pos->aa));
- wpa_supplicant_remove_pmkid(sm->ctx, pos->aa, pos->pmkid);
+ preauth_i.remove_pmkid(sm->ctx, pos->aa, pos->pmkid);
pmksa_cache_free_entry(sm, pos);
}
@@ -244,7 +244,7 @@
sm->pmksa_count++;
wpa_printf(MSG_DEBUG, "RSN: added PMKSA cache entry for " MACSTR,
MAC2STR(entry->aa));
- wpa_supplicant_add_pmkid(sm->ctx, entry->aa, entry->pmkid);
+ preauth_i.add_pmkid(sm->ctx, entry->aa, entry->pmkid);
return entry;
}
@@ -567,7 +567,7 @@
if (sm->l2_preauth == NULL)
return -1;
- msg = wpa_alloc_eapol(sm->ctx, sm->preauth_bssid, ETH_P_RSN_PREAUTH,
+ msg = preauth_i.alloc_eapol(sm->ctx, sm->preauth_bssid, ETH_P_RSN_PREAUTH,
type, buf, len, &msglen, NULL);
if (msg == NULL)
return -1;
@@ -704,7 +704,7 @@
wpa_msg(sm->ctx, MSG_DEBUG, "RSN: processing PMKSA candidate list");
if (sm->preauth_eapol ||
sm->proto != WPA_PROTO_RSN ||
- wpa_supplicant_get_state(sm->ctx) != WPA_COMPLETED ||
+ preauth_i.get_state(sm->ctx) != WPA_COMPLETED ||
sm->key_mgmt != WPA_KEY_MGMT_IEEE8021X) {
wpa_msg(sm->ctx, MSG_DEBUG, "RSN: not in suitable state for "
"new pre-authentication");
@@ -731,7 +731,7 @@
/* Some drivers (e.g., NDIS) expect to get notified about the
* PMKIDs again, so report the existing data now. */
if (p) {
- wpa_supplicant_add_pmkid(sm->ctx, candidate->bssid,
+ preauth_i.add_pmkid(sm->ctx, candidate->bssid,
p->pmkid);
}
diff -u -x cscope.out -x tags -x '*swp' -N wpa_supplicant-0.4.3/wpa.c wpa_supplicant-0.4.3-dev/wpa.c
--- wpa_supplicant-0.4.3/wpa.c 2005-06-26 05:27:00.000000000 +0200
+++ wpa_supplicant-0.4.3-dev/wpa.c 2005-07-08 16:20:51.000000000 +0200
@@ -31,11 +31,12 @@
#include "config.h"
#include "l2_packet.h"
#include "eapol_sm.h"
-#include "wpa_supplicant_s.h"
#include "preauth.h"
#include "wpa_i.h"
+extern struct wpa_sm_interface wpa_sm_i;
+
static const int WPA_SELECTOR_LEN = 4;
static const u8 WPA_OUI_TYPE[] = { 0x00, 0x50, 0xf2, 1 };
static const u16 WPA_VERSION = 1;
@@ -741,7 +742,7 @@
key_mic);
}
wpa_hexdump(MSG_MSGDUMP, "WPA: TX EAPOL-Key", msg, msg_len);
- wpa_ether_send(sm->ctx, msg, msg_len);
+ wpa_sm_i.ether_send(sm->ctx, msg, msg_len);
eapol_sm_notify_tx_eapol_key(sm->eapol);
free(msg);
}
@@ -770,13 +771,13 @@
else
ver = WPA_KEY_INFO_TYPE_HMAC_MD5_RC4;
- if (wpa_supplicant_get_bssid(sm->ctx, bssid) < 0) {
+ if (wpa_sm_i.get_bssid(sm->ctx, bssid) < 0) {
wpa_printf(MSG_WARNING, "Failed to read BSSID for EAPOL-Key "
"request");
return;
}
- rbuf = wpa_alloc_eapol(sm->ctx, bssid, ETH_P_EAPOL,
+ rbuf = wpa_sm_i.alloc_eapol(sm->ctx, bssid, ETH_P_EAPOL,
IEEE802_1X_TYPE_EAPOL_KEY, NULL, sizeof(*reply),
&rlen, (void *) &reply);
if (rbuf == NULL)
@@ -977,11 +978,11 @@
wpa_printf(MSG_DEBUG, "RSN: no PMKSA entry found - trigger "
"full EAP authentication");
- buf = wpa_alloc_eapol(sm->ctx, sm->bssid, ETH_P_EAPOL,
+ buf = wpa_sm_i.alloc_eapol(sm->ctx, sm->bssid, ETH_P_EAPOL,
IEEE802_1X_TYPE_EAPOL_START, NULL, 0,
&buflen, NULL);
if (buf) {
- wpa_ether_send(sm->ctx, buf, buflen);
+ wpa_sm_i.ether_send(sm->ctx, buf, buflen);
free(buf);
}
@@ -1013,7 +1014,7 @@
wpa_ie_len = sm->assoc_wpa_ie_len;
wpa_hexdump(MSG_DEBUG, "WPA: WPA IE for msg 2/4", wpa_ie, wpa_ie_len);
- rbuf = wpa_alloc_eapol(sm->ctx, src_addr, ETH_P_EAPOL,
+ rbuf = wpa_sm_i.alloc_eapol(sm->ctx, src_addr, ETH_P_EAPOL,
IEEE802_1X_TYPE_EAPOL_KEY, NULL,
sizeof(*reply) + wpa_ie_len,
&rlen, (void *) &reply);
@@ -1073,13 +1074,13 @@
{
struct wpa_eapol_ie_parse ie;
- if (wpa_supplicant_get_ssid(sm->ctx) == NULL) {
+ if (wpa_sm_i.get_ssid(sm->ctx) == NULL) {
wpa_printf(MSG_WARNING, "WPA: No SSID info found (msg 1 of "
"4).");
return;
}
- wpa_supplicant_set_state(sm->ctx, WPA_4WAY_HANDSHAKE);
+ wpa_sm_i.set_state(sm->ctx, WPA_4WAY_HANDSHAKE);
wpa_printf(MSG_DEBUG, "WPA: RX message 1 of 4-Way Handshake from "
MACSTR " (ver=%d)", MAC2STR(src_addr), ver);
@@ -1121,9 +1122,9 @@
MACSTR " [PTK=%s GTK=%s]", MAC2STR(addr),
wpa_cipher_txt(sm->pairwise_cipher),
wpa_cipher_txt(sm->group_cipher));
- eloop_cancel_timeout(wpa_supplicant_scan, sm->ctx, NULL);
- wpa_supplicant_cancel_auth_timeout(sm->ctx);
- wpa_supplicant_set_state(sm->ctx, WPA_COMPLETED);
+ eloop_cancel_timeout(wpa_sm_i.scan, sm->ctx, NULL);
+ wpa_sm_i.cancel_auth_timeout(sm->ctx);
+ wpa_sm_i.set_state(sm->ctx, WPA_COMPLETED);
if (secure) {
/* MLME.SETPROTECTION.request(TA, Tx_Rx) */
@@ -1186,7 +1187,7 @@
wpa_hexdump(MSG_DEBUG, "WPA: RSC", key_rsc, rsclen);
}
- if (wpa_supplicant_set_key(sm->ctx, alg, src_addr, 0, 1, key_rsc,
+ if (wpa_sm_i.set_key(sm->ctx, alg, src_addr, 0, 1, key_rsc,
rsclen, (u8 *) &sm->ptk.tk1, keylen) < 0) {
wpa_printf(MSG_WARNING, "WPA: Failed to set PTK to the "
"driver.");
@@ -1277,7 +1278,7 @@
_gtk = gtk_buf;
}
if (sm->pairwise_cipher == WPA_CIPHER_NONE) {
- if (wpa_supplicant_set_key(sm->ctx, gd->alg,
+ if (wpa_sm_i.set_key(sm->ctx, gd->alg,
(u8 *) "\xff\xff\xff\xff\xff\xff",
gd->keyidx, 1, key_rsc,
gd->key_rsc_len, _gtk, gd->gtk_len)
@@ -1286,7 +1287,7 @@
"GTK to the driver (Group only).");
return -1;
}
- } else if (wpa_supplicant_set_key(sm->ctx, gd->alg,
+ } else if (wpa_sm_i.set_key(sm->ctx, gd->alg,
(u8 *) "\xff\xff\xff\xff\xff\xff",
gd->keyidx, gd->tx, key_rsc,
gd->key_rsc_len, _gtk, gd->gtk_len) <
@@ -1397,8 +1398,8 @@
rsn_ie, rsn_ie_len);
}
- wpa_supplicant_disassociate(sm->ctx, REASON_IE_IN_4WAY_DIFFERS);
- wpa_supplicant_req_scan(sm->ctx, 0, 0);
+ wpa_sm_i.disassociate(sm->ctx, REASON_IE_IN_4WAY_DIFFERS);
+ wpa_sm_i.req_scan(sm->ctx, 0, 0);
}
@@ -1411,7 +1412,7 @@
if (sm->ap_wpa_ie == NULL && sm->ap_rsn_ie == NULL) {
wpa_printf(MSG_DEBUG, "WPA: No WPA/RSN IE for this AP known. "
"Trying to get from scan results");
- if (wpa_supplicant_get_beacon_ie(sm->ctx) < 0) {
+ if (wpa_sm_i.get_beacon_ie(sm->ctx) < 0) {
wpa_printf(MSG_WARNING, "WPA: Could not find AP from "
"the scan results");
} else {
@@ -1458,7 +1459,7 @@
struct wpa_eapol_key *reply;
u8 *rbuf;
- rbuf = wpa_alloc_eapol(sm->ctx, src_addr, ETH_P_EAPOL,
+ rbuf = wpa_sm_i.alloc_eapol(sm->ctx, src_addr, ETH_P_EAPOL,
IEEE802_1X_TYPE_EAPOL_KEY, NULL,
sizeof(*reply), &rlen, (void *) &reply);
if (rbuf == NULL)
@@ -1495,7 +1496,7 @@
const u8 *pos;
struct wpa_eapol_ie_parse ie;
- wpa_supplicant_set_state(sm->ctx, WPA_4WAY_HANDSHAKE);
+ wpa_sm_i.set_state(sm->ctx, WPA_4WAY_HANDSHAKE);
wpa_printf(MSG_DEBUG, "WPA: RX message 3 of 4-Way Handshake from "
MACSTR " (ver=%d)", MAC2STR(src_addr), ver);
@@ -1556,7 +1557,7 @@
/* MLME.SETPROTECTION.request(TA, Tx_Rx) */
eapol_sm_notify_portValid(sm->eapol, TRUE);
}
- wpa_supplicant_set_state(sm->ctx, WPA_GROUP_HANDSHAKE);
+ wpa_sm_i.set_state(sm->ctx, WPA_GROUP_HANDSHAKE);
if (ie.gtk &&
wpa_supplicant_pairwise_gtk(sm, src_addr, key,
@@ -1674,7 +1675,7 @@
struct wpa_eapol_key *reply;
u8 *rbuf;
- rbuf = wpa_alloc_eapol(sm->ctx, src_addr, ETH_P_EAPOL,
+ rbuf = wpa_sm_i.alloc_eapol(sm->ctx, src_addr, ETH_P_EAPOL,
IEEE802_1X_TYPE_EAPOL_KEY, NULL,
sizeof(*reply), &rlen, (void *) &reply);
if (rbuf == NULL)
@@ -1713,8 +1714,8 @@
memset(&gd, 0, sizeof(gd));
- rekey = wpa_supplicant_get_state(sm->ctx) == WPA_COMPLETED;
- wpa_supplicant_set_state(sm->ctx, WPA_GROUP_HANDSHAKE);
+ rekey = wpa_sm_i.get_state(sm->ctx) == WPA_COMPLETED;
+ wpa_sm_i.set_state(sm->ctx, WPA_GROUP_HANDSHAKE);
wpa_printf(MSG_DEBUG, "WPA: RX message 1 of Group Key Handshake from "
MACSTR " (ver=%d)", MAC2STR(src_addr), ver);
@@ -1742,7 +1743,7 @@
wpa_msg(sm->ctx, MSG_INFO, "WPA: Group rekeying completed "
"with " MACSTR " [GTK=%s]", MAC2STR(src_addr),
wpa_cipher_txt(sm->group_cipher));
- wpa_supplicant_set_state(sm->ctx, WPA_COMPLETED);
+ wpa_sm_i.set_state(sm->ctx, WPA_COMPLETED);
} else {
wpa_supplicant_key_neg_complete(sm, src_addr,
key_info &
@@ -2229,7 +2230,7 @@
void wpa_sm_notify_disassoc(struct wpa_sm *sm)
{
rsn_preauth_deinit(sm);
- if (wpa_supplicant_get_state(sm->ctx) == WPA_4WAY_HANDSHAKE)
+ if (wpa_sm_i.get_state(sm->ctx) == WPA_4WAY_HANDSHAKE)
sm->dot11RSNA4WayHandshakeFailures++;
}
Common subdirectories: wpa_supplicant-0.4.3/wpa_gui and wpa_supplicant-0.4.3-dev/wpa_gui
diff -u -x cscope.out -x tags -x '*swp' -N wpa_supplicant-0.4.3/wpa.h wpa_supplicant-0.4.3-dev/wpa.h
--- wpa_supplicant-0.4.3/wpa.h 2005-06-26 04:58:29.000000000 +0200
+++ wpa_supplicant-0.4.3-dev/wpa.h 2005-07-07 14:59:01.000000000 +0200
@@ -189,4 +189,11 @@
unsigned char *buf, size_t len);
int wpa_sm_parse_own_wpa_ie(struct wpa_sm *sm, struct wpa_ie_data *data);
+typedef enum {
+ WPA_DISCONNECTED, WPA_SCANNING, WPA_ASSOCIATING,
+ WPA_ASSOCIATED, WPA_4WAY_HANDSHAKE, WPA_GROUP_HANDSHAKE,
+ WPA_COMPLETED
+} wpa_states;
+
+
#endif /* WPA_H */
diff -u -x cscope.out -x tags -x '*swp' -N wpa_supplicant-0.4.3/wpa_i.h wpa_supplicant-0.4.3-dev/wpa_i.h
--- wpa_supplicant-0.4.3/wpa_i.h 2005-06-26 04:58:29.000000000 +0200
+++ wpa_supplicant-0.4.3-dev/wpa_i.h 2005-07-08 15:39:25.000000000 +0200
@@ -102,4 +102,46 @@
size_t ap_wpa_ie_len, ap_rsn_ie_len;
};
+
+struct preauth_interface {
+
+ wpa_states (*get_state)(void * ctx);
+ void (*deauthenticate)(void * ctx, int reason_code);
+ void (*req_scan)(void * ctx, int sec, int usec);
+
+ u8 * (*alloc_eapol)(void * ctx, const u8 *dest,
+ u16 proto, u8 type, const void *data, u16 data_len,
+ size_t *msg_len, void **data_pos);
+
+ int (*add_pmkid)(void * ctx, const u8 *bssid, const u8
+ *pmkid);
+ int (*remove_pmkid)(void * ctx, const u8 *bssid, const
+ u8 *pmkid);
+};
+
+
+struct wpa_sm_interface {
+ void (*set_state)(void *ctx, wpa_states state);
+ wpa_states (*get_state)(void *ctx);
+ void (*req_scan)(void *ctx , int sec, int usec);
+ void (*disassociate)(void *ctx,
+ int reason_code);
+ int (*set_key)(void *ctx, wpa_alg alg,
+ const u8 *addr, int key_idx, int set_tx,
+ const u8 *seq, size_t seq_len,
+ const u8 *key, size_t key_len);
+ void (*scan)(void *eloop_ctx, void *timeout_ctx);
+ struct wpa_ssid * (*get_ssid)(void *ctx);
+ int (*get_bssid)(void *ctx, u8 *bssid);
+ int (*ether_send)(void *ctx, u8 *buf, size_t len);
+ int (*get_beacon_ie)(void *ctx);
+ void (*cancel_auth_timeout)(void *ctx);
+ u8 * (*alloc_eapol)(void * ctx, const u8 *dest,
+ u16 proto, u8 type, const void *data, u16 data_len,
+ size_t *msg_len, void **data_pos); /*preauth.c*/
+
+
+};
+
+
#endif /* WPA_I_H */
diff -u -x cscope.out -x tags -x '*swp' -N wpa_supplicant-0.4.3/wpa_supplicant.c wpa_supplicant-0.4.3-dev/wpa_supplicant.c
--- wpa_supplicant-0.4.3/wpa_supplicant.c 2005-06-26 20:34:34.000000000 +0200
+++ wpa_supplicant-0.4.3-dev/wpa_supplicant.c 2005-07-08 16:42:37.000000000 +0200
@@ -107,6 +107,16 @@
extern int wpa_debug_show_keys;
extern int wpa_debug_timestamp;
+void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx);
+void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec);
+
+struct preauth_interface;
+struct wpa_sm_interface;
+
+struct preauth_interface preauth_i;
+struct wpa_sm_interface wpa_sm_i;
+
+
void wpa_msg(struct wpa_supplicant *wpa_s, int level, char *fmt, ...)
{
@@ -1612,6 +1622,73 @@
};
+struct wpa_sm_interface {
+ void (*set_state)(struct wpa_supplicant *wpa_s, wpa_states state);
+ wpa_states (*get_state)(struct wpa_supplicant *wpa_s);
+ void (*req_scan)(struct wpa_supplicant *wpa_s, int sec, int usec);
+ void (*disassociate)(struct wpa_supplicant *wpa_s,
+ int reason_code);
+ int (*set_key)(struct wpa_supplicant *wpa_s, wpa_alg alg,
+ const u8 *addr, int key_idx, int set_tx,
+ const u8 *seq, size_t seq_len,
+ const u8 *key, size_t key_len);
+ void (*scan)(void *eloop_ctx, void *timeout_ctx);
+ struct wpa_ssid * (*get_ssid)(struct wpa_supplicant *wpa_s);
+ int (*get_bssid)(struct wpa_supplicant *wpa_s, u8 *bssid);
+ int (*ether_send)(struct wpa_supplicant *wpa_s, u8 *buf, size_t len);
+ int (*get_beacon_ie)(struct wpa_supplicant *wpa_s);
+ void (*cancel_auth_timeout)(struct wpa_supplicant *wpa_s);
+ u8 * (*alloc_eapol)(const struct wpa_supplicant *wpa_s, const u8 *dest,
+ u16 proto, u8 type, const void *data, u16 data_len,
+ size_t *msg_len, void **data_pos);
+};
+
+
+struct preauth_interface {
+
+ wpa_states (*get_state)(struct wpa_supplicant *wpa_s);
+ void (*deauthenticate)(struct wpa_supplicant *wpa_s, int reason_code);
+ void (*req_scan)(struct wpa_supplicant *wpa_s, int sec, int usec);
+
+ u8 * (*alloc_eapol)(const struct wpa_supplicant *wpa_s, const u8 *dest,
+ u16 proto, u8 type, const void *data, u16 data_len,
+ size_t *msg_len, void **data_pos);
+
+ int (*add_pmkid)(struct wpa_supplicant *wpa_s, const u8 *bssid, const u8
+ *pmkid);
+ int (*remove_pmkid)(struct wpa_supplicant *wpa_s, const u8 *bssid, const
+ u8 *pmkid);
+};
+
+
+void export_wpa_interface(void){
+
+ wpa_sm_i.set_state = wpa_supplicant_set_state;
+ wpa_sm_i.get_state = wpa_supplicant_get_state;
+ wpa_sm_i.req_scan = wpa_supplicant_req_scan;
+ wpa_sm_i.disassociate = wpa_supplicant_disassociate;
+ wpa_sm_i.set_key = wpa_supplicant_set_key;
+ wpa_sm_i.scan = wpa_supplicant_scan;
+ wpa_sm_i.get_ssid = wpa_supplicant_get_ssid;
+ wpa_sm_i.ether_send = wpa_ether_send;
+ wpa_sm_i.get_beacon_ie = wpa_supplicant_get_beacon_ie;
+ wpa_sm_i.alloc_eapol = wpa_alloc_eapol;
+ wpa_sm_i.cancel_auth_timeout = wpa_supplicant_cancel_auth_timeout;
+}
+
+void export_preauth_interface(void){
+
+ preauth_i.get_state = wpa_supplicant_get_state;
+ preauth_i.deauthenticate = wpa_supplicant_deauthenticate;
+ preauth_i.req_scan = wpa_supplicant_req_scan;
+ preauth_i.alloc_eapol = wpa_alloc_eapol;
+ preauth_i.add_pmkid = wpa_supplicant_add_pmkid;
+ preauth_i.remove_pmkid = wpa_supplicant_remove_pmkid;
+}
+
+
+
+
static int wpa_supplicant_init(struct wpa_supplicant *wpa_s,
struct wpa_interface *iface)
{
@@ -1671,6 +1748,10 @@
wpa_printf(MSG_DEBUG, "Initializing interface (2) '%s'",
wpa_s->ifname);
+ export_wpa_interface();
+ export_preauth_interface();
+
+
ctx = malloc(sizeof(*ctx));
if (ctx == NULL) {
printf("Failed to allocate EAPOL context.\n");
@@ -1895,8 +1976,6 @@
return 0;
}
-
-
int main(int argc, char *argv[])
{
int c;
@@ -1918,7 +1997,6 @@
return -1;
memset(iface, 0, sizeof(*iface));
iface_count = 1;
-
wpa_supplicant_fd_workaround();
for (;;) {
diff -u -x cscope.out -x tags -x '*swp' -N wpa_supplicant-0.4.3/wpa_supplicant_s.h wpa_supplicant-0.4.3-dev/wpa_supplicant_s.h
--- wpa_supplicant-0.4.3/wpa_supplicant_s.h 2005-07-08 16:47:20.000000000 +0200
+++ wpa_supplicant-0.4.3-dev/wpa_supplicant_s.h 2005-07-08 16:48:50.000000000 +0200
@@ -20,44 +20,18 @@
#ifndef WPA_SUPPLICANT_S_H
#define WPA_SUPPLICANT_S_H
-typedef enum {
- WPA_DISCONNECTED, WPA_SCANNING, WPA_ASSOCIATING,
- WPA_ASSOCIATED, WPA_4WAY_HANDSHAKE, WPA_GROUP_HANDSHAKE,
- WPA_COMPLETED
-} wpa_states;
+void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, wpa_states state); /* needed by events.c*/
-void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, wpa_states state);
-wpa_states wpa_supplicant_get_state(struct wpa_supplicant *wpa_s);
+struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s); /* needed by events.c*/
+void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s); /* needed by events.c*/
-u8 * wpa_alloc_eapol(const struct wpa_supplicant *wpa_s, const u8 *dest,
- u16 proto, u8 type, const void *data, u16 data_len,
- size_t *msg_len, void **data_pos);
-int wpa_ether_send(struct wpa_supplicant *wpa_s, u8 *buf, size_t len);
+void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
+ int reason_code);/*needed by events.c preauth.c*/
-int wpa_supplicant_get_beacon_ie(struct wpa_supplicant *wpa_s);
-
-struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s);
-
-void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s);
-
-void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
- int reason_code);
void wpa_supplicant_disassociate(struct wpa_supplicant *wpa_s,
- int reason_code);
-
-void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx);
-
-void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec);
+ int reason_code);/*needed by ctrl_iface.c events.c*/
-int wpa_supplicant_get_bssid(struct wpa_supplicant *wpa_s, u8 *bssid);
-int wpa_supplicant_set_key(struct wpa_supplicant *wpa_s, wpa_alg alg,
- const u8 *addr, int key_idx, int set_tx,
- const u8 *seq, size_t seq_len,
- const u8 *key, size_t key_len);
-int wpa_supplicant_add_pmkid(struct wpa_supplicant *wpa_s,
- const u8 *bssid, const u8 *pmkid);
-int wpa_supplicant_remove_pmkid(struct wpa_supplicant *wpa_s,
- const u8 *bssid, const u8 *pmkid);
+void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec);/*needed by ctrl_iface.c events.c preauth.c*/
#endif /* WPA_SUPPLICANT_S_H */
More information about the Hostap
mailing list