2 * Copyright 2009 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 /* #include <pciprop.h> */
34 #define _NDIS_CONTROL_CODE(request, method) \
35 CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, request, method, FILE_ANY_ACCESS)
37 #define IOCTL_NDIS_QUERY_GLOBAL_STATS _NDIS_CONTROL_CODE(0, METHOD_OUT_DIRECT)
38 #define IOCTL_NDIS_QUERY_ALL_STATS _NDIS_CONTROL_CODE(1, METHOD_OUT_DIRECT)
39 #define IOCTL_NDIS_DO_PNP_OPERATION _NDIS_CONTROL_CODE(2, METHOD_BUFFERED)
40 #define IOCTL_NDIS_QUERY_SELECTED_STATS _NDIS_CONTROL_CODE(3, METHOD_OUT_DIRECT)
41 #define IOCTL_NDIS_ENUMERATE_INTERFACES _NDIS_CONTROL_CODE(4, METHOD_BUFFERED)
42 #define IOCTL_NDIS_ADD_TDI_DEVICE _NDIS_CONTROL_CODE(5, METHOD_BUFFERED)
43 #define IOCTL_NDIS_GET_LOG_DATA _NDIS_CONTROL_CODE(7, METHOD_OUT_DIRECT)
44 #define IOCTL_NDIS_GET_VERSION _NDIS_CONTROL_CODE(8, METHOD_BUFFERED)
46 #define IOCTL_NDIS_RESERVED1 _NDIS_CONTROL_CODE(0x09, METHOD_BUFFERED)
47 #define IOCTL_NDIS_RESERVED2 _NDIS_CONTROL_CODE(0x0a, METHOD_BUFFERED)
48 #define IOCTL_NDIS_RESERVED3 _NDIS_CONTROL_CODE(0x0b, METHOD_BUFFERED)
49 #define IOCTL_NDIS_RESERVED4 _NDIS_CONTROL_CODE(0x0c, METHOD_BUFFERED)
50 #define IOCTL_NDIS_RESERVED5 CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, 0x0d, METHOD_BUFFERED, FILE_ANY_ACCESS)
51 #define IOCTL_NDIS_RESERVED6 CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, 0x0e, METHOD_BUFFERED, FILE_WRITE_ACCESS)
52 #define IOCTL_NDIS_RESERVED7 _NDIS_CONTROL_CODE(0x0f, METHOD_OUT_DIRECT)
53 #define IOCTL_NDIS_RESERVED8 _NDIS_CONTROL_CODE(0x10, METHOD_BUFFERED)
54 #define IOCTL_NDIS_RESERVED9 _NDIS_CONTROL_CODE(0x11, METHOD_BUFFERED)
55 #define IOCTL_NDIS_RESERVED10 _NDIS_CONTROL_CODE(0x12, METHOD_BUFFERED)
56 #define IOCTL_NDIS_RESERVED11 _NDIS_CONTROL_CODE(0x13, METHOD_BUFFERED)
57 #define IOCTL_NDIS_RESERVED12 _NDIS_CONTROL_CODE(0x14, METHOD_BUFFERED)
58 #define IOCTL_NDIS_RESERVED13 _NDIS_CONTROL_CODE(0x15, METHOD_BUFFERED)
61 #define OID_802_11_BSSID 0x0d010101
62 #define OID_802_11_SSID 0x0d010102
63 #define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0d010203
64 #define OID_802_11_NETWORK_TYPE_IN_USE 0x0d010204
65 #define OID_802_11_TX_POWER_LEVEL 0x0d010205
66 #define OID_802_11_RSSI 0x0d010206
67 #define OID_802_11_RSSI_TRIGGER 0x0d010207
68 #define OID_802_11_INFRASTRUCTURE_MODE 0x0d010108
69 #define OID_802_11_FRAGMENTATION_THRESHOLD 0x0d010209
70 #define OID_802_11_RTS_THRESHOLD 0x0d01020a
71 #define OID_802_11_NUMBER_OF_ANTENNAS 0x0d01020b
72 #define OID_802_11_RX_ANTENNA_SELECTED 0x0d01020c
73 #define OID_802_11_TX_ANTENNA_SELECTED 0x0d01020d
74 #define OID_802_11_SUPPORTED_RATES 0x0d01020e
75 #define OID_802_11_DESIRED_RATES 0x0d010210
76 #define OID_802_11_CONFIGURATION 0x0d010211
77 #define OID_802_11_STATISTICS 0x0d020212
78 #define OID_802_11_ADD_WEP 0x0d010113
79 #define OID_802_11_REMOVE_WEP 0x0d010114
80 #define OID_802_11_DISASSOCIATE 0x0d010115
81 #define OID_802_11_POWER_MODE 0x0d010216
82 #define OID_802_11_BSSID_LIST 0x0d010217
83 #define OID_802_11_AUTHENTICATION_MODE 0x0d010118
84 #define OID_802_11_PRIVACY_FILTER 0x0d010119
85 #define OID_802_11_BSSID_LIST_SCAN 0x0d01011a
86 #define OID_802_11_WEP_STATUS 0x0d01011b
87 #define OID_802_11_ENCRYPTION_STATUS OID_802_11_WEP_STATUS
88 #define OID_802_11_RELOAD_DEFAULTS 0x0d01011c
89 #define OID_802_11_ADD_KEY 0x0d01011d
90 #define OID_802_11_REMOVE_KEY 0x0d01011e
91 #define OID_802_11_ASSOCIATION_INFORMATION 0x0d01011f
92 #define OID_802_11_TEST 0x0d010120
93 #define OID_802_11_MEDIA_STREAM_MODE 0x0d010121
94 #define OID_802_11_CAPABILITY 0x0d010122
95 #define OID_802_11_PMKID 0x0d010123
96 #define OID_802_11_NON_BCAST_SSID_LIST 0x0d010124
97 #define OID_802_11_RADIO_STATUS 0x0d010125
99 #define NDIS_802_11_LENGTH_SSID 32
100 #define NDIS_802_11_LENGTH_RATES 8
101 #define NDIS_802_11_LENGTH_RATES_EX 16
103 typedef LONG NDIS_802_11_RSSI
;
105 typedef struct _NDIS_802_11_CONFIGURATION_FH
{
110 } NDIS_802_11_CONFIGURATION_FH
, *PNDIS_802_11_CONFIGURATION_FH
;
112 typedef struct _NDIS_802_11_CONFIGURATION
{
117 NDIS_802_11_CONFIGURATION_FH FHConfig
;
118 } NDIS_802_11_CONFIGURATION
, *PNDIS_802_11_CONFIGURATION
;
120 typedef UCHAR NDIS_802_11_MAC_ADDRESS
[6];
122 typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
{
124 Ndis802_11Infrastructure
,
125 Ndis802_11AutoUnknown
,
126 Ndis802_11InfrastructureMax
127 } NDIS_802_11_NETWORK_INFRASTRUCTURE
, *PNDIS_802_11_NETWORK_INFRASTRUCTURE
;
129 typedef enum _NDIS_802_11_NETWORK_TYPE
{
135 Ndis802_11NetworkTypeMax
136 } NDIS_802_11_NETWORK_TYPE
, *PNDIS_802_11_NETWORK_TYPE
;
138 typedef UCHAR NDIS_802_11_RATES
[NDIS_802_11_LENGTH_RATES
];
139 typedef UCHAR NDIS_802_11_RATES_EX
[NDIS_802_11_LENGTH_RATES_EX
];
141 typedef struct _NDIS_802_11_SSID
{
143 UCHAR Ssid
[NDIS_802_11_LENGTH_SSID
];
144 } NDIS_802_11_SSID
, *PNDIS_802_11_SSID
;
146 typedef struct _NDIS_WLAN_BSSID
{
148 NDIS_802_11_MAC_ADDRESS MacAddress
;
150 NDIS_802_11_SSID Ssid
;
152 NDIS_802_11_RSSI Rssi
;
153 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse
;
154 NDIS_802_11_CONFIGURATION Configuration
;
155 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode
;
156 NDIS_802_11_RATES SupportedRates
;
157 } NDIS_WLAN_BSSID
, *PNDIS_WLAN_BSSID
;
159 typedef struct _NDIS_802_11_BSSID_LIST
{
161 NDIS_WLAN_BSSID Bssid
[1];
162 } NDIS_802_11_BSSID_LIST
, *PNDIS_802_11_BSSID_LIST
;
165 typedef int NDIS_STATUS
, *PNDIS_STATUS
;
168 typedef enum _NDIS_MEDIUM
177 NdisMediumArcnet878_2
,
179 NdisMediumWirelessWan
,
184 NdisMediumInfiniBand
,
186 NdisMediumNative802_11
,
191 } NDIS_MEDIUM
, *PNDIS_MEDIUM
;
193 typedef enum _NDIS_PHYSICAL_MEDIUM
195 NdisPhysicalMediumUnspecified
,
196 NdisPhysicalMediumWirelessLan
,
197 NdisPhysicalMediumCableModem
,
198 NdisPhysicalMediumPhoneLine
,
199 NdisPhysicalMediumPowerLine
,
200 NdisPhysicalMediumDSL
,
201 NdisPhysicalMediumFibreChannel
,
202 NdisPhysicalMedium1394
,
203 NdisPhysicalMediumWirelessWan
,
204 NdisPhysicalMediumNative802_11
,
205 NdisPhysicalMediumBluetooth
,
206 NdisPhysicalMediumInfiniband
,
207 NdisPhysicalMediumWiMax
,
208 NdisPhysicalMediumUWB
,
209 NdisPhysicalMedium802_3
,
210 NdisPhysicalMedium802_5
,
211 NdisPhysicalMediumIrda
,
212 NdisPhysicalMediumWiredWAN
,
213 NdisPhysicalMediumWiredCoWan
,
214 NdisPhysicalMediumOther
,
215 NdisPhysicalMediumMax
216 } NDIS_PHYSICAL_MEDIUM
, *PNDIS_PHYSICAL_MEDIUM
;
222 #endif /* _NTDDNDIS_ */