Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v3.14-rc4 128 lines 2.8 kB view raw
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/* 36typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg; 37typedef enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, 38 CIPHER_WEP104 } wpa_cipher; 39typedef enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE, 40 KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE } wpa_key_mgmt; 41*/ 42 43enum { 44 VIAWGET_SET_WPA = 1, 45 VIAWGET_SET_KEY = 2, 46 VIAWGET_SET_SCAN = 3, 47 VIAWGET_GET_SCAN = 4, 48 VIAWGET_GET_SSID = 5, 49 VIAWGET_GET_BSSID = 6, 50 VIAWGET_SET_DROP_UNENCRYPT = 7, 51 VIAWGET_SET_DEAUTHENTICATE = 8, 52 VIAWGET_SET_ASSOCIATE = 9, 53 VIAWGET_SET_DISASSOCIATE = 10 54}; 55 56enum { 57 VIAWGET_ASSOC_MSG = 1, 58 VIAWGET_DISASSOC_MSG = 2, 59 VIAWGET_PTK_MIC_MSG = 3, 60 VIAWGET_GTK_MIC_MSG = 4, 61 VIAWGET_CCKM_ROAM_MSG = 5, 62 VIAWGET_DEVICECLOSE_MSG = 6 63}; 64 65typedef struct viawget_wpa_header { 66 u8 type; 67 u16 req_ie_len; 68 u16 resp_ie_len; 69} __packed viawget_wpa_header; 70 71struct viawget_wpa_param { 72 u32 cmd; 73 u8 addr[6]; 74 union { 75 struct { 76 u8 len; 77 u8 data[0]; 78 } generic_elem; 79 struct { 80 u8 bssid[6]; 81 u8 ssid[32]; 82 u8 ssid_len; 83 u8 *wpa_ie; 84 u16 wpa_ie_len; 85 int pairwise_suite; 86 int group_suite; 87 int key_mgmt_suite; 88 int auth_alg; 89 int mode; 90 u8 roam_dbm; 91 } wpa_associate; 92 struct { 93 int alg_name; 94 u16 key_index; 95 u16 set_tx; 96 u8 *seq; 97 u16 seq_len; 98 u8 *key; 99 u16 key_len; 100 } wpa_key; 101 struct { 102 u8 ssid_len; 103 u8 ssid[32]; 104 } scan_req; 105 struct { 106 u16 scan_count; 107 u8 *buf; 108 } scan_results; 109 } u; 110} __packed; 111 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} __packed; 127 128#endif /* __IOWPA_H__ */