Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * File: iowpa.h
20 *
21 * Purpose: Handles wpa supplicant ioctl interface
22 *
23 * Author: Lyndon Chen
24 *
25 * Date: May 8, 2002
26 *
27 */
28
29#ifndef __IOWPA_H__
30#define __IOWPA_H__
31
32#define WPA_IE_LEN 64
33
34//WPA related
35
36enum {
37 VIAWGET_SET_WPA = 1,
38 VIAWGET_SET_KEY = 2,
39 VIAWGET_SET_SCAN = 3,
40 VIAWGET_GET_SCAN = 4,
41 VIAWGET_GET_SSID = 5,
42 VIAWGET_GET_BSSID = 6,
43 VIAWGET_SET_DROP_UNENCRYPT = 7,
44 VIAWGET_SET_DEAUTHENTICATE = 8,
45 VIAWGET_SET_ASSOCIATE = 9,
46 VIAWGET_SET_DISASSOCIATE = 10
47};
48
49enum {
50 VIAWGET_ASSOC_MSG = 1,
51 VIAWGET_DISASSOC_MSG = 2,
52 VIAWGET_PTK_MIC_MSG = 3,
53 VIAWGET_GTK_MIC_MSG = 4,
54 VIAWGET_CCKM_ROAM_MSG = 5,
55 VIAWGET_DEVICECLOSE_MSG = 6
56};
57
58#pragma pack(1)
59typedef struct viawget_wpa_header {
60 u8 type;
61 u16 req_ie_len;
62 u16 resp_ie_len;
63} viawget_wpa_header;
64
65struct viawget_wpa_param {
66 u32 cmd;
67 u8 addr[6];
68 union {
69 struct {
70 u8 len;
71 u8 data[0];
72 } generic_elem;
73
74 struct {
75 u8 bssid[6];
76 u8 ssid[32];
77 u8 ssid_len;
78 u8 __user *wpa_ie;
79 u16 wpa_ie_len;
80 int pairwise_suite;
81 int group_suite;
82 int key_mgmt_suite;
83 int auth_alg;
84 int mode;
85
86 } wpa_associate;
87
88 struct {
89 int alg_name;
90 u16 key_index;
91 u16 set_tx;
92 u8 *seq;
93 u16 seq_len;
94 u8 *key;
95 u16 key_len;
96 } wpa_key;
97
98 struct {
99 u8 ssid_len;
100 u8 ssid[32];
101 } scan_req;
102
103 struct {
104 u16 scan_count;
105 u8 __user *buf;
106 } scan_results;
107
108 } u;
109};
110
111#pragma pack(1)
112struct viawget_scan_result {
113 u8 bssid[6];
114 u8 ssid[32];
115 u16 ssid_len;
116 u8 wpa_ie[WPA_IE_LEN];
117 u16 wpa_ie_len;
118 u8 rsn_ie[WPA_IE_LEN];
119 u16 rsn_ie_len;
120 int freq; // MHz
121 int caps; // e.g. privacy
122 int qual; // signal quality
123 int noise;
124 int level;
125 int maxrate;
126};
127
128#pragma pack()
129
130#endif //__IOWPA_H__