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