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#include <libdlwlan.h> 15#include <libdllink.h> 16 17#ifdef __cplusplus 18extern "C" { 19#endif 20 21typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg; 22typedef enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, 23 CIPHER_WEP104 } wpa_cipher; 24typedef enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE } wpa_key_mgmt; 25 26struct wpa_driver_ops { 27 int (*get_bssid)(dladm_handle_t, datalink_id_t, char *); 28 int (*get_ssid)(dladm_handle_t, datalink_id_t, char *); 29 int (*set_wpa)(dladm_handle_t, datalink_id_t, boolean_t); 30 int (*set_key)(dladm_handle_t, datalink_id_t, wpa_alg, uint8_t *, 31 int, boolean_t, uint8_t *, uint32_t, uint8_t *, uint32_t); 32 int (*scan)(dladm_handle_t, datalink_id_t); 33 int (*get_scan_results)(dladm_handle_t, datalink_id_t, 34 dladm_wlan_ess_t *, uint32_t); 35 int (*disassociate)(dladm_handle_t, datalink_id_t, int); 36 int (*associate)(dladm_handle_t, datalink_id_t, const char *, uint8_t *, 37 uint32_t); 38}; 39 40#ifdef __cplusplus 41} 42#endif 43 44#endif /* __DRIVER_H */ 45