4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
27 * Macro and data structures defined for 802.11i.
33 #pragma ident "%Z%%M% %I% %E% SMI"
35 #include <inet/wifi_ioctl.h>
36 #include <sys/net80211_crypto.h>
42 #define SERVICE_NAME "network/wpa"
43 #define WPA_DOOR "/var/run/wpa_door"
44 #define SVC_METHOD "/usr/lib/inet/wpad"
49 #define WL_WPA_BASE (WL_PARAMETERS_BASE + 0x500)
50 #define WL_SETOPTIE (WL_WPA_BASE + 0x0)
51 #define WL_WPA (WL_WPA_BASE + 0x2)
52 #define WL_KEY (WL_WPA_BASE + 0x3)
53 #define WL_DELKEY (WL_WPA_BASE + 0x4)
54 #define WL_SCANRESULTS (WL_WPA_BASE + 0x7)
55 #define WL_MLME (WL_WPA_BASE + 0x8)
56 #define WL_CAPABILITY (WL_WPA_BASE + 0x9)
58 typedef struct wl_wpa_ie
{
60 char wpa_ie
[1]; /* it's the head of wpa_ie */
63 typedef struct wl_wpa
{
67 typedef struct wl_capability
{
72 * WPA/RSN get/set key request.
73 * ik_type : wep/tkip/aes
74 * ik_keyix : should be between 0 and 3, 0 will be used as default key.
75 * ik_keylen: key length in bytes.
76 * ik_keydata and ik_keylen include the DATA key and MIC key.
77 * ik_keyrsc/ik_keytsc: rx/tx seq number.
80 typedef struct wl_key
{
88 uint8_t ik_macaddr
[IEEE80211_ADDR_LEN
];
92 uint8_t ik_keydata
[IEEE80211_KEYBUF_SIZE
+IEEE80211_MICBUF_SIZE
];
96 typedef struct wl_del_key
{
98 uint8_t idk_macaddr
[IEEE80211_ADDR_LEN
];
102 uint8_t bssid
[IEEE80211_ADDR_LEN
];
103 uint8_t ssid
[MAX_ESSID_LENGTH
];
106 uint8_t wpa_ie
[IEEE80211_MAX_WPA_IE
];
111 typedef struct wl_wpa_ess
{
113 struct wpa_ess ess
[1];
117 * structure for WL_MLME state manipulation request.
118 * im_op: operations include auth/deauth/assoc/disassoc,
119 * im_reason: 802.11 reason code
121 typedef struct wl_mlme
{
124 uint8_t im_macaddr
[IEEE80211_ADDR_LEN
];
128 * State machine events
136 typedef struct wl_events
{
137 wpa_event_type event
;