]>
Commit | Line | Data |
---|---|---|
6fc6879b JM |
1 | /* |
2 | * WPA Supplicant - driver_wext exported functions | |
3 | * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi> | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License version 2 as | |
7 | * published by the Free Software Foundation. | |
8 | * | |
9 | * Alternatively, this software may be distributed under the terms of BSD | |
10 | * license. | |
11 | * | |
12 | * See README and COPYING for more details. | |
13 | */ | |
14 | ||
15 | #ifndef DRIVER_WEXT_H | |
16 | #define DRIVER_WEXT_H | |
17 | ||
b5a357b4 MM |
18 | #include <net/if.h> |
19 | ||
20 | struct wpa_driver_wext_data { | |
21 | void *ctx; | |
08063178 | 22 | struct netlink_data *netlink; |
b5a357b4 MM |
23 | int ioctl_sock; |
24 | int mlme_sock; | |
25 | char ifname[IFNAMSIZ + 1]; | |
26 | int ifindex; | |
27 | int ifindex2; | |
3fbda8f9 | 28 | int if_removed; |
b5a357b4 MM |
29 | u8 *assoc_req_ies; |
30 | size_t assoc_req_ies_len; | |
31 | u8 *assoc_resp_ies; | |
32 | size_t assoc_resp_ies_len; | |
33 | struct wpa_driver_capa capa; | |
34 | int has_capability; | |
35 | int we_version_compiled; | |
36 | ||
37 | /* for set_auth_alg fallback */ | |
38 | int use_crypt; | |
39 | int auth_alg_fallback; | |
40 | ||
41 | int operstate; | |
42 | ||
43 | char mlmedev[IFNAMSIZ + 1]; | |
44 | ||
45 | int scan_complete_events; | |
46 | }; | |
6fc6879b | 47 | |
6fc6879b JM |
48 | int wpa_driver_wext_get_bssid(void *priv, u8 *bssid); |
49 | int wpa_driver_wext_set_bssid(void *priv, const u8 *bssid); | |
50 | int wpa_driver_wext_get_ssid(void *priv, u8 *ssid); | |
51 | int wpa_driver_wext_set_ssid(void *priv, const u8 *ssid, size_t ssid_len); | |
52 | int wpa_driver_wext_set_freq(void *priv, int freq); | |
53 | int wpa_driver_wext_set_mode(void *priv, int mode); | |
71934751 | 54 | int wpa_driver_wext_set_key(const char *ifname, void *priv, enum wpa_alg alg, |
6fc6879b JM |
55 | const u8 *addr, int key_idx, |
56 | int set_tx, const u8 *seq, size_t seq_len, | |
57 | const u8 *key, size_t key_len); | |
c2e8d0a0 | 58 | int wpa_driver_wext_scan(void *priv, struct wpa_driver_scan_params *params); |
6fc6879b JM |
59 | struct wpa_scan_results * wpa_driver_wext_get_scan_results(void *priv); |
60 | ||
61 | void wpa_driver_wext_scan_timeout(void *eloop_ctx, void *timeout_ctx); | |
62 | ||
63 | int wpa_driver_wext_alternative_ifindex(struct wpa_driver_wext_data *drv, | |
64 | const char *ifname); | |
65 | ||
66 | void * wpa_driver_wext_init(void *ctx, const char *ifname); | |
67 | void wpa_driver_wext_deinit(void *priv); | |
68 | ||
69 | int wpa_driver_wext_set_operstate(void *priv, int state); | |
70 | int wpa_driver_wext_get_version(struct wpa_driver_wext_data *drv); | |
71 | ||
b5a357b4 MM |
72 | int wpa_driver_wext_associate(void *priv, |
73 | struct wpa_driver_associate_params *params); | |
74 | int wpa_driver_wext_get_capa(void *priv, struct wpa_driver_capa *capa); | |
75 | int wpa_driver_wext_set_auth_param(struct wpa_driver_wext_data *drv, | |
76 | int idx, u32 value); | |
77 | int wpa_driver_wext_cipher2wext(int cipher); | |
78 | int wpa_driver_wext_keymgmt2wext(int keymgmt); | |
79 | ||
6fc6879b | 80 | #endif /* DRIVER_WEXT_H */ |