X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=wpa_supplicant%2Fpreauth_test.c;h=f4bba98e2a8254259df0716ed7a58b252ef055b9;hb=0dbe22be3d6b1857a8f5183c5e309130b87b0655;hp=cebe2bac69d499f6181e63f64c3e9ea3c1d86728;hpb=0456ea16d8edfa47c4ff1ddabf4f496a3c5c67bd;p=mech_eap.git diff --git a/wpa_supplicant/preauth_test.c b/wpa_supplicant/preauth_test.c index cebe2ba..f4bba98 100644 --- a/wpa_supplicant/preauth_test.c +++ b/wpa_supplicant/preauth_test.c @@ -2,14 +2,8 @@ * WPA Supplicant - test code for pre-authentication * Copyright (c) 2003-2007, Jouni Malinen * - * 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 - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. + * This software may be distributed under the terms of the BSD license. + * See README for more details. * * IEEE 802.1X Supplicant test code (to be used in place of wpa_supplicant.c. * Not used in production version. @@ -33,10 +27,7 @@ #include "drivers/driver.h" -extern int wpa_debug_level; -extern int wpa_debug_show_keys; - -struct wpa_driver_ops *wpa_drivers[] = { NULL }; +const struct wpa_driver_ops *const wpa_drivers[] = { NULL }; struct preauth_test_data { @@ -44,12 +35,6 @@ struct preauth_test_data { }; -static void _wpa_supplicant_disassociate(void *wpa_s, int reason_code) -{ - wpa_supplicant_disassociate(wpa_s, reason_code); -} - - static void _wpa_supplicant_deauthenticate(void *wpa_s, int reason_code) { wpa_supplicant_deauthenticate(wpa_s, reason_code); @@ -91,14 +76,14 @@ static u8 * _wpa_alloc_eapol(void *wpa_s, u8 type, } -static void _wpa_supplicant_set_state(void *ctx, wpa_states state) +static void _wpa_supplicant_set_state(void *ctx, enum wpa_states state) { struct wpa_supplicant *wpa_s = ctx; wpa_s->wpa_state = state; } -static wpa_states _wpa_supplicant_get_state(void *ctx) +static enum wpa_states _wpa_supplicant_get_state(void *ctx) { struct wpa_supplicant *wpa_s = ctx; return wpa_s->wpa_state; @@ -139,7 +124,7 @@ static int wpa_supplicant_get_bssid(void *wpa_s, u8 *bssid) } -static int wpa_supplicant_set_key(void *wpa_s, wpa_alg alg, +static int wpa_supplicant_set_key(void *wpa_s, enum 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) @@ -244,7 +229,6 @@ static void wpa_init_conf(struct wpa_supplicant *wpa_s, const char *ifname) ctx->set_state = _wpa_supplicant_set_state; ctx->get_state = _wpa_supplicant_get_state; ctx->deauthenticate = _wpa_supplicant_deauthenticate; - ctx->disassociate = _wpa_supplicant_disassociate; ctx->set_key = wpa_supplicant_set_key; ctx->get_network_ctx = wpa_supplicant_get_network_ctx; ctx->get_bssid = wpa_supplicant_get_bssid; @@ -322,7 +306,7 @@ int main(int argc, char *argv[]) } os_memset(&wpa_s, 0, sizeof(wpa_s)); - wpa_s.conf = wpa_config_read(argv[1]); + wpa_s.conf = wpa_config_read(argv[1], NULL); if (wpa_s.conf == NULL) { printf("Failed to parse configuration file '%s'.\n", argv[1]); return -1;