xref: /titanic_41/usr/src/cmd/cmd-inet/usr.lib/wpad/driver.h (revision f52e84dfce89ba2ea0ebb6a191b4466da3012efd)
1 /*
2  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 /*
7  * Copyright (c) 2003-2004, Jouni Malinen <jkmaline@cc.hut.fi>
8  * Sun elects to license this software under the BSD license.
9  * See README for more details.
10  */
11 #ifndef __DRIVER_H
12 #define	__DRIVER_H
13 
14 #pragma ident	"%Z%%M%	%I%	%E% SMI"
15 
16 #include <libdlwlan.h>
17 #include <libdllink.h>
18 
19 #ifdef	__cplusplus
20 extern "C" {
21 #endif
22 
23 typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg;
24 typedef enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
25 	CIPHER_WEP104 } wpa_cipher;
26 typedef enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE } wpa_key_mgmt;
27 
28 struct wpa_driver_ops {
29 	int (*get_bssid)(datalink_id_t, char *);
30 	int (*get_ssid)(datalink_id_t, char *);
31 	int (*set_wpa)(datalink_id_t, boolean_t);
32 	int (*set_key)(datalink_id_t, wpa_alg, uint8_t *,
33 	    int, boolean_t, uint8_t *, uint32_t, uint8_t *, uint32_t);
34 	int (*scan)(datalink_id_t);
35 	int (*get_scan_results)(datalink_id_t, dladm_wlan_ess_t *, uint32_t);
36 	int (*disassociate)(datalink_id_t, int);
37 	int (*associate)(datalink_id_t, const char *, uint8_t *, uint32_t);
38 };
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 #endif /* __DRIVER_H */
45