xref: /titanic_52/usr/src/cmd/cmd-inet/usr.lib/wpad/driver.h (revision 80b80bf0416a7eb4be4215b2e192cafd03ca80b7)
1 /*
2  * Copyright 2007 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 
18 #ifdef	__cplusplus
19 extern "C" {
20 #endif
21 
22 typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg;
23 typedef enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
24 	CIPHER_WEP104 } wpa_cipher;
25 typedef enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE } wpa_key_mgmt;
26 
27 struct wpa_driver_ops {
28 	int (*get_bssid)(const char *, char *);
29 	int (*get_ssid)(const char *ifname, char *);
30 	int (*set_wpa)(const char *, boolean_t);
31 	int (*set_key)(const char *, wpa_alg, uint8_t *,
32 	    int, boolean_t, uint8_t *, uint32_t, uint8_t *, uint32_t);
33 	int (*scan)(const char *);
34 	int (*get_scan_results)(const char *, dladm_wlan_ess_t *, uint32_t);
35 	int (*disassociate)(const char *, int);
36 	int (*associate)(const char *, const char *, uint8_t *, uint32_t);
37 };
38 
39 #ifdef __cplusplus
40 }
41 #endif
42 
43 #endif /* __DRIVER_H */
44