1 /* 2 * ntddndis.h 3 * 4 * NDIS device driver interface 5 * 6 * This file is part of the w32api package. 7 * 8 * Contributors: 9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net> 10 * 11 * THIS SOFTWARE IS NOT COPYRIGHTED 12 * 13 * This source code is offered for use in the public domain. You may 14 * use, modify or distribute it freely. 15 * 16 * This code is distributed in the hope that it will be useful but 17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 18 * DISCLAIMED. This includes but is not limited to warranties of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 * 21 */ 22 23 #ifndef _NTDDNDIS_ 24 #define _NTDDNDIS_ 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 30 typedef enum _NDIS_WAN_QUALITY { 31 NdisWanRaw, 32 NdisWanErrorControl, 33 NdisWanReliable 34 } NDIS_WAN_QUALITY, *PNDIS_WAN_QUALITY; 35 36 typedef enum _NDIS_DEVICE_POWER_STATE { 37 NdisDeviceStateUnspecified = 0, 38 NdisDeviceStateD0, 39 NdisDeviceStateD1, 40 NdisDeviceStateD2, 41 NdisDeviceStateD3, 42 NdisDeviceStateMaximum 43 } NDIS_DEVICE_POWER_STATE, *PNDIS_DEVICE_POWER_STATE; 44 45 typedef enum _NDIS_802_11_WEP_STATUS 46 { 47 Ndis802_11WEPEnabled, 48 Ndis802_11WEPDisabled, 49 Ndis802_11WEPKeyAbsent, 50 Ndis802_11WEPNotSupported 51 } NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS; 52 53 typedef enum _NDIS_802_11_AUTHENTICATION_MODE 54 { 55 Ndis802_11AuthModeOpen, 56 Ndis802_11AuthModeShared, 57 Ndis802_11AuthModeAutoSwitch, 58 Ndis802_11AuthModeMax 59 } NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE; 60 61 typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE 62 { 63 Ndis802_11IBSS, 64 Ndis802_11Infrastructure, 65 Ndis802_11AutoUnknown, 66 Ndis802_11InfrastructureMax 67 } NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE; 68 69 typedef enum _NDIS_802_11_NETWORK_TYPE 70 { 71 Ndis802_11FH, 72 Ndis802_11DS, 73 Ndis802_11OFDM5, 74 Ndis802_11OFDM24, 75 Ndis802_11Automode, 76 Ndis802_11NetworkTypeMax 77 } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE; 78 79 typedef struct _NDIS_OBJECT_HEADER 80 { 81 UCHAR Type; 82 UCHAR Revision; 83 USHORT Size; 84 } NDIS_OBJECT_HEADER, *PNDIS_OBJECT_HEADER; 85 86 #define NDIS_802_11_LENGTH_SSID 32 87 #define NDIS_802_11_LENGTH_RATES 8 88 89 typedef UCHAR NDIS_802_11_MAC_ADDRESS[6]; 90 typedef LONG NDIS_802_11_RSSI; 91 typedef UCHAR NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; 92 93 typedef struct _NDIS_802_11_SSID 94 { 95 ULONG SsidLength; 96 UCHAR Ssid[NDIS_802_11_LENGTH_SSID]; 97 } NDIS_802_11_SSID, *PNDIS_802_11_SSID; 98 99 typedef struct _NDIS_802_11_CONFIGURATION_FH 100 { 101 ULONG Length; 102 ULONG HopPattern; 103 ULONG HopSet; 104 ULONG DwellTime; 105 } NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH; 106 107 typedef struct _NDIS_802_11_CONFIGURATION 108 { 109 ULONG Length; 110 ULONG BeaconPeriod; 111 ULONG ATIMWindow; 112 ULONG DSConfig; 113 NDIS_802_11_CONFIGURATION_FH FHConfig; 114 } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION; 115 116 typedef struct _NDIS_WLAN_BSSID 117 { 118 ULONG Length; 119 NDIS_802_11_MAC_ADDRESS MacAddress; 120 UCHAR Reserved[2]; 121 NDIS_802_11_SSID Ssid; 122 ULONG Privacy; 123 NDIS_802_11_RSSI Rssi; 124 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; 125 NDIS_802_11_CONFIGURATION Configuration; 126 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; 127 NDIS_802_11_RATES SupportedRates; 128 } NDIS_WLAN_BSSID, *PNDIS_WLAN_BSSID; 129 130 typedef struct _NDIS_802_11_BSSID_LIST 131 { 132 ULONG NumberOfItems; 133 NDIS_WLAN_BSSID Bssid[1]; 134 } NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST; 135 136 typedef struct _NDIS_802_11_WEP 137 { 138 ULONG Length; 139 ULONG KeyIndex; 140 ULONG KeyLength; 141 UCHAR KeyMaterial[1]; 142 } NDIS_802_11_WEP, *PNDIS_802_11_WEP; 143 144 typedef struct _NDIS_PM_WAKE_UP_CAPABILITIES { 145 NDIS_DEVICE_POWER_STATE MinMagicPacketWakeUp; 146 NDIS_DEVICE_POWER_STATE MinPatternWakeUp; 147 NDIS_DEVICE_POWER_STATE MinLinkChangeWakeUp; 148 } NDIS_PM_WAKE_UP_CAPABILITIES, *PNDIS_PM_WAKE_UP_CAPABILITIES; 149 150 /* NDIS_PNP_CAPABILITIES.Flags constants */ 151 #define NDIS_DEVICE_WAKE_UP_ENABLE 0x00000001 152 #define NDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE 0x00000002 153 #define NDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE 0x00000004 154 155 typedef struct _NDIS_PNP_CAPABILITIES { 156 ULONG Flags; 157 NDIS_PM_WAKE_UP_CAPABILITIES WakeUpCapabilities; 158 } NDIS_PNP_CAPABILITIES, *PNDIS_PNP_CAPABILITIES; 159 160 /* NDIS driver medium (OID_GEN_MEDIA_SUPPORTED / OID_GEN_MEDIA_IN_USE) */ 161 typedef enum _NDIS_MEDIUM { 162 NdisMedium802_3, 163 NdisMedium802_5, 164 NdisMediumFddi, 165 NdisMediumWan, 166 NdisMediumLocalTalk, 167 NdisMediumDix, 168 NdisMediumArcnetRaw, 169 NdisMediumArcnet878_2, 170 NdisMediumAtm, 171 NdisMediumWirelessWan, 172 NdisMediumIrda, 173 NdisMediumBpc, 174 NdisMediumCoWan, 175 NdisMedium1394, 176 NdisMediumMax 177 } NDIS_MEDIUM, *PNDIS_MEDIUM; 178 179 typedef enum _NDIS_PHYSICAL_MEDIUM 180 { 181 NdisPhysicalMediumUnspecified, 182 NdisPhysicalMediumWirelessLan, 183 NdisPhysicalMediumCableModem, 184 NdisPhysicalMediumPhoneLine, 185 NdisPhysicalMediumPowerLine, 186 NdisPhysicalMediumDSL, 187 NdisPhysicalMediumFibreChannel, 188 NdisPhysicalMedium1394, 189 NdisPhysicalMediumWirelessWan, 190 NdisPhysicalMediumNative802_11, 191 NdisPhysicalMediumBluetooth, 192 NdisPhysicalMediumInfiniband, 193 NdisPhysicalMediumWiMax, 194 NdisPhysicalMediumUWB, 195 NdisPhysicalMedium802_3, 196 NdisPhysicalMedium802_5, 197 NdisPhysicalMediumIrda, 198 NdisPhysicalMediumWiredWAN, 199 NdisPhysicalMediumWiredCoWan, 200 NdisPhysicalMediumOther, 201 NdisPhysicalMediumMax 202 } NDIS_PHYSICAL_MEDIUM, *PNDIS_PHYSICAL_MEDIUM; 203 204 typedef ULONG NDIS_OID, *PNDIS_OID; 205 206 /* Required Object IDs (OIDs) */ 207 #define OID_GEN_SUPPORTED_LIST 0x00010101 208 #define OID_GEN_HARDWARE_STATUS 0x00010102 209 #define OID_GEN_MEDIA_SUPPORTED 0x00010103 210 #define OID_GEN_MEDIA_IN_USE 0x00010104 211 #define OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105 212 #define OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106 213 #define OID_GEN_LINK_SPEED 0x00010107 214 #define OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108 215 #define OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109 216 #define OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A 217 #define OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B 218 #define OID_GEN_VENDOR_ID 0x0001010C 219 #define OID_GEN_VENDOR_DESCRIPTION 0x0001010D 220 #define OID_GEN_CURRENT_PACKET_FILTER 0x0001010E 221 #define OID_GEN_CURRENT_LOOKAHEAD 0x0001010F 222 #define OID_GEN_DRIVER_VERSION 0x00010110 223 #define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111 224 #define OID_GEN_PROTOCOL_OPTIONS 0x00010112 225 #define OID_GEN_MAC_OPTIONS 0x00010113 226 #define OID_GEN_MEDIA_CONNECT_STATUS 0x00010114 227 #define OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115 228 #define OID_GEN_VENDOR_DRIVER_VERSION 0x00010116 229 #define OID_GEN_SUPPORTED_GUIDS 0x00010117 230 #define OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118 231 #define OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119 232 #define OID_GEN_MACHINE_NAME 0x0001021A 233 #define OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021B 234 #define OID_GEN_VLAN_ID 0x0001021C 235 236 /* Optional OIDs */ 237 #define OID_GEN_MEDIA_CAPABILITIES 0x00010201 238 #define OID_GEN_PHYSICAL_MEDIUM 0x00010202 239 240 /* Required statistics OIDs */ 241 #define OID_GEN_XMIT_OK 0x00020101 242 #define OID_GEN_RCV_OK 0x00020102 243 #define OID_GEN_XMIT_ERROR 0x00020103 244 #define OID_GEN_RCV_ERROR 0x00020104 245 #define OID_GEN_RCV_NO_BUFFER 0x00020105 246 247 /* Optional statistics OIDs */ 248 #define OID_GEN_DIRECTED_BYTES_XMIT 0x00020201 249 #define OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202 250 #define OID_GEN_MULTICAST_BYTES_XMIT 0x00020203 251 #define OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204 252 #define OID_GEN_BROADCAST_BYTES_XMIT 0x00020205 253 #define OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206 254 #define OID_GEN_DIRECTED_BYTES_RCV 0x00020207 255 #define OID_GEN_DIRECTED_FRAMES_RCV 0x00020208 256 #define OID_GEN_MULTICAST_BYTES_RCV 0x00020209 257 #define OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A 258 #define OID_GEN_BROADCAST_BYTES_RCV 0x0002020B 259 #define OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C 260 #define OID_GEN_RCV_CRC_ERROR 0x0002020D 261 #define OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E 262 #define OID_GEN_GET_TIME_CAPS 0x0002020F 263 #define OID_GEN_GET_NETCARD_TIME 0x00020210 264 #define OID_GEN_NETCARD_LOAD 0x00020211 265 #define OID_GEN_DEVICE_PROFILE 0x00020212 266 #define OID_GEN_INIT_TIME_MS 0x00020213 267 #define OID_GEN_RESET_COUNTS 0x00020214 268 #define OID_GEN_MEDIA_SENSE_COUNTS 0x00020215 269 #define OID_GEN_FRIENDLY_NAME 0x00020216 270 #define OID_GEN_MINIPORT_INFO 0x00020217 271 #define OID_GEN_RESET_VERIFY_PARAMETERS 0x00020218 272 273 /* IEEE 802.3 (Ethernet) OIDs */ 274 #define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001 275 276 #define OID_802_3_PERMANENT_ADDRESS 0x01010101 277 #define OID_802_3_CURRENT_ADDRESS 0x01010102 278 #define OID_802_3_MULTICAST_LIST 0x01010103 279 #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 280 #define OID_802_3_MAC_OPTIONS 0x01010105 281 #define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101 282 #define OID_802_3_XMIT_ONE_COLLISION 0x01020102 283 #define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103 284 #define OID_802_3_XMIT_DEFERRED 0x01020201 285 #define OID_802_3_XMIT_MAX_COLLISIONS 0x01020202 286 #define OID_802_3_RCV_OVERRUN 0x01020203 287 #define OID_802_3_XMIT_UNDERRUN 0x01020204 288 #define OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205 289 #define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206 290 #define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207 291 292 /* IEEE 802.11 (WLAN) OIDs */ 293 #define OID_802_11_BSSID 0x0D010101 294 #define OID_802_11_SSID 0x0D010102 295 #define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0D010203 296 #define OID_802_11_NETWORK_TYPE_IN_USE 0x0D010204 297 #define OID_802_11_TX_POWER_LEVEL 0x0D010205 298 #define OID_802_11_RSSI 0x0D010206 299 #define OID_802_11_RSSI_TRIGGER 0x0D010207 300 #define OID_802_11_INFRASTRUCTURE_MODE 0x0D010108 301 #define OID_802_11_FRAGMENTATION_THRESHOLD 0x0D010209 302 #define OID_802_11_RTS_THRESHOLD 0x0D01020A 303 #define OID_802_11_NUMBER_OF_ANTENNAS 0x0D01020B 304 #define OID_802_11_RX_ANTENNA_SELECTED 0x0D01020C 305 #define OID_802_11_TX_ANTENNA_SELECTED 0x0D01020D 306 #define OID_802_11_SUPPORTED_RATES 0x0D01020E 307 #define OID_802_11_DESIRED_RATES 0x0D010210 308 #define OID_802_11_CONFIGURATION 0x0D010211 309 #define OID_802_11_STATISTICS 0x0D020212 310 #define OID_802_11_ADD_WEP 0x0D010113 311 #define OID_802_11_REMOVE_WEP 0x0D010114 312 #define OID_802_11_DISASSOCIATE 0x0D010115 313 #define OID_802_11_POWER_MODE 0x0D010216 314 #define OID_802_11_BSSID_LIST 0x0D010217 315 #define OID_802_11_AUTHENTICATION_MODE 0x0D010118 316 #define OID_802_11_PRIVACY_FILTER 0x0D010119 317 #define OID_802_11_BSSID_LIST_SCAN 0x0D01011A 318 #define OID_802_11_WEP_STATUS 0x0D01011B 319 /* New name is supposed to better reflect the extended set of encryption status */ 320 #define OID_802_11_ENCRYPTION_STATUS OID_802_11_WEP_STATUS 321 #define OID_802_11_RELOAD_DEFAULTS 0x0D01011C 322 /* Allows key mapping and default keys */ 323 #define OID_802_11_ADD_KEY 0x0D01011D 324 #define OID_802_11_REMOVE_KEY 0x0D01011E 325 #define OID_802_11_ASSOCIATION_INFORMATION 0x0D01011F 326 #define OID_802_11_TEST 0x0D010120 327 #define OID_802_11_MEDIA_STREAM_MODE 0x0D010121 328 #define OID_802_11_CAPABILITY 0x0D010122 329 #define OID_802_11_PMKID 0x0D010123 330 #define OID_802_11_NON_BCAST_SSID_LIST 0x0D010124 331 #define OID_802_11_RADIO_STATUS 0x0D010125 332 333 /* PnP and Power Management (PM) OIDs */ 334 #define OID_PNP_CAPABILITIES 0xFD010100 335 #define OID_PNP_SET_POWER 0xFD010101 336 #define OID_PNP_QUERY_POWER 0xFD010102 337 #define OID_PNP_ADD_WAKE_UP_PATTERN 0xFD010103 338 #define OID_PNP_REMOVE_WAKE_UP_PATTERN 0xFD010104 339 #define OID_PNP_WAKE_UP_PATTERN_LIST 0xFD010105 340 #define OID_PNP_ENABLE_WAKE_UP 0xFD010106 341 342 /* Optional PnP/PM statistics OIDs */ 343 #define OID_PNP_WAKE_UP_OK 0xFD020200 344 #define OID_PNP_WAKE_UP_ERROR 0xFD020201 345 346 /* TCP and IP OIDs */ 347 #define OID_TCP_TASK_OFFLOAD 0xFC010201 348 #define OID_TCP_TASK_IPSEC_ADD_SA 0xFC010202 349 #define OID_TCP_TASK_IPSEC_DELETE_SA 0xFC010203 350 #define OID_TCP_SAN_SUPPORT 0xFC010204 351 #define OID_TCP_TASK_IPSEC_ADD_UDPESP_SA 0xFC010205 352 #define OID_TCP_TASK_IPSEC_DELETE_UDPESP_SA 0xFC010206 353 #define OID_TCP4_OFFLOAD_STATS 0xFC010207 354 #define OID_TCP6_OFFLOAD_STATS 0xFC010208 355 #define OID_IP4_OFFLOAD_STATS 0xFC010209 356 #define OID_IP6_OFFLOAD_STATS 0xFC01020A 357 358 /* New NDIS 6 offload OIDs */ 359 #define OID_TCP_OFFLOAD_CURRENT_CONFIG 0xFC01020B /* NDIS 5 handled. Query only */ 360 #define OID_TCP_OFFLOAD_PARAMETERS 0xFC01020C /* Set only */ 361 #define OID_TCP_OFFLOAD_HARDWARE_CAPABILITIES 0xFC01020D /* Query only */ 362 #define OID_TCP_CONNECTION_OFFLOAD_CURRENT_CONFIG 0xFC01020E /* Query only */ 363 #define OID_TCP_CONNECTION_OFFLOAD_HARDWARE_CAPABILITIES 0xFC01020F /* Query only */ 364 #define OID_OFFLOAD_ENCAPSULATION 0x0101010A 365 366 /* Obsolete FFP defines */ 367 #define OID_FFP_SUPPORT 0xFC010210 368 #define OID_FFP_FLUSH 0xFC010211 369 #define OID_FFP_CONTROL 0xFC010212 370 #define OID_FFP_PARAMS 0xFC010213 371 #define OID_FFP_DATA 0xFC010214 372 373 #define OID_FFP_DRIVER_STATS 0xFC020210 374 #define OID_FFP_ADAPTER_STATS 0xFC020211 375 376 /* OID_GEN_MINIPORT_INFO constants */ 377 #define NDIS_MINIPORT_BUS_MASTER 0x00000001 378 #define NDIS_MINIPORT_WDM_DRIVER 0x00000002 379 #define NDIS_MINIPORT_SG_LIST 0x00000004 380 #define NDIS_MINIPORT_SUPPORTS_MEDIA_QUERY 0x00000008 381 #define NDIS_MINIPORT_INDICATES_PACKETS 0x00000010 382 #define NDIS_MINIPORT_IGNORE_PACKET_QUEUE 0x00000020 383 #define NDIS_MINIPORT_IGNORE_REQUEST_QUEUE 0x00000040 384 #define NDIS_MINIPORT_IGNORE_TOKEN_RING_ERRORS 0x00000080 385 #define NDIS_MINIPORT_INTERMEDIATE_DRIVER 0x00000100 386 #define NDIS_MINIPORT_IS_NDIS_5 0x00000200 387 #define NDIS_MINIPORT_IS_CO 0x00000400 388 #define NDIS_MINIPORT_DESERIALIZE 0x00000800 389 #define NDIS_MINIPORT_REQUIRES_MEDIA_POLLING 0x00001000 390 #define NDIS_MINIPORT_SUPPORTS_MEDIA_SENSE 0x00002000 391 #define NDIS_MINIPORT_NETBOOT_CARD 0x00004000 392 #define NDIS_MINIPORT_PM_SUPPORTED 0x00008000 393 #define NDIS_MINIPORT_SUPPORTS_MAC_ADDRESS_OVERWRITE 0x00010000 394 #define NDIS_MINIPORT_USES_SAFE_BUFFER_APIS 0x00020000 395 #define NDIS_MINIPORT_HIDDEN 0x00040000 396 #define NDIS_MINIPORT_SWENUM 0x00080000 397 #define NDIS_MINIPORT_SURPRISE_REMOVE_OK 0x00100000 398 #define NDIS_MINIPORT_NO_HALT_ON_SUSPEND 0x00200000 399 #define NDIS_MINIPORT_HARDWARE_DEVICE 0x00400000 400 #define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000 401 #define NDIS_MINIPORT_64BITS_DMA 0x01000000 402 403 /* Full duplex driver */ 404 #define NDIS_MAC_OPTION_FULL_DUPLEX 0x00000010 /* Deprecated flag */ 405 406 #define NDIS_MAC_OPTION_EOTX_INDICATION 0x00000020 407 #define NDIS_MAC_OPTION_8021P_PRIORITY 0x00000040 408 #define NDIS_MAC_OPTION_SUPPORTS_MAC_ADRESS_OVERWRITE 0x00000080 409 #define NDIS_MAC_OPTION_RECEIVE_AT_DPC 0x00000100 410 #define NDIS_MAC_OPTION_8021Q_VLAN 0x00000200 411 #define NDIS_MAC_OPTION_RESERVED 0x80000000 412 413 #define IOCTL_NDIS_QUERY_GLOBAL_STATS CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, \ 414 0, \ 415 METHOD_OUT_DIRECT, \ 416 FILE_ANY_ACCESS) 417 418 /* Hardware status codes (OID_GEN_HARDWARE_STATUS) */ 419 typedef enum _NDIS_HARDWARE_STATUS { 420 NdisHardwareStatusReady, 421 NdisHardwareStatusInitializing, 422 NdisHardwareStatusReset, 423 NdisHardwareStatusClosing, 424 NdisHardwareStatusNotReady 425 } NDIS_HARDWARE_STATUS, *PNDIS_HARDWARE_STATUS; 426 427 /* OID_GEN_GET_TIME_CAPS */ 428 typedef struct _GEN_GET_TIME_CAPS { 429 ULONG Flags; 430 ULONG ClockPrecision; 431 } GEN_GET_TIME_CAPS, *PGEN_GET_TIME_CAPS; 432 433 /* OID_GEN_GET_NETCARD_TIME */ 434 typedef struct _GEN_GET_NETCARD_TIME { 435 ULONGLONG ReadTime; 436 } GEN_GET_NETCARD_TIME, *PGEN_GET_NETCARD_TIME; 437 438 /* State of the LAN media (OID_GEN_MEDIA_CONNECT_STATUS) */ 439 typedef enum _NDIS_MEDIA_STATE { 440 NdisMediaStateConnected, 441 NdisMediaStateDisconnected 442 } NDIS_MEDIA_STATE, *PNDIS_MEDIA_STATE; 443 444 #ifndef _NDIS_ 445 typedef int NDIS_STATUS, *PNDIS_STATUS; 446 #endif 447 448 /* OID_GEN_SUPPORTED_GUIDS */ 449 typedef struct _NDIS_GUID { 450 GUID Guid; 451 union { 452 NDIS_OID Oid; 453 NDIS_STATUS Status; 454 } u; 455 ULONG Size; 456 ULONG Flags; 457 } NDIS_GUID, *PNDIS_GUID; 458 459 typedef struct _NDIS_PM_PACKET_PATTERN { 460 ULONG Priority; 461 ULONG Reserved; 462 ULONG MaskSize; 463 ULONG PatternOffset; 464 ULONG PatternSize; 465 ULONG PatternFlags; 466 } NDIS_PM_PACKET_PATTERN, *PNDIS_PM_PACKET_PATTERN; 467 468 /* OID_GEN_NETWORK_LAYER_ADDRESSES */ 469 typedef struct _NETWORK_ADDRESS { 470 USHORT AddressLength; 471 USHORT AddressType; 472 UCHAR Address[1]; 473 } NETWORK_ADDRESS, *PNETWORK_ADDRESS; 474 475 typedef struct _NETWORK_ADDRESS_LIST { 476 LONG AddressCount; 477 USHORT AddressType; 478 NETWORK_ADDRESS Address[1]; 479 } NETWORK_ADDRESS_LIST, *PNETWORK_ADDRESS_LIST; 480 481 /* OID_GEN_TRANSPORT_HEADER_OFFSET */ 482 typedef struct _TRANSPORT_HEADER_OFFSET { 483 USHORT ProtocolType; 484 USHORT HeaderOffset; 485 } TRANSPORT_HEADER_OFFSET, *PTRANSPORT_HEADER_OFFSET; 486 487 /* OID_GEN_CO_LINK_SPEED / OID_GEN_CO_MINIMUM_LINK_SPEED */ 488 typedef struct _NDIS_CO_LINK_SPEED { 489 ULONG Outbound; 490 ULONG Inbound; 491 } NDIS_CO_LINK_SPEED, *PNDIS_CO_LINK_SPEED; 492 493 #ifdef __cplusplus 494 } 495 #endif 496 497 #endif /* _NTDDNDIS_ */ 498