ifndef _NTDDNDIS_
define _NTDDNDIS_

include libc.inc
include winapifamily.inc

if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP or WINAPI_PARTITION_SYSTEM or WINAPI_PARTITION_GAMES)

if ((NTDDI_VERSION ge NTDDI_VISTA) or defined(NDIS_SUPPORT_NDIS6))
include ifdef.inc
include devpkey.inc
include pciprop.inc
endif

include ndis/version.inc

define DD_NDIS_DEVICE_NAME <L"\\Device\\NDIS">

_NDIS_CONTROL_CODE macro request,method
  exitm<CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, request, method, FILE_ANY_ACCESS)>
  endm

define IOCTL_NDIS_QUERY_GLOBAL_STATS   _NDIS_CONTROL_CODE(0, METHOD_OUT_DIRECT)
define IOCTL_NDIS_QUERY_ALL_STATS      _NDIS_CONTROL_CODE(1, METHOD_OUT_DIRECT)
define IOCTL_NDIS_DO_PNP_OPERATION     _NDIS_CONTROL_CODE(2, METHOD_BUFFERED)
define IOCTL_NDIS_QUERY_SELECTED_STATS _NDIS_CONTROL_CODE(3, METHOD_OUT_DIRECT)
define IOCTL_NDIS_ENUMERATE_INTERFACES _NDIS_CONTROL_CODE(4, METHOD_BUFFERED)
define IOCTL_NDIS_ADD_TDI_DEVICE       _NDIS_CONTROL_CODE(5, METHOD_BUFFERED)
define IOCTL_NDIS_GET_LOG_DATA         _NDIS_CONTROL_CODE(7, METHOD_OUT_DIRECT)
define IOCTL_NDIS_GET_VERSION          _NDIS_CONTROL_CODE(8, METHOD_BUFFERED)

define IOCTL_NDIS_RESERVED1            _NDIS_CONTROL_CODE(9, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED2            _NDIS_CONTROL_CODE(0xA, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED3            _NDIS_CONTROL_CODE(0xB, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED4            _NDIS_CONTROL_CODE(0xC, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED5            CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, 0xD, METHOD_BUFFERED, FILE_ANY_ACCESS)
define IOCTL_NDIS_RESERVED6            CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, 0xE, METHOD_BUFFERED, FILE_WRITE_ACCESS)
define IOCTL_NDIS_RESERVED7            _NDIS_CONTROL_CODE(0xF, METHOD_OUT_DIRECT)
define IOCTL_NDIS_RESERVED8            _NDIS_CONTROL_CODE(0x10, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED9            _NDIS_CONTROL_CODE(0x11, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED10           _NDIS_CONTROL_CODE(0x12, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED11           _NDIS_CONTROL_CODE(0x13, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED12           _NDIS_CONTROL_CODE(0x14, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED13           _NDIS_CONTROL_CODE(0x15, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED14           _NDIS_CONTROL_CODE(0x16, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED15           _NDIS_CONTROL_CODE(0x17, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED16           _NDIS_CONTROL_CODE(0x18, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED17           _NDIS_CONTROL_CODE(0x19, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED18           _NDIS_CONTROL_CODE(0x1A, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED19           _NDIS_CONTROL_CODE(0x1B, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED20           _NDIS_CONTROL_CODE(0x1C, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED21           _NDIS_CONTROL_CODE(0x1D, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED22           _NDIS_CONTROL_CODE(0x1E, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED23           _NDIS_CONTROL_CODE(0x1F, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED24           _NDIS_CONTROL_CODE(0x20, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED25           _NDIS_CONTROL_CODE(0x21, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED26           _NDIS_CONTROL_CODE(0x22, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED27           _NDIS_CONTROL_CODE(0x23, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED28           _NDIS_CONTROL_CODE(0x24, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED29           _NDIS_CONTROL_CODE(0x25, METHOD_BUFFERED)
define IOCTL_NDIS_RESERVED30           _NDIS_CONTROL_CODE(0x26, METHOD_BUFFERED)

NDIS_OID                typedef ULONG
PNDIS_OID               typedef ptr NDIS_OID

_NDIS_STATISTICS_VALUE  struct
Oid                     NDIS_OID ?
DataLength              ULONG ?
Data                    UCHAR 1 dup(?)
_NDIS_STATISTICS_VALUE  ends
NDIS_STATISTICS_VALUE   typedef _NDIS_STATISTICS_VALUE
PNDIS_STATISTICS_VALUE  typedef ptr _NDIS_STATISTICS_VALUE

if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)
_NDIS_STATISTICS_VALUE_EX struct
Oid                     NDIS_OID ?
DataLength              ULONG ?
Length                  ULONG ?
Data                    UCHAR 1 dup(?)
_NDIS_STATISTICS_VALUE_EX ends
NDIS_STATISTICS_VALUE_EX  typedef _NDIS_STATISTICS_VALUE_EX
PNDIS_STATISTICS_VALUE_EX typedef ptr _NDIS_STATISTICS_VALUE_EX
endif

_NDIS_VAR_DATA_DESC     struct
Length                  USHORT ?
MaximumLength           USHORT ?
_Offset                 ULONG_PTR ?
_NDIS_VAR_DATA_DESC     ends
NDIS_VAR_DATA_DESC      typedef _NDIS_VAR_DATA_DESC
PNDIS_VAR_DATA_DESC     typedef ptr _NDIS_VAR_DATA_DESC

ifndef GUID_DEFINED
include guiddef.inc
endif

define NDIS_OBJECT_TYPE_DEFAULT                            0x80
define NDIS_OBJECT_TYPE_MINIPORT_INIT_PARAMETERS           0x81
define NDIS_OBJECT_TYPE_SG_DMA_DESCRIPTION                 0x83
define NDIS_OBJECT_TYPE_MINIPORT_INTERRUPT                 0x84
define NDIS_OBJECT_TYPE_DEVICE_OBJECT_ATTRIBUTES           0x85
define NDIS_OBJECT_TYPE_BIND_PARAMETERS                    0x86
define NDIS_OBJECT_TYPE_OPEN_PARAMETERS                    0x87
define NDIS_OBJECT_TYPE_RSS_CAPABILITIES                   0x88
define NDIS_OBJECT_TYPE_RSS_PARAMETERS                     0x89
define NDIS_OBJECT_TYPE_MINIPORT_DRIVER_CHARACTERISTICS    0x8A
define NDIS_OBJECT_TYPE_FILTER_DRIVER_CHARACTERISTICS      0x8B
define NDIS_OBJECT_TYPE_FILTER_PARTIAL_CHARACTERISTICS     0x8C
define NDIS_OBJECT_TYPE_FILTER_ATTRIBUTES                  0x8D
define NDIS_OBJECT_TYPE_CLIENT_CHIMNEY_OFFLOAD_GENERIC_CHARACTERISTICS     0x8E
define NDIS_OBJECT_TYPE_PROVIDER_CHIMNEY_OFFLOAD_GENERIC_CHARACTERISTICS   0x8F
define NDIS_OBJECT_TYPE_CO_PROTOCOL_CHARACTERISTICS        0x90
define NDIS_OBJECT_TYPE_CO_MINIPORT_CHARACTERISTICS        0x91
define NDIS_OBJECT_TYPE_MINIPORT_PNP_CHARACTERISTICS       0x92
define NDIS_OBJECT_TYPE_CLIENT_CHIMNEY_OFFLOAD_CHARACTERISTICS     0x93
define NDIS_OBJECT_TYPE_PROVIDER_CHIMNEY_OFFLOAD_CHARACTERISTICS   0x94
define NDIS_OBJECT_TYPE_PROTOCOL_DRIVER_CHARACTERISTICS    0x95
define NDIS_OBJECT_TYPE_REQUEST_EX                         0x96
define NDIS_OBJECT_TYPE_OID_REQUEST                        0x96
define NDIS_OBJECT_TYPE_TIMER_CHARACTERISTICS              0x97
define NDIS_OBJECT_TYPE_STATUS_INDICATION                  0x98
define NDIS_OBJECT_TYPE_FILTER_ATTACH_PARAMETERS           0x99
define NDIS_OBJECT_TYPE_FILTER_PAUSE_PARAMETERS            0x9A
define NDIS_OBJECT_TYPE_FILTER_RESTART_PARAMETERS          0x9B
define NDIS_OBJECT_TYPE_PORT_CHARACTERISTICS               0x9C
define NDIS_OBJECT_TYPE_PORT_STATE                         0x9D
define NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES       0x9E
define NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES            0x9F
define NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_OFFLOAD_ATTRIBUTES            0xA0
define NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_NATIVE_802_11_ATTRIBUTES      0xA1
define NDIS_OBJECT_TYPE_RESTART_GENERAL_ATTRIBUTES                     0xA2
define NDIS_OBJECT_TYPE_PROTOCOL_RESTART_PARAMETERS                    0xA3
define NDIS_OBJECT_TYPE_MINIPORT_ADD_DEVICE_REGISTRATION_ATTRIBUTES    0xA4
define NDIS_OBJECT_TYPE_CO_CALL_MANAGER_OPTIONAL_HANDLERS              0xA5
define NDIS_OBJECT_TYPE_CO_CLIENT_OPTIONAL_HANDLERS                    0xA6
define NDIS_OBJECT_TYPE_OFFLOAD                                        0xA7
define NDIS_OBJECT_TYPE_OFFLOAD_ENCAPSULATION                          0xA8
define NDIS_OBJECT_TYPE_CONFIGURATION_OBJECT                           0xA9
define NDIS_OBJECT_TYPE_DRIVER_WRAPPER_OBJECT                          0xAA
if (NDIS_SUPPORT_NDIS61)
define NDIS_OBJECT_TYPE_HD_SPLIT_ATTRIBUTES                            0xAB
endif
define NDIS_OBJECT_TYPE_NSI_NETWORK_RW_STRUCT                          0xAC
define NDIS_OBJECT_TYPE_NSI_COMPARTMENT_RW_STRUCT                      0xAD
define NDIS_OBJECT_TYPE_NSI_INTERFACE_PERSIST_RW_STRUCT                0xAE
if (NDIS_SUPPORT_NDIS61)
define NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES    0xAF
endif
if (NDIS_SUPPORT_NDIS620)
define NDIS_OBJECT_TYPE_SHARED_MEMORY_PROVIDER_CHARACTERISTICS         0xB0
define NDIS_OBJECT_TYPE_RSS_PROCESSOR_INFO                             0xB1
endif
if (NDIS_SUPPORT_NDIS630)
define NDIS_OBJECT_TYPE_NDK_PROVIDER_CHARACTERISTICS                   0xB2
define NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_NDK_ATTRIBUTES                0xB3
define NDIS_OBJECT_TYPE_MINIPORT_SS_CHARACTERISTICS                    0xB4
define NDIS_OBJECT_TYPE_QOS_CAPABILITIES                               0xB5
define NDIS_OBJECT_TYPE_QOS_PARAMETERS                                 0xB6
define NDIS_OBJECT_TYPE_QOS_CLASSIFICATION_ELEMENT                     0xB7
define NDIS_OBJECT_TYPE_SWITCH_OPTIONAL_HANDLERS                       0xB8

endif

if (NDIS_SUPPORT_NDIS650)
define NDIS_OBJECT_TYPE_PD_TRANSMIT_QUEUE                              0xBE
define NDIS_OBJECT_TYPE_PD_RECEIVE_QUEUE                               0xBF
endif

if (NDIS_SUPPORT_NDIS650)
define NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_PACKET_DIRECT_ATTRIBUTES      0xC5
endif

if (NDIS_SUPPORT_NDIS670)
define NDIS_OBJECT_TYPE_MINIPORT_DEVICE_POWER_NOTIFICATION             0xC6
endif

define NDIS_OBJECT_TYPE_RSS_PARAMETERS_V2                              0xC8
define NDIS_OBJECT_TYPE_RSS_SET_INDIRECTION_ENTRIES                    0xC9

_NDIS_OBJECT_HEADER     struct
Type                    UCHAR ?
Revision                UCHAR ?
Size                    USHORT ?
_NDIS_OBJECT_HEADER     ends
NDIS_OBJECT_HEADER      typedef _NDIS_OBJECT_HEADER
PNDIS_OBJECT_HEADER     typedef ptr _NDIS_OBJECT_HEADER

define NDIS_OBJECT_REVISION_1                  1

.enum NDIS_REQUEST_TYPE {
    NdisRequestQueryInformation,
    NdisRequestSetInformation,
    NdisRequestQueryStatistics,
    NdisRequestOpen,
    NdisRequestClose,
    NdisRequestSend,
    NdisRequestTransferData,
    NdisRequestReset,
    NdisRequestGeneric1,
    NdisRequestGeneric2,
    NdisRequestGeneric3,
    NdisRequestGeneric4,
if NDIS_SUPPORT_NDIS6
    NdisRequestMethod,
endif
}

if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)

define NDIS_STATISTICS_FLAGS_VALID_DIRECTED_FRAMES_RCV             0x00000001
define NDIS_STATISTICS_FLAGS_VALID_MULTICAST_FRAMES_RCV            0x00000002
define NDIS_STATISTICS_FLAGS_VALID_BROADCAST_FRAMES_RCV            0x00000004
define NDIS_STATISTICS_FLAGS_VALID_BYTES_RCV                       0x00000008
define NDIS_STATISTICS_FLAGS_VALID_RCV_DISCARDS                    0x00000010
define NDIS_STATISTICS_FLAGS_VALID_RCV_ERROR                       0x00000020
define NDIS_STATISTICS_FLAGS_VALID_DIRECTED_FRAMES_XMIT            0x00000040
define NDIS_STATISTICS_FLAGS_VALID_MULTICAST_FRAMES_XMIT           0x00000080
define NDIS_STATISTICS_FLAGS_VALID_BROADCAST_FRAMES_XMIT           0x00000100
define NDIS_STATISTICS_FLAGS_VALID_BYTES_XMIT                      0x00000200
define NDIS_STATISTICS_FLAGS_VALID_XMIT_ERROR                      0x00000400
define NDIS_STATISTICS_FLAGS_VALID_XMIT_DISCARDS                   0x00008000
define NDIS_STATISTICS_FLAGS_VALID_DIRECTED_BYTES_RCV              0x00010000
define NDIS_STATISTICS_FLAGS_VALID_MULTICAST_BYTES_RCV             0x00020000
define NDIS_STATISTICS_FLAGS_VALID_BROADCAST_BYTES_RCV             0x00040000
define NDIS_STATISTICS_FLAGS_VALID_DIRECTED_BYTES_XMIT             0x00080000
define NDIS_STATISTICS_FLAGS_VALID_MULTICAST_BYTES_XMIT            0x00100000
define NDIS_STATISTICS_FLAGS_VALID_BROADCAST_BYTES_XMIT            0x00200000

define NDIS_STATISTICS_INFO_REVISION_1  1

_NDIS_STATISTICS_INFO   struct
Header                  NDIS_OBJECT_HEADER <>
SupportedStatistics     ULONG ?
ifInDiscards            ULONG64 ?
ifInErrors              ULONG64 ?
ifHCInOctets            ULONG64 ?
ifHCInUcastPkts         ULONG64 ?
ifHCInMulticastPkts     ULONG64 ?
ifHCInBroadcastPkts     ULONG64 ?
ifHCOutOctets           ULONG64 ?
ifHCOutUcastPkts        ULONG64 ?
ifHCOutMulticastPkts    ULONG64 ?
ifHCOutBroadcastPkts    ULONG64 ?
ifOutErrors             ULONG64 ?
ifOutDiscards           ULONG64 ?
ifHCInUcastOctets       ULONG64 ?
ifHCInMulticastOctets   ULONG64 ?
ifHCInBroadcastOctets   ULONG64 ?
ifHCOutUcastOctets      ULONG64 ?
ifHCOutMulticastOctets  ULONG64 ?
ifHCOutBroadcastOctets  ULONG64 ?
_NDIS_STATISTICS_INFO   ends
NDIS_STATISTICS_INFO    typedef _NDIS_STATISTICS_INFO
PNDIS_STATISTICS_INFO   typedef ptr _NDIS_STATISTICS_INFO

define NDIS_SIZEOF_STATISTICS_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_STATISTICS_INFO, ifHCOutBroadcastOctets)

if (NDIS_SUPPORT_NDIS630)

_NDIS_RSC_STATISTICS_INFO struct
Header                  NDIS_OBJECT_HEADER ?
CoalescedPkts           ULONG64 ?
CoalescedOctets         ULONG64 ?
CoalesceEvents          ULONG64 ?
Aborts                  ULONG64 ?
_NDIS_RSC_STATISTICS_INFO ends
NDIS_RSC_STATISTICS_INFO typedef _NDIS_RSC_STATISTICS_INFO
PNDIS_RSC_STATISTICS_INFO typedef ptr _NDIS_RSC_STATISTICS_INFO

define NDIS_RSC_STATISTICS_REVISION_1              1

define NDIS_SIZEOF_RSC_STATISTICS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RSC_STATISTICS_INFO, Aborts)

endif

.enum NDIS_INTERRUPT_MODERATION {
    NdisInterruptModerationUnknown,
    NdisInterruptModerationNotSupported,
    NdisInterruptModerationEnabled,
    NdisInterruptModerationDisabled
}

define NDIS_INTERRUPT_MODERATION_CHANGE_NEEDS_RESET            0x00000001
define NDIS_INTERRUPT_MODERATION_CHANGE_NEEDS_REINITIALIZE     0x00000002

define NDIS_INTERRUPT_MODERATION_PARAMETERS_REVISION_1    1

_NDIS_INTERRUPT_MODERATION_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER <>
Flags                   ULONG ?
InterruptModeration     NDIS_INTERRUPT_MODERATION ?
_NDIS_INTERRUPT_MODERATION_PARAMETERS ends
NDIS_INTERRUPT_MODERATION_PARAMETERS typedef _NDIS_INTERRUPT_MODERATION_PARAMETERS
PNDIS_INTERRUPT_MODERATION_PARAMETERS typedef ptr _NDIS_INTERRUPT_MODERATION_PARAMETERS

define NDIS_SIZEOF_INTERRUPT_MODERATION_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_INTERRUPT_MODERATION_PARAMETERS, InterruptModeration)

define NDIS_TIMEOUT_DPC_REQUEST_CAPABILITIES_REVISION_1  1

_NDIS_TIMEOUT_DPC_REQUEST_CAPABILITIES struct
Header                  NDIS_OBJECT_HEADER <>
Flags                   ULONG ?
TimeoutArrayLength      ULONG ?
TimeoutArray            ULONG 1 dup(?)
_NDIS_TIMEOUT_DPC_REQUEST_CAPABILITIES ends
NDIS_TIMEOUT_DPC_REQUEST_CAPABILITIES typedef _NDIS_TIMEOUT_DPC_REQUEST_CAPABILITIES
PNDIS_TIMEOUT_DPC_REQUEST_CAPABILITIES typedef ptr _NDIS_TIMEOUT_DPC_REQUEST_CAPABILITIES

define NDIS_SIZEOF_TIMEOUT_DPC_REQUEST_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_TIMEOUT_DPC_REQUEST_CAPABILITIES, TimeoutArray)

define NDIS_OBJECT_TYPE_PCI_DEVICE_CUSTOM_PROPERTIES_REVISION_1  1

if ((NTDDI_VERSION ge NTDDI_WIN7) or NDIS_SUPPORT_NDIS620)
define NDIS_OBJECT_TYPE_PCI_DEVICE_CUSTOM_PROPERTIES_REVISION_2  2
endif

_NDIS_PCI_DEVICE_CUSTOM_PROPERTIES struct
Header                  NDIS_OBJECT_HEADER <>
DeviceType              UINT32 ?
CurrentSpeedAndMode     UINT32 ?
CurrentPayloadSize      UINT32 ?
MaxPayloadSize          UINT32 ?
MaxReadRequestSize      UINT32 ?
CurrentLinkSpeed        UINT32 ?
CurrentLinkWidth        UINT32 ?
MaxLinkSpeed            UINT32 ?
MaxLinkWidth            UINT32 ?
if ((NTDDI_VERSION ge NTDDI_WIN7) or NDIS_SUPPORT_NDIS620)
PciExpressVersion       UINT32 ?
InterruptType           UINT32 ?
MaxInterruptMessages    UINT32 ?
endif
_NDIS_PCI_DEVICE_CUSTOM_PROPERTIES ends
NDIS_PCI_DEVICE_CUSTOM_PROPERTIES typedef _NDIS_PCI_DEVICE_CUSTOM_PROPERTIES
PNDIS_PCI_DEVICE_CUSTOM_PROPERTIES typedef ptr _NDIS_PCI_DEVICE_CUSTOM_PROPERTIES

define NDIS_SIZEOF_PCI_DEVICE_CUSTOM_PROPERTIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PCI_DEVICE_CUSTOM_PROPERTIES, MaxLinkWidth)

if ((NTDDI_VERSION ge NTDDI_WIN7) or NDIS_SUPPORT_NDIS620)
define NDIS_SIZEOF_PCI_DEVICE_CUSTOM_PROPERTIES_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_PCI_DEVICE_CUSTOM_PROPERTIES, MaxInterruptMessages)
endif

endif

define OID_GEN_SUPPORTED_LIST                  0x00010101
define OID_GEN_HARDWARE_STATUS                 0x00010102
define OID_GEN_MEDIA_SUPPORTED                 0x00010103
define OID_GEN_MEDIA_IN_USE                    0x00010104
define OID_GEN_MAXIMUM_LOOKAHEAD               0x00010105
define OID_GEN_MAXIMUM_FRAME_SIZE              0x00010106
define OID_GEN_LINK_SPEED                      0x00010107
define OID_GEN_TRANSMIT_BUFFER_SPACE           0x00010108
define OID_GEN_RECEIVE_BUFFER_SPACE            0x00010109
define OID_GEN_TRANSMIT_BLOCK_SIZE             0x0001010A
define OID_GEN_RECEIVE_BLOCK_SIZE              0x0001010B
define OID_GEN_VENDOR_ID                       0x0001010C
define OID_GEN_VENDOR_DESCRIPTION              0x0001010D
define OID_GEN_CURRENT_PACKET_FILTER           0x0001010E
define OID_GEN_CURRENT_LOOKAHEAD               0x0001010F
define OID_GEN_DRIVER_VERSION                  0x00010110
define OID_GEN_MAXIMUM_TOTAL_SIZE              0x00010111
define OID_GEN_PROTOCOL_OPTIONS                0x00010112
define OID_GEN_MAC_OPTIONS                     0x00010113
define OID_GEN_MEDIA_CONNECT_STATUS            0x00010114
define OID_GEN_MAXIMUM_SEND_PACKETS            0x00010115

define OID_GEN_VENDOR_DRIVER_VERSION           0x00010116
define OID_GEN_SUPPORTED_GUIDS                 0x00010117
define OID_GEN_NETWORK_LAYER_ADDRESSES         0x00010118
define OID_GEN_TRANSPORT_HEADER_OFFSET         0x00010119
define OID_GEN_MEDIA_CAPABILITIES              0x00010201
define OID_GEN_PHYSICAL_MEDIUM                 0x00010202

if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)
define OID_GEN_RECEIVE_SCALE_CAPABILITIES      0x00010203
define OID_GEN_RECEIVE_SCALE_PARAMETERS        0x00010204

define OID_GEN_MAC_ADDRESS                     0x00010205
define OID_GEN_MAX_LINK_SPEED                  0x00010206
define OID_GEN_LINK_STATE                      0x00010207

define OID_GEN_LINK_PARAMETERS                 0x00010208
define OID_GEN_INTERRUPT_MODERATION            0x00010209
define OID_GEN_NDIS_RESERVED_3                 0x0001020A
define OID_GEN_NDIS_RESERVED_4                 0x0001020B
define OID_GEN_NDIS_RESERVED_5                 0x0001020C

define OID_GEN_ENUMERATE_PORTS                 0x0001020D
define OID_GEN_PORT_STATE                      0x0001020E
define OID_GEN_PORT_AUTHENTICATION_PARAMETERS  0x0001020F

define OID_GEN_TIMEOUT_DPC_REQUEST_CAPABILITIES 0x00010210

define OID_GEN_PCI_DEVICE_CUSTOM_PROPERTIES    0x00010211
define OID_GEN_NDIS_RESERVED_6                 0x00010212
define OID_GEN_PHYSICAL_MEDIUM_EX              0x00010213

endif

if ((NTDDI_VERSION ge NTDDI_WIN10_RS3) or NDIS_SUPPORT_NDIS680)
define OID_GEN_RECEIVE_SCALE_PARAMETERS_V2     0x00010214
endif

define OID_GEN_MACHINE_NAME                    0x0001021A
define OID_GEN_RNDIS_CONFIG_PARAMETER          0x0001021B
define OID_GEN_VLAN_ID                         0x0001021C

if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)
define OID_GEN_RECEIVE_HASH                    0x0001021F
define OID_GEN_MINIPORT_RESTART_ATTRIBUTES     0x0001021D

if (NDIS_SUPPORT_NDIS61)
define OID_GEN_HD_SPLIT_PARAMETERS             0x0001021E
define OID_GEN_HD_SPLIT_CURRENT_CONFIG         0x00010220
endif

define OID_GEN_PROMISCUOUS_MODE                0x00010280
define OID_GEN_LAST_CHANGE                     0x00010281
define OID_GEN_DISCONTINUITY_TIME              0x00010282
define OID_GEN_OPERATIONAL_STATUS              0x00010283
define OID_GEN_XMIT_LINK_SPEED                 0x00010284
define OID_GEN_RCV_LINK_SPEED                  0x00010285
define OID_GEN_UNKNOWN_PROTOS                  0x00010286
define OID_GEN_INTERFACE_INFO                  0x00010287
define OID_GEN_ADMIN_STATUS                    0x00010288
define OID_GEN_ALIAS                           0x00010289
define OID_GEN_MEDIA_CONNECT_STATUS_EX         0x0001028A
define OID_GEN_LINK_SPEED_EX                   0x0001028B
define OID_GEN_MEDIA_DUPLEX_STATE              0x0001028C
define OID_GEN_IP_OPER_STATUS                  0x0001028D

define OID_WWAN_DRIVER_CAPS                    0x0e010100
define OID_WWAN_DEVICE_CAPS                    0x0e010101
define OID_WWAN_READY_INFO                     0x0e010102
define OID_WWAN_RADIO_STATE                    0x0e010103
define OID_WWAN_PIN                            0x0e010104
define OID_WWAN_PIN_LIST                       0x0e010105
define OID_WWAN_HOME_PROVIDER                  0x0e010106
define OID_WWAN_PREFERRED_PROVIDERS            0x0e010107
define OID_WWAN_VISIBLE_PROVIDERS              0x0e010108
define OID_WWAN_REGISTER_STATE                 0x0e010109
define OID_WWAN_PACKET_SERVICE                 0x0e01010a
define OID_WWAN_SIGNAL_STATE                   0x0e01010b
define OID_WWAN_CONNECT                        0x0e01010c
define OID_WWAN_PROVISIONED_CONTEXTS           0x0e01010d
define OID_WWAN_SERVICE_ACTIVATION             0x0e01010e
define OID_WWAN_SMS_CONFIGURATION              0x0e01010f
define OID_WWAN_SMS_READ                       0x0e010110
define OID_WWAN_SMS_SEND                       0x0e010111
define OID_WWAN_SMS_DELETE                     0x0e010112
define OID_WWAN_SMS_STATUS                     0x0e010113
define OID_WWAN_VENDOR_SPECIFIC                0x0e010114

endif

if ((NTDDI_VERSION ge NTDDI_WIN8) or NDIS_SUPPORT_NDIS630)

define OID_WWAN_AUTH_CHALLENGE                     0x0e010115
define OID_WWAN_ENUMERATE_DEVICE_SERVICES          0x0e010116
define OID_WWAN_SUBSCRIBE_DEVICE_SERVICE_EVENTS    0x0e010117
define OID_WWAN_DEVICE_SERVICE_COMMAND             0x0e010118
define OID_WWAN_USSD                               0x0e010119
define OID_WWAN_PIN_EX                             0x0e010121
define OID_WWAN_ENUMERATE_DEVICE_SERVICE_COMMANDS  0x0e010122
define OID_WWAN_DEVICE_SERVICE_SESSION             0x0e010123
define OID_WWAN_DEVICE_SERVICE_SESSION_WRITE       0x0e010124
define OID_WWAN_PREFERRED_MULTICARRIER_PROVIDERS   0x0e010125
define OID_WWAN_CREATE_MAC                         0x0e010126
define OID_WWAN_DELETE_MAC                         0x0e010127
endif

if ((NTDDI_VERSION ge NTDDI_WINTHRESHOLD) or NDIS_SUPPORT_NDIS650)
define OID_WWAN_UICC_FILE_STATUS                   0x0e010128
define OID_WWAN_UICC_ACCESS_BINARY                 0x0e010129
define OID_WWAN_UICC_ACCESS_RECORD                 0x0e01012a
define OID_WWAN_PIN_EX2                            0x0e01012b
define OID_WWAN_MBIM_VERSION                       0x0e01012c
define OID_WWAN_SYS_CAPS                           0x0e01012d
define OID_WWAN_DEVICE_CAPS_EX                     0x0e01012e
define OID_WWAN_SYS_SLOTMAPPINGS                   0x0e01012f
define OID_WWAN_SLOT_INFO_STATUS                   0x0e010130
define OID_WWAN_DEVICE_BINDINGS                    0x0e010131
define OID_WWAN_REGISTER_STATE_EX                  0x0e010132
define OID_WWAN_IMS_VOICE_STATE                    0x0e010133
define OID_WWAN_SIGNAL_STATE_EX                    0x0e010134
define OID_WWAN_LOCATION_STATE                     0x0e010135
define OID_WWAN_NITZ                               0x0e010136
define OID_WWAN_NETWORK_IDLE_HINT                  0x0e010137
endif

if ((NTDDI_VERSION ge NTDDI_WIN10) or NDIS_SUPPORT_NDIS651)
define OID_WWAN_PRESHUTDOWN                        0x0e010138
endif

if ((NTDDI_VERSION ge NTDDI_WIN10_RS1) or NDIS_SUPPORT_NDIS660)
define OID_WWAN_UICC_ATR                           0x0e010139
define OID_WWAN_UICC_OPEN_CHANNEL                  0x0e01013a
define OID_WWAN_UICC_CLOSE_CHANNEL                 0x0e01013b
define OID_WWAN_UICC_APDU                          0x0e01013c
define OID_WWAN_UICC_TERMINAL_CAPABILITY           0x0e01013d
define OID_WWAN_PS_MEDIA_CONFIG                    0x0e01013e
endif

if ((NTDDI_VERSION ge NTDDI_WIN10_RS2) or NDIS_SUPPORT_NDIS670)
define OID_WWAN_SAR_CONFIG                         0x0e01013f
define OID_WWAN_SAR_TRANSMISSION_STATUS            0x0e010140
define OID_WWAN_NETWORK_BLACKLIST                  0x0e010141
define OID_WWAN_LTE_ATTACH_CONFIG                  0x0e010142
define OID_WWAN_LTE_ATTACH_STATUS                  0x0e010143
endif

if ((NTDDI_VERSION ge NTDDI_WIN10_RS3) or NDIS_SUPPORT_NDIS680)
define OID_WWAN_MODEM_CONFIG_INFO                  0x0e010144
define OID_WWAN_PCO                                0x0e010145
define OID_WWAN_UICC_RESET                         0x0e010146
define OID_WWAN_DEVICE_RESET                       0x0e010147
define OID_WWAN_BASE_STATIONS_INFO                 0x0e010148
endif

if ((NTDDI_VERSION ge NTDDI_WIN10_RS4) or NDIS_SUPPORT_NDIS680)
define OID_WWAN_MPDP                               0x0e010149
endif

if ((NTDDI_VERSION ge NTDDI_WIN10_19H1) or NDIS_SUPPORT_NDIS683)
define OID_WWAN_UICC_APP_LIST                      0x0e01014a
define OID_WWAN_MODEM_LOGGING_CONFIG               0x0e01014b
endif

if ((NTDDI_VERSION ge NTDDI_WIN10_VB) or NDIS_SUPPORT_NDIS684)
define OID_WWAN_REGISTER_PARAMS                    0x0e01014c
define OID_WWAN_NETWORK_PARAMS                     0x0e01014d
endif

define OID_GEN_XMIT_OK                         0x00020101
define OID_GEN_RCV_OK                          0x00020102
define OID_GEN_XMIT_ERROR                      0x00020103
define OID_GEN_RCV_ERROR                       0x00020104
define OID_GEN_RCV_NO_BUFFER                   0x00020105

if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)
define OID_GEN_STATISTICS                      0x00020106
endif

define OID_GEN_DIRECTED_BYTES_XMIT             0x00020201
define OID_GEN_DIRECTED_FRAMES_XMIT            0x00020202
define OID_GEN_MULTICAST_BYTES_XMIT            0x00020203
define OID_GEN_MULTICAST_FRAMES_XMIT           0x00020204
define OID_GEN_BROADCAST_BYTES_XMIT            0x00020205
define OID_GEN_BROADCAST_FRAMES_XMIT           0x00020206
define OID_GEN_DIRECTED_BYTES_RCV              0x00020207
define OID_GEN_DIRECTED_FRAMES_RCV             0x00020208
define OID_GEN_MULTICAST_BYTES_RCV             0x00020209
define OID_GEN_MULTICAST_FRAMES_RCV            0x0002020A
define OID_GEN_BROADCAST_BYTES_RCV             0x0002020B
define OID_GEN_BROADCAST_FRAMES_RCV            0x0002020C
define OID_GEN_RCV_CRC_ERROR                   0x0002020D
define OID_GEN_TRANSMIT_QUEUE_LENGTH           0x0002020E

define OID_GEN_GET_TIME_CAPS                   0x0002020F
define OID_GEN_GET_NETCARD_TIME                0x00020210
define OID_GEN_NETCARD_LOAD                    0x00020211
define OID_GEN_DEVICE_PROFILE                  0x00020212

define OID_GEN_INIT_TIME_MS                    0x00020213

define OID_GEN_RESET_COUNTS                    0x00020214

define OID_GEN_MEDIA_SENSE_COUNTS              0x00020215

define OID_GEN_FRIENDLY_NAME                   0x00020216

define OID_GEN_NDIS_RESERVED_1                 0x00020217

define OID_GEN_NDIS_RESERVED_2                 0x00020218
define OID_GEN_NDIS_RESERVED_5                 0x0001020C

if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)

define OID_GEN_BYTES_RCV                       0x00020219
define OID_GEN_BYTES_XMIT                      0x0002021A
define OID_GEN_RCV_DISCARDS                    0x0002021B
define OID_GEN_XMIT_DISCARDS                   0x0002021C
endif

if (NTDDI_VERSION ge NTDDI_WIN8) or NDIS_SUPPORT_NDIS630
define OID_TCP_RSC_STATISTICS                  0x0002021D

define OID_GEN_NDIS_RESERVED_7                 0x0002021E

endif

define OID_GEN_CO_SUPPORTED_LIST               OID_GEN_SUPPORTED_LIST
define OID_GEN_CO_HARDWARE_STATUS              OID_GEN_HARDWARE_STATUS
define OID_GEN_CO_MEDIA_SUPPORTED              OID_GEN_MEDIA_SUPPORTED
define OID_GEN_CO_MEDIA_IN_USE                 OID_GEN_MEDIA_IN_USE
define OID_GEN_CO_LINK_SPEED                   OID_GEN_LINK_SPEED
define OID_GEN_CO_VENDOR_ID                    OID_GEN_VENDOR_ID
define OID_GEN_CO_VENDOR_DESCRIPTION           OID_GEN_VENDOR_DESCRIPTION
define OID_GEN_CO_DRIVER_VERSION               OID_GEN_DRIVER_VERSION
define OID_GEN_CO_PROTOCOL_OPTIONS             OID_GEN_PROTOCOL_OPTIONS
define OID_GEN_CO_MAC_OPTIONS                  OID_GEN_MAC_OPTIONS
define OID_GEN_CO_MEDIA_CONNECT_STATUS         OID_GEN_MEDIA_CONNECT_STATUS
define OID_GEN_CO_VENDOR_DRIVER_VERSION        OID_GEN_VENDOR_DRIVER_VERSION
define OID_GEN_CO_SUPPORTED_GUIDS              OID_GEN_SUPPORTED_GUIDS
define OID_GEN_CO_GET_TIME_CAPS                OID_GEN_GET_TIME_CAPS
define OID_GEN_CO_GET_NETCARD_TIME             OID_GEN_GET_NETCARD_TIME
define OID_GEN_CO_MINIMUM_LINK_SPEED           0x00020120

define OID_GEN_CO_XMIT_PDUS_OK                 OID_GEN_XMIT_OK
define OID_GEN_CO_RCV_PDUS_OK                  OID_GEN_RCV_OK
define OID_GEN_CO_XMIT_PDUS_ERROR              OID_GEN_XMIT_ERROR
define OID_GEN_CO_RCV_PDUS_ERROR               OID_GEN_RCV_ERROR
define OID_GEN_CO_RCV_PDUS_NO_BUFFER           OID_GEN_RCV_NO_BUFFER

define OID_GEN_CO_RCV_CRC_ERROR                OID_GEN_RCV_CRC_ERROR
define OID_GEN_CO_TRANSMIT_QUEUE_LENGTH        OID_GEN_TRANSMIT_QUEUE_LENGTH
define OID_GEN_CO_BYTES_XMIT                   OID_GEN_DIRECTED_BYTES_XMIT
define OID_GEN_CO_BYTES_RCV                    OID_GEN_DIRECTED_BYTES_RCV
define OID_GEN_CO_NETCARD_LOAD                 OID_GEN_NETCARD_LOAD
define OID_GEN_CO_DEVICE_PROFILE               OID_GEN_DEVICE_PROFILE
define OID_GEN_CO_BYTES_XMIT_OUTSTANDING       0x00020221

define OID_802_3_PERMANENT_ADDRESS             0x01010101
define OID_802_3_CURRENT_ADDRESS               0x01010102
define OID_802_3_MULTICAST_LIST                0x01010103
define OID_802_3_MAXIMUM_LIST_SIZE             0x01010104
define OID_802_3_MAC_OPTIONS                   0x01010105

define NDIS_802_3_MAC_OPTION_PRIORITY          0x00000001

define OID_802_3_RCV_ERROR_ALIGNMENT           0x01020101
define OID_802_3_XMIT_ONE_COLLISION            0x01020102
define OID_802_3_XMIT_MORE_COLLISIONS          0x01020103

define OID_802_3_XMIT_DEFERRED                 0x01020201
define OID_802_3_XMIT_MAX_COLLISIONS           0x01020202
define OID_802_3_RCV_OVERRUN                   0x01020203
define OID_802_3_XMIT_UNDERRUN                 0x01020204
define OID_802_3_XMIT_HEARTBEAT_FAILURE        0x01020205
define OID_802_3_XMIT_TIMES_CRS_LOST           0x01020206
define OID_802_3_XMIT_LATE_COLLISIONS          0x01020207

if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)
define OID_802_3_ADD_MULTICAST_ADDRESS         0x01010208
define OID_802_3_DELETE_MULTICAST_ADDRESS      0x01010209
endif

define OID_802_5_PERMANENT_ADDRESS             0x02010101
define OID_802_5_CURRENT_ADDRESS               0x02010102
define OID_802_5_CURRENT_FUNCTIONAL            0x02010103
define OID_802_5_CURRENT_GROUP                 0x02010104
define OID_802_5_LAST_OPEN_STATUS              0x02010105
define OID_802_5_CURRENT_RING_STATUS           0x02010106
define OID_802_5_CURRENT_RING_STATE            0x02010107

define OID_802_5_LINE_ERRORS                   0x02020101
define OID_802_5_LOST_FRAMES                   0x02020102

define OID_802_5_BURST_ERRORS                  0x02020201
define OID_802_5_AC_ERRORS                     0x02020202
define OID_802_5_ABORT_DELIMETERS              0x02020203
define OID_802_5_FRAME_COPIED_ERRORS           0x02020204
define OID_802_5_FREQUENCY_ERRORS              0x02020205
define OID_802_5_TOKEN_ERRORS                  0x02020206
define OID_802_5_INTERNAL_ERRORS               0x02020207

define OID_FDDI_LONG_PERMANENT_ADDR            0x03010101
define OID_FDDI_LONG_CURRENT_ADDR              0x03010102
define OID_FDDI_LONG_MULTICAST_LIST            0x03010103
define OID_FDDI_LONG_MAX_LIST_SIZE             0x03010104
define OID_FDDI_SHORT_PERMANENT_ADDR           0x03010105
define OID_FDDI_SHORT_CURRENT_ADDR             0x03010106
define OID_FDDI_SHORT_MULTICAST_LIST           0x03010107
define OID_FDDI_SHORT_MAX_LIST_SIZE            0x03010108

define OID_FDDI_ATTACHMENT_TYPE                0x03020101
define OID_FDDI_UPSTREAM_NODE_LONG             0x03020102
define OID_FDDI_DOWNSTREAM_NODE_LONG           0x03020103
define OID_FDDI_FRAME_ERRORS                   0x03020104
define OID_FDDI_FRAMES_LOST                    0x03020105
define OID_FDDI_RING_MGT_STATE                 0x03020106
define OID_FDDI_LCT_FAILURES                   0x03020107
define OID_FDDI_LEM_REJECTS                    0x03020108
define OID_FDDI_LCONNECTION_STATE              0x03020109

define OID_FDDI_SMT_STATION_ID                 0x03030201
define OID_FDDI_SMT_OP_VERSION_ID              0x03030202
define OID_FDDI_SMT_HI_VERSION_ID              0x03030203
define OID_FDDI_SMT_LO_VERSION_ID              0x03030204
define OID_FDDI_SMT_MANUFACTURER_DATA          0x03030205
define OID_FDDI_SMT_USER_DATA                  0x03030206
define OID_FDDI_SMT_MIB_VERSION_ID             0x03030207
define OID_FDDI_SMT_MAC_CT                     0x03030208
define OID_FDDI_SMT_NON_MASTER_CT              0x03030209
define OID_FDDI_SMT_MASTER_CT                  0x0303020A
define OID_FDDI_SMT_AVAILABLE_PATHS            0x0303020B
define OID_FDDI_SMT_CONFIG_CAPABILITIES        0x0303020C
define OID_FDDI_SMT_CONFIG_POLICY              0x0303020D
define OID_FDDI_SMT_CONNECTION_POLICY          0x0303020E
define OID_FDDI_SMT_T_NOTIFY                   0x0303020F
define OID_FDDI_SMT_STAT_RPT_POLICY            0x03030210
define OID_FDDI_SMT_TRACE_MAX_EXPIRATION       0x03030211
define OID_FDDI_SMT_PORT_INDEXES               0x03030212
define OID_FDDI_SMT_MAC_INDEXES                0x03030213
define OID_FDDI_SMT_BYPASS_PRESENT             0x03030214
define OID_FDDI_SMT_ECM_STATE                  0x03030215
define OID_FDDI_SMT_CF_STATE                   0x03030216
define OID_FDDI_SMT_HOLD_STATE                 0x03030217
define OID_FDDI_SMT_REMOTE_DISCONNECT_FLAG     0x03030218
define OID_FDDI_SMT_STATION_STATUS             0x03030219
define OID_FDDI_SMT_PEER_WRAP_FLAG             0x0303021A
define OID_FDDI_SMT_MSG_TIME_STAMP             0x0303021B
define OID_FDDI_SMT_TRANSITION_TIME_STAMP      0x0303021C
define OID_FDDI_SMT_SET_COUNT                  0x0303021D
define OID_FDDI_SMT_LAST_SET_STATION_ID        0x0303021E
define OID_FDDI_MAC_FRAME_STATUS_FUNCTIONS     0x0303021F
define OID_FDDI_MAC_BRIDGE_FUNCTIONS           0x03030220
define OID_FDDI_MAC_T_MAX_CAPABILITY           0x03030221
define OID_FDDI_MAC_TVX_CAPABILITY             0x03030222
define OID_FDDI_MAC_AVAILABLE_PATHS            0x03030223
define OID_FDDI_MAC_CURRENT_PATH               0x03030224
define OID_FDDI_MAC_UPSTREAM_NBR               0x03030225
define OID_FDDI_MAC_DOWNSTREAM_NBR             0x03030226
define OID_FDDI_MAC_OLD_UPSTREAM_NBR           0x03030227
define OID_FDDI_MAC_OLD_DOWNSTREAM_NBR         0x03030228
define OID_FDDI_MAC_DUP_ADDRESS_TEST           0x03030229
define OID_FDDI_MAC_REQUESTED_PATHS            0x0303022A
define OID_FDDI_MAC_DOWNSTREAM_PORT_TYPE       0x0303022B
define OID_FDDI_MAC_INDEX                      0x0303022C
define OID_FDDI_MAC_SMT_ADDRESS                0x0303022D
define OID_FDDI_MAC_LONG_GRP_ADDRESS           0x0303022E
define OID_FDDI_MAC_SHORT_GRP_ADDRESS          0x0303022F
define OID_FDDI_MAC_T_REQ                      0x03030230
define OID_FDDI_MAC_T_NEG                      0x03030231
define OID_FDDI_MAC_T_MAX                      0x03030232
define OID_FDDI_MAC_TVX_VALUE                  0x03030233
define OID_FDDI_MAC_T_PRI0                     0x03030234
define OID_FDDI_MAC_T_PRI1                     0x03030235
define OID_FDDI_MAC_T_PRI2                     0x03030236
define OID_FDDI_MAC_T_PRI3                     0x03030237
define OID_FDDI_MAC_T_PRI4                     0x03030238
define OID_FDDI_MAC_T_PRI5                     0x03030239
define OID_FDDI_MAC_T_PRI6                     0x0303023A
define OID_FDDI_MAC_FRAME_CT                   0x0303023B
define OID_FDDI_MAC_COPIED_CT                  0x0303023C
define OID_FDDI_MAC_TRANSMIT_CT                0x0303023D
define OID_FDDI_MAC_TOKEN_CT                   0x0303023E
define OID_FDDI_MAC_ERROR_CT                   0x0303023F
define OID_FDDI_MAC_LOST_CT                    0x03030240
define OID_FDDI_MAC_TVX_EXPIRED_CT             0x03030241
define OID_FDDI_MAC_NOT_COPIED_CT              0x03030242
define OID_FDDI_MAC_LATE_CT                    0x03030243
define OID_FDDI_MAC_RING_OP_CT                 0x03030244
define OID_FDDI_MAC_FRAME_ERROR_THRESHOLD      0x03030245
define OID_FDDI_MAC_FRAME_ERROR_RATIO          0x03030246
define OID_FDDI_MAC_NOT_COPIED_THRESHOLD       0x03030247
define OID_FDDI_MAC_NOT_COPIED_RATIO           0x03030248
define OID_FDDI_MAC_RMT_STATE                  0x03030249
define OID_FDDI_MAC_DA_FLAG                    0x0303024A
define OID_FDDI_MAC_UNDA_FLAG                  0x0303024B
define OID_FDDI_MAC_FRAME_ERROR_FLAG           0x0303024C
define OID_FDDI_MAC_NOT_COPIED_FLAG            0x0303024D
define OID_FDDI_MAC_MA_UNITDATA_AVAILABLE      0x0303024E
define OID_FDDI_MAC_HARDWARE_PRESENT           0x0303024F
define OID_FDDI_MAC_MA_UNITDATA_ENABLE         0x03030250
define OID_FDDI_PATH_INDEX                     0x03030251
define OID_FDDI_PATH_RING_LATENCY              0x03030252
define OID_FDDI_PATH_TRACE_STATUS              0x03030253
define OID_FDDI_PATH_SBA_PAYLOAD               0x03030254
define OID_FDDI_PATH_SBA_OVERHEAD              0x03030255
define OID_FDDI_PATH_CONFIGURATION             0x03030256
define OID_FDDI_PATH_T_R_MODE                  0x03030257
define OID_FDDI_PATH_SBA_AVAILABLE             0x03030258
define OID_FDDI_PATH_TVX_LOWER_BOUND           0x03030259
define OID_FDDI_PATH_T_MAX_LOWER_BOUND         0x0303025A
define OID_FDDI_PATH_MAX_T_REQ                 0x0303025B
define OID_FDDI_PORT_MY_TYPE                   0x0303025C
define OID_FDDI_PORT_NEIGHBOR_TYPE             0x0303025D
define OID_FDDI_PORT_CONNECTION_POLICIES       0x0303025E
define OID_FDDI_PORT_MAC_INDICATED             0x0303025F
define OID_FDDI_PORT_CURRENT_PATH              0x03030260
define OID_FDDI_PORT_REQUESTED_PATHS           0x03030261
define OID_FDDI_PORT_MAC_PLACEMENT             0x03030262
define OID_FDDI_PORT_AVAILABLE_PATHS           0x03030263
define OID_FDDI_PORT_MAC_LOOP_TIME             0x03030264
define OID_FDDI_PORT_PMD_CLASS                 0x03030265
define OID_FDDI_PORT_CONNECTION_CAPABILITIES   0x03030266
define OID_FDDI_PORT_INDEX                     0x03030267
define OID_FDDI_PORT_MAINT_LS                  0x03030268
define OID_FDDI_PORT_BS_FLAG                   0x03030269
define OID_FDDI_PORT_PC_LS                     0x0303026A
define OID_FDDI_PORT_EB_ERROR_CT               0x0303026B
define OID_FDDI_PORT_LCT_FAIL_CT               0x0303026C
define OID_FDDI_PORT_LER_ESTIMATE              0x0303026D
define OID_FDDI_PORT_LEM_REJECT_CT             0x0303026E
define OID_FDDI_PORT_LEM_CT                    0x0303026F
define OID_FDDI_PORT_LER_CUTOFF                0x03030270
define OID_FDDI_PORT_LER_ALARM                 0x03030271
define OID_FDDI_PORT_CONNNECT_STATE            0x03030272
define OID_FDDI_PORT_PCM_STATE                 0x03030273
define OID_FDDI_PORT_PC_WITHHOLD               0x03030274
define OID_FDDI_PORT_LER_FLAG                  0x03030275
define OID_FDDI_PORT_HARDWARE_PRESENT          0x03030276
define OID_FDDI_SMT_STATION_ACTION             0x03030277
define OID_FDDI_PORT_ACTION                    0x03030278
define OID_FDDI_IF_DESCR                       0x03030279
define OID_FDDI_IF_TYPE                        0x0303027A
define OID_FDDI_IF_MTU                         0x0303027B
define OID_FDDI_IF_SPEED                       0x0303027C
define OID_FDDI_IF_PHYS_ADDRESS                0x0303027D
define OID_FDDI_IF_ADMIN_STATUS                0x0303027E
define OID_FDDI_IF_OPER_STATUS                 0x0303027F
define OID_FDDI_IF_LAST_CHANGE                 0x03030280
define OID_FDDI_IF_IN_OCTETS                   0x03030281
define OID_FDDI_IF_IN_UCAST_PKTS               0x03030282
define OID_FDDI_IF_IN_NUCAST_PKTS              0x03030283
define OID_FDDI_IF_IN_DISCARDS                 0x03030284
define OID_FDDI_IF_IN_ERRORS                   0x03030285
define OID_FDDI_IF_IN_UNKNOWN_PROTOS           0x03030286
define OID_FDDI_IF_OUT_OCTETS                  0x03030287
define OID_FDDI_IF_OUT_UCAST_PKTS              0x03030288
define OID_FDDI_IF_OUT_NUCAST_PKTS             0x03030289
define OID_FDDI_IF_OUT_DISCARDS                0x0303028A
define OID_FDDI_IF_OUT_ERRORS                  0x0303028B
define OID_FDDI_IF_OUT_QLEN                    0x0303028C
define OID_FDDI_IF_SPECIFIC                    0x0303028D

define OID_WAN_PERMANENT_ADDRESS               0x04010101
define OID_WAN_CURRENT_ADDRESS                 0x04010102
define OID_WAN_QUALITY_OF_SERVICE              0x04010103
define OID_WAN_PROTOCOL_TYPE                   0x04010104
define OID_WAN_MEDIUM_SUBTYPE                  0x04010105
define OID_WAN_HEADER_FORMAT                   0x04010106

define OID_WAN_GET_INFO                        0x04010107
define OID_WAN_SET_LINK_INFO                   0x04010108
define OID_WAN_GET_LINK_INFO                   0x04010109

define OID_WAN_LINE_COUNT                      0x0401010A
define OID_WAN_PROTOCOL_CAPS                   0x0401010B

define OID_WAN_GET_BRIDGE_INFO                 0x0401020A
define OID_WAN_SET_BRIDGE_INFO                 0x0401020B
define OID_WAN_GET_COMP_INFO                   0x0401020C
define OID_WAN_SET_COMP_INFO                   0x0401020D
define OID_WAN_GET_STATS_INFO                  0x0401020E

define OID_WAN_CO_GET_INFO                     0x04010180
define OID_WAN_CO_SET_LINK_INFO                0x04010181
define OID_WAN_CO_GET_LINK_INFO                0x04010182
define OID_WAN_CO_GET_COMP_INFO                0x04010280
define OID_WAN_CO_SET_COMP_INFO                0x04010281
define OID_WAN_CO_GET_STATS_INFO               0x04010282

define OID_LTALK_CURRENT_NODE_ID               0x05010102

define OID_LTALK_IN_BROADCASTS                 0x05020101
define OID_LTALK_IN_LENGTH_ERRORS              0x05020102

define OID_LTALK_OUT_NO_HANDLERS               0x05020201
define OID_LTALK_COLLISIONS                    0x05020202
define OID_LTALK_DEFERS                        0x05020203
define OID_LTALK_NO_DATA_ERRORS                0x05020204
define OID_LTALK_RANDOM_CTS_ERRORS             0x05020205
define OID_LTALK_FCS_ERRORS                    0x05020206

define OID_ARCNET_PERMANENT_ADDRESS            0x06010101
define OID_ARCNET_CURRENT_ADDRESS              0x06010102

define OID_ARCNET_RECONFIGURATIONS             0x06020201

define OID_TAPI_ACCEPT                         0x07030101
define OID_TAPI_ANSWER                         0x07030102
define OID_TAPI_CLOSE                          0x07030103
define OID_TAPI_CLOSE_CALL                     0x07030104
define OID_TAPI_CONDITIONAL_MEDIA_DETECTION    0x07030105
define OID_TAPI_CONFIG_DIALOG                  0x07030106
define OID_TAPI_DEV_SPECIFIC                   0x07030107
define OID_TAPI_DIAL                           0x07030108
define OID_TAPI_DROP                           0x07030109
define OID_TAPI_GET_ADDRESS_CAPS               0x0703010A
define OID_TAPI_GET_ADDRESS_ID                 0x0703010B
define OID_TAPI_GET_ADDRESS_STATUS             0x0703010C
define OID_TAPI_GET_CALL_ADDRESS_ID            0x0703010D
define OID_TAPI_GET_CALL_INFO                  0x0703010E
define OID_TAPI_GET_CALL_STATUS                0x0703010F
define OID_TAPI_GET_DEV_CAPS                   0x07030110
define OID_TAPI_GET_DEV_CONFIG                 0x07030111
define OID_TAPI_GET_EXTENSION_ID               0x07030112
define OID_TAPI_GET_ID                         0x07030113
define OID_TAPI_GET_LINE_DEV_STATUS            0x07030114
define OID_TAPI_MAKE_CALL                      0x07030115
define OID_TAPI_NEGOTIATE_EXT_VERSION          0x07030116
define OID_TAPI_OPEN                           0x07030117
define OID_TAPI_PROVIDER_INITIALIZE            0x07030118
define OID_TAPI_PROVIDER_SHUTDOWN              0x07030119
define OID_TAPI_SECURE_CALL                    0x0703011A
define OID_TAPI_SELECT_EXT_VERSION             0x0703011B
define OID_TAPI_SEND_USER_USER_INFO            0x0703011C
define OID_TAPI_SET_APP_SPECIFIC               0x0703011D
define OID_TAPI_SET_CALL_PARAMS                0x0703011E
define OID_TAPI_SET_DEFAULT_MEDIA_DETECTION    0x0703011F
define OID_TAPI_SET_DEV_CONFIG                 0x07030120
define OID_TAPI_SET_MEDIA_MODE                 0x07030121
define OID_TAPI_SET_STATUS_MESSAGES            0x07030122
define OID_TAPI_GATHER_DIGITS                  0x07030123
define OID_TAPI_MONITOR_DIGITS                 0x07030124

define OID_ATM_SUPPORTED_VC_RATES              0x08010101
define OID_ATM_SUPPORTED_SERVICE_CATEGORY      0x08010102
define OID_ATM_SUPPORTED_AAL_TYPES             0x08010103
define OID_ATM_HW_CURRENT_ADDRESS              0x08010104
define OID_ATM_MAX_ACTIVE_VCS                  0x08010105
define OID_ATM_MAX_ACTIVE_VCI_BITS             0x08010106
define OID_ATM_MAX_ACTIVE_VPI_BITS             0x08010107
define OID_ATM_MAX_AAL0_PACKET_SIZE            0x08010108
define OID_ATM_MAX_AAL1_PACKET_SIZE            0x08010109
define OID_ATM_MAX_AAL34_PACKET_SIZE           0x0801010A
define OID_ATM_MAX_AAL5_PACKET_SIZE            0x0801010B

define OID_ATM_SIGNALING_VPIVCI                0x08010201
define OID_ATM_ASSIGNED_VPI                    0x08010202
define OID_ATM_ACQUIRE_ACCESS_NET_RESOURCES    0x08010203
define OID_ATM_RELEASE_ACCESS_NET_RESOURCES    0x08010204
define OID_ATM_ILMI_VPIVCI                     0x08010205
define OID_ATM_DIGITAL_BROADCAST_VPIVCI        0x08010206
define OID_ATM_GET_NEAREST_FLOW                0x08010207
define OID_ATM_ALIGNMENT_REQUIRED              0x08010208
define OID_ATM_LECS_ADDRESS                    0x08010209
define OID_ATM_SERVICE_ADDRESS                 0x0801020A

define OID_ATM_CALL_PROCEEDING                 0x0801020B
define OID_ATM_CALL_ALERTING                   0x0801020C
define OID_ATM_PARTY_ALERTING                  0x0801020D
define OID_ATM_CALL_NOTIFY                     0x0801020E

define OID_ATM_MY_IP_NM_ADDRESS                0x0801020F

define OID_ATM_RCV_CELLS_OK                    0x08020101
define OID_ATM_XMIT_CELLS_OK                   0x08020102
define OID_ATM_RCV_CELLS_DROPPED               0x08020103

define OID_ATM_RCV_INVALID_VPI_VCI             0x08020201
define OID_ATM_CELLS_HEC_ERROR                 0x08020202
define OID_ATM_RCV_REASSEMBLY_ERROR            0x08020203

define OID_802_11_BSSID                        0x0D010101
define OID_802_11_SSID                         0x0D010102
define OID_802_11_NETWORK_TYPES_SUPPORTED      0x0D010203
define OID_802_11_NETWORK_TYPE_IN_USE          0x0D010204
define OID_802_11_TX_POWER_LEVEL               0x0D010205
define OID_802_11_RSSI                         0x0D010206
define OID_802_11_RSSI_TRIGGER                 0x0D010207
define OID_802_11_INFRASTRUCTURE_MODE          0x0D010108
define OID_802_11_FRAGMENTATION_THRESHOLD      0x0D010209
define OID_802_11_RTS_THRESHOLD                0x0D01020A
define OID_802_11_NUMBER_OF_ANTENNAS           0x0D01020B
define OID_802_11_RX_ANTENNA_SELECTED          0x0D01020C
define OID_802_11_TX_ANTENNA_SELECTED          0x0D01020D
define OID_802_11_SUPPORTED_RATES              0x0D01020E
define OID_802_11_DESIRED_RATES                0x0D010210
define OID_802_11_CONFIGURATION                0x0D010211
define OID_802_11_STATISTICS                   0x0D020212
define OID_802_11_ADD_WEP                      0x0D010113
define OID_802_11_REMOVE_WEP                   0x0D010114
define OID_802_11_DISASSOCIATE                 0x0D010115
define OID_802_11_POWER_MODE                   0x0D010216
define OID_802_11_BSSID_LIST                   0x0D010217
define OID_802_11_AUTHENTICATION_MODE          0x0D010118
define OID_802_11_PRIVACY_FILTER               0x0D010119
define OID_802_11_BSSID_LIST_SCAN              0x0D01011A
define OID_802_11_WEP_STATUS                   0x0D01011B
define OID_802_11_ENCRYPTION_STATUS            OID_802_11_WEP_STATUS
define OID_802_11_RELOAD_DEFAULTS              0x0D01011C
define OID_802_11_ADD_KEY                      0x0D01011D
define OID_802_11_REMOVE_KEY                   0x0D01011E
define OID_802_11_ASSOCIATION_INFORMATION      0x0D01011F
define OID_802_11_TEST                         0x0D010120
define OID_802_11_MEDIA_STREAM_MODE            0x0D010121
define OID_802_11_CAPABILITY                   0x0D010122
define OID_802_11_PMKID                        0x0D010123
define OID_802_11_NON_BCAST_SSID_LIST          0x0D010124
define OID_802_11_RADIO_STATUS                 0x0D010125

define NDIS_ETH_TYPE_IPV4              0x0800
define NDIS_ETH_TYPE_ARP               0x0806
define NDIS_ETH_TYPE_IPV6              0x86dd
define NDIS_ETH_TYPE_802_1X            0x888e
define NDIS_ETH_TYPE_802_1Q            0x8100
define NDIS_ETH_TYPE_SLOW_PROTOCOL     0x8809

define NDIS_802_11_LENGTH_SSID         32
define NDIS_802_11_LENGTH_RATES        8
define NDIS_802_11_LENGTH_RATES_EX     16

.enum NDIS_802_11_STATUS_TYPE {
    Ndis802_11StatusType_Authentication,
    Ndis802_11StatusType_MediaStreamMode,
    Ndis802_11StatusType_PMKID_CandidateList,
    Ndis802_11StatusTypeMax
    }

define NDIS_802_11_MAC_ADDRESS <UCHAR 6>

_NDIS_802_11_STATUS_INDICATION struct
StatusType              NDIS_802_11_STATUS_TYPE ?
_NDIS_802_11_STATUS_INDICATION ends
NDIS_802_11_STATUS_INDICATION typedef _NDIS_802_11_STATUS_INDICATION
PNDIS_802_11_STATUS_INDICATION typedef ptr _NDIS_802_11_STATUS_INDICATION

define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS            0x0f

define NDIS_802_11_AUTH_REQUEST_REAUTH                 0x01
define NDIS_802_11_AUTH_REQUEST_KEYUPDATE              0x02
define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR         0x06
define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR            0x0E

_NDIS_802_11_AUTHENTICATION_REQUEST struct
Length                  ULONG ?
Bssid                   NDIS_802_11_MAC_ADDRESS dup(?)
Flags                   ULONG ?
_NDIS_802_11_AUTHENTICATION_REQUEST ends
NDIS_802_11_AUTHENTICATION_REQUEST typedef _NDIS_802_11_AUTHENTICATION_REQUEST
PNDIS_802_11_AUTHENTICATION_REQUEST typedef ptr _NDIS_802_11_AUTHENTICATION_REQUEST

_PMKID_CANDIDATE        struct
BSSID                   NDIS_802_11_MAC_ADDRESS dup(?)
Flags                   ULONG ?
_PMKID_CANDIDATE        ends
PMKID_CANDIDATE         typedef _PMKID_CANDIDATE
PPMKID_CANDIDATE        typedef ptr _PMKID_CANDIDATE

_NDIS_802_11_PMKID_CANDIDATE_LIST struct
Version                 ULONG ?
NumCandidates           ULONG ?
CandidateList           PMKID_CANDIDATE 1 dup(<>)
_NDIS_802_11_PMKID_CANDIDATE_LIST ends
NDIS_802_11_PMKID_CANDIDATE_LIST typedef _NDIS_802_11_PMKID_CANDIDATE_LIST
PNDIS_802_11_PMKID_CANDIDATE_LIST typedef ptr _NDIS_802_11_PMKID_CANDIDATE_LIST

define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED    0x01

.enum NDIS_802_11_NETWORK_TYPE {
    Ndis802_11FH,
    Ndis802_11DS,
    Ndis802_11OFDM5,
    Ndis802_11OFDM24,
    Ndis802_11Automode,
    Ndis802_11NetworkTypeMax
    }

_NDIS_802_11_NETWORK_TYPE_LIST struct
NumberOfItems           ULONG ?
NetworkType             NDIS_802_11_NETWORK_TYPE 1 dup(?)
_NDIS_802_11_NETWORK_TYPE_LIST ends
NDIS_802_11_NETWORK_TYPE_LIST typedef _NDIS_802_11_NETWORK_TYPE_LIST
PNDIS_802_11_NETWORK_TYPE_LIST typedef ptr _NDIS_802_11_NETWORK_TYPE_LIST

.enum NDIS_802_11_POWER_MODE {
    Ndis802_11PowerModeCAM,
    Ndis802_11PowerModeMAX_PSP,
    Ndis802_11PowerModeFast_PSP,
    Ndis802_11PowerModeMax
    }

NDIS_802_11_TX_POWER_LEVEL typedef ULONG

NDIS_802_11_RSSI        typedef LONG

_NDIS_802_11_CONFIGURATION_FH struct
Length                  ULONG ?
HopPattern              ULONG ?
HopSet                  ULONG ?
DwellTime               ULONG ?
_NDIS_802_11_CONFIGURATION_FH ends
NDIS_802_11_CONFIGURATION_FH typedef _NDIS_802_11_CONFIGURATION_FH
PNDIS_802_11_CONFIGURATION_FH typedef ptr _NDIS_802_11_CONFIGURATION_FH

_NDIS_802_11_CONFIGURATION struct
Length                  ULONG ?
BeaconPeriod            ULONG ?
ATIMWindow              ULONG ?
DSConfig                ULONG ?
FHConfig                NDIS_802_11_CONFIGURATION_FH <>
_NDIS_802_11_CONFIGURATION ends
NDIS_802_11_CONFIGURATION typedef _NDIS_802_11_CONFIGURATION
PNDIS_802_11_CONFIGURATION typedef ptr _NDIS_802_11_CONFIGURATION

_NDIS_802_11_STATISTICS struct
Length                  ULONG ?
TransmittedFragmentCount LARGE_INTEGER <>
MulticastTransmittedFrameCount LARGE_INTEGER <>
FailedCount             LARGE_INTEGER <>
RetryCount              LARGE_INTEGER <>
MultipleRetryCount      LARGE_INTEGER <>
RTSSuccessCount         LARGE_INTEGER <>
RTSFailureCount         LARGE_INTEGER <>
ACKFailureCount         LARGE_INTEGER <>
FrameDuplicateCount     LARGE_INTEGER <>
ReceivedFragmentCount   LARGE_INTEGER <>
MulticastReceivedFrameCount LARGE_INTEGER <>
FCSErrorCount           LARGE_INTEGER <>
TKIPLocalMICFailures    LARGE_INTEGER <>
TKIPICVErrorCount       LARGE_INTEGER <>
TKIPCounterMeasuresInvoked LARGE_INTEGER <>
TKIPReplays             LARGE_INTEGER <>
CCMPFormatErrors        LARGE_INTEGER <>
CCMPReplays             LARGE_INTEGER <>
CCMPDecryptErrors       LARGE_INTEGER <>
FourWayHandshakeFailures LARGE_INTEGER <>
WEPUndecryptableCount   LARGE_INTEGER <>
WEPICVErrorCount        LARGE_INTEGER <>
DecryptSuccessCount     LARGE_INTEGER <>
DecryptFailureCount     LARGE_INTEGER <>
_NDIS_802_11_STATISTICS ends
NDIS_802_11_STATISTICS  typedef _NDIS_802_11_STATISTICS
PNDIS_802_11_STATISTICS typedef ptr _NDIS_802_11_STATISTICS

NDIS_802_11_KEY_INDEX   typedef ULONG
NDIS_802_11_KEY_RSC     typedef ULONGLONG

_NDIS_802_11_KEY        struct
Length                  ULONG ?
KeyIndex                ULONG ?
KeyLength               ULONG ?
BSSID                   NDIS_802_11_MAC_ADDRESS dup(?)
KeyRSC                  NDIS_802_11_KEY_RSC ?
KeyMaterial             UCHAR 1 dup(?)
_NDIS_802_11_KEY        ends
NDIS_802_11_KEY         typedef _NDIS_802_11_KEY
PNDIS_802_11_KEY        typedef ptr _NDIS_802_11_KEY

_NDIS_802_11_REMOVE_KEY struct
Length                  ULONG ?
KeyIndex                ULONG ?
BSSID                   NDIS_802_11_MAC_ADDRESS dup(?)
_NDIS_802_11_REMOVE_KEY ends
NDIS_802_11_REMOVE_KEY  typedef _NDIS_802_11_REMOVE_KEY
PNDIS_802_11_REMOVE_KEY typedef ptr _NDIS_802_11_REMOVE_KEY

_NDIS_802_11_WEP        struct
Length                  ULONG ?
KeyIndex                ULONG ?
KeyLength               ULONG ?
KeyMaterial             UCHAR 1 dup(?)
_NDIS_802_11_WEP        ends
NDIS_802_11_WEP         typedef _NDIS_802_11_WEP
PNDIS_802_11_WEP        typedef ptr _NDIS_802_11_WEP

.enum NDIS_802_11_NETWORK_INFRASTRUCTURE {
    Ndis802_11IBSS,
    Ndis802_11Infrastructure,
    Ndis802_11AutoUnknown,
    Ndis802_11InfrastructureMax
    }

.enum NDIS_802_11_AUTHENTICATION_MODE {
    Ndis802_11AuthModeOpen,
    Ndis802_11AuthModeShared,
    Ndis802_11AuthModeAutoSwitch,
    Ndis802_11AuthModeWPA,
    Ndis802_11AuthModeWPAPSK,
    Ndis802_11AuthModeWPANone,
    Ndis802_11AuthModeWPA2,
    Ndis802_11AuthModeWPA2PSK,
    Ndis802_11AuthModeWPA3,
    Ndis802_11AuthModeWPA3SAE,
if(NDIS_SUPPORT_NDIS684)
    Ndis802_11AuthModeOWE,
endif
    Ndis802_11AuthModeMax
    }

define NDIS_802_11_RATES <UCHAR NDIS_802_11_LENGTH_RATES>
define NDIS_802_11_RATES_EX <UCHAR NDIS_802_11_LENGTH_RATES_EX>

_NDIS_802_11_SSID       struct
SsidLength              ULONG ?
Ssid                    UCHAR NDIS_802_11_LENGTH_SSID dup(?)
_NDIS_802_11_SSID       ends
NDIS_802_11_SSID        typedef _NDIS_802_11_SSID
PNDIS_802_11_SSID       typedef ptr _NDIS_802_11_SSID

_NDIS_WLAN_BSSID        struct
Length                  ULONG ?
MacAddress              NDIS_802_11_MAC_ADDRESS dup(?)
Reserved                UCHAR 2 dup(?)
Ssid                    NDIS_802_11_SSID <>
Privacy                 ULONG ?
Rssi                    NDIS_802_11_RSSI ?
NetworkTypeInUse        NDIS_802_11_NETWORK_TYPE ?
Configuration           NDIS_802_11_CONFIGURATION <>
InfrastructureMode      NDIS_802_11_NETWORK_INFRASTRUCTURE ?
SupportedRates          NDIS_802_11_RATES dup(?)
_NDIS_WLAN_BSSID        ends
NDIS_WLAN_BSSID         typedef _NDIS_WLAN_BSSID
PNDIS_WLAN_BSSID        typedef ptr _NDIS_WLAN_BSSID

_NDIS_802_11_BSSID_LIST struct
NumberOfItems           ULONG ?
Bssid                   NDIS_WLAN_BSSID 1 dup(<>)
_NDIS_802_11_BSSID_LIST ends
NDIS_802_11_BSSID_LIST  typedef _NDIS_802_11_BSSID_LIST
PNDIS_802_11_BSSID_LIST typedef ptr _NDIS_802_11_BSSID_LIST

_NDIS_WLAN_BSSID_EX     struct
Length                  ULONG ?
MacAddress              NDIS_802_11_MAC_ADDRESS dup(?)
Reserved                UCHAR 2 dup(?)
Ssid                    NDIS_802_11_SSID <>
Privacy                 ULONG ?
Rssi                    NDIS_802_11_RSSI ?
NetworkTypeInUse        NDIS_802_11_NETWORK_TYPE ?
Configuration           NDIS_802_11_CONFIGURATION <>
InfrastructureMode      NDIS_802_11_NETWORK_INFRASTRUCTURE ?
SupportedRates          NDIS_802_11_RATES_EX dup(?)
IELength                ULONG ?
IEs                     UCHAR 1 dup(?)
_NDIS_WLAN_BSSID_EX     ends
NDIS_WLAN_BSSID_EX      typedef _NDIS_WLAN_BSSID_EX
PNDIS_WLAN_BSSID_EX     typedef ptr _NDIS_WLAN_BSSID_EX

_NDIS_802_11_BSSID_LIST_EX struct
NumberOfItems           ULONG ?
Bssid                   NDIS_WLAN_BSSID_EX 1 dup(<>)
_NDIS_802_11_BSSID_LIST_EX ends
NDIS_802_11_BSSID_LIST_EX typedef _NDIS_802_11_BSSID_LIST_EX
PNDIS_802_11_BSSID_LIST_EX typedef ptr _NDIS_802_11_BSSID_LIST_EX

_NDIS_802_11_FIXED_IEs  struct
Timestamp               UCHAR 8 dup(?)
BeaconInterval          USHORT ?
Capabilities            USHORT ?
_NDIS_802_11_FIXED_IEs  ends
NDIS_802_11_FIXED_IEs   typedef _NDIS_802_11_FIXED_IEs
PNDIS_802_11_FIXED_IEs  typedef ptr _NDIS_802_11_FIXED_IEs

_NDIS_802_11_VARIABLE_IEs struct
ElementID               UCHAR ?
Length                  UCHAR ?
data                    UCHAR 1 dup(?)
_NDIS_802_11_VARIABLE_IEs ends
NDIS_802_11_VARIABLE_IEs typedef _NDIS_802_11_VARIABLE_IEs
PNDIS_802_11_VARIABLE_IEs typedef ptr _NDIS_802_11_VARIABLE_IEs

NDIS_802_11_FRAGMENTATION_THRESHOLD typedef ULONG

NDIS_802_11_RTS_THRESHOLD typedef ULONG

NDIS_802_11_ANTENNA     typedef ULONG

.enum _NDIS_802_11_PRIVACY_FILTER {
    Ndis802_11PrivFilterAcceptAll,
    Ndis802_11PrivFilter8021xWEP
    }
NDIS_802_11_PRIVACY_FILTER typedef _NDIS_802_11_PRIVACY_FILTER
PNDIS_802_11_PRIVACY_FILTER typedef ptr _NDIS_802_11_PRIVACY_FILTER

.enum _NDIS_802_11_WEP_STATUS {
    Ndis802_11WEPEnabled,
    Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
    Ndis802_11WEPDisabled,
    Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
    Ndis802_11WEPKeyAbsent,
    Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
    Ndis802_11WEPNotSupported,
    Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
    Ndis802_11Encryption2Enabled,
    Ndis802_11Encryption2KeyAbsent,
    Ndis802_11Encryption3Enabled,
    Ndis802_11Encryption3KeyAbsent
    }
NDIS_802_11_WEP_STATUS  typedef _NDIS_802_11_WEP_STATUS
PNDIS_802_11_WEP_STATUS typedef ptr _NDIS_802_11_WEP_STATUS
NDIS_802_11_ENCRYPTION_STATUS typedef _NDIS_802_11_WEP_STATUS
PNDIS_802_11_ENCRYPTION_STATUS typedef ptr _NDIS_802_11_WEP_STATUS

.enum _NDIS_802_11_RELOAD_DEFAULTS {
    Ndis802_11ReloadWEPKeys
    }
NDIS_802_11_RELOAD_DEFAULTS typedef _NDIS_802_11_RELOAD_DEFAULTS
PNDIS_802_11_RELOAD_DEFAULTS typedef ptr _NDIS_802_11_RELOAD_DEFAULTS

define NDIS_802_11_AI_REQFI_CAPABILITIES      1
define NDIS_802_11_AI_REQFI_LISTENINTERVAL    2
define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS  4

define NDIS_802_11_AI_RESFI_CAPABILITIES      1
define NDIS_802_11_AI_RESFI_STATUSCODE        2
define NDIS_802_11_AI_RESFI_ASSOCIATIONID     4

_NDIS_802_11_AI_REQFI   struct
Capabilities            USHORT ?
ListenInterval          USHORT ?
CurrentAPAddress        NDIS_802_11_MAC_ADDRESS dup(?)
_NDIS_802_11_AI_REQFI   ends
NDIS_802_11_AI_REQFI    typedef _NDIS_802_11_AI_REQFI
PNDIS_802_11_AI_REQFI   typedef ptr _NDIS_802_11_AI_REQFI

_NDIS_802_11_AI_RESFI   struct
Capabilities            USHORT ?
StatusCode              USHORT ?
AssociationId           USHORT ?
_NDIS_802_11_AI_RESFI   ends
NDIS_802_11_AI_RESFI    typedef _NDIS_802_11_AI_RESFI
PNDIS_802_11_AI_RESFI   typedef ptr _NDIS_802_11_AI_RESFI

_NDIS_802_11_ASSOCIATION_INFORMATION struct
Length                  ULONG ?
AvailableRequestFixedIEs USHORT ?
RequestFixedIEs         NDIS_802_11_AI_REQFI <>
RequestIELength         ULONG ?
OffsetRequestIEs        ULONG ?
AvailableResponseFixedIEs USHORT ?
ResponseFixedIEs        NDIS_802_11_AI_RESFI <>
ResponseIELength        ULONG ?
OffsetResponseIEs       ULONG ?
_NDIS_802_11_ASSOCIATION_INFORMATION ends
NDIS_802_11_ASSOCIATION_INFORMATION typedef _NDIS_802_11_ASSOCIATION_INFORMATION
PNDIS_802_11_ASSOCIATION_INFORMATION typedef ptr _NDIS_802_11_ASSOCIATION_INFORMATION

_NDIS_802_11_AUTHENTICATION_EVENT struct
Status                  NDIS_802_11_STATUS_INDICATION <>
Request                 NDIS_802_11_AUTHENTICATION_REQUEST 1 dup(<>)
_NDIS_802_11_AUTHENTICATION_EVENT ends
NDIS_802_11_AUTHENTICATION_EVENT typedef _NDIS_802_11_AUTHENTICATION_EVENT
PNDIS_802_11_AUTHENTICATION_EVENT typedef ptr _NDIS_802_11_AUTHENTICATION_EVENT

_NDIS_802_11_TEST       struct
Length                  ULONG ?
Type                    ULONG ?
union
 AuthenticationEvent    NDIS_802_11_AUTHENTICATION_EVENT <>
 RssiTrigger            NDIS_802_11_RSSI ?
ends
_NDIS_802_11_TEST       ends
NDIS_802_11_TEST        typedef _NDIS_802_11_TEST
PNDIS_802_11_TEST       typedef ptr _NDIS_802_11_TEST

.enum NDIS_802_11_MEDIA_STREAM_MODE {
    Ndis802_11MediaStreamOff,
    Ndis802_11MediaStreamOn,
    }

define NDIS_802_11_PMKID_VALUE <UCHAR 16>

_BSSID_INFO             struct
BSSID                   NDIS_802_11_MAC_ADDRESS dup(?)
PMKID                   NDIS_802_11_PMKID_VALUE dup(?)
_BSSID_INFO             ends
BSSID_INFO              typedef _BSSID_INFO
PBSSID_INFO             typedef ptr _BSSID_INFO

_NDIS_802_11_PMKID      struct
Length                  ULONG ?
BSSIDInfoCount          ULONG ?
BSSIDInfo               BSSID_INFO 1 dup(<>)
_NDIS_802_11_PMKID      ends
NDIS_802_11_PMKID       typedef _NDIS_802_11_PMKID
PNDIS_802_11_PMKID      typedef ptr _NDIS_802_11_PMKID

_NDIS_802_11_AUTHENTICATION_ENCRYPTION struct
AuthModeSupported       NDIS_802_11_AUTHENTICATION_MODE ?
EncryptStatusSupported  NDIS_802_11_ENCRYPTION_STATUS ?
_NDIS_802_11_AUTHENTICATION_ENCRYPTION ends
NDIS_802_11_AUTHENTICATION_ENCRYPTION typedef _NDIS_802_11_AUTHENTICATION_ENCRYPTION
PNDIS_802_11_AUTHENTICATION_ENCRYPTION typedef ptr _NDIS_802_11_AUTHENTICATION_ENCRYPTION

_NDIS_802_11_CAPABILITY struct
Length                  ULONG ?
Version                 ULONG ?
NoOfPMKIDs              ULONG ?
NoOfAuthEncryptPairsSupported ULONG ?
AuthenticationEncryptionSupported NDIS_802_11_AUTHENTICATION_ENCRYPTION 1 dup(<>)
_NDIS_802_11_CAPABILITY ends
NDIS_802_11_CAPABILITY  typedef _NDIS_802_11_CAPABILITY
PNDIS_802_11_CAPABILITY typedef ptr _NDIS_802_11_CAPABILITY

_NDIS_802_11_NON_BCAST_SSID_LIST struct
NumberOfItems           ULONG ?
Non_Bcast_Ssid          NDIS_802_11_SSID 1 dup(<>)
_NDIS_802_11_NON_BCAST_SSID_LIST ends
NDIS_802_11_NON_BCAST_SSID_LIST typedef _NDIS_802_11_NON_BCAST_SSID_LIST
PNDIS_802_11_NON_BCAST_SSID_LIST typedef ptr _NDIS_802_11_NON_BCAST_SSID_LIST

.enum _NDIS_802_11_RADIO_STATUS  {
    Ndis802_11RadioStatusOn,
    Ndis802_11RadioStatusHardwareOff,
    Ndis802_11RadioStatusSoftwareOff,
    Ndis802_11RadioStatusHardwareSoftwareOff,
    Ndis802_11RadioStatusMax
    }
NDIS_802_11_RADIO_STATUS typedef _NDIS_802_11_RADIO_STATUS
PNDIS_802_11_RADIO_STATUS typedef ptr _NDIS_802_11_RADIO_STATUS

define OID_IRDA_RECEIVING                      0x0A010100
define OID_IRDA_TURNAROUND_TIME                0x0A010101
define OID_IRDA_SUPPORTED_SPEEDS               0x0A010102
define OID_IRDA_LINK_SPEED                     0x0A010103
define OID_IRDA_MEDIA_BUSY                     0x0A010104

define OID_IRDA_EXTRA_RCV_BOFS                 0x0A010200
define OID_IRDA_RATE_SNIFF                     0x0A010201
define OID_IRDA_UNICAST_LIST                   0x0A010202
define OID_IRDA_MAX_UNICAST_LIST_SIZE          0x0A010203
define OID_IRDA_MAX_RECEIVE_WINDOW_SIZE        0x0A010204
define OID_IRDA_MAX_SEND_WINDOW_SIZE           0x0A010205
define OID_IRDA_RESERVED1                      0x0A01020A
define OID_IRDA_RESERVED2                      0x0A01020F

define OID_1394_LOCAL_NODE_INFO                0x0C010101
define OID_1394_VC_INFO                        0x0C010102

define OID_CO_ADD_PVC                          0xFE000001
define OID_CO_DELETE_PVC                       0xFE000002
define OID_CO_GET_CALL_INFORMATION             0xFE000003
define OID_CO_ADD_ADDRESS                      0xFE000004
define OID_CO_DELETE_ADDRESS                   0xFE000005
define OID_CO_GET_ADDRESSES                    0xFE000006
define OID_CO_ADDRESS_CHANGE                   0xFE000007
define OID_CO_SIGNALING_ENABLED                0xFE000008
define OID_CO_SIGNALING_DISABLED               0xFE000009
define OID_CO_AF_CLOSE                         0xFE00000A

define OID_CO_TAPI_CM_CAPS                     0xFE001001
define OID_CO_TAPI_LINE_CAPS                   0xFE001002
define OID_CO_TAPI_ADDRESS_CAPS                0xFE001003
define OID_CO_TAPI_TRANSLATE_TAPI_CALLPARAMS   0xFE001004
define OID_CO_TAPI_TRANSLATE_NDIS_CALLPARAMS   0xFE001005
define OID_CO_TAPI_TRANSLATE_TAPI_SAP          0xFE001006
define OID_CO_TAPI_GET_CALL_DIAGNOSTICS        0xFE001007
define OID_CO_TAPI_REPORT_DIGITS               0xFE001008
define OID_CO_TAPI_DONT_REPORT_DIGITS          0xFE001009

define OID_PNP_CAPABILITIES                    0xFD010100
define OID_PNP_SET_POWER                       0xFD010101
define OID_PNP_QUERY_POWER                     0xFD010102
define OID_PNP_ADD_WAKE_UP_PATTERN             0xFD010103
define OID_PNP_REMOVE_WAKE_UP_PATTERN          0xFD010104
define OID_PNP_WAKE_UP_PATTERN_LIST            0xFD010105
define OID_PNP_ENABLE_WAKE_UP                  0xFD010106

define OID_PNP_WAKE_UP_OK                      0xFD020200
define OID_PNP_WAKE_UP_ERROR                   0xFD020201

if ((NTDDI_VERSION ge NTDDI_WIN7) or NDIS_SUPPORT_NDIS620)

define OID_PM_CURRENT_CAPABILITIES             0xFD010107
define OID_PM_HARDWARE_CAPABILITIES            0xFD010108
define OID_PM_PARAMETERS                       0xFD010109
define OID_PM_ADD_WOL_PATTERN                  0xFD01010A
define OID_PM_REMOVE_WOL_PATTERN               0xFD01010B
define OID_PM_WOL_PATTERN_LIST                 0xFD01010C
define OID_PM_ADD_PROTOCOL_OFFLOAD             0xFD01010D
define OID_PM_GET_PROTOCOL_OFFLOAD             0xFD01010E
define OID_PM_REMOVE_PROTOCOL_OFFLOAD          0xFD01010F
define OID_PM_PROTOCOL_OFFLOAD_LIST            0xFD010110
define OID_PM_RESERVED_1                       0xFD010111

define OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES        0x00010221
define OID_RECEIVE_FILTER_GLOBAL_PARAMETERS            0x00010222
define OID_RECEIVE_FILTER_ALLOCATE_QUEUE               0x00010223
define OID_RECEIVE_FILTER_FREE_QUEUE                   0x00010224
define OID_RECEIVE_FILTER_ENUM_QUEUES                  0x00010225
define OID_RECEIVE_FILTER_QUEUE_PARAMETERS             0x00010226
define OID_RECEIVE_FILTER_SET_FILTER                   0x00010227
define OID_RECEIVE_FILTER_CLEAR_FILTER                 0x00010228
define OID_RECEIVE_FILTER_ENUM_FILTERS                 0x00010229
define OID_RECEIVE_FILTER_PARAMETERS                   0x0001022A
define OID_RECEIVE_FILTER_QUEUE_ALLOCATION_COMPLETE    0x0001022B
define OID_RECEIVE_FILTER_CURRENT_CAPABILITIES         0x0001022D
define OID_NIC_SWITCH_HARDWARE_CAPABILITIES            0x0001022E
define OID_NIC_SWITCH_CURRENT_CAPABILITIES             0x0001022F

if (NDIS_SUPPORT_NDIS630)
define OID_RECEIVE_FILTER_MOVE_FILTER                  0x00010230
endif

define OID_VLAN_RESERVED1                              0x00010231
define OID_VLAN_RESERVED2                              0x00010232
define OID_VLAN_RESERVED3                              0x00010233
define OID_VLAN_RESERVED4                              0x00010234

if (NDIS_SUPPORT_NDIS630)
define OID_PACKET_COALESCING_FILTER_MATCH_COUNT        0x00010235
endif

endif

if ((NTDDI_VERSION ge NTDDI_WIN8) or NDIS_SUPPORT_NDIS630)
define OID_NIC_SWITCH_CREATE_SWITCH                  0x00010237
define OID_NIC_SWITCH_PARAMETERS                     0x00010238
define OID_NIC_SWITCH_DELETE_SWITCH                  0x00010239
define OID_NIC_SWITCH_ENUM_SWITCHES                  0x00010240
define OID_NIC_SWITCH_CREATE_VPORT                   0x00010241
define OID_NIC_SWITCH_VPORT_PARAMETERS               0x00010242
define OID_NIC_SWITCH_ENUM_VPORTS                    0x00010243
define OID_NIC_SWITCH_DELETE_VPORT                   0x00010244
define OID_NIC_SWITCH_ALLOCATE_VF                    0x00010245
define OID_NIC_SWITCH_FREE_VF                        0x00010246
define OID_NIC_SWITCH_VF_PARAMETERS                  0x00010247
define OID_NIC_SWITCH_ENUM_VFS                       0x00010248

define OID_SRIOV_HARDWARE_CAPABILITIES               0x00010249
define OID_SRIOV_CURRENT_CAPABILITIES                0x00010250
define OID_SRIOV_READ_VF_CONFIG_SPACE                0x00010251
define OID_SRIOV_WRITE_VF_CONFIG_SPACE               0x00010252
define OID_SRIOV_READ_VF_CONFIG_BLOCK                0x00010253
define OID_SRIOV_WRITE_VF_CONFIG_BLOCK               0x00010254
define OID_SRIOV_RESET_VF                            0x00010255
define OID_SRIOV_SET_VF_POWER_STATE                  0x00010256
define OID_SRIOV_VF_VENDOR_DEVICE_ID                 0x00010257
define OID_SRIOV_PROBED_BARS                         0x00010258
define OID_SRIOV_BAR_RESOURCES                       0x00010259
define OID_SRIOV_PF_LUID                             0x00010260

define OID_SRIOV_CONFIG_STATE                        0x00010261
define OID_SRIOV_VF_SERIAL_NUMBER                    0x00010262
if (NDIS_SUPPORT_NDIS670)
define OID_SRIOV_OVERLYING_ADAPTER_INFO              0x00010268
endif
define OID_SRIOV_VF_INVALIDATE_CONFIG_BLOCK          0x00010269

define OID_SWITCH_PROPERTY_ADD                       0x00010263
define OID_SWITCH_PROPERTY_UPDATE                    0x00010264
define OID_SWITCH_PROPERTY_DELETE                    0x00010265
define OID_SWITCH_PROPERTY_ENUM                      0x00010266
define OID_SWITCH_FEATURE_STATUS_QUERY               0x00010267

define OID_SWITCH_NIC_REQUEST                        0x00010270
define OID_SWITCH_PORT_PROPERTY_ADD                  0x00010271
define OID_SWITCH_PORT_PROPERTY_UPDATE               0x00010272
define OID_SWITCH_PORT_PROPERTY_DELETE               0x00010273
define OID_SWITCH_PORT_PROPERTY_ENUM                 0x00010274
define OID_SWITCH_PARAMETERS                         0x00010275
define OID_SWITCH_PORT_ARRAY                         0x00010276
define OID_SWITCH_NIC_ARRAY                          0x00010277
define OID_SWITCH_PORT_CREATE                        0x00010278
define OID_SWITCH_PORT_DELETE                        0x00010279
define OID_SWITCH_NIC_CREATE                         0x0001027A
define OID_SWITCH_NIC_CONNECT                        0x0001027B
define OID_SWITCH_NIC_DISCONNECT                     0x0001027C
define OID_SWITCH_NIC_DELETE                         0x0001027D
define OID_SWITCH_PORT_FEATURE_STATUS_QUERY          0x0001027E
define OID_SWITCH_PORT_TEARDOWN                      0x0001027F
define OID_SWITCH_NIC_SAVE                           0x00010290
define OID_SWITCH_NIC_SAVE_COMPLETE                  0x00010291
define OID_SWITCH_NIC_RESTORE                        0x00010292
define OID_SWITCH_NIC_RESTORE_COMPLETE               0x00010293
define OID_SWITCH_NIC_UPDATED                        0x00010294
define OID_SWITCH_PORT_UPDATED                       0x00010295

endif

if (NDIS_SUPPORT_NDIS650)
define OID_SWITCH_NIC_DIRECT_REQUEST                 0x00010296
define OID_SWITCH_NIC_SUSPEND                        0x00010297
define OID_SWITCH_NIC_RESUME                         0x00010298
endif

if (NTDDI_VERSION ge NTDDI_WIN10_RS3) or (NDIS_SUPPORT_NDIS680)

define OID_SWITCH_NIC_SUSPENDED_LM_SOURCE_STARTED    0x00010299
define OID_SWITCH_NIC_SUSPENDED_LM_SOURCE_FINISHED   0x0001029A

define OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES     0x000102C0

endif

if (NTDDI_VERSION ge NTDDI_WINBLUE) or (NDIS_SUPPORT_NDIS640)

define OID_GEN_ISOLATION_PARAMETERS                  0x00010300

endif

if (NDIS_SUPPORT_NDIS650)

define OID_GFT_HARDWARE_CAPABILITIES                   0x00010401
define OID_GFT_CURRENT_CAPABILITIES                    0x00010402
define OID_GFT_GLOBAL_PARAMETERS                       0x00010403

define OID_GFT_CREATE_TABLE                            0x00010404
define OID_GFT_DELETE_TABLE                            0x00010405
define OID_GFT_ENUM_TABLES                             0x00010406

define OID_GFT_ALLOCATE_COUNTERS                       0x00010407
define OID_GFT_FREE_COUNTERS                           0x00010408
define OID_GFT_ENUM_COUNTERS                           0x00010409
define OID_GFT_COUNTER_VALUES                          0x0001040A

define OID_GFT_STATISTICS                              0x0001040B

define OID_GFT_ADD_FLOW_ENTRIES                        0x0001040C
define OID_GFT_DELETE_FLOW_ENTRIES                     0x0001040D
define OID_GFT_ENUM_FLOW_ENTRIES                       0x0001040E
define OID_GFT_ACTIVATE_FLOW_ENTRIES                   0x0001040F
define OID_GFT_DEACTIVATE_FLOW_ENTRIES                 0x00010410
define OID_GFT_FLOW_ENTRY_PARAMETERS                   0x00010411

define OID_GFT_EXACT_MATCH_PROFILE                     0x00010412
define OID_GFT_HEADER_TRANSPOSITION_PROFILE            0x00010413
define OID_GFT_WILDCARD_MATCH_PROFILE                  0x00010414
define OID_GFT_ENUM_PROFILES                           0x00010415
define OID_GFT_DELETE_PROFILE                          0x00010416

define OID_GFT_VPORT_PARAMETERS                        0x00010417

define OID_GFT_CREATE_LOGICAL_VPORT                    0x00010418
define OID_GFT_DELETE_LOGICAL_VPORT                    0x00010419
define OID_GFT_ENUM_LOGICAL_VPORTS                     0x0001041A

define OID_QOS_OFFLOAD_HARDWARE_CAPABILITIES           0x00010601
define OID_QOS_OFFLOAD_CURRENT_CAPABILITIES            0x00010602

define OID_QOS_OFFLOAD_CREATE_SQ                       0x00010603
define OID_QOS_OFFLOAD_DELETE_SQ                       0x00010604
define OID_QOS_OFFLOAD_UPDATE_SQ                       0x00010605
define OID_QOS_OFFLOAD_ENUM_SQS                        0x00010606
if (NDIS_SUPPORT_NDIS684)
define OID_QOS_OFFLOAD_SQ_STATS                        0x00010607
endif

define OID_PD_OPEN_PROVIDER                            0x00010501
define OID_PD_CLOSE_PROVIDER                           0x00010502
define OID_PD_QUERY_CURRENT_CONFIG                     0x00010503
endif

define NDIS_PNP_WAKE_UP_MAGIC_PACKET           0x00000001
define NDIS_PNP_WAKE_UP_PATTERN_MATCH          0x00000002
define NDIS_PNP_WAKE_UP_LINK_CHANGE            0x00000004

define OID_TCP_TASK_OFFLOAD                    0xFC010201
define OID_TCP_TASK_IPSEC_ADD_SA               0xFC010202
define OID_TCP_TASK_IPSEC_DELETE_SA            0xFC010203
define OID_TCP_SAN_SUPPORT                     0xFC010204
define OID_TCP_TASK_IPSEC_ADD_UDPESP_SA        0xFC010205
define OID_TCP_TASK_IPSEC_DELETE_UDPESP_SA     0xFC010206
define OID_TCP4_OFFLOAD_STATS                  0xFC010207
define OID_TCP6_OFFLOAD_STATS                  0xFC010208
define OID_IP4_OFFLOAD_STATS                   0xFC010209
define OID_IP6_OFFLOAD_STATS                   0xFC01020A

define OID_TCP_OFFLOAD_CURRENT_CONFIG          0xFC01020B
define OID_TCP_OFFLOAD_PARAMETERS              0xFC01020C
define OID_TCP_OFFLOAD_HARDWARE_CAPABILITIES   0xFC01020D
define OID_TCP_CONNECTION_OFFLOAD_CURRENT_CONFIG 0xFC01020E
define OID_TCP_CONNECTION_OFFLOAD_HARDWARE_CAPABILITIES 0xFC01020F
define OID_OFFLOAD_ENCAPSULATION               0x0101010A

if (NDIS_SUPPORT_NDIS61)
define OID_TCP_TASK_IPSEC_OFFLOAD_V2_ADD_SA    0xFC030202
define OID_TCP_TASK_IPSEC_OFFLOAD_V2_DELETE_SA 0xFC030203
define OID_TCP_TASK_IPSEC_OFFLOAD_V2_UPDATE_SA 0xFC030204
endif
if (NDIS_SUPPORT_NDIS630)
define OID_TCP_TASK_IPSEC_OFFLOAD_V2_ADD_SA_EX    0xFC030205
endif

define OID_FFP_SUPPORT                         0xFC010210
define OID_FFP_FLUSH                           0xFC010211
define OID_FFP_CONTROL                         0xFC010212
define OID_FFP_PARAMS                          0xFC010213
define OID_FFP_DATA                            0xFC010214

define OID_FFP_DRIVER_STATS                    0xFC020210
define OID_FFP_ADAPTER_STATS                   0xFC020211

define OID_TCP_CONNECTION_OFFLOAD_PARAMETERS   0xFC030201

if ((NTDDI_VERSION ge NTDDI_WIN7) or NDIS_SUPPORT_NDIS620)
define OID_TUNNEL_INTERFACE_SET_OID            0x0f010106
define OID_TUNNEL_INTERFACE_RELEASE_OID        0x0f010107
endif

define OID_QOS_RESERVED1                       0xFB010100
define OID_QOS_RESERVED2                       0xFB010101
define OID_QOS_RESERVED3                       0xFB010102
define OID_QOS_RESERVED4                       0xFB010103
define OID_QOS_RESERVED5                       0xFB010104
define OID_QOS_RESERVED6                       0xFB010105
define OID_QOS_RESERVED7                       0xFB010106
define OID_QOS_RESERVED8                       0xFB010107
define OID_QOS_RESERVED9                       0xFB010108
define OID_QOS_RESERVED10                      0xFB010109
define OID_QOS_RESERVED11                      0xFB01010A
define OID_QOS_RESERVED12                      0xFB01010B
define OID_QOS_RESERVED13                      0xFB01010C
define OID_QOS_RESERVED14                      0xFB01010D
define OID_QOS_RESERVED15                      0xFB01010E
define OID_QOS_RESERVED16                      0xFB01010F
define OID_QOS_RESERVED17                      0xFB010110
define OID_QOS_RESERVED18                      0xFB010111
define OID_QOS_RESERVED19                      0xFB010112
define OID_QOS_RESERVED20                      0xFB010113

if ((NTDDI_VERSION ge NTDDI_WINTHRESHOLD) or NDIS_SUPPORT_NDIS650)

define OID_XBOX_ACC_RESERVED0                  0xFA000000

endif

NDIS_CO_DEVICE_PROFILE  struct
DeviceDescription       NDIS_VAR_DATA_DESC <>
DevSpecificInfo         NDIS_VAR_DATA_DESC <>
ulTAPISupplementaryPassThru ULONG ?
ulAddressModes          ULONG ?
ulNumAddresses          ULONG ?
ulBearerModes           ULONG ?
ulMaxTxRate             ULONG ?
ulMinTxRate             ULONG ?
ulMaxRxRate             ULONG ?
ulMinRxRate             ULONG ?
ulMediaModes            ULONG ?
ulGenerateToneModes     ULONG ?
ulGenerateToneMaxNumFreq ULONG ?
ulGenerateDigitModes    ULONG ?
ulMonitorToneMaxNumFreq ULONG ?
ulMonitorToneMaxNumEntries ULONG ?
ulMonitorDigitModes     ULONG ?
ulGatherDigitsMinTimeout ULONG ?
ulGatherDigitsMaxTimeout ULONG ?
ulDevCapFlags           ULONG ?
ulMaxNumActiveCalls     ULONG ?
ulAnswerMode            ULONG ?
ulUUIAcceptSize         ULONG ?
ulUUIAnswerSize         ULONG ?
ulUUIMakeCallSize       ULONG ?
ulUUIDropSize           ULONG ?
ulUUISendUserUserInfoSize ULONG ?
ulUUICallInfoSize       ULONG ?
NDIS_CO_DEVICE_PROFILE  ends
PNDIS_CO_DEVICE_PROFILE typedef ptr NDIS_CO_DEVICE_PROFILE

ifndef IP_EXPORT_INCLUDED
IPAddr                  typedef ULONG
IPMask                  typedef ULONG
endif
SPI_TYPE                typedef ULONG

.enum _OFFLOAD_OPERATION_E {
    AUTHENTICATE = 1,
    ENCRYPT
    }
OFFLOAD_OPERATION_E     typedef _OFFLOAD_OPERATION_E

_OFFLOAD_ALGO_INFO      struct
algoIdentifier          ULONG ?
algoKeylen              ULONG ?
algoRounds              ULONG ?
_OFFLOAD_ALGO_INFO      ends
OFFLOAD_ALGO_INFO       typedef _OFFLOAD_ALGO_INFO
POFFLOAD_ALGO_INFO      typedef ptr _OFFLOAD_ALGO_INFO

.enum _OFFLOAD_CONF_ALGO {
    OFFLOAD_IPSEC_CONF_NONE,
    OFFLOAD_IPSEC_CONF_DES,
    OFFLOAD_IPSEC_CONF_RESERVED,
    OFFLOAD_IPSEC_CONF_3_DES,
    OFFLOAD_IPSEC_CONF_MAX
    }
OFFLOAD_CONF_ALGO       typedef _OFFLOAD_CONF_ALGO

.enum _OFFLOAD_INTEGRITY_ALGO {
    OFFLOAD_IPSEC_INTEGRITY_NONE,
    OFFLOAD_IPSEC_INTEGRITY_MD5,
    OFFLOAD_IPSEC_INTEGRITY_SHA,
    OFFLOAD_IPSEC_INTEGRITY_MAX
    }
OFFLOAD_INTEGRITY_ALGO  typedef _OFFLOAD_INTEGRITY_ALGO

_OFFLOAD_SECURITY_ASSOCIATION struct
Operation               OFFLOAD_OPERATION_E ?
SPI                     SPI_TYPE ?
IntegrityAlgo           OFFLOAD_ALGO_INFO <>
ConfAlgo                OFFLOAD_ALGO_INFO <>
Reserved                OFFLOAD_ALGO_INFO <>
_OFFLOAD_SECURITY_ASSOCIATION ends
OFFLOAD_SECURITY_ASSOCIATION typedef _OFFLOAD_SECURITY_ASSOCIATION
POFFLOAD_SECURITY_ASSOCIATION typedef ptr _OFFLOAD_SECURITY_ASSOCIATION

define OFFLOAD_MAX_SAS             3

define OFFLOAD_INBOUND_SA          0x0001
define OFFLOAD_OUTBOUND_SA         0x0002

_OFFLOAD_IPSEC_ADD_SA   struct
SrcAddr                 IPAddr ?
SrcMask                 IPMask ?
DestAddr                IPAddr ?
DestMask                IPMask ?
Protocol                ULONG ?
SrcPort                 USHORT ?
DestPort                USHORT ?
SrcTunnelAddr           IPAddr ?
DestTunnelAddr          IPAddr ?
Flags                   USHORT ?
NumSAs                  sword ?
SecAssoc                OFFLOAD_SECURITY_ASSOCIATION OFFLOAD_MAX_SAS dup(<>)
OffloadHandle           HANDLE ?
KeyLen                  ULONG ?
KeyMat                  UCHAR 1 dup(?)
_OFFLOAD_IPSEC_ADD_SA   ends
OFFLOAD_IPSEC_ADD_SA    typedef _OFFLOAD_IPSEC_ADD_SA
POFFLOAD_IPSEC_ADD_SA   typedef ptr _OFFLOAD_IPSEC_ADD_SA

_OFFLOAD_IPSEC_DELETE_SA struct
OffloadHandle           HANDLE ?
_OFFLOAD_IPSEC_DELETE_SA ends
OFFLOAD_IPSEC_DELETE_SA typedef _OFFLOAD_IPSEC_DELETE_SA
POFFLOAD_IPSEC_DELETE_SA typedef ptr _OFFLOAD_IPSEC_DELETE_SA

.enum UDP_ENCAP_TYPE {
    OFFLOAD_IPSEC_UDPESP_ENCAPTYPE_IKE,
    OFFLOAD_IPSEC_UDPESP_ENCAPTYPE_OTHER
    }

_OFFLOAD_IPSEC_UDPESP_ENCAPTYPE_ENTRY struct
UdpEncapType            UDP_ENCAP_TYPE ?
DstEncapPort            USHORT ?
_OFFLOAD_IPSEC_UDPESP_ENCAPTYPE_ENTRY ends
OFFLOAD_IPSEC_UDPESP_ENCAPTYPE_ENTRY typedef _OFFLOAD_IPSEC_UDPESP_ENCAPTYPE_ENTRY
POFFLOAD_IPSEC_UDPESP_ENCAPTYPE_ENTRY typedef ptr _OFFLOAD_IPSEC_UDPESP_ENCAPTYPE_ENTRY

_OFFLOAD_IPSEC_ADD_UDPESP_SA struct
SrcAddr                 IPAddr ?
SrcMask                 IPMask ?
DstAddr                 IPAddr ?
DstMask                 IPMask ?
Protocol                ULONG ?
SrcPort                 USHORT ?
DstPort                 USHORT ?
SrcTunnelAddr           IPAddr ?
DstTunnelAddr           IPAddr ?
Flags                   USHORT ?
NumSAs                  sword ?
SecAssoc                OFFLOAD_SECURITY_ASSOCIATION OFFLOAD_MAX_SAS dup(<>)
OffloadHandle           HANDLE ?
EncapTypeEntry          OFFLOAD_IPSEC_UDPESP_ENCAPTYPE_ENTRY <>
EncapTypeEntryOffldHandle HANDLE ?
KeyLen                  ULONG ?
KeyMat                  UCHAR 1 dup(?)
_OFFLOAD_IPSEC_ADD_UDPESP_SA ends
OFFLOAD_IPSEC_ADD_UDPESP_SA typedef _OFFLOAD_IPSEC_ADD_UDPESP_SA
POFFLOAD_IPSEC_ADD_UDPESP_SA typedef ptr _OFFLOAD_IPSEC_ADD_UDPESP_SA

_OFFLOAD_IPSEC_DELETE_UDPESP_SA struct
OffloadHandle           HANDLE ?
EncapTypeEntryOffldHandle HANDLE ?
_OFFLOAD_IPSEC_DELETE_UDPESP_SA ends
OFFLOAD_IPSEC_DELETE_UDPESP_SA typedef _OFFLOAD_IPSEC_DELETE_UDPESP_SA
POFFLOAD_IPSEC_DELETE_UDPESP_SA typedef ptr _OFFLOAD_IPSEC_DELETE_UDPESP_SA

NDIS_VLAN_ID            typedef ULONG

.enum NDIS_MEDIUM {
    NdisMedium802_3,
    NdisMedium802_5,
    NdisMediumFddi,
    NdisMediumWan,
    NdisMediumLocalTalk,
    NdisMediumDix,
    NdisMediumArcnetRaw,
    NdisMediumArcnet878_2,
    NdisMediumAtm,
    NdisMediumWirelessWan,
    NdisMediumIrda,
    NdisMediumBpc,
    NdisMediumCoWan,
    NdisMedium1394,
    NdisMediumInfiniBand,
if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)
    NdisMediumTunnel,
    NdisMediumNative802_11,
    NdisMediumLoopback,
endif

if (NTDDI_VERSION ge NTDDI_WIN7)
    NdisMediumWiMAX,
    NdisMediumIP,
endif

    NdisMediumMax
    }

.enum NDIS_PHYSICAL_MEDIUM {
    NdisPhysicalMediumUnspecified,
    NdisPhysicalMediumWirelessLan,
    NdisPhysicalMediumCableModem,
    NdisPhysicalMediumPhoneLine,
    NdisPhysicalMediumPowerLine,
    NdisPhysicalMediumDSL,
    NdisPhysicalMediumFibreChannel,
    NdisPhysicalMedium1394,
    NdisPhysicalMediumWirelessWan,
    NdisPhysicalMediumNative802_11,
    NdisPhysicalMediumBluetooth,
    NdisPhysicalMediumInfiniband,
    NdisPhysicalMediumWiMax,
    NdisPhysicalMediumUWB,
    NdisPhysicalMedium802_3,
    NdisPhysicalMedium802_5,
    NdisPhysicalMediumIrda,
    NdisPhysicalMediumWiredWAN,
    NdisPhysicalMediumWiredCoWan,
    NdisPhysicalMediumOther,
    NdisPhysicalMediumNative802_15_4,
    NdisPhysicalMediumMax
    }

define NDIS_PROTOCOL_ID_DEFAULT        0x00
define NDIS_PROTOCOL_ID_TCP_IP         0x02
define NDIS_PROTOCOL_ID_IP6            0x03
define NDIS_PROTOCOL_ID_IPX            0x06
define NDIS_PROTOCOL_ID_NBF            0x07
define NDIS_PROTOCOL_ID_MAX            0x0F
define NDIS_PROTOCOL_ID_MASK           0x0F

_TRANSPORT_HEADER_OFFSET struct
ProtocolType            USHORT ?
HeaderOffset            USHORT ?
_TRANSPORT_HEADER_OFFSET ends
TRANSPORT_HEADER_OFFSET typedef _TRANSPORT_HEADER_OFFSET
PTRANSPORT_HEADER_OFFSET typedef ptr _TRANSPORT_HEADER_OFFSET

_NETWORK_ADDRESS        struct
AddressLength           USHORT ?
AddressType             USHORT ?
Address                 UCHAR 1 dup(?)
_NETWORK_ADDRESS        ends
NETWORK_ADDRESS         typedef _NETWORK_ADDRESS
PNETWORK_ADDRESS        typedef ptr _NETWORK_ADDRESS

_NETWORK_ADDRESS_LIST   struct
AddressCount            LONG ?
AddressType             USHORT ?
Address                 NETWORK_ADDRESS 1 dup(<>)
_NETWORK_ADDRESS_LIST   ends
NETWORK_ADDRESS_LIST    typedef _NETWORK_ADDRESS_LIST
PNETWORK_ADDRESS_LIST   typedef ptr _NETWORK_ADDRESS_LIST

_NETWORK_ADDRESS_IP     struct
sin_port                USHORT ?
in_addr                 ULONG ?
sin_zero                UCHAR 8 dup(?)
_NETWORK_ADDRESS_IP     ends
NETWORK_ADDRESS_IP      typedef _NETWORK_ADDRESS_IP
PNETWORK_ADDRESS_IP     typedef ptr _NETWORK_ADDRESS_IP

define NETWORK_ADDRESS_LENGTH_IP sizeof (NETWORK_ADDRESS_IP)

_NETWORK_ADDRESS_IP6    struct
sin6_port               USHORT ?
sin6_flowinfo           ULONG ?
sin6_addr               USHORT 8 dup(?)
sin6_scope_id           ULONG ?
_NETWORK_ADDRESS_IP6    ends
NETWORK_ADDRESS_IP6     typedef _NETWORK_ADDRESS_IP6
PNETWORK_ADDRESS_IP6    typedef ptr _NETWORK_ADDRESS_IP6

define NETWORK_ADDRESS_LENGTH_IP6 sizeof (NETWORK_ADDRESS_IP6)

_NETWORK_ADDRESS_IPX    struct
NetworkAddress          ULONG ?
NodeAddress             UCHAR 6 dup(?)
Socket                  USHORT ?
_NETWORK_ADDRESS_IPX    ends
NETWORK_ADDRESS_IPX     typedef _NETWORK_ADDRESS_IPX
PNETWORK_ADDRESS_IPX    typedef ptr _NETWORK_ADDRESS_IPX

define NETWORK_ADDRESS_LENGTH_IPX sizeof (NETWORK_ADDRESS_IPX)

.enum NDIS_HARDWARE_STATUS {
    NdisHardwareStatusReady,
    NdisHardwareStatusInitializing,
    NdisHardwareStatusReset,
    NdisHardwareStatusClosing,
    NdisHardwareStatusNotReady
    }

_GEN_GET_TIME_CAPS      struct
Flags                   ULONG ?
ClockPrecision          ULONG ?
_GEN_GET_TIME_CAPS      ends
GEN_GET_TIME_CAPS       typedef _GEN_GET_TIME_CAPS
PGEN_GET_TIME_CAPS      typedef ptr _GEN_GET_TIME_CAPS

define READABLE_LOCAL_CLOCK                    0x00000001
define CLOCK_NETWORK_DERIVED                   0x00000002
define CLOCK_PRECISION                         0x00000004
define RECEIVE_TIME_INDICATION_CAPABLE         0x00000008
define TIMED_SEND_CAPABLE                      0x00000010
define TIME_STAMP_CAPABLE                      0x00000020

_GEN_GET_NETCARD_TIME   struct
ReadTime                ULONGLONG ?
_GEN_GET_NETCARD_TIME   ends
GEN_GET_NETCARD_TIME    typedef _GEN_GET_NETCARD_TIME
PGEN_GET_NETCARD_TIME   typedef ptr _GEN_GET_NETCARD_TIME

_NDIS_PM_PACKET_PATTERN struct
Priority                ULONG ?
Reserved                ULONG ?
MaskSize                ULONG ?
PatternOffset           ULONG ?
PatternSize             ULONG ?
PatternFlags            ULONG ?
_NDIS_PM_PACKET_PATTERN ends
NDIS_PM_PACKET_PATTERN  typedef _NDIS_PM_PACKET_PATTERN
PNDIS_PM_PACKET_PATTERN typedef ptr _NDIS_PM_PACKET_PATTERN

.enum NDIS_DEVICE_POWER_STATE {
    NdisDeviceStateUnspecified = 0,
    NdisDeviceStateD0,
    NdisDeviceStateD1,
    NdisDeviceStateD2,
    NdisDeviceStateD3,
    NdisDeviceStateMaximum
    }

_NDIS_PM_WAKE_UP_CAPABILITIES struct
MinMagicPacketWakeUp    NDIS_DEVICE_POWER_STATE ?
MinPatternWakeUp        NDIS_DEVICE_POWER_STATE ?
MinLinkChangeWakeUp     NDIS_DEVICE_POWER_STATE ?
_NDIS_PM_WAKE_UP_CAPABILITIES ends
NDIS_PM_WAKE_UP_CAPABILITIES typedef _NDIS_PM_WAKE_UP_CAPABILITIES
PNDIS_PM_WAKE_UP_CAPABILITIES typedef ptr _NDIS_PM_WAKE_UP_CAPABILITIES

define NDIS_DEVICE_WAKE_UP_ENABLE                          0x00000001
define NDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE            0x00000002
define NDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE             0x00000004

_NDIS_PNP_CAPABILITIES  struct
Flags                   ULONG ?
WakeUpCapabilities      NDIS_PM_WAKE_UP_CAPABILITIES <>
_NDIS_PNP_CAPABILITIES  ends
NDIS_PNP_CAPABILITIES   typedef _NDIS_PNP_CAPABILITIES
PNDIS_PNP_CAPABILITIES  typedef ptr _NDIS_PNP_CAPABILITIES

.enum NDIS_FDDI_ATTACHMENT_TYPE {
    NdisFddiTypeIsolated = 1,
    NdisFddiTypeLocalA,
    NdisFddiTypeLocalB,
    NdisFddiTypeLocalAB,
    NdisFddiTypeLocalS,
    NdisFddiTypeWrapA,
    NdisFddiTypeWrapB,
    NdisFddiTypeWrapAB,
    NdisFddiTypeWrapS,
    NdisFddiTypeCWrapA,
    NdisFddiTypeCWrapB,
    NdisFddiTypeCWrapS,
    NdisFddiTypeThrough
    }

.enum NDIS_FDDI_RING_MGT_STATE {
    NdisFddiRingIsolated = 1,
    NdisFddiRingNonOperational,
    NdisFddiRingOperational,
    NdisFddiRingDetect,
    NdisFddiRingNonOperationalDup,
    NdisFddiRingOperationalDup,
    NdisFddiRingDirected,
    NdisFddiRingTrace
    }

.enum NDIS_FDDI_LCONNECTION_STATE {
    NdisFddiStateOff = 1,
    NdisFddiStateBreak,
    NdisFddiStateTrace,
    NdisFddiStateConnect,
    NdisFddiStateNext,
    NdisFddiStateSignal,
    NdisFddiStateJoin,
    NdisFddiStateVerify,
    NdisFddiStateActive,
    NdisFddiStateMaintenance
    }

.enum NDIS_WAN_MEDIUM_SUBTYPE {
    NdisWanMediumHub,
    NdisWanMediumX_25,
    NdisWanMediumIsdn,
    NdisWanMediumSerial,
    NdisWanMediumFrameRelay,
    NdisWanMediumAtm,
    NdisWanMediumSonet,
    NdisWanMediumSW56K,
    NdisWanMediumPPTP,
    NdisWanMediumL2TP,
    NdisWanMediumIrda,
    NdisWanMediumParallel,
    NdisWanMediumPppoe,
if (NTDDI_VERSION ge NTDDI_VISTA)
    NdisWanMediumSSTP,
    NdisWanMediumAgileVPN,
endif
if (NTDDI_VERSION ge NTDDI_WINBLUE)
    NdisWanMediumGre,
endif
    NdisWanMediumSubTypeMax
    }

.enum NDIS_WAN_HEADER_FORMAT {
    NdisWanHeaderNative,
    NdisWanHeaderEthernet
    }

.enum NDIS_WAN_QUALITY {
    NdisWanRaw,
    NdisWanErrorControl,
    NdisWanReliable
    }

_NDIS_WAN_PROTOCOL_CAPS struct
Flags                   ULONG ?
Reserved                ULONG ?
_NDIS_WAN_PROTOCOL_CAPS ends
NDIS_WAN_PROTOCOL_CAPS  typedef _NDIS_WAN_PROTOCOL_CAPS
PNDIS_WAN_PROTOCOL_CAPS typedef ptr _NDIS_WAN_PROTOCOL_CAPS

define WAN_PROTOCOL_KEEPS_STATS    0x00000001

.enum NDIS_802_5_RING_STATE {
    NdisRingStateOpened = 1,
    NdisRingStateClosed,
    NdisRingStateOpening,
    NdisRingStateClosing,
    NdisRingStateOpenFailure,
    NdisRingStateRingFailure
    }

.enum NDIS_MEDIA_STATE {
    NdisMediaStateConnected,
    NdisMediaStateDisconnected
    }

Priority_802_3          typedef ULONG

_NDIS_CO_LINK_SPEED     struct
Outbound                ULONG ?
Inbound                 ULONG ?
_NDIS_CO_LINK_SPEED     ends
NDIS_CO_LINK_SPEED      typedef _NDIS_CO_LINK_SPEED
PNDIS_CO_LINK_SPEED     typedef ptr _NDIS_CO_LINK_SPEED

if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)

_NDIS_LINK_SPEED        struct
XmitLinkSpeed           ULONG64 ?
RcvLinkSpeed            ULONG64 ?
_NDIS_LINK_SPEED        ends
NDIS_LINK_SPEED         typedef _NDIS_LINK_SPEED
PNDIS_LINK_SPEED        typedef ptr _NDIS_LINK_SPEED

define NDIS_LINK_SPEED_UNKNOWN NET_IF_LINK_SPEED_UNKNOWN
endif

ifndef _NDIS_
NDIS_STATUS             typedef SINT
PNDIS_STATUS            typedef ptr NDIS_STATUS
endif

if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)
ifndef __WINDOT11_H__
include windot11.inc
endif
endif

_NDIS_GUID              struct
Guid                    GUID <>
union
 Oid                    NDIS_OID ?
 Status                 NDIS_STATUS ?
ends
Size                    ULONG ?
Flags                   ULONG ?
_NDIS_GUID              ends
NDIS_GUID               typedef _NDIS_GUID
PNDIS_GUID              typedef ptr _NDIS_GUID

define fNDIS_GUID_TO_OID                   0x00000001
define fNDIS_GUID_TO_STATUS                0x00000002
define fNDIS_GUID_ANSI_STRING              0x00000004
define fNDIS_GUID_UNICODE_STRING           0x00000008
define fNDIS_GUID_ARRAY                    0x00000010
define fNDIS_GUID_ALLOW_READ               0x00000020
define fNDIS_GUID_ALLOW_WRITE              0x00000040
define fNDIS_GUID_METHOD                   0x00000080
define fNDIS_GUID_NDIS_RESERVED            0x00000100
define fNDIS_GUID_SUPPORT_COMMON_HEADER    0x00000200

define NDIS_PACKET_TYPE_DIRECTED               0x00000001
define NDIS_PACKET_TYPE_MULTICAST              0x00000002
define NDIS_PACKET_TYPE_ALL_MULTICAST          0x00000004
define NDIS_PACKET_TYPE_BROADCAST              0x00000008
define NDIS_PACKET_TYPE_SOURCE_ROUTING         0x00000010
define NDIS_PACKET_TYPE_PROMISCUOUS            0x00000020
define NDIS_PACKET_TYPE_SMT                    0x00000040
define NDIS_PACKET_TYPE_ALL_LOCAL              0x00000080
define NDIS_PACKET_TYPE_GROUP                  0x00001000
define NDIS_PACKET_TYPE_ALL_FUNCTIONAL         0x00002000
define NDIS_PACKET_TYPE_FUNCTIONAL             0x00004000
define NDIS_PACKET_TYPE_MAC_FRAME              0x00008000
define NDIS_PACKET_TYPE_NO_LOCAL               0x00010000

define NDIS_RING_SIGNAL_LOSS                   0x00008000
define NDIS_RING_HARD_ERROR                    0x00004000
define NDIS_RING_SOFT_ERROR                    0x00002000
define NDIS_RING_TRANSMIT_BEACON               0x00001000
define NDIS_RING_LOBE_WIRE_FAULT               0x00000800
define NDIS_RING_AUTO_REMOVAL_ERROR            0x00000400
define NDIS_RING_REMOVE_RECEIVED               0x00000200
define NDIS_RING_COUNTER_OVERFLOW              0x00000100
define NDIS_RING_SINGLE_STATION                0x00000080
define NDIS_RING_RING_RECOVERY                 0x00000040

define NDIS_PROT_OPTION_ESTIMATED_LENGTH               0x00000001
define NDIS_PROT_OPTION_NO_LOOPBACK                    0x00000002
define NDIS_PROT_OPTION_NO_RSVD_ON_RCVPKT              0x00000004
define NDIS_PROT_OPTION_SEND_RESTRICTED                0x00000008

define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA             0x00000001
define NDIS_MAC_OPTION_RECEIVE_SERIALIZED              0x00000002
define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND              0x00000004
define NDIS_MAC_OPTION_NO_LOOPBACK                     0x00000008

define NDIS_MAC_OPTION_FULL_DUPLEX                     0x00000010

define NDIS_MAC_OPTION_EOTX_INDICATION                 0x00000020
define NDIS_MAC_OPTION_8021P_PRIORITY                  0x00000040
define NDIS_MAC_OPTION_SUPPORTS_MAC_ADDRESS_OVERWRITE  0x00000080
define NDIS_MAC_OPTION_RECEIVE_AT_DPC                  0x00000100
define NDIS_MAC_OPTION_8021Q_VLAN                      0x00000200
define NDIS_MAC_OPTION_RESERVED                        0x80000000

define NDIS_MEDIA_CAP_TRANSMIT                 0x00000001
define NDIS_MEDIA_CAP_RECEIVE                  0x00000002

define NDIS_CO_MAC_OPTION_DYNAMIC_LINK_SPEED   0x00000001

_NDIS_IRDA_PACKET_INFO  struct
ExtraBOFs               ULONG ?
MinTurnAroundTime       ULONG ?
_NDIS_IRDA_PACKET_INFO  ends
NDIS_IRDA_PACKET_INFO   typedef _NDIS_IRDA_PACKET_INFO
PNDIS_IRDA_PACKET_INFO  typedef ptr _NDIS_IRDA_PACKET_INFO

if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)

NDIS_MAKE_NET_LUID macro _pNetLuid, _IfType, _NetLuidIndex
  exitm<.err>
  endm

define NDIS_IF_MAX_STRING_SIZE IF_MAX_STRING_SIZE

NDIS_IF_COUNTED_STRING  typedef IF_COUNTED_STRING
PNDIS_IF_COUNTED_STRING typedef ptr NDIS_IF_COUNTED_STRING

define NDIS_MAX_PHYS_ADDRESS_LENGTH IF_MAX_PHYS_ADDRESS_LENGTH
NDIS_IF_PHYSICAL_ADDRESS typedef IF_PHYSICAL_ADDRESS
PNDIS_IF_PHYSICAL_ADDRESS typedef ptr NDIS_IF_PHYSICAL_ADDRESS

NDIS_MEDIA_CONNECT_STATE typedef NET_IF_MEDIA_CONNECT_STATE
PNDIS_MEDIA_CONNECT_STATE typedef ptr NDIS_MEDIA_CONNECT_STATE

NDIS_MEDIA_DUPLEX_STATE typedef NET_IF_MEDIA_DUPLEX_STATE
PNDIS_MEDIA_DUPLEX_STATE typedef ptr NDIS_MEDIA_DUPLEX_STATE

.enum NDIS_SUPPORTED_PAUSE_FUNCTIONS {
    NdisPauseFunctionsUnsupported,
    NdisPauseFunctionsSendOnly,
    NdisPauseFunctionsReceiveOnly,
    NdisPauseFunctionsSendAndReceive,
    NdisPauseFunctionsUnknown
    }

define NDIS_LINK_STATE_XMIT_LINK_SPEED_AUTO_NEGOTIATED         0x00000001
define NDIS_LINK_STATE_RCV_LINK_SPEED_AUTO_NEGOTIATED          0x00000002
define NDIS_LINK_STATE_DUPLEX_AUTO_NEGOTIATED                  0x00000004
define NDIS_LINK_STATE_PAUSE_FUNCTIONS_AUTO_NEGOTIATED         0x00000008

define NDIS_LINK_STATE_REVISION_1      1

_NDIS_LINK_STATE        struct
Header                  NDIS_OBJECT_HEADER <>
MediaConnectState       NDIS_MEDIA_CONNECT_STATE ?
MediaDuplexState        NDIS_MEDIA_DUPLEX_STATE ?
XmitLinkSpeed           ULONG64 ?
RcvLinkSpeed            ULONG64 ?
PauseFunctions          NDIS_SUPPORTED_PAUSE_FUNCTIONS ?
AutoNegotiationFlags    ULONG ?
_NDIS_LINK_STATE        ends
NDIS_LINK_STATE         typedef _NDIS_LINK_STATE
PNDIS_LINK_STATE        typedef ptr _NDIS_LINK_STATE

define NDIS_SIZEOF_LINK_STATE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_LINK_STATE, AutoNegotiationFlags)

define NDIS_LINK_PARAMETERS_REVISION_1      1

_NDIS_LINK_PARAMETERS   struct
Header                  NDIS_OBJECT_HEADER <>
MediaDuplexState        NDIS_MEDIA_DUPLEX_STATE ?
XmitLinkSpeed           ULONG64 ?
RcvLinkSpeed            ULONG64 ?
PauseFunctions          NDIS_SUPPORTED_PAUSE_FUNCTIONS ?
AutoNegotiationFlags    ULONG ?
_NDIS_LINK_PARAMETERS   ends
NDIS_LINK_PARAMETERS    typedef _NDIS_LINK_PARAMETERS
PNDIS_LINK_PARAMETERS   typedef ptr _NDIS_LINK_PARAMETERS

define NDIS_SIZEOF_LINK_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_LINK_PARAMETERS, AutoNegotiationFlags)

define NDIS_OPER_STATE_REVISION_1      1

_NDIS_OPER_STATE        struct
Header                  NDIS_OBJECT_HEADER <>
OperationalStatus       NET_IF_OPER_STATUS ?
OperationalStatusFlags  ULONG ?
_NDIS_OPER_STATE        ends
NDIS_OPER_STATE         typedef _NDIS_OPER_STATE
PNDIS_OPER_STATE        typedef ptr _NDIS_OPER_STATE

define NDIS_SIZEOF_OPER_STATE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_OPER_STATE, OperationalStatusFlags)

_NDIS_IP_OPER_STATUS    struct
AddressFamily           ULONG ?
OperationalStatus       NET_IF_OPER_STATUS ?
OperationalStatusFlags  ULONG ?
_NDIS_IP_OPER_STATUS    ends
NDIS_IP_OPER_STATUS     typedef _NDIS_IP_OPER_STATUS
PNDIS_IP_OPER_STATUS    typedef ptr _NDIS_IP_OPER_STATUS

define MAXIMUM_IP_OPER_STATUS_ADDRESS_FAMILIES_SUPPORTED 32

define NDIS_IP_OPER_STATUS_INFO_REVISION_1 1

_NDIS_IP_OPER_STATUS_INFO struct
Header                  NDIS_OBJECT_HEADER <>
Flags                   ULONG ?
NumberofAddressFamiliesReturned ULONG ?
IpOperationalStatus     NDIS_IP_OPER_STATUS MAXIMUM_IP_OPER_STATUS_ADDRESS_FAMILIES_SUPPORTED dup(<>)
_NDIS_IP_OPER_STATUS_INFO ends
NDIS_IP_OPER_STATUS_INFO typedef _NDIS_IP_OPER_STATUS_INFO
PNDIS_IP_OPER_STATUS_INFO typedef ptr _NDIS_IP_OPER_STATUS_INFO

define NDIS_SIZEOF_IP_OPER_STATUS_INFO_REVISION_1 (FIELD_OFFSET(NDIS_IP_OPER_STATUS_INFO, IpOperationalStatus) + MAXIMUM_IP_OPER_STATUS_ADDRESS_FAMILIES_SUPPORTED * sizeof(NDIS_IP_OPER_STATUS))

define NDIS_IP_OPER_STATE_REVISION_1    1

_NDIS_IP_OPER_STATE     struct
Header                  NDIS_OBJECT_HEADER <>
Flags                   ULONG ?
IpOperationalStatus     NDIS_IP_OPER_STATUS <>
_NDIS_IP_OPER_STATE     ends
NDIS_IP_OPER_STATE      typedef _NDIS_IP_OPER_STATE
PNDIS_IP_OPER_STATE     typedef ptr _NDIS_IP_OPER_STATE

define NDIS_SIZEOF_IP_OPER_STATE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_IP_OPER_STATE, IpOperationalStatus)

define NDIS_OFFLOAD_PARAMETERS_NO_CHANGE                  0

define NDIS_OFFLOAD_PARAMETERS_TX_RX_DISABLED             1
define NDIS_OFFLOAD_PARAMETERS_TX_ENABLED_RX_DISABLED     2
define NDIS_OFFLOAD_PARAMETERS_RX_ENABLED_TX_DISABLED     3
define NDIS_OFFLOAD_PARAMETERS_TX_RX_ENABLED              4

define NDIS_OFFLOAD_PARAMETERS_LSOV1_DISABLED             1
define NDIS_OFFLOAD_PARAMETERS_LSOV1_ENABLED              2

define NDIS_OFFLOAD_PARAMETERS_IPSECV1_DISABLED             1
define NDIS_OFFLOAD_PARAMETERS_IPSECV1_AH_ENABLED           2
define NDIS_OFFLOAD_PARAMETERS_IPSECV1_ESP_ENABLED          3
define NDIS_OFFLOAD_PARAMETERS_IPSECV1_AH_AND_ESP_ENABLED   4

define NDIS_OFFLOAD_PARAMETERS_LSOV2_DISABLED             1
define NDIS_OFFLOAD_PARAMETERS_LSOV2_ENABLED              2

if (NDIS_SUPPORT_NDIS61)
define NDIS_OFFLOAD_PARAMETERS_IPSECV2_DISABLED             1
define NDIS_OFFLOAD_PARAMETERS_IPSECV2_AH_ENABLED           2
define NDIS_OFFLOAD_PARAMETERS_IPSECV2_ESP_ENABLED          3
define NDIS_OFFLOAD_PARAMETERS_IPSECV2_AH_AND_ESP_ENABLED   4
endif

if (NDIS_SUPPORT_NDIS630)

define NDIS_OFFLOAD_PARAMETERS_RSC_DISABLED             1
define NDIS_OFFLOAD_PARAMETERS_RSC_ENABLED              2

define NDIS_ENCAPSULATION_TYPE_GRE_MAC          0x00000001

if (NDIS_SUPPORT_NDIS650)

define NDIS_ENCAPSULATION_TYPE_VXLAN            0x00000002

endif

endif

define NDIS_OFFLOAD_PARAMETERS_CONNECTION_OFFLOAD_DISABLED     1
define NDIS_OFFLOAD_PARAMETERS_CONNECTION_OFFLOAD_ENABLED      2

if (NDIS_SUPPORT_NDIS683)
define NDIS_OFFLOAD_PARAMETERS_USO_DISABLED            1
define NDIS_OFFLOAD_PARAMETERS_USO_ENABLED             2
endif

define NDIS_OFFLOAD_PARAMETERS_REVISION_1            1

if (NDIS_SUPPORT_NDIS61)
define NDIS_OFFLOAD_PARAMETERS_REVISION_2            2
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_OFFLOAD_PARAMETERS_REVISION_3            3
endif

if (NDIS_SUPPORT_NDIS650)
define NDIS_OFFLOAD_PARAMETERS_REVISION_4            4
endif

if (NDIS_SUPPORT_NDIS683)
define NDIS_OFFLOAD_PARAMETERS_REVISION_5            5
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_OFFLOAD_PARAMETERS_SKIP_REGISTRY_UPDATE    0x00000001
endif

_NDIS_OFFLOAD_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER <>
IPv4Checksum            UCHAR ?
TCPIPv4Checksum         UCHAR ?
UDPIPv4Checksum         UCHAR ?
TCPIPv6Checksum         UCHAR ?
UDPIPv6Checksum         UCHAR ?
LsoV1                   UCHAR ?
IPsecV1                 UCHAR ?
LsoV2IPv4               UCHAR ?
LsoV2IPv6               UCHAR ?
TcpConnectionIPv4       UCHAR ?
TcpConnectionIPv6       UCHAR ?
Flags                   ULONG ?
if (NDIS_SUPPORT_NDIS61)
IPsecV2                 UCHAR ?
IPsecV2IPv4             UCHAR ?
endif
if (NDIS_SUPPORT_NDIS630)
struct
 RscIPv4                UCHAR ?
 RscIPv6                UCHAR ?
ends
struct
 EncapsulatedPacketTaskOffload UCHAR ?
 EncapsulationTypes     UCHAR ?
ends
endif
if (NDIS_SUPPORT_NDIS650)
union EncapsulationProtocolParameters
 struct VxlanParameters
  VxlanUDPPortNumber    USHORT ?
 ends
 Value                  ULONG ?
ends
endif
if (NDIS_SUPPORT_NDIS683)
struct UdpSegmentation
 IPv4                   UCHAR ?
 IPv6                   UCHAR ?
ends
endif
_NDIS_OFFLOAD_PARAMETERS ends
NDIS_OFFLOAD_PARAMETERS typedef _NDIS_OFFLOAD_PARAMETERS
PNDIS_OFFLOAD_PARAMETERS typedef ptr _NDIS_OFFLOAD_PARAMETERS

define NDIS_SIZEOF_OFFLOAD_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_OFFLOAD_PARAMETERS, Flags)

if (NDIS_SUPPORT_NDIS61)
define NDIS_SIZEOF_OFFLOAD_PARAMETERS_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_OFFLOAD_PARAMETERS, IPsecV2IPv4)
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_OFFLOAD_PARAMETERS_REVISION_3 RTL_SIZEOF_THROUGH_FIELD(NDIS_OFFLOAD_PARAMETERS, EncapsulationTypes)
endif

if (NDIS_SUPPORT_NDIS650)
define NDIS_SIZEOF_OFFLOAD_PARAMETERS_REVISION_4 RTL_SIZEOF_THROUGH_FIELD(NDIS_OFFLOAD_PARAMETERS, EncapsulationProtocolParameters)
endif

if (NDIS_SUPPORT_NDIS683)
define NDIS_SIZEOF_OFFLOAD_PARAMETERS_REVISION_5 RTL_SIZEOF_THROUGH_FIELD(NDIS_OFFLOAD_PARAMETERS, UdpSegmentation)
endif

define NDIS_OFFLOAD_NOT_SUPPORTED             0
define NDIS_OFFLOAD_SUPPORTED                 1

define NDIS_OFFLOAD_SET_NO_CHANGE             0
define NDIS_OFFLOAD_SET_ON                    1
define NDIS_OFFLOAD_SET_OFF                   2

define NDIS_ENCAPSULATION_NOT_SUPPORTED                0x00000000
define NDIS_ENCAPSULATION_NULL                         0x00000001
define NDIS_ENCAPSULATION_IEEE_802_3                   0x00000002
define NDIS_ENCAPSULATION_IEEE_802_3_P_AND_Q           0x00000004
define NDIS_ENCAPSULATION_IEEE_802_3_P_AND_Q_IN_OOB    0x00000008
define NDIS_ENCAPSULATION_IEEE_LLC_SNAP_ROUTED         0x00000010

_NDIS_TCP_LARGE_SEND_OFFLOAD_V1 struct
struct IPv4
 Encapsulation          ULONG ?
 MaxOffLoadSize         ULONG ?
 MinSegmentCount        ULONG ?
 record
  TcpOptions            ULONG : 2 ?
  IpOptions             ULONG : 2 ?
 ends
ends
_NDIS_TCP_LARGE_SEND_OFFLOAD_V1 ends
NDIS_TCP_LARGE_SEND_OFFLOAD_V1 typedef _NDIS_TCP_LARGE_SEND_OFFLOAD_V1
PNDIS_TCP_LARGE_SEND_OFFLOAD_V1 typedef ptr _NDIS_TCP_LARGE_SEND_OFFLOAD_V1

_NDIS_TCP_IP_CHECKSUM_OFFLOAD struct
struct IPv4Transmit
 Encapsulation          ULONG ?
 record
  IpOptionsSupported    ULONG : 2 ?
  TcpOptionsSupported   ULONG : 2 ?
  TcpChecksum           ULONG : 2 ?
  UdpChecksum           ULONG : 2 ?
  IpChecksum            ULONG : 2 ?
 ends
ends
struct IPv4Receive
 Encapsulation          ULONG ?
 record
  IpOptionsSupported    ULONG : 2 ?
  TcpOptionsSupported   ULONG : 2 ?
  TcpChecksum           ULONG : 2 ?
  UdpChecksum           ULONG : 2 ?
  IpChecksum            ULONG : 2 ?
 ends
ends
struct IPv6Transmit
 Encapsulation          ULONG ?
 record
  IpExtensionHeadersSupported ULONG : 2 ?
  TcpOptionsSupported   ULONG : 2 ?
  TcpChecksum           ULONG : 2 ?
  UdpChecksum           ULONG : 2 ?
 ends
ends
struct IPv6Receive
 Encapsulation          ULONG ?
 record
  IpExtensionHeadersSupported ULONG : 2 ?
  TcpOptionsSupported   ULONG : 2 ?
  TcpChecksum           ULONG : 2 ?
  UdpChecksum           ULONG : 2 ?
 ends
ends
_NDIS_TCP_IP_CHECKSUM_OFFLOAD ends
NDIS_TCP_IP_CHECKSUM_OFFLOAD typedef _NDIS_TCP_IP_CHECKSUM_OFFLOAD
PNDIS_TCP_IP_CHECKSUM_OFFLOAD typedef ptr _NDIS_TCP_IP_CHECKSUM_OFFLOAD

_NDIS_IPSEC_OFFLOAD_V1  struct
struct Supported
 Encapsulation          ULONG ?
 AhEspCombined          ULONG ?
 TransportTunnelCombined ULONG ?
 IPv4Options            ULONG ?
 Flags                  ULONG ?
ends
struct IPv4AH
 record
  Md5                   ULONG : 2 ?
  Sha_1                 ULONG : 2 ?
  Transport             ULONG : 2 ?
  Tunnel                ULONG : 2 ?
  Send                  ULONG : 2 ?
  Receive               ULONG : 2 ?
 ends
ends
struct IPv4ESP
 record
  Des                   ULONG : 2 ?
  Reserved              ULONG : 2 ?
  TripleDes             ULONG : 2 ?
  NullEsp               ULONG : 2 ?
  Transport             ULONG : 2 ?
  Tunnel                ULONG : 2 ?
  Send                  ULONG : 2 ?
  Receive               ULONG : 2 ?
 ends
ends
_NDIS_IPSEC_OFFLOAD_V1  ends
NDIS_IPSEC_OFFLOAD_V1   typedef _NDIS_IPSEC_OFFLOAD_V1
PNDIS_IPSEC_OFFLOAD_V1  typedef ptr _NDIS_IPSEC_OFFLOAD_V1

_NDIS_TCP_LARGE_SEND_OFFLOAD_V2 struct
struct IPv4
 Encapsulation          ULONG ?
 MaxOffLoadSize         ULONG ?
 MinSegmentCount        ULONG ?
ends
struct IPv6
 Encapsulation          ULONG ?
 MaxOffLoadSize         ULONG ?
 MinSegmentCount        ULONG ?
 record
  IpExtensionHeadersSupported ULONG : 2 ?
  TcpOptionsSupported   ULONG : 2 ?
 ends
ends
_NDIS_TCP_LARGE_SEND_OFFLOAD_V2 ends
NDIS_TCP_LARGE_SEND_OFFLOAD_V2 typedef _NDIS_TCP_LARGE_SEND_OFFLOAD_V2
PNDIS_TCP_LARGE_SEND_OFFLOAD_V2 typedef ptr _NDIS_TCP_LARGE_SEND_OFFLOAD_V2

if (NDIS_SUPPORT_NDIS61)

define IPSEC_OFFLOAD_V2_AUTHENTICATION_MD5                      0x00000001
define IPSEC_OFFLOAD_V2_AUTHENTICATION_SHA_1                    0x00000002
define IPSEC_OFFLOAD_V2_AUTHENTICATION_SHA_256                  0x00000004
define IPSEC_OFFLOAD_V2_AUTHENTICATION_AES_GCM_128              0x00000008
define IPSEC_OFFLOAD_V2_AUTHENTICATION_AES_GCM_192              0x00000010
define IPSEC_OFFLOAD_V2_AUTHENTICATION_AES_GCM_256              0x00000020

define IPSEC_OFFLOAD_V2_ENCRYPTION_NONE                          0x00000001
define IPSEC_OFFLOAD_V2_ENCRYPTION_DES_CBC                       0x00000002
define IPSEC_OFFLOAD_V2_ENCRYPTION_3_DES_CBC                     0x00000004
define IPSEC_OFFLOAD_V2_ENCRYPTION_AES_GCM_128                   0x00000008
define IPSEC_OFFLOAD_V2_ENCRYPTION_AES_GCM_192                   0x00000010
define IPSEC_OFFLOAD_V2_ENCRYPTION_AES_GCM_256                   0x00000020
define IPSEC_OFFLOAD_V2_ENCRYPTION_AES_CBC_128                   0x00000040
define IPSEC_OFFLOAD_V2_ENCRYPTION_AES_CBC_192                   0x00000080
define IPSEC_OFFLOAD_V2_ENCRYPTION_AES_CBC_256                   0x00000100

_NDIS_IPSEC_OFFLOAD_V2  struct
Encapsulation           ULONG ?
IPv6Supported           BOOLEAN ?
IPv4Options             BOOLEAN ?
IPv6NonIPsecExtensionHeaders BOOLEAN ?
_Ah                     BOOLEAN ?
_Esp                    BOOLEAN ?
AhEspCombined           BOOLEAN ?
Transport               BOOLEAN ?
Tunnel                  BOOLEAN ?
TransportTunnelCombined BOOLEAN ?
LsoSupported            BOOLEAN ?
ExtendedSequenceNumbers BOOLEAN ?
UdpEsp                  ULONG ?
AuthenticationAlgorithms ULONG ?
EncryptionAlgorithms    ULONG ?
SaOffloadCapacity       ULONG ?
_NDIS_IPSEC_OFFLOAD_V2  ends
NDIS_IPSEC_OFFLOAD_V2   typedef _NDIS_IPSEC_OFFLOAD_V2
PNDIS_IPSEC_OFFLOAD_V2  typedef ptr _NDIS_IPSEC_OFFLOAD_V2

endif

if (NDIS_SUPPORT_NDIS630)

_NDIS_TCP_RECV_SEG_COALESCE_OFFLOAD struct
struct IPv4
 Enabled                BOOLEAN ?
ends
struct IPv6
 Enabled                BOOLEAN ?
ends
_NDIS_TCP_RECV_SEG_COALESCE_OFFLOAD ends
NDIS_TCP_RECV_SEG_COALESCE_OFFLOAD typedef _NDIS_TCP_RECV_SEG_COALESCE_OFFLOAD
PNDIS_TCP_RECV_SEG_COALESCE_OFFLOAD typedef ptr _NDIS_TCP_RECV_SEG_COALESCE_OFFLOAD

define NDIS_TCP_RECV_SEG_COALESC_OFFLOAD_REVISION_1            1

define NDIS_SIZEOF_TCP_RECV_SEG_COALESC_OFFLOAD_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_TCP_RECV_SEG_COALESCE_OFFLOAD, IPv6.Enabled)

define NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_NOT_SUPPORTED    0x00000000
define NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_INNER_IPV4       0x00000001
define NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_OUTER_IPV4       0x00000002
define NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_INNER_IPV6       0x00000004
define NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_OUTER_IPV6       0x00000008

_NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD struct
record
 TransmitChecksumOffloadSupported ULONG : 4 ?
 ReceiveChecksumOffloadSupported ULONG : 4 ?
 LsoV2Supported         ULONG : 4 ?
 RssSupported           ULONG : 4 ?
 VmqSupported           ULONG : 4 ?
ends
MaxHeaderSizeSupported  ULONG ?
_NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD ends
NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD typedef _NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD
PNDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD typedef ptr _NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD

define NDIS_SIZEOF_ENCAPSULATED_PACKET_TASK_OFFLOAD_REVISION_1 RTL_SIZEOF_THROUGH_FIELD( NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD, MaxHeaderSizeSupported)

endif

if (NDIS_SUPPORT_NDIS650)

_NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_V2 struct
record
 TransmitChecksumOffloadSupported ULONG :  4 ?
 ReceiveChecksumOffloadSupported ULONG :  4 ?
 LsoV2Supported         ULONG :  4 ?
 RssSupported           ULONG :  4 ?
 VmqSupported           ULONG :  4 ?
 Reserved               ULONG : 12 ?
ends
MaxHeaderSizeSupported  ULONG ?
union EncapsulationProtocolInfo
 struct VxlanInfo
  VxlanUDPPortNumber    USHORT ?
  record
   VxlanUDPPortNumberConfigurable USHORT : 1 ?
  ends
 ends
 Value                  ULONG ?
ends
Reserved1               ULONG ?
Reserved2               ULONG ?
_NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_V2 ends
NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_V2 typedef _NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_V2
PNDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_V2 typedef ptr _NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_V2

endif

if (NDIS_SUPPORT_NDIS670)

.enum NDIS_RFC6877_464XLAT_OFFLOAD_OPTIONS {
    NDIS_RFC6877_464XLAT_OFFLOAD_NOT_SUPPORTED = 0,
    NDIS_RFC6877_464XLAT_OFFLOAD_DISABLED,
    NDIS_RFC6877_464XLAT_OFFLOAD_ENABLED,
    NDIS_RFC6877_464XLAT_OFFLOAD_ON_DEMAND,
    }

_NDIS_RFC6877_464XLAT_OFFLOAD struct
XlatOffload             NDIS_RFC6877_464XLAT_OFFLOAD_OPTIONS ?
Flags                   ULONG ?
_NDIS_RFC6877_464XLAT_OFFLOAD ends
NDIS_RFC6877_464XLAT_OFFLOAD typedef _NDIS_RFC6877_464XLAT_OFFLOAD
PNDIS_RFC6877_464XLAT_OFFLOAD typedef ptr _NDIS_RFC6877_464XLAT_OFFLOAD

endif

if (NDIS_SUPPORT_NDIS683)

_NDIS_UDP_SEGMENTATION_OFFLOAD struct
struct IPv4
 Encapsulation          ULONG ?
 MaxOffLoadSize         ULONG ?
 record
  MinSegmentCount       ULONG : 6 ?
if (NDIS_SUPPORT_NDIS684)
  SubMssFinalSegmentSupported ULONG :  1 ?
  Reserved               ULONG : 25 ?
else
  Reserved               ULONG : 26 ?
endif
 ends
ends
struct IPv6
 Encapsulation          ULONG ?
 MaxOffLoadSize         ULONG ?
 record
  MinSegmentCount       ULONG :  6 ?
if (NDIS_SUPPORT_NDIS684)
  SubMssFinalSegmentSupported ULONG :  1 ?
  Reserved1              ULONG : 25 ?
else
  Reserved1              ULONG : 26 ?
endif
 ends
 record
  IpExtensionHeadersSupported ULONG :  2 ?
  Reserved2              ULONG : 30 ?
 ends
ends
_NDIS_UDP_SEGMENTATION_OFFLOAD ends
NDIS_UDP_SEGMENTATION_OFFLOAD typedef _NDIS_UDP_SEGMENTATION_OFFLOAD
PNDIS_UDP_SEGMENTATION_OFFLOAD typedef ptr _NDIS_UDP_SEGMENTATION_OFFLOAD

endif

define NDIS_OFFLOAD_FLAGS_GROUP_CHECKSUM_CAPABILITIES  0x00000001

if (NDIS_SUPPORT_NDIS630)
define IPSEC_OFFLOAD_V2_AND_TCP_CHECKSUM_COEXISTENCE  0x00000002
define IPSEC_OFFLOAD_V2_AND_UDP_CHECKSUM_COEXISTENCE  0x00000004
endif

define NDIS_OFFLOAD_REVISION_1    1
if (NDIS_SUPPORT_NDIS61)
define NDIS_OFFLOAD_REVISION_2    2
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_OFFLOAD_REVISION_3    3
endif

if (NDIS_SUPPORT_NDIS650)
define NDIS_OFFLOAD_REVISION_4    4
endif

if (NDIS_SUPPORT_NDIS670)
define NDIS_OFFLOAD_REVISION_5    5
endif

if (NDIS_SUPPORT_NDIS683)
define NDIS_OFFLOAD_REVISION_6    6
endif

_NDIS_OFFLOAD           struct
Header                  NDIS_OBJECT_HEADER <>
Checksum                NDIS_TCP_IP_CHECKSUM_OFFLOAD <>
LsoV1                   NDIS_TCP_LARGE_SEND_OFFLOAD_V1 <>
IPsecV1                 NDIS_IPSEC_OFFLOAD_V1 <>
LsoV2                   NDIS_TCP_LARGE_SEND_OFFLOAD_V2 <>
Flags                   ULONG ?
if (NDIS_SUPPORT_NDIS61)
IPsecV2                 NDIS_IPSEC_OFFLOAD_V2 ?
endif
if (NDIS_SUPPORT_NDIS630)
Rsc                     NDIS_TCP_RECV_SEG_COALESCE_OFFLOAD ?
EncapsulatedPacketTaskOffloadGre NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD ?
endif
if (NDIS_SUPPORT_NDIS650)
EncapsulatedPacketTaskOffloadVxlan NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD_V2 ?
EncapsulationTypes      UCHAR ?
endif
if (NDIS_SUPPORT_NDIS670)
Rfc6877Xlat             NDIS_RFC6877_464XLAT_OFFLOAD ?
endif
if (NDIS_SUPPORT_NDIS683)
UdpSegmentation         NDIS_UDP_SEGMENTATION_OFFLOAD ?
endif
_NDIS_OFFLOAD           ends
NDIS_OFFLOAD            typedef _NDIS_OFFLOAD
PNDIS_OFFLOAD           typedef ptr _NDIS_OFFLOAD

define NDIS_SIZEOF_NDIS_OFFLOAD_REVISION_1   RTL_SIZEOF_THROUGH_FIELD(NDIS_OFFLOAD, Flags)

if (NDIS_SUPPORT_NDIS61)
define NDIS_SIZEOF_NDIS_OFFLOAD_REVISION_2   RTL_SIZEOF_THROUGH_FIELD(NDIS_OFFLOAD, IPsecV2)
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_NDIS_OFFLOAD_REVISION_3   RTL_SIZEOF_THROUGH_FIELD(NDIS_OFFLOAD, EncapsulatedPacketTaskOffloadGre)
endif

if (NDIS_SUPPORT_NDIS650)
define NDIS_SIZEOF_NDIS_OFFLOAD_REVISION_4   RTL_SIZEOF_THROUGH_FIELD(NDIS_OFFLOAD, EncapsulationTypes)
endif

if (NDIS_SUPPORT_NDIS670)
define NDIS_SIZEOF_NDIS_OFFLOAD_REVISION_5   RTL_SIZEOF_THROUGH_FIELD(NDIS_OFFLOAD, Rfc6877Xlat)
endif

if (NDIS_SUPPORT_NDIS683)
define NDIS_SIZEOF_NDIS_OFFLOAD_REVISION_6   RTL_SIZEOF_THROUGH_FIELD(NDIS_OFFLOAD, UdpSegmentation)
endif

_NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 struct
struct IPv4
 Encapsulation          ULONG ?
 MaxOffLoadSize         ULONG ?
 MinSegmentCount        ULONG ?
 TcpOptions             ULONG ?
 IpOptions              ULONG ?
ends
_NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 ends
NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 typedef _NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1
PNDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 typedef ptr _NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1

_NDIS_WMI_TCP_IP_CHECKSUM_OFFLOAD struct
struct IPv4Transmit
 Encapsulation          ULONG ?
 IpOptionsSupported     ULONG ?
 TcpOptionsSupported    ULONG ?
 TcpChecksum            ULONG ?
 UdpChecksum            ULONG ?
 IpChecksum             ULONG ?
ends
struct IPv4Receive
 Encapsulation          ULONG ?
 IpOptionsSupported     ULONG ?
 TcpOptionsSupported    ULONG ?
 TcpChecksum            ULONG ?
 UdpChecksum            ULONG ?
 IpChecksum             ULONG ?
ends
struct IPv6Transmit
 Encapsulation          ULONG ?
 IpExtensionHeadersSupported ULONG ?
 TcpOptionsSupported    ULONG ?
 TcpChecksum            ULONG ?
 UdpChecksum            ULONG ?
ends
struct IPv6Receive
 Encapsulation          ULONG ?
 IpExtensionHeadersSupported ULONG ?
 TcpOptionsSupported    ULONG ?
 TcpChecksum            ULONG ?
 UdpChecksum            ULONG ?
ends
_NDIS_WMI_TCP_IP_CHECKSUM_OFFLOAD ends
NDIS_WMI_TCP_IP_CHECKSUM_OFFLOAD typedef _NDIS_WMI_TCP_IP_CHECKSUM_OFFLOAD
PNDIS_WMI_TCP_IP_CHECKSUM_OFFLOAD typedef ptr _NDIS_WMI_TCP_IP_CHECKSUM_OFFLOAD

_NDIS_WMI_IPSEC_OFFLOAD_V1 struct
struct Supported
 Encapsulation          ULONG ?
 AhEspCombined          ULONG ?
 TransportTunnelCombined ULONG ?
 IPv4Options            ULONG ?
 Flags                  ULONG ?
ends
struct IPv4AH
 Md5                    ULONG ?
 Sha_1                  ULONG ?
 Transport              ULONG ?
 Tunnel                 ULONG ?
 Send                   ULONG ?
 Receive                ULONG ?
ends
struct IPv4ESP
 Des                    ULONG ?
 Reserved               ULONG ?
 TripleDes              ULONG ?
 NullEsp                ULONG ?
 Transport              ULONG ?
 Tunnel                 ULONG ?
 Send                   ULONG ?
 Receive                ULONG ?
ends
_NDIS_WMI_IPSEC_OFFLOAD_V1 ends
NDIS_WMI_IPSEC_OFFLOAD_V1 typedef _NDIS_WMI_IPSEC_OFFLOAD_V1
PNDIS_WMI_IPSEC_OFFLOAD_V1 typedef ptr _NDIS_WMI_IPSEC_OFFLOAD_V1

_NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V2 struct
struct IPv4
 Encapsulation          ULONG ?
 MaxOffLoadSize         ULONG ?
 MinSegmentCount        ULONG ?
ends
struct IPv6
 Encapsulation          ULONG ?
 MaxOffLoadSize         ULONG ?
 MinSegmentCount        ULONG ?
 IpExtensionHeadersSupported ULONG ?
 TcpOptionsSupported    ULONG ?
ends
_NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V2 ends
NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V2 typedef _NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V2
PNDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V2 typedef ptr _NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V2

_NDIS_WMI_OFFLOAD       struct
Header                  NDIS_OBJECT_HEADER <>
Checksum                NDIS_WMI_TCP_IP_CHECKSUM_OFFLOAD <>
LsoV1                   NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 <>
IPsecV1                 NDIS_WMI_IPSEC_OFFLOAD_V1 <>
LsoV2                   NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V2 <>
Flags                   ULONG ?
if (NDIS_SUPPORT_NDIS61)
IPsecV2                 NDIS_IPSEC_OFFLOAD_V2 ?
endif
if (NDIS_SUPPORT_NDIS630)
Rsc                     NDIS_TCP_RECV_SEG_COALESCE_OFFLOAD ?
EncapsulatedPacketTaskOffloadGre NDIS_ENCAPSULATED_PACKET_TASK_OFFLOAD ?
endif
if (NDIS_SUPPORT_NDIS683)
UdpSegmentation         NDIS_UDP_SEGMENTATION_OFFLOAD ?
endif
_NDIS_WMI_OFFLOAD       ends
NDIS_WMI_OFFLOAD        typedef _NDIS_WMI_OFFLOAD
PNDIS_WMI_OFFLOAD       typedef ptr _NDIS_WMI_OFFLOAD

define NDIS_SIZEOF_NDIS_WMI_OFFLOAD_REVISION_1   RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_OFFLOAD, Flags)

if (NDIS_SUPPORT_NDIS61)
define NDIS_SIZEOF_NDIS_WMI_OFFLOAD_REVISION_2   RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_OFFLOAD, IPsecV2)
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_NDIS_WMI_OFFLOAD_REVISION_3   RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_OFFLOAD, EncapsulatedPacketTaskOffloadGre)
endif

if (NDIS_SUPPORT_NDIS683)
define NDIS_SIZEOF_NDIS_WMI_OFFLOAD_REVISION_4   RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_OFFLOAD, UdpSegmentation)
endif

;.pragma warning(push)
;.pragma warning(disable:4214)

define NDIS_TCP_CONNECTION_OFFLOAD_REVISION_1              1
if (NDIS_SUPPORT_NDIS61)
define NDIS_TCP_CONNECTION_OFFLOAD_REVISION_2              2
endif

_NDIS_TCP_CONNECTION_OFFLOAD struct
Header                  NDIS_OBJECT_HEADER <>
Encapsulation           ULONG ?
record
 SupportIPv4             ULONG :  2 ?
 SupportIPv6             ULONG :  2 ?
 SupportIPv6ExtensionHeaders ULONG :  2 ?
 SupportSack             ULONG :  2 ?
if (NDIS_SUPPORT_NDIS61)
 CongestionAlgorithm     ULONG :  4 ?
endif
ends
TcpConnectionOffloadCapacity ULONG ?
Flags                   ULONG ?
_NDIS_TCP_CONNECTION_OFFLOAD ends
NDIS_TCP_CONNECTION_OFFLOAD typedef _NDIS_TCP_CONNECTION_OFFLOAD
PNDIS_TCP_CONNECTION_OFFLOAD typedef ptr _NDIS_TCP_CONNECTION_OFFLOAD

define NDIS_SIZEOF_TCP_CONNECTION_OFFLOAD_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_TCP_CONNECTION_OFFLOAD, Flags)
if (NDIS_SUPPORT_NDIS61)
define NDIS_SIZEOF_TCP_CONNECTION_OFFLOAD_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_TCP_CONNECTION_OFFLOAD, Flags)
endif

;.pragma warning(pop)

_NDIS_WMI_TCP_CONNECTION_OFFLOAD struct
Header                  NDIS_OBJECT_HEADER <>
Encapsulation           ULONG ?
SupportIPv4             ULONG ?
SupportIPv6             ULONG ?
SupportIPv6ExtensionHeaders ULONG ?
SupportSack             ULONG ?
TcpConnectionOffloadCapacity ULONG ?
Flags                   ULONG ?
_NDIS_WMI_TCP_CONNECTION_OFFLOAD ends
NDIS_WMI_TCP_CONNECTION_OFFLOAD typedef _NDIS_WMI_TCP_CONNECTION_OFFLOAD
PNDIS_WMI_TCP_CONNECTION_OFFLOAD typedef ptr _NDIS_WMI_TCP_CONNECTION_OFFLOAD

define NDIS_SIZEOF_WMI_TCP_CONNECTION_OFFLOAD_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_TCP_CONNECTION_OFFLOAD, Flags)

define NDIS_MAXIMUM_PORTS 0x1000000

NDIS_PORT_NUMBER        typedef ULONG
PNDIS_PORT_NUMBER       typedef ptr NDIS_PORT_NUMBER

define NDIS_DEFAULT_PORT_NUMBER 0

.enum NDIS_PORT_TYPE {
    NdisPortTypeUndefined,
    NdisPortTypeBridge,
    NdisPortTypeRasConnection,
    NdisPortType8021xSupplicant,
if (NDIS_SUPPORT_NDIS630)
    NdisPortTypeNdisImPlatform,
endif
    NdisPortTypeMax,
    }

.enum NDIS_PORT_AUTHORIZATION_STATE {
    NdisPortAuthorizationUnknown,
    NdisPortAuthorized,
    NdisPortUnauthorized,
    NdisPortReauthorizing
    }

.enum NDIS_PORT_CONTROL_STATE {
    NdisPortControlStateUnknown,
    NdisPortControlStateControlled,
    NdisPortControlStateUncontrolled
    }

NDIS_PORT_CONTROLL_STATE typedef NDIS_PORT_CONTROL_STATE
PNDIS_PORT_CONTROLL_STATE typedef ptr NDIS_PORT_CONTROL_STATE

define NDIS_PORT_AUTHENTICATION_PARAMETERS_REVISION_1     1

_NDIS_PORT_AUTHENTICATION_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER <>
SendControlState        NDIS_PORT_CONTROL_STATE ?
RcvControlState         NDIS_PORT_CONTROL_STATE ?
SendAuthorizationState  NDIS_PORT_AUTHORIZATION_STATE ?
RcvAuthorizationState   NDIS_PORT_AUTHORIZATION_STATE ?
_NDIS_PORT_AUTHENTICATION_PARAMETERS ends
NDIS_PORT_AUTHENTICATION_PARAMETERS typedef _NDIS_PORT_AUTHENTICATION_PARAMETERS
PNDIS_PORT_AUTHENTICATION_PARAMETERS typedef ptr _NDIS_PORT_AUTHENTICATION_PARAMETERS

define NDIS_SIZEOF_PORT_AUTHENTICATION_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PORT_AUTHENTICATION_PARAMETERS, RcvAuthorizationState)

.enum NDIS_NETWORK_CHANGE_TYPE {
    NdisPossibleNetworkChange = 1,
    NdisDefinitelyNetworkChange,
    NdisNetworkChangeFromMediaConnect,
    NdisNetworkChangeMax
    }

define  NDIS_WMI_DEFAULT_METHOD_ID             1

define  NDIS_WMI_OBJECT_TYPE_SET               0x01
define  NDIS_WMI_OBJECT_TYPE_METHOD            0x02
define  NDIS_WMI_OBJECT_TYPE_EVENT             0x03
define  NDIS_WMI_OBJECT_TYPE_ENUM_ADAPTER      0x04
define  NDIS_WMI_OBJECT_TYPE_OUTPUT_INFO       0x05

define NDIS_WMI_METHOD_HEADER_REVISION_1       1

_NDIS_WMI_METHOD_HEADER struct
Header                  NDIS_OBJECT_HEADER <>
PortNumber              NDIS_PORT_NUMBER ?
NetLuid                 NET_LUID <>
RequestId               ULONG64 ?
Timeout                 ULONG ?
Padding                 UCHAR 4 dup(?)
_NDIS_WMI_METHOD_HEADER ends
NDIS_WMI_METHOD_HEADER  typedef _NDIS_WMI_METHOD_HEADER
PNDIS_WMI_METHOD_HEADER typedef ptr _NDIS_WMI_METHOD_HEADER

define NDIS_SIZEOF_WMI_METHOD_HEADER_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_METHOD_HEADER, Padding)

define NDIS_WMI_SET_HEADER_REVISION_1         1

_NDIS_WMI_SET_HEADER    struct
Header                  NDIS_OBJECT_HEADER <>
PortNumber              NDIS_PORT_NUMBER ?
NetLuid                 NET_LUID <>
RequestId               ULONG64 ?
Timeout                 ULONG ?
Padding                 UCHAR 4 dup(?)
_NDIS_WMI_SET_HEADER    ends
NDIS_WMI_SET_HEADER     typedef _NDIS_WMI_SET_HEADER
PNDIS_WMI_SET_HEADER    typedef ptr _NDIS_WMI_SET_HEADER

define NDIS_SIZEOF_WMI_SET_HEADER_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_SET_HEADER, Padding)

define NDIS_WMI_EVENT_HEADER_REVISION_1      1

_NDIS_WMI_EVENT_HEADER  struct
Header                  NDIS_OBJECT_HEADER <>
IfIndex                 NET_IFINDEX ?
NetLuid                 NET_LUID <>
RequestId               ULONG64 ?
PortNumber              NDIS_PORT_NUMBER ?
DeviceNameLength        ULONG ?
DeviceNameOffset        ULONG ?
Padding                 UCHAR 4 dup(?)
_NDIS_WMI_EVENT_HEADER  ends
NDIS_WMI_EVENT_HEADER   typedef _NDIS_WMI_EVENT_HEADER
PNDIS_WMI_EVENT_HEADER  typedef ptr _NDIS_WMI_EVENT_HEADER

define NDIS_SIZEOF_WMI_EVENT_HEADER_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_EVENT_HEADER, Padding)

define NDIS_WMI_ENUM_ADAPTER_REVISION_1       1

_NDIS_WMI_ENUM_ADAPTER  struct
Header                  NDIS_OBJECT_HEADER <>
IfIndex                 NET_IFINDEX ?
NetLuid                 NET_LUID <>
DeviceNameLength        USHORT ?
DeviceName              CHAR 1 dup(?)
_NDIS_WMI_ENUM_ADAPTER  ends
NDIS_WMI_ENUM_ADAPTER   typedef _NDIS_WMI_ENUM_ADAPTER
PNDIS_WMI_ENUM_ADAPTER  typedef ptr _NDIS_WMI_ENUM_ADAPTER

define NDIS_SIZEOF_WMI_ENUM_ADAPTER_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_ENUM_ADAPTER, DeviceName)

define NDIS_DEVICE_TYPE_ENDPOINT           0x00000001

if (NDIS_SUPPORT_NDIS61)

define NDIS_HD_SPLIT_PARAMETERS_REVISION_1      1

_NDIS_HD_SPLIT_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
HDSplitCombineFlags     ULONG ?
_NDIS_HD_SPLIT_PARAMETERS ends
NDIS_HD_SPLIT_PARAMETERS typedef _NDIS_HD_SPLIT_PARAMETERS
PNDIS_HD_SPLIT_PARAMETERS typedef ptr _NDIS_HD_SPLIT_PARAMETERS

define NDIS_SIZEOF_HD_SPLIT_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_HD_SPLIT_PARAMETERS, HDSplitCombineFlags)

define NDIS_HD_SPLIT_COMBINE_ALL_HEADERS          0x00000001

define NDIS_HD_SPLIT_CURRENT_CONFIG_REVISION_1      1

_NDIS_HD_SPLIT_CURRENT_CONFIG struct
Header                  NDIS_OBJECT_HEADER ?
HardwareCapabilities    ULONG ?
CurrentCapabilities     ULONG ?
HDSplitFlags            ULONG ?
HDSplitCombineFlags     ULONG ?
BackfillSize            ULONG ?
MaxHeaderSize           ULONG ?
_NDIS_HD_SPLIT_CURRENT_CONFIG ends
NDIS_HD_SPLIT_CURRENT_CONFIG typedef _NDIS_HD_SPLIT_CURRENT_CONFIG
PNDIS_HD_SPLIT_CURRENT_CONFIG typedef ptr _NDIS_HD_SPLIT_CURRENT_CONFIG

define NDIS_SIZEOF_HD_SPLIT_CURRENT_CONFIG_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_HD_SPLIT_CURRENT_CONFIG, MaxHeaderSize)

define NDIS_HD_SPLIT_CAPS_SUPPORTS_HEADER_DATA_SPLIT         0x00000001
define NDIS_HD_SPLIT_CAPS_SUPPORTS_IPV4_OPTIONS              0x00000002
define NDIS_HD_SPLIT_CAPS_SUPPORTS_IPV6_EXTENSION_HEADERS    0x00000004
define NDIS_HD_SPLIT_CAPS_SUPPORTS_TCP_OPTIONS               0x00000008

define NDIS_HD_SPLIT_ENABLE_HEADER_DATA_SPLIT     0x00000001

endif

define NDIS_WMI_OUTPUT_INFO_REVISION_1    1;

NDIS_WMI_OUTPUT_INFO    struct
Header                  NDIS_OBJECT_HEADER <>
Flags                   ULONG ?
SupportedRevision       UCHAR ?
DataOffset              ULONG ?
NDIS_WMI_OUTPUT_INFO    ends
PNDIS_WMI_OUTPUT_INFO   typedef ptr NDIS_WMI_OUTPUT_INFO

define NDIS_SIZEOF_WMI_OUTPUT_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_OUTPUT_INFO, DataOffset)

if (NDIS_SUPPORT_NDIS620)

define NDIS_PM_WOL_BITMAP_PATTERN_SUPPORTED                    0x00000001
define NDIS_PM_WOL_MAGIC_PACKET_SUPPORTED                      0x00000002
define NDIS_PM_WOL_IPV4_TCP_SYN_SUPPORTED                      0x00000004
define NDIS_PM_WOL_IPV6_TCP_SYN_SUPPORTED                      0x00000008
define NDIS_PM_WOL_IPV4_DEST_ADDR_WILDCARD_SUPPORTED           0x00000200
define NDIS_PM_WOL_IPV6_DEST_ADDR_WILDCARD_SUPPORTED           0x00000800
define NDIS_PM_WOL_EAPOL_REQUEST_ID_MESSAGE_SUPPORTED          0x00010000

define NDIS_PM_PROTOCOL_OFFLOAD_ARP_SUPPORTED                  0x00000001
define NDIS_PM_PROTOCOL_OFFLOAD_NS_SUPPORTED                   0x00000002
define NDIS_PM_PROTOCOL_OFFLOAD_80211_RSN_REKEY_SUPPORTED      0x00000080

if (NDIS_SUPPORT_NDIS630)
define NDIS_PM_WAKE_ON_MEDIA_CONNECT_SUPPORTED                   0x00000001
define NDIS_PM_WAKE_ON_MEDIA_DISCONNECT_SUPPORTED                0x00000002
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_WLAN_WAKE_ON_NLO_DISCOVERY_SUPPORTED                 0x00000001
define NDIS_WLAN_WAKE_ON_AP_ASSOCIATION_LOST_SUPPORTED           0x00000002
define NDIS_WLAN_WAKE_ON_GTK_HANDSHAKE_ERROR_SUPPORTED           0x00000004
define NDIS_WLAN_WAKE_ON_4WAY_HANDSHAKE_REQUEST_SUPPORTED        0x00000008
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_WWAN_WAKE_ON_REGISTER_STATE_SUPPORTED                0x00000001
define NDIS_WWAN_WAKE_ON_SMS_RECEIVE_SUPPORTED                   0x00000002
define NDIS_WWAN_WAKE_ON_USSD_RECEIVE_SUPPORTED                  0x00000004
define NDIS_WWAN_WAKE_ON_PACKET_STATE_SUPPORTED                  0x00000008
define NDIS_WWAN_WAKE_ON_UICC_CHANGE_SUPPORTED                   0x00000010
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_PM_WAKE_PACKET_INDICATION_SUPPORTED                0x00000001
define NDIS_PM_SELECTIVE_SUSPEND_SUPPORTED                     0x00000002
endif

define NDIS_PM_WOL_BITMAP_PATTERN_ENABLED                      0x00000001
define NDIS_PM_WOL_MAGIC_PACKET_ENABLED                        0x00000002
define NDIS_PM_WOL_IPV4_TCP_SYN_ENABLED                        0x00000004
define NDIS_PM_WOL_IPV6_TCP_SYN_ENABLED                        0x00000008
define NDIS_PM_WOL_IPV4_DEST_ADDR_WILDCARD_ENABLED             0x00000200
define NDIS_PM_WOL_IPV6_DEST_ADDR_WILDCARD_ENABLED             0x00000800
define NDIS_PM_WOL_EAPOL_REQUEST_ID_MESSAGE_ENABLED            0x00010000

define NDIS_PM_PROTOCOL_OFFLOAD_ARP_ENABLED                    0x00000001
define NDIS_PM_PROTOCOL_OFFLOAD_NS_ENABLED                     0x00000002
define NDIS_PM_PROTOCOL_OFFLOAD_80211_RSN_REKEY_ENABLED        0x00000080

define NDIS_PM_WAKE_ON_LINK_CHANGE_ENABLED                     0x00000001

if (NDIS_SUPPORT_NDIS630)
define NDIS_PM_WAKE_ON_MEDIA_DISCONNECT_ENABLED                0x00000002
define NDIS_PM_SELECTIVE_SUSPEND_ENABLED                       0x00000010
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_WLAN_WAKE_ON_NLO_DISCOVERY_ENABLED                 0x00000001
define NDIS_WLAN_WAKE_ON_AP_ASSOCIATION_LOST_ENABLED           0x00000002
define NDIS_WLAN_WAKE_ON_GTK_HANDSHAKE_ERROR_ENABLED           0x00000004
define NDIS_WLAN_WAKE_ON_4WAY_HANDSHAKE_REQUEST_ENABLED        0x00000008
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_WWAN_WAKE_ON_REGISTER_STATE_ENABLED                0x00000001
define NDIS_WWAN_WAKE_ON_SMS_RECEIVE_ENABLED                   0x00000002
define NDIS_WWAN_WAKE_ON_USSD_RECEIVE_ENABLED                  0x00000004
endif

if (NDIS_SUPPORT_NDIS650)
define NDIS_WWAN_WAKE_ON_PACKET_STATE_ENABLED                  0x00000008
define NDIS_WWAN_WAKE_ON_UICC_CHANGE_ENABLED                   0x00000010
endif

define NDIS_PM_WOL_PRIORITY_LOWEST                             0xFFFFFFFF
define NDIS_PM_WOL_PRIORITY_NORMAL                             0x10000000
define NDIS_PM_WOL_PRIORITY_HIGHEST                            0x00000001

define NDIS_PM_PROTOCOL_OFFLOAD_PRIORITY_LOWEST                0xFFFFFFFF
define NDIS_PM_PROTOCOL_OFFLOAD_PRIORITY_NORMAL                0x10000000
define NDIS_PM_PROTOCOL_OFFLOAD_PRIORITY_HIGHEST               0x00000001

.enum NDIS_PM_WOL_PACKET {
    NdisPMWoLPacketUnspecified,
    NdisPMWoLPacketBitmapPattern,
    NdisPMWoLPacketMagicPacket,
    NdisPMWoLPacketIPv4TcpSyn,
    NdisPMWoLPacketIPv6TcpSyn,
    NdisPMWoLPacketEapolRequestIdMessage,
    NdisPMWoLPacketMaximum
    }

.enum NDIS_PM_PROTOCOL_OFFLOAD_TYPE {
    NdisPMProtocolOffloadIdUnspecified,
    NdisPMProtocolOffloadIdIPv4ARP,
    NdisPMProtocolOffloadIdIPv6NS,
    NdisPMProtocolOffload80211RSNRekey,
if (NDIS_SUPPORT_NDIS684)
    NdisPMProtocolOffload80211RSNRekeyV2,
endif
    NdisPMProtocolOffloadIdMaximum
    }

define NDIS_PM_MAX_STRING_SIZE 64

_NDIS_PM_COUNTED_STRING struct
Length                  USHORT ?
String                  WCHAR NDIS_PM_MAX_STRING_SIZE + 1 dup(?)
_NDIS_PM_COUNTED_STRING ends
NDIS_PM_COUNTED_STRING  typedef _NDIS_PM_COUNTED_STRING
PNDIS_PM_COUNTED_STRING typedef ptr _NDIS_PM_COUNTED_STRING

define NDIS_PM_CAPABILITIES_REVISION_1              1

if (NDIS_SUPPORT_NDIS630)
define NDIS_PM_CAPABILITIES_REVISION_2              2
endif

_NDIS_PM_CAPABILITIES   struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SupportedWoLPacketPatterns ULONG ?
NumTotalWoLPatterns     ULONG ?
MaxWoLPatternSize       ULONG ?
MaxWoLPatternOffset     ULONG ?
MaxWoLPacketSaveBuffer  ULONG ?
SupportedProtocolOffloads ULONG ?
NumArpOffloadIPv4Addresses ULONG ?
NumNSOffloadIPv6Addresses ULONG ?
MinMagicPacketWakeUp    NDIS_DEVICE_POWER_STATE ?
MinPatternWakeUp        NDIS_DEVICE_POWER_STATE ?
MinLinkChangeWakeUp     NDIS_DEVICE_POWER_STATE ?
if (NDIS_SUPPORT_NDIS630)
SupportedWakeUpEvents   ULONG ?
MediaSpecificWakeUpEvents ULONG ?
endif
_NDIS_PM_CAPABILITIES   ends
NDIS_PM_CAPABILITIES    typedef _NDIS_PM_CAPABILITIES
PNDIS_PM_CAPABILITIES   typedef ptr _NDIS_PM_CAPABILITIES

define NDIS_SIZEOF_NDIS_PM_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PM_CAPABILITIES, MinLinkChangeWakeUp)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_NDIS_PM_CAPABILITIES_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_PM_CAPABILITIES, MediaSpecificWakeUpEvents)
endif

define NDIS_PM_PARAMETERS_REVISION_1              1

if (NDIS_SUPPORT_NDIS630)
define NDIS_PM_PARAMETERS_REVISION_2              2
endif

_NDIS_PM_PARAMETERS     struct
Header                  NDIS_OBJECT_HEADER ?
EnabledWoLPacketPatterns ULONG ?
EnabledProtocolOffloads ULONG ?
WakeUpFlags             ULONG ?
if (NDIS_SUPPORT_NDIS630)
MediaSpecificWakeUpEvents ULONG ?
endif
_NDIS_PM_PARAMETERS     ends
NDIS_PM_PARAMETERS      typedef _NDIS_PM_PARAMETERS
PNDIS_PM_PARAMETERS     typedef ptr _NDIS_PM_PARAMETERS

define NDIS_SIZEOF_NDIS_PM_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PM_PARAMETERS, WakeUpFlags)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_NDIS_PM_PARAMETERS_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_PM_PARAMETERS, MediaSpecificWakeUpEvents)
endif

define EAPOL_REQUEST_ID_WOL_FLAG_MUST_ENCRYPT        0x00000001

define NDIS_PM_MAX_PATTERN_ID  0x0000FFFF

define NDIS_PM_PRIVATE_PATTERN_ID  0x00000001

define NDIS_PM_WOL_PATTERN_REVISION_1              1

if (NDIS_SUPPORT_NDIS630)
define NDIS_PM_WOL_PATTERN_REVISION_2              2
endif

_NDIS_PM_WOL_PATTERN    struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
Priority                ULONG ?
WoLPacketType           NDIS_PM_WOL_PACKET ?
FriendlyName            NDIS_PM_COUNTED_STRING ?
PatternId               ULONG ?
NextWoLPatternOffset    ULONG ?
union WoLPattern
 struct IPv4TcpSynParameters
  Flags                 ULONG ?
  IPv4SourceAddress     UCHAR 4 dup(?)
  IPv4DestAddress       UCHAR 4 dup(?)
  TCPSourcePortNumber   USHORT ?
  TCPDestPortNumber     USHORT ?
 ends
 struct IPv6TcpSynParameters
  Flags                 ULONG ?
  IPv6SourceAddress     UCHAR 16 dup(?)
  IPv6DestAddress       UCHAR 16 dup(?)
  TCPSourcePortNumber   USHORT ?
  TCPDestPortNumber     USHORT ?
 ends
 struct EapolRequestIdMessageParameters
  Flags                 ULONG ?
 ends
 struct WoLBitMapPattern
  Flags                 ULONG ?
  MaskOffset            ULONG ?
  MaskSize              ULONG ?
  PatternOffset         ULONG ?
  PatternSize           ULONG ?
 ends
ends
_NDIS_PM_WOL_PATTERN    ends
NDIS_PM_WOL_PATTERN     typedef _NDIS_PM_WOL_PATTERN
PNDIS_PM_WOL_PATTERN    typedef ptr _NDIS_PM_WOL_PATTERN

define NDIS_SIZEOF_NDIS_PM_WOL_PATTERN_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PM_WOL_PATTERN, WoLPattern)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_NDIS_PM_WOL_PATTERN_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_PM_WOL_PATTERN, WoLPattern)
endif

define DOT11_RSN_KCK_LENGTH                  16
define DOT11_RSN_KEK_LENGTH                  16

if (NDIS_SUPPORT_NDIS684)
define DOT11_RSN_MAX_CIPHER_KEY_LENGTH       32
endif

define NDIS_PM_PROTOCOL_OFFLOAD_REVISION_1             1
if (NDIS_SUPPORT_NDIS684)
define NDIS_PM_PROTOCOL_OFFLOAD_REVISION_2             2
endif

_NDIS_PM_PROTOCOL_OFFLOAD struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
Priority                ULONG ?
ProtocolOffloadType     NDIS_PM_PROTOCOL_OFFLOAD_TYPE ?
FriendlyName            NDIS_PM_COUNTED_STRING ?
ProtocolOffloadId       ULONG ?
NextProtocolOffloadOffset ULONG ?
union ProtocolOffloadParameters
 struct IPv4ARPParameters
  Flags                 ULONG ?
  RemoteIPv4Address     UCHAR 4 dup(?)
  HostIPv4Address       UCHAR 4 dup(?)
  MacAddress            UCHAR 6 dup(?)
 ends
 struct IPv6NSParameters
  Flags                 ULONG ?
  RemoteIPv6Address     UCHAR 16 dup(?)
  SolicitedNodeIPv6Address UCHAR 16 dup(?)
  MacAddress            UCHAR 6 dup(?)
  TargetIPv6Addresses   UCHAR 2* 16 dup(?)
 ends
 struct Dot11RSNRekeyParameters
  Flags                 ULONG ?
  KCK                   UCHAR DOT11_RSN_KCK_LENGTH dup(?)
  KEK                   UCHAR DOT11_RSN_KEK_LENGTH dup(?)
  KeyReplayCounter      ULONGLONG ?
 ends
if (NDIS_SUPPORT_NDIS684)
 struct Dot11RSNRekeyParametersV2
  Flags                 ULONG ?
  KeyReplayCounter      ULONGLONG ?
  AuthAlgo              ULONG ?
  KCKLength             ULONG ?
  KEKLength             ULONG ?
  KCK                   UCHAR DOT11_RSN_MAX_CIPHER_KEY_LENGTH dup(?)
  KEK                   UCHAR DOT11_RSN_MAX_CIPHER_KEY_LENGTH dup(?)
 ends
endif
ends
_NDIS_PM_PROTOCOL_OFFLOAD ends
NDIS_PM_PROTOCOL_OFFLOAD typedef _NDIS_PM_PROTOCOL_OFFLOAD
PNDIS_PM_PROTOCOL_OFFLOAD typedef ptr _NDIS_PM_PROTOCOL_OFFLOAD

define NDIS_SIZEOF_NDIS_PM_PROTOCOL_OFFLOAD_REVISION_1 0xF0

if (NDIS_SUPPORT_NDIS684)
define NDIS_SIZEOF_NDIS_PM_PROTOCOL_OFFLOAD_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_PM_PROTOCOL_OFFLOAD, ProtocolOffloadParameters)
endif

if (NDIS_SUPPORT_NDIS630)

.enum NDIS_PM_WAKE_REASON_TYPE {
    NdisWakeReasonUnspecified               = 0x0000,
    NdisWakeReasonPacket                    = 0x0001,
    NdisWakeReasonMediaDisconnect           = 0x0002,
    NdisWakeReasonMediaConnect              = 0x0003,

    NdisWakeReasonWlanNLODiscovery          = 0x1000,
    NdisWakeReasonWlanAPAssociationLost     = 0x1001,
    NdisWakeReasonWlanGTKHandshakeError     = 0x1002,
    NdisWakeReasonWlan4WayHandshakeRequest  = 0x1003,

    NdisWakeReasonWwanRegisterState         = 0x2000,
    NdisWakeReasonWwanSMSReceive            = 0x2001,
    NdisWakeReasonWwanUSSDReceive           = 0x2002,
if (NDIS_SUPPORT_NDIS684)
    NdisWakeReasonWwanPacketState           = 0x2004,
    NdisWakeReasonWwanUiccChange            = 0x2005,
endif
    }

define NDIS_PM_WAKE_REASON_REVISION_1     1

_NDIS_PM_WAKE_REASON    struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
WakeReason              NDIS_PM_WAKE_REASON_TYPE ?
InfoBufferOffset        ULONG ?
InfoBufferSize          ULONG ?
_NDIS_PM_WAKE_REASON    ends
NDIS_PM_WAKE_REASON     typedef _NDIS_PM_WAKE_REASON
PNDIS_PM_WAKE_REASON    typedef ptr _NDIS_PM_WAKE_REASON

define NDIS_SIZEOF_PM_WAKE_REASON_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PM_WAKE_REASON, InfoBufferSize)

define NDIS_PM_WAKE_PACKET_REVISION_1     1

_NDIS_PM_WAKE_PACKET    struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PatternId               ULONG ?
PatternFriendlyName     NDIS_PM_COUNTED_STRING ?
OriginalPacketSize      ULONG ?
SavedPacketSize         ULONG ?
SavedPacketOffset       ULONG ?
_NDIS_PM_WAKE_PACKET    ends
NDIS_PM_WAKE_PACKET     typedef _NDIS_PM_WAKE_PACKET
PNDIS_PM_WAKE_PACKET    typedef ptr _NDIS_PM_WAKE_PACKET

define NDIS_SIZEOF_PM_WAKE_PACKET_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PM_WAKE_PACKET, SavedPacketOffset)

endif

.enum NDIS_PM_ADMIN_CONFIG_STATE {
    NdisPMAdminConfigUnspecified = 0,
    NdisPMAdminConfigDisabled = 1,
    NdisPMAdminConfigEnabled = 2
    }

define NDIS_WMI_PM_ADMIN_CONFIG_REVISION_1     1

_NDIS_WMI_PM_ADMIN_CONFIG struct
Header                  NDIS_OBJECT_HEADER ?
WakeOnPattern           NDIS_PM_ADMIN_CONFIG_STATE ?
WakeOnMagicPacket       NDIS_PM_ADMIN_CONFIG_STATE ?
DeviceSleepOnDisconnect NDIS_PM_ADMIN_CONFIG_STATE ?
PMARPOffload            NDIS_PM_ADMIN_CONFIG_STATE ?
PMNSOffload             NDIS_PM_ADMIN_CONFIG_STATE ?
PMWiFiRekeyOffload      NDIS_PM_ADMIN_CONFIG_STATE ?
_NDIS_WMI_PM_ADMIN_CONFIG ends
NDIS_WMI_PM_ADMIN_CONFIG typedef _NDIS_WMI_PM_ADMIN_CONFIG
PNDIS_WMI_PM_ADMIN_CONFIG typedef ptr _NDIS_WMI_PM_ADMIN_CONFIG

define NDIS_SIZEOF_WMI_PM_ADMIN_CONFIG_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_PM_ADMIN_CONFIG, PMWiFiRekeyOffload)

.enum NDIS_PM_CAPABILITY_STATE {
    NdisPMAdminConfigUnsupported = 0,
    NdisPMAdminConfigInactive = 1,
    NdisPMAdminConfigActive = 2
    }

define NDIS_WMI_PM_ACTIVE_CAPABILITIES_REVISION_1     1

_NDIS_WMI_PM_ACTIVE_CAPABILITIES struct
Header                  NDIS_OBJECT_HEADER ?
WakeOnPattern           NDIS_PM_CAPABILITY_STATE ?
WakeOnMagicPacket       NDIS_PM_CAPABILITY_STATE ?
DeviceSleepOnDisconnect NDIS_PM_CAPABILITY_STATE ?
PMARPOffload            NDIS_PM_CAPABILITY_STATE ?
PMNSOffload             NDIS_PM_CAPABILITY_STATE ?
PMWiFiRekeyOffload      NDIS_PM_CAPABILITY_STATE ?
_NDIS_WMI_PM_ACTIVE_CAPABILITIES ends
NDIS_WMI_PM_ACTIVE_CAPABILITIES typedef _NDIS_WMI_PM_ACTIVE_CAPABILITIES
PNDIS_WMI_PM_ACTIVE_CAPABILITIES typedef ptr _NDIS_WMI_PM_ACTIVE_CAPABILITIES

define NDIS_SIZEOF_WMI_PM_ACTIVE_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_PM_ACTIVE_CAPABILITIES, PMWiFiRekeyOffload)

define NDIS_RECEIVE_FILTER_MAC_HEADER_SUPPORTED            0x00000001
define NDIS_RECEIVE_FILTER_IPV4_HEADER_SUPPORTED           0x00000002
define NDIS_RECEIVE_FILTER_IPV6_HEADER_SUPPORTED           0x00000004
define NDIS_RECEIVE_FILTER_ARP_HEADER_SUPPORTED            0x00000008
define NDIS_RECEIVE_FILTER_UDP_HEADER_SUPPORTED            0x00000010

define NDIS_RECEIVE_FILTER_MAC_HEADER_DEST_ADDR_SUPPORTED      0x00000001
define NDIS_RECEIVE_FILTER_MAC_HEADER_SOURCE_ADDR_SUPPORTED    0x00000002
define NDIS_RECEIVE_FILTER_MAC_HEADER_PROTOCOL_SUPPORTED       0x00000004
define NDIS_RECEIVE_FILTER_MAC_HEADER_VLAN_ID_SUPPORTED        0x00000008
define NDIS_RECEIVE_FILTER_MAC_HEADER_PRIORITY_SUPPORTED       0x00000010
define NDIS_RECEIVE_FILTER_MAC_HEADER_PACKET_TYPE_SUPPORTED    0x00000020

define NDIS_RECEIVE_FILTER_ARP_HEADER_OPERATION_SUPPORTED      0x00000001
define NDIS_RECEIVE_FILTER_ARP_HEADER_SPA_SUPPORTED            0x00000002
define NDIS_RECEIVE_FILTER_ARP_HEADER_TPA_SUPPORTED            0x00000004

define NDIS_RECEIVE_FILTER_IPV4_HEADER_PROTOCOL_SUPPORTED      0x00000001

define NDIS_RECEIVE_FILTER_IPV6_HEADER_PROTOCOL_SUPPORTED      0x00000001

define NDIS_RECEIVE_FILTER_UDP_HEADER_DEST_PORT_SUPPORTED      0x00000001

define NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_EQUAL_SUPPORTED               0x00000001
define NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_MASK_EQUAL_SUPPORTED          0x00000002
define NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_NOT_EQUAL_SUPPORTED           0x00000004

define NDIS_RECEIVE_FILTER_MSI_X_SUPPORTED                         0x00000001
define NDIS_RECEIVE_FILTER_VM_QUEUE_SUPPORTED                      0x00000002
define NDIS_RECEIVE_FILTER_LOOKAHEAD_SPLIT_SUPPORTED               0x00000004
if (NDIS_SUPPORT_NDIS630)
define NDIS_RECEIVE_FILTER_DYNAMIC_PROCESSOR_AFFINITY_CHANGE_SUPPORTED 0x00000008
define NDIS_RECEIVE_FILTER_INTERRUPT_VECTOR_COALESCING_SUPPORTED       0x00000010
define NDIS_RECEIVE_FILTER_IMPLAT_MIN_OF_QUEUES_MODE                   0x00000040
define NDIS_RECEIVE_FILTER_IMPLAT_SUM_OF_QUEUES_MODE                   0x00000080
define NDIS_RECEIVE_FILTER_PACKET_COALESCING_SUPPORTED_ON_DEFAULT_QUEUE 0x00000100

define NDIS_RECEIVE_FILTER_ANY_VLAN_SUPPORTED                          0x00000020
endif

if (NDIS_SUPPORT_NDIS680)
define NDIS_RECEIVE_FILTER_DYNAMIC_PROCESSOR_AFFINITY_CHANGE_FOR_DEFAULT_QUEUE_SUPPORTED 0x00000040
endif

define NDIS_RECEIVE_FILTER_VMQ_FILTERS_ENABLED                     0x00000001
define NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED       0x00000002

define NDIS_RECEIVE_FILTER_VM_QUEUES_ENABLED                       0x00000001

define NDIS_RECEIVE_FILTER_CAPABILITIES_REVISION_1     1
if (NDIS_SUPPORT_NDIS630)
define NDIS_RECEIVE_FILTER_CAPABILITIES_REVISION_2     2
endif

_NDIS_RECEIVE_FILTER_CAPABILITIES struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
EnabledFilterTypes      ULONG ?
EnabledQueueTypes       ULONG ?
NumQueues               ULONG ?
SupportedQueueProperties ULONG ?
SupportedFilterTests    ULONG ?
SupportedHeaders        ULONG ?
SupportedMacHeaderFields ULONG ?
MaxMacHeaderFilters     ULONG ?
MaxQueueGroups          ULONG ?
MaxQueuesPerQueueGroup  ULONG ?
MinLookaheadSplitSize   ULONG ?
MaxLookaheadSplitSize   ULONG ?
if (NDIS_SUPPORT_NDIS630)
SupportedARPHeaderFields ULONG ?
SupportedIPv4HeaderFields ULONG ?
SupportedIPv6HeaderFields ULONG ?
SupportedUdpHeaderFields ULONG ?
MaxFieldTestsPerPacketCoalescingFilter ULONG ?
MaxPacketCoalescingFilters ULONG ?
NdisReserved            ULONG ?
endif
_NDIS_RECEIVE_FILTER_CAPABILITIES ends
NDIS_RECEIVE_FILTER_CAPABILITIES typedef _NDIS_RECEIVE_FILTER_CAPABILITIES
PNDIS_RECEIVE_FILTER_CAPABILITIES typedef ptr _NDIS_RECEIVE_FILTER_CAPABILITIES

define NDIS_SIZEOF_RECEIVE_FILTER_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_CAPABILITIES, MaxLookaheadSplitSize)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_RECEIVE_FILTER_CAPABILITIES_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_CAPABILITIES, NdisReserved)
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_NIC_SWITCH_CAPS_VLAN_SUPPORTED                                                       0x00000001
define NDIS_NIC_SWITCH_CAPS_PER_VPORT_INTERRUPT_MODERATION_SUPPORTED                             0x00000002
define NDIS_NIC_SWITCH_CAPS_ASYMMETRIC_QUEUE_PAIRS_FOR_NONDEFAULT_VPORT_SUPPORTED                0x00000004
define NDIS_NIC_SWITCH_CAPS_VF_RSS_SUPPORTED                                                     0x00000008
define NDIS_NIC_SWITCH_CAPS_SINGLE_VPORT_POOL                                                    0x00000010
if (NDIS_SUPPORT_NDIS650)
define NDIS_NIC_SWITCH_CAPS_RSS_PARAMETERS_PER_PF_VPORT_SUPPORTED                                0x00000020
endif
if (NDIS_SUPPORT_NDIS660)
define NDIS_NIC_SWITCH_CAPS_NIC_SWITCH_WITHOUT_IOV_SUPPORTED                                     0x00000040
define NDIS_NIC_SWITCH_CAPS_RSS_ON_PF_VPORTS_SUPPORTED                                           0x00000080
define NDIS_NIC_SWITCH_CAPS_RSS_PER_PF_VPORT_INDIRECTION_TABLE_SUPPORTED                         0x00000100
define NDIS_NIC_SWITCH_CAPS_RSS_PER_PF_VPORT_HASH_FUNCTION_SUPPORTED                             0x00000200
define NDIS_NIC_SWITCH_CAPS_RSS_PER_PF_VPORT_HASH_TYPE_SUPPORTED                                 0x00000400
define NDIS_NIC_SWITCH_CAPS_RSS_PER_PF_VPORT_HASH_KEY_SUPPORTED                                  0x00000800
define NDIS_NIC_SWITCH_CAPS_RSS_PER_PF_VPORT_INDIRECTION_TABLE_SIZE_RESTRICTED                   0x00001000

define NDIS_NIC_SWITCH_CAPS_RSS_PER_PF_VPORT_MASK (NDIS_NIC_SWITCH_CAPS_RSS_PER_PF_VPORT_HASH_KEY_SUPPORTED or NDIS_NIC_SWITCH_CAPS_RSS_PER_PF_VPORT_HASH_FUNCTION_SUPPORTED or NDIS_NIC_SWITCH_CAPS_RSS_PER_PF_VPORT_HASH_TYPE_SUPPORTED or NDIS_NIC_SWITCH_CAPS_RSS_PER_PF_VPORT_INDIRECTION_TABLE_SUPPORTED)
endif

endif

define NDIS_NIC_SWITCH_CAPABILITIES_REVISION_1        1

if (NDIS_SUPPORT_NDIS630)
define NDIS_NIC_SWITCH_CAPABILITIES_REVISION_2        2
endif

if (NDIS_SUPPORT_NDIS660)
define NDIS_NIC_SWITCH_CAPABILITIES_REVISION_3        3
endif

_NDIS_NIC_SWITCH_CAPABILITIES struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
NdisReserved1           ULONG ?
NumTotalMacAddresses    ULONG ?
NumMacAddressesPerPort  ULONG ?
NumVlansPerPort         ULONG ?
NdisReserved2           ULONG ?
NdisReserved3           ULONG ?
if (NDIS_SUPPORT_NDIS630)
NicSwitchCapabilities   ULONG ?
MaxNumSwitches          ULONG ?
MaxNumVPorts            ULONG ?
NdisReserved4           ULONG ?
MaxNumVFs               ULONG ?
MaxNumQueuePairs        ULONG ?
NdisReserved5           ULONG ?
NdisReserved6           ULONG ?
NdisReserved7           ULONG ?
MaxNumQueuePairsPerNonDefaultVPort ULONG ?
NdisReserved8           ULONG ?
NdisReserved9           ULONG ?
NdisReserved10          ULONG ?
NdisReserved11          ULONG ?
NdisReserved12          ULONG ?
MaxNumMacAddresses      ULONG ?
NdisReserved13          ULONG ?
NdisReserved14          ULONG ?
NdisReserved15          ULONG ?
NdisReserved16          ULONG ?
NdisReserved17          ULONG ?
endif
if (NDIS_SUPPORT_NDIS660)
MaxNumRssCapableNonDefaultPFVPorts ULONG ?
NumberOfIndirectionTableEntriesForDefaultVPort ULONG ?
NumberOfIndirectionTableEntriesPerNonDefaultPFVPort ULONG ?
MaxNumQueuePairsForDefaultVPort ULONG ?
endif
_NDIS_NIC_SWITCH_CAPABILITIES ends
NDIS_NIC_SWITCH_CAPABILITIES typedef _NDIS_NIC_SWITCH_CAPABILITIES
PNDIS_NIC_SWITCH_CAPABILITIES typedef ptr _NDIS_NIC_SWITCH_CAPABILITIES

define NDIS_SIZEOF_NIC_SWITCH_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_CAPABILITIES, NdisReserved3)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_NIC_SWITCH_CAPABILITIES_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_CAPABILITIES, NdisReserved17)
endif

if (NDIS_SUPPORT_NDIS660)
define NDIS_SIZEOF_NIC_SWITCH_CAPABILITIES_REVISION_3 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_CAPABILITIES, MaxNumQueuePairsForDefaultVPort)
endif

define NDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS_REVISION_1       1
_NDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
EnabledFilterTypes      ULONG ?
EnabledQueueTypes       ULONG ?
_NDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS ends
NDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS typedef _NDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS
PNDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS typedef ptr _NDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS

define NDIS_SIZEOF_RECEIVE_FILTER_GLOBAL_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_GLOBAL_PARAMETERS, EnabledQueueTypes)

PNDIS_RECEIVE_QUEUE_ID  typedef ptr NDIS_RECEIVE_QUEUE_ID
PNDIS_RECEIVE_QUEUE_GROUP_ID typedef ptr NDIS_RECEIVE_QUEUE_GROUP_ID

define NDIS_DEFAULT_RECEIVE_QUEUE_ID               0
define NDIS_DEFAULT_RECEIVE_QUEUE_GROUP_ID         0
define NDIS_DEFAULT_RECEIVE_FILTER_ID              0

PNDIS_RECEIVE_FILTER_ID typedef ptr NDIS_RECEIVE_FILTER_ID

.enum NDIS_RECEIVE_FILTER_TYPE {
    NdisReceiveFilterTypeUndefined,
    NdisReceiveFilterTypeVMQueue,
    NdisReceiveFilterTypePacketCoalescing,
    NdisReceiveFilterTypeMaximum
    }

.enum NDIS_FRAME_HEADER {
    NdisFrameHeaderUndefined,
    NdisFrameHeaderMac,
    NdisFrameHeaderArp,
    NdisFrameHeaderIPv4,
    NdisFrameHeaderIPv6,
    NdisFrameHeaderUdp,
    NdisFrameHeaderMaximum
    }

.enum NDIS_MAC_HEADER_FIELD {
    NdisMacHeaderFieldUndefined,
    NdisMacHeaderFieldDestinationAddress,
    NdisMacHeaderFieldSourceAddress,
    NdisMacHeaderFieldProtocol,
    NdisMacHeaderFieldVlanId,
    NdisMacHeaderFieldPriority,
    NdisMacHeaderFieldPacketType,
    NdisMacHeaderFieldMaximum
    }

.enum NDIS_MAC_PACKET_TYPE {
    NdisMacPacketTypeUndefined = 0,
    NdisMacPacketTypeUnicast = 1,
    NdisMacPacketTypeMulticast = 2,
    NdisMacPacketTypeBroadcast = 3,
    NdisMacPacketTypeMaximum
    }

.enum NDIS_ARP_HEADER_FIELD {
    NdisARPHeaderFieldUndefined,
    NdisARPHeaderFieldOperation,
    NdisARPHeaderFieldSPA,
    NdisARPHeaderFieldTPA,
    NdisARPHeaderFieldMaximum
    }

.enum NDIS_IPV4_HEADER_FIELD {
    NdisIPv4HeaderFieldUndefined,
    NdisIPv4HeaderFieldProtocol,
    NdisIPv4HeaderFieldMaximum
    }

.enum NDIS_IPV6_HEADER_FIELD {
    NdisIPv6HeaderFieldUndefined,
    NdisIPv6HeaderFieldProtocol,
    NdisIPv6HeaderFieldMaximum
    }

.enum NDIS_UDP_HEADER_FIELD {
    NdisUdpHeaderFieldUndefined,
    NdisUdpHeaderFieldDestinationPort,
    NdisUdpHeaderFieldMaximum
    }

.enum NDIS_RECEIVE_FILTER_TEST {
    NdisReceiveFilterTestUndefined,
    NdisReceiveFilterTestEqual,
    NdisReceiveFilterTestMaskEqual,
    NdisReceiveFilterTestNotEqual,
    NdisReceiveFilterTestMaximum
    }

define NDIS_RECEIVE_FILTER_FIELD_MAC_HEADER_VLAN_UNTAGGED_OR_ZERO  0x00000001

define NDIS_RECEIVE_FILTER_FIELD_PARAMETERS_REVISION_1       1
if (NDIS_SUPPORT_NDIS630)
define NDIS_RECEIVE_FILTER_FIELD_PARAMETERS_REVISION_2       2
endif

_NDIS_RECEIVE_FILTER_FIELD_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
FrameHeader             NDIS_FRAME_HEADER ?
ReceiveFilterTest       NDIS_RECEIVE_FILTER_TEST ?
MacHeaderField          NDIS_MAC_HEADER_FIELD ?
ArpHeaderField          NDIS_ARP_HEADER_FIELD ?
IPv4HeaderField         NDIS_IPV4_HEADER_FIELD ?
IPv6HeaderField         NDIS_IPV6_HEADER_FIELD ?
UdpHeaderField          NDIS_UDP_HEADER_FIELD ?
_NDIS_RECEIVE_FILTER_FIELD_PARAMETERS ends
HeaderField             typedef _NDIS_RECEIVE_FILTER_FIELD_PARAMETERS

define NDIS_SIZEOF_RECEIVE_FILTER_FIELD_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_FIELD_PARAMETERS, ResultValue)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_RECEIVE_FILTER_FIELD_PARAMETERS_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_FIELD_PARAMETERS, ResultValue)
endif

PNDIS_NIC_SWITCH_ID     typedef ptr NDIS_NIC_SWITCH_ID
if (NDIS_SUPPORT_NDIS630)
PNDIS_NIC_SWITCH_VPORT_ID typedef ptr NDIS_NIC_SWITCH_VPORT_ID
endif

define NDIS_RECEIVE_FILTER_FLAGS_RESERVED                          0x00000001
define NDIS_RECEIVE_FILTER_PACKET_ENCAPSULATION_GRE                0x00000002
if (NDIS_SUPPORT_NDIS650)
define NDIS_RECEIVE_FILTER_PACKET_ENCAPSULATION                    0x00000002
endif

define NDIS_RECEIVE_FILTER_PARAMETERS_REVISION_1       1

if (NDIS_SUPPORT_NDIS630)
define NDIS_RECEIVE_FILTER_PARAMETERS_REVISION_2       2
endif

_NDIS_RECEIVE_FILTER_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER <>
Flags                   ULONG ?
FilterType              NDIS_RECEIVE_FILTER_TYPE ?
QueueId                 NDIS_RECEIVE_QUEUE_ID ?
FilterId                NDIS_RECEIVE_FILTER_ID ?
FieldParametersArrayOffset ULONG ?
FieldParametersArrayNumElements ULONG ?
FieldParametersArrayElementSize ULONG ?
RequestedFilterIdBitCount ULONG ?
if (NDIS_SUPPORT_NDIS630)
MaxCoalescingDelay      ULONG ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
endif
_NDIS_RECEIVE_FILTER_PARAMETERS ends
NDIS_RECEIVE_FILTER_PARAMETERS  typedef _NDIS_RECEIVE_FILTER_PARAMETERS
PNDIS_RECEIVE_FILTER_PARAMETERS typedef ptr _NDIS_RECEIVE_FILTER_PARAMETERS

define NDIS_SIZEOF_RECEIVE_FILTER_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_PARAMETERS, RequestedFilterIdBitCount)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_RECEIVE_FILTER_PARAMETERS_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_PARAMETERS, VPortId)
endif

define NDIS_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1       1

_NDIS_RECEIVE_FILTER_CLEAR_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
QueueId                 NDIS_RECEIVE_QUEUE_ID ?
FilterId                NDIS_RECEIVE_FILTER_ID ?
_NDIS_RECEIVE_FILTER_CLEAR_PARAMETERS ends
NDIS_RECEIVE_FILTER_CLEAR_PARAMETERS typedef _NDIS_RECEIVE_FILTER_CLEAR_PARAMETERS
PNDIS_RECEIVE_FILTER_CLEAR_PARAMETERS typedef ptr _NDIS_RECEIVE_FILTER_CLEAR_PARAMETERS

define NDIS_SIZEOF_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_CLEAR_PARAMETERS, FilterId)

.enum NDIS_RECEIVE_QUEUE_TYPE {
    NdisReceiveQueueTypeUnspecified,
    NdisReceiveQueueTypeVMQueue,
    NdisReceiveQueueTypeMaximum
    }

define NDIS_RECEIVE_QUEUE_PARAMETERS_PER_QUEUE_RECEIVE_INDICATION              0x00000001
define NDIS_RECEIVE_QUEUE_PARAMETERS_LOOKAHEAD_SPLIT_REQUIRED                  0x00000002

define NDIS_RECEIVE_QUEUE_PARAMETERS_FLAGS_CHANGED                             0x00010000
define NDIS_RECEIVE_QUEUE_PARAMETERS_PROCESSOR_AFFINITY_CHANGED                0x00020000
define NDIS_RECEIVE_QUEUE_PARAMETERS_SUGGESTED_RECV_BUFFER_NUMBERS_CHANGED     0x00040000
define NDIS_RECEIVE_QUEUE_PARAMETERS_NAME_CHANGED                              0x00080000

if (NDIS_SUPPORT_NDIS630)
define NDIS_RECEIVE_QUEUE_PARAMETERS_INTERRUPT_COALESCING_DOMAIN_ID_CHANGED    0x00100000
endif

if (NDIS_SUPPORT_NDIS650)
define NDIS_RECEIVE_QUEUE_PARAMETERS_QOS_SQ_ID_CHANGED                         0x00200000
endif

define NDIS_RECEIVE_QUEUE_PARAMETERS_CHANGE_MASK                               0xFFFF0000

PNDIS_QUEUE_NAME        typedef ptr NDIS_QUEUE_NAME
PNDIS_VM_NAME           typedef ptr NDIS_VM_NAME
PNDIS_VM_FRIENDLYNAME   typedef ptr NDIS_VM_FRIENDLYNAME
PNDIS_SWITCH_PORT_PROPERTY_PROFILE_NAME typedef ptr NDIS_SWITCH_PORT_PROPERTY_PROFILE_NAME
PNDIS_SWITCH_PORT_PROPERTY_PROFILE_CDN_LABEL typedef ptr NDIS_SWITCH_PORT_PROPERTY_PROFILE_CDN_LABEL
PNDIS_SWITCH_NAME       typedef ptr NDIS_SWITCH_NAME
PNDIS_SWITCH_FRIENDLYNAME typedef ptr NDIS_SWITCH_FRIENDLYNAME
PNDIS_SWITCH_PORT_NAME  typedef ptr NDIS_SWITCH_PORT_NAME
PNDIS_SWITCH_PORT_FRIENDLYNAME typedef ptr NDIS_SWITCH_PORT_FRIENDLYNAME
PNDIS_SWITCH_NIC_NAME   typedef ptr NDIS_SWITCH_NIC_NAME
PNDIS_SWITCH_NIC_FRIENDLYNAME typedef ptr NDIS_SWITCH_NIC_FRIENDLYNAME
PNDIS_SWITCH_EXTENSION_FRIENDLYNAME typedef ptr NDIS_SWITCH_EXTENSION_FRIENDLYNAME
PNDIS_VENDOR_NAME       typedef ptr NDIS_VENDOR_NAME

if (NDIS_SUPPORT_NDIS650)
PNDIS_QOS_SQ_ID         typedef ptr NDIS_QOS_SQ_ID
endif

define NDIS_RECEIVE_QUEUE_PARAMETERS_REVISION_1       1
if (NDIS_SUPPORT_NDIS630)
define NDIS_RECEIVE_QUEUE_PARAMETERS_REVISION_2       2
endif
if (NDIS_SUPPORT_NDIS650)
define NDIS_RECEIVE_QUEUE_PARAMETERS_REVISION_3       3
endif

_NDIS_RECEIVE_QUEUE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
QueueType               NDIS_RECEIVE_QUEUE_TYPE ?
QueueId                 NDIS_RECEIVE_QUEUE_ID ?
QueueGroupId            NDIS_RECEIVE_QUEUE_GROUP_ID ?
ProcessorAffinity       GROUP_AFFINITY ?
NumSuggestedReceiveBuffers ULONG ?
MSIXTableEntry          ULONG ?
LookaheadSize           ULONG ?
VmName                  NDIS_VM_NAME ?
QueueName               NDIS_QUEUE_NAME ?
if (NDIS_SUPPORT_NDIS630)
PortId                  ULONG ?
InterruptCoalescingDomainId ULONG ?
endif
if (NDIS_SUPPORT_NDIS650)
QosSqId                 NDIS_QOS_SQ_ID ?
endif
_NDIS_RECEIVE_QUEUE_PARAMETERS ends
NDIS_RECEIVE_QUEUE_PARAMETERS typedef _NDIS_RECEIVE_QUEUE_PARAMETERS
PNDIS_RECEIVE_QUEUE_PARAMETERS typedef ptr _NDIS_RECEIVE_QUEUE_PARAMETERS

define NDIS_SIZEOF_RECEIVE_QUEUE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_QUEUE_PARAMETERS, QueueName)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_RECEIVE_QUEUE_PARAMETERS_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_QUEUE_PARAMETERS, InterruptCoalescingDomainId)
endif

if (NDIS_SUPPORT_NDIS650)
define NDIS_SIZEOF_RECEIVE_QUEUE_PARAMETERS_REVISION_3 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_QUEUE_PARAMETERS, QosSqId)
endif

define NDIS_RECEIVE_QUEUE_FREE_PARAMETERS_REVISION_1       1

_NDIS_RECEIVE_QUEUE_FREE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
QueueId                 NDIS_RECEIVE_QUEUE_ID ?
_NDIS_RECEIVE_QUEUE_FREE_PARAMETERS ends
NDIS_RECEIVE_QUEUE_FREE_PARAMETERS typedef _NDIS_RECEIVE_QUEUE_FREE_PARAMETERS
PNDIS_RECEIVE_QUEUE_FREE_PARAMETERS typedef ptr _NDIS_RECEIVE_QUEUE_FREE_PARAMETERS

define NDIS_SIZEOF_RECEIVE_QUEUE_FREE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_QUEUE_FREE_PARAMETERS, QueueId)

.enum NDIS_RECEIVE_QUEUE_OPERATIONAL_STATE {
    NdisReceiveQueueOperationalStateUndefined,
    NdisReceiveQueueOperationalStateRunning,
    NdisReceiveQueueOperationalStatePaused,
    NdisReceiveQueueOperationalStateDmaStopped,
    NdisReceiveQueueOperationalStateMaximum
    }

define NDIS_RECEIVE_QUEUE_INFO_REVISION_1              1

if (NDIS_SUPPORT_NDIS630)
define NDIS_RECEIVE_QUEUE_INFO_REVISION_2              2
endif

_NDIS_RECEIVE_QUEUE_INFO struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
QueueType               NDIS_RECEIVE_QUEUE_TYPE ?
QueueId                 NDIS_RECEIVE_QUEUE_ID ?
QueueGroupId            NDIS_RECEIVE_QUEUE_GROUP_ID ?
QueueState              NDIS_RECEIVE_QUEUE_OPERATIONAL_STATE ?
ProcessorAffinity       GROUP_AFFINITY ?
NumSuggestedReceiveBuffers ULONG ?
MSIXTableEntry          ULONG ?
LookaheadSize           ULONG ?
VmName                  NDIS_VM_NAME ?
QueueName               NDIS_QUEUE_NAME ?
if (NDIS_SUPPORT_NDIS630)
NumFilters              ULONG ?
InterruptCoalescingDomainId ULONG ?
endif
_NDIS_RECEIVE_QUEUE_INFO ends
NDIS_RECEIVE_QUEUE_INFO typedef _NDIS_RECEIVE_QUEUE_INFO
PNDIS_RECEIVE_QUEUE_INFO typedef ptr _NDIS_RECEIVE_QUEUE_INFO

define NDIS_SIZEOF_RECEIVE_QUEUE_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_QUEUE_INFO, QueueName)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_RECEIVE_QUEUE_INFO_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_QUEUE_INFO, InterruptCoalescingDomainId)
endif

define NDIS_RECEIVE_QUEUE_INFO_ARRAY_REVISION_1             1

_NDIS_RECEIVE_QUEUE_INFO_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
FirstElementOffset      ULONG ?
NumElements             ULONG ?
ElementSize             ULONG ?
_NDIS_RECEIVE_QUEUE_INFO_ARRAY ends
NDIS_RECEIVE_QUEUE_INFO_ARRAY typedef _NDIS_RECEIVE_QUEUE_INFO_ARRAY
PNDIS_RECEIVE_QUEUE_INFO_ARRAY typedef ptr _NDIS_RECEIVE_QUEUE_INFO_ARRAY

define NDIS_SIZEOF_RECEIVE_QUEUE_INFO_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_QUEUE_INFO_ARRAY, ElementSize)

define NDIS_RECEIVE_FILTER_INFO_REVISION_1             1

_NDIS_RECEIVE_FILTER_INFO struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
FilterType              NDIS_RECEIVE_FILTER_TYPE ?
FilterId                NDIS_RECEIVE_FILTER_ID ?
_NDIS_RECEIVE_FILTER_INFO ends
NDIS_RECEIVE_FILTER_INFO typedef _NDIS_RECEIVE_FILTER_INFO
PNDIS_RECEIVE_FILTER_INFO typedef ptr _NDIS_RECEIVE_FILTER_INFO

define NDIS_SIZEOF_RECEIVE_FILTER_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_INFO, FilterId)

define NDIS_RECEIVE_FILTER_INFO_ARRAY_REVISION_1             1
if (NDIS_SUPPORT_NDIS630)
define NDIS_RECEIVE_FILTER_INFO_ARRAY_REVISION_2             2
endif

if (NDIS_SUPPORT_NDIS630)
define NDIS_RECEIVE_FILTER_INFO_ARRAY_VPORT_ID_SPECIFIED       0x00000001
endif

_NDIS_RECEIVE_FILTER_INFO_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
QueueId                 NDIS_RECEIVE_QUEUE_ID ?
FirstElementOffset      ULONG ?
NumElements             ULONG ?
ElementSize             ULONG ?
if (NDIS_SUPPORT_NDIS630)
Flags                   ULONG ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
endif
_NDIS_RECEIVE_FILTER_INFO_ARRAY ends
NDIS_RECEIVE_FILTER_INFO_ARRAY typedef _NDIS_RECEIVE_FILTER_INFO_ARRAY
PNDIS_RECEIVE_FILTER_INFO_ARRAY typedef ptr _NDIS_RECEIVE_FILTER_INFO_ARRAY

define NDIS_SIZEOF_RECEIVE_FILTER_INFO_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_INFO_ARRAY, ElementSize)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_RECEIVE_FILTER_INFO_ARRAY_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_INFO_ARRAY, VPortId)
endif

define NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_PARAMETERS_REVISION_1    1

_NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
QueueId                 NDIS_RECEIVE_QUEUE_ID ?
CompletionStatus        NDIS_STATUS ?
_NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_PARAMETERS ends
NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_PARAMETERS typedef _NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_PARAMETERS
PNDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_PARAMETERS typedef ptr _NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_PARAMETERS

define NDIS_SIZEOF_RECEIVE_QUEUE_ALLOCATION_COMPLETE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_PARAMETERS, CompletionStatus)

define NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1         1

Header                  typedef ptr NumElements

define NDIS_SIZEOF_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY, ElementSize)

endif

if ((NTDDI_VERSION ge NTDDI_VISTA) or NDIS_SUPPORT_NDIS6)

define NDIS_RECEIVE_SCALE_CAPABILITIES_REVISION_1     1

if (NDIS_SUPPORT_NDIS630)
define NDIS_RECEIVE_SCALE_CAPABILITIES_REVISION_2     2
endif

if (NDIS_SUPPORT_NDIS660)
define NDIS_RECEIVE_SCALE_CAPABILITIES_REVISION_3     3
endif

define NDIS_RSS_CAPS_HASH_TYPE_TCP_IPV4                    0x00000100
define NDIS_RSS_CAPS_HASH_TYPE_TCP_IPV6                    0x00000200
define NDIS_RSS_CAPS_HASH_TYPE_TCP_IPV6_EX                 0x00000400
if (NDIS_SUPPORT_NDIS680)
define NDIS_RSS_CAPS_HASH_TYPE_UDP_IPV4                0x00000800
define NDIS_RSS_CAPS_HASH_TYPE_UDP_IPV6                0x00001000
define NDIS_RSS_CAPS_HASH_TYPE_UDP_IPV6_EX             0x00002000
endif

define NDIS_RSS_CAPS_MESSAGE_SIGNALED_INTERRUPTS           0x01000000
define NDIS_RSS_CAPS_CLASSIFICATION_AT_ISR                 0x02000000
define NDIS_RSS_CAPS_CLASSIFICATION_AT_DPC                 0x04000000
if NDIS_SUPPORT_NDIS620
define NDIS_RSS_CAPS_USING_MSI_X                       0x08000000
endif
if (NDIS_SUPPORT_NDIS630)
define NDIS_RSS_CAPS_RSS_AVAILABLE_ON_PORTS            0x10000000
define NDIS_RSS_CAPS_SUPPORTS_MSI_X                    0x20000000
endif
if (NDIS_SUPPORT_NDIS680)
define NDIS_RSS_CAPS_SUPPORTS_INDEPENDENT_ENTRY_MOVE   0x40000000
endif
NDIS_RSS_CAPS_FLAGS     typedef ULONG

_NDIS_RECEIVE_SCALE_CAPABILITIES struct
Header                  NDIS_OBJECT_HEADER <>
CapabilitiesFlags       NDIS_RSS_CAPS_FLAGS ?
NumberOfInterruptMessages ULONG ?
NumberOfReceiveQueues   ULONG ?
if (NDIS_SUPPORT_NDIS630)
NumberOfIndirectionTableEntries USHORT ?
endif
_NDIS_RECEIVE_SCALE_CAPABILITIES ends
NDIS_RECEIVE_SCALE_CAPABILITIES typedef _NDIS_RECEIVE_SCALE_CAPABILITIES
PNDIS_RECEIVE_SCALE_CAPABILITIES typedef ptr _NDIS_RECEIVE_SCALE_CAPABILITIES

define NDIS_SIZEOF_RECEIVE_SCALE_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_SCALE_CAPABILITIES, NumberOfReceiveQueues)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_RECEIVE_SCALE_CAPABILITIES_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_SCALE_CAPABILITIES, NumberOfIndirectionTableEntries)
endif

if (NDIS_SUPPORT_NDIS660)
define NDIS_SIZEOF_RECEIVE_SCALE_CAPABILITIES_REVISION_3 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_SCALE_CAPABILITIES, NumberOfIndirectionTableEntries)
endif

define NdisHashFunctionToeplitz                            0x00000001
define NdisHashFunctionReserved1                           0x00000002
define NdisHashFunctionReserved2                           0x00000004
define NdisHashFunctionReserved3                           0x00000008

define NDIS_HASH_FUNCTION_MASK                             0x000000FF
define NDIS_HASH_TYPE_MASK                                 0x00FFFF00

NDIS_RSS_HASH_FUNC_FROM_HASH_INFO macro _HashInfo
  exitm<((_HashInfo) and (NDIS_HASH_FUNCTION_MASK))>
  endm

NDIS_RSS_HASH_TYPE_FROM_HASH_INFO macro _HashInfo
  exitm<((_HashInfo) and (NDIS_HASH_TYPE_MASK))>
  endm

NDIS_RSS_HASH_INFO_FROM_TYPE_AND_FUNC macro _HashType, _HashFunction
  exitm<((_HashType) or (_HashFunction))>
  endm

define NDIS_HASH_IPV4              0x00000100
define NDIS_HASH_TCP_IPV4          0x00000200
define NDIS_HASH_IPV6              0x00000400
define NDIS_HASH_IPV6_EX           0x00000800
define NDIS_HASH_TCP_IPV6          0x00001000
define NDIS_HASH_TCP_IPV6_EX       0x00002000
if (NDIS_SUPPORT_NDIS680)
define NDIS_HASH_UDP_IPV4      0x00004000
define NDIS_HASH_UDP_IPV6      0x00008000
define NDIS_HASH_UDP_IPV6_EX   0x00010000
endif

NDIS_HASH_FLAGS         typedef ULONG

define NDIS_RSS_PARAM_FLAG_BASE_CPU_UNCHANGED              0x0001
define NDIS_RSS_PARAM_FLAG_HASH_INFO_UNCHANGED             0x0002
define NDIS_RSS_PARAM_FLAG_ITABLE_UNCHANGED                0x0004
define NDIS_RSS_PARAM_FLAG_HASH_KEY_UNCHANGED              0x0008
define NDIS_RSS_PARAM_FLAG_DISABLE_RSS                     0x0010
if (NDIS_SUPPORT_NDIS660)
define NDIS_RSS_PARAM_FLAG_DEFAULT_PROCESSOR_UNCHANGED     0x0020
endif

define NDIS_RSS_INDIRECTION_TABLE_SIZE_REVISION_1          128
define NDIS_RSS_HASH_SECRET_KEY_SIZE_REVISION_1            40

define NDIS_RECEIVE_SCALE_PARAMETERS_REVISION_1     1

if NDIS_SUPPORT_NDIS620

define NDIS_RECEIVE_SCALE_PARAMETERS_REVISION_2     2

endif

if NDIS_SUPPORT_NDIS660

define NDIS_RECEIVE_SCALE_PARAMETERS_REVISION_3     3

endif

_NDIS_RECEIVE_SCALE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER <>
Flags                   USHORT ?
BaseCpuNumber           USHORT ?
HashInformation         ULONG ?
IndirectionTableSize    USHORT ?
IndirectionTableOffset  ULONG ?
HashSecretKeySize       USHORT ?
HashSecretKeyOffset     ULONG ?
if NDIS_SUPPORT_NDIS620
ProcessorMasksOffset    ULONG ?
NumberOfProcessorMasks  ULONG ?
ProcessorMasksEntrySize ULONG ?
endif
if NDIS_SUPPORT_NDIS660
DefaultProcessorNumber  PROCESSOR_NUMBER ?
endif
_NDIS_RECEIVE_SCALE_PARAMETERS ends
NDIS_RECEIVE_SCALE_PARAMETERS typedef _NDIS_RECEIVE_SCALE_PARAMETERS
PNDIS_RECEIVE_SCALE_PARAMETERS typedef ptr _NDIS_RECEIVE_SCALE_PARAMETERS

define NDIS_SIZEOF_RECEIVE_SCALE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_SCALE_PARAMETERS, HashSecretKeyOffset)

define NDIS_RSS_INDIRECTION_TABLE_MAX_SIZE_REVISION_1      128
define NDIS_RSS_HASH_SECRET_KEY_MAX_SIZE_REVISION_1        40

if NDIS_SUPPORT_NDIS620

define NDIS_SIZEOF_RECEIVE_SCALE_PARAMETERS_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_SCALE_PARAMETERS, ProcessorMasksEntrySize)

define NDIS_RSS_INDIRECTION_TABLE_MAX_SIZE_REVISION_2      (128*sizeof(PROCESSOR_NUMBER))
define NDIS_RSS_HASH_SECRET_KEY_MAX_SIZE_REVISION_2        40

endif

if NDIS_SUPPORT_NDIS660

define NDIS_SIZEOF_RECEIVE_SCALE_PARAMETERS_REVISION_3 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_SCALE_PARAMETERS, DefaultProcessorNumber)

define NDIS_RSS_INDIRECTION_TABLE_MAX_SIZE_REVISION_3      (128*sizeof(PROCESSOR_NUMBER))
define NDIS_RSS_HASH_SECRET_KEY_MAX_SIZE_REVISION_3        40

endif

if NDIS_SUPPORT_NDIS680

define NDIS_RECEIVE_SCALE_PARAMETERS_V2_REVISION_1         1

define NDIS_RECEIVE_SCALE_PARAM_ENABLE_RSS                 0x00000001
define NDIS_RECEIVE_SCALE_PARAM_HASH_INFO_CHANGED          0x00000002
define NDIS_RECEIVE_SCALE_PARAM_HASH_KEY_CHANGED           0x00000004
define NDIS_RECEIVE_SCALE_PARAM_NUMBER_OF_QUEUES_CHANGED   0x00000008
define NDIS_RECEIVE_SCALE_PARAM_NUMBER_OF_ENTRIES_CHANGED  0x00000010

_NDIS_RECEIVE_SCALE_PARAMETERS_V2 struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
HashInformation         ULONG ?
HashSecretKeySize       ULONG ?
HashSecretKeyOffset     ULONG ?
NumberOfQueues          ULONG ?
NumberOfIndirectionTableEntries ULONG ?
_NDIS_RECEIVE_SCALE_PARAMETERS_V2 ends
NDIS_RECEIVE_SCALE_PARAMETERS_V2 typedef _NDIS_RECEIVE_SCALE_PARAMETERS_V2
PNDIS_RECEIVE_SCALE_PARAMETERS_V2 typedef ptr _NDIS_RECEIVE_SCALE_PARAMETERS_V2

define NDIS_SIZEOF_RECEIVE_SCALE_PARAMETERS_V2_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_SCALE_PARAMETERS_V2, NumberOfIndirectionTableEntries)

define NDIS_RSS_SET_INDIRECTION_ENTRY_FLAG_PRIMARY_PROCESSOR   0x00000001

define NDIS_RSS_SET_INDIRECTION_ENTRY_FLAG_DEFAULT_PROCESSOR   0x00000002

_NDIS_RSS_SET_INDIRECTION_ENTRY struct
SwitchId                NDIS_NIC_SWITCH_ID ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
Flags                   ULONG ?
IndirectionTableIndex   USHORT ?
TargetProcessorNumber   PROCESSOR_NUMBER ?
EntryStatus             NDIS_STATUS ?
_NDIS_RSS_SET_INDIRECTION_ENTRY ends
NDIS_RSS_SET_INDIRECTION_ENTRY typedef _NDIS_RSS_SET_INDIRECTION_ENTRY
PNDIS_RSS_SET_INDIRECTION_ENTRY typedef ptr _NDIS_RSS_SET_INDIRECTION_ENTRY

define NDIS_SIZEOF_RSS_SET_INDIRECTION_ENTRY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RSS_SET_INDIRECTION_ENTRY, EntryStatus)

define NDIS_RSS_SET_INDIRECTION_ENTRIES_REVISION_1     1

_NDIS_RSS_SET_INDIRECTION_ENTRIES struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
RssEntrySize            ULONG ?
RssEntryTableOffset     ULONG ?
NumberOfRssEntries      ULONG ?
_NDIS_RSS_SET_INDIRECTION_ENTRIES ends
NDIS_RSS_SET_INDIRECTION_ENTRIES typedef _NDIS_RSS_SET_INDIRECTION_ENTRIES
PNDIS_RSS_SET_INDIRECTION_ENTRIES typedef ptr _NDIS_RSS_SET_INDIRECTION_ENTRIES

define NDIS_SIZEOF_RSS_SET_INDIRECTION_ENTRIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RSS_SET_INDIRECTION_ENTRIES, NumberOfRssEntries)

endif

define NDIS_RECEIVE_HASH_FLAG_ENABLE_HASH                      0x00000001
define NDIS_RECEIVE_HASH_FLAG_HASH_INFO_UNCHANGED              0x00000002
define NDIS_RECEIVE_HASH_FLAG_HASH_KEY_UNCHANGED               0x00000004

define NDIS_RECEIVE_HASH_PARAMETERS_REVISION_1                 1

_NDIS_RECEIVE_HASH_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER <>
Flags                   ULONG ?
HashInformation         ULONG ?
HashSecretKeySize       USHORT ?
HashSecretKeyOffset     ULONG ?
_NDIS_RECEIVE_HASH_PARAMETERS ends
NDIS_RECEIVE_HASH_PARAMETERS typedef _NDIS_RECEIVE_HASH_PARAMETERS
PNDIS_RECEIVE_HASH_PARAMETERS typedef ptr _NDIS_RECEIVE_HASH_PARAMETERS

define NDIS_SIZEOF_RECEIVE_HASH_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_HASH_PARAMETERS, HashSecretKeyOffset)

.enum NDIS_PROCESSOR_VENDOR {
    NdisProcessorVendorUnknown,
    NdisProcessorVendorGenuinIntel,
    NdisProcessorVendorGenuineIntel = NdisProcessorVendorGenuinIntel,
    NdisProcessorVendorAuthenticAMD
    }

if NDIS_SUPPORT_NDIS620

_NDIS_RSS_PROCESSOR     struct
ProcNum                 PROCESSOR_NUMBER ?
PreferenceIndex         USHORT ?
Reserved                USHORT ?
_NDIS_RSS_PROCESSOR     ends
NDIS_RSS_PROCESSOR      typedef _NDIS_RSS_PROCESSOR
PNDIS_RSS_PROCESSOR     typedef ptr _NDIS_RSS_PROCESSOR

define NDIS_SIZEOF_RSS_PROCESSOR_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RSS_PROCESSOR, PreferenceIndex)

define NDIS_RSS_PROCESSOR_INFO_REVISION_1      1

if (NDIS_SUPPORT_NDIS630)
define NDIS_RSS_PROCESSOR_INFO_REVISION_2      2
.enum NDIS_RSS_PROFILE {
    NdisRssProfileClosest = 1,
    NdisRssProfileClosestStatic,
    NdisRssProfileNuma,
    NdisRssProfileNumaStatic,
    NdisRssProfileConservative,
    NdisRssProfileMaximum,
    }
endif

_NDIS_RSS_PROCESSOR_INFO struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
RssBaseProcessor        PROCESSOR_NUMBER ?
MaxNumRssProcessors     ULONG ?
PreferredNumaNode       USHORT ?
RssProcessorArrayOffset ULONG ?
RssProcessorCount       ULONG ?
RssProcessorEntrySize   ULONG ?
if (NDIS_SUPPORT_NDIS630)
RssMaxProcessor         PROCESSOR_NUMBER ?
RssProfile              NDIS_RSS_PROFILE ?
endif
_NDIS_RSS_PROCESSOR_INFO ends
NDIS_RSS_PROCESSOR_INFO typedef _NDIS_RSS_PROCESSOR_INFO
PNDIS_RSS_PROCESSOR_INFO typedef ptr _NDIS_RSS_PROCESSOR_INFO

C_ASSERT proto :__alignof

define NDIS_SIZEOF_RSS_PROCESSOR_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RSS_PROCESSOR_INFO, RssProcessorEntrySize)

if (NDIS_SUPPORT_NDIS630)
define NDIS_SIZEOF_RSS_PROCESSOR_INFO_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_RSS_PROCESSOR_INFO, RssProfile)
endif

_NDIS_PROCESSOR_INFO_EX struct
ProcNum                 PROCESSOR_NUMBER ?
SocketId                ULONG ?
CoreId                  ULONG ?
HyperThreadId           ULONG ?
NodeId                  USHORT ?
NodeDistance            USHORT ?
_NDIS_PROCESSOR_INFO_EX ends
NDIS_PROCESSOR_INFO_EX  typedef _NDIS_PROCESSOR_INFO_EX
PNDIS_PROCESSOR_INFO_EX typedef ptr _NDIS_PROCESSOR_INFO_EX

define NDIS_SYSTEM_PROCESSOR_INFO_EX_REVISION_1 1

_NDIS_SYSTEM_PROCESSOR_INFO_EX struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
ProcessorVendor         NDIS_PROCESSOR_VENDOR ?
NumSockets              ULONG ?
NumCores                ULONG ?
NumCoresPerSocket       ULONG ?
MaxHyperThreadingProcsPerCore ULONG ?
ProcessorInfoOffset     ULONG ?
NumberOfProcessors      ULONG ?
ProcessorInfoEntrySize  ULONG ?
_NDIS_SYSTEM_PROCESSOR_INFO_EX ends
NDIS_SYSTEM_PROCESSOR_INFO_EX typedef _NDIS_SYSTEM_PROCESSOR_INFO_EX
PNDIS_SYSTEM_PROCESSOR_INFO_EX typedef ptr _NDIS_SYSTEM_PROCESSOR_INFO_EX

C_ASSERT proto :__alignof

define NDIS_SIZEOF_SYSTEM_PROCESSOR_INFO_EX_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SYSTEM_PROCESSOR_INFO_EX, ProcessorInfoEntrySize)

.enum NDIS_HYPERVISOR_PARTITION_TYPE {
    NdisHypervisorPartitionTypeUnknown,
    NdisHypervisorPartitionTypeMsHvParent,
    NdisHypervisorPartitionMsHvChild,
    NdisHypervisorPartitionTypeMax
    }

define NDIS_HYPERVISOR_INFO_FLAG_HYPERVISOR_PRESENT            0x00000001

define NDIS_HYPERVISOR_INFO_REVISION_1 1

_NDIS_HYPERVISOR_INFO   struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PartitionType           NDIS_HYPERVISOR_PARTITION_TYPE ?
_NDIS_HYPERVISOR_INFO   ends
NDIS_HYPERVISOR_INFO    typedef _NDIS_HYPERVISOR_INFO
PNDIS_HYPERVISOR_INFO   typedef ptr _NDIS_HYPERVISOR_INFO

define NDIS_SIZEOF_HYPERVISOR_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_HYPERVISOR_INFO, PartitionType)

_NDIS_WMI_GROUP_AFFINITY struct
Mask                    ULONG64 ?
Group                   USHORT ?
Reserved                USHORT 3 dup(?)
_NDIS_WMI_GROUP_AFFINITY ends
NDIS_WMI_GROUP_AFFINITY typedef _NDIS_WMI_GROUP_AFFINITY
PNDIS_WMI_GROUP_AFFINITY typedef ptr _NDIS_WMI_GROUP_AFFINITY

define NDIS_WMI_RECEIVE_QUEUE_PARAMETERS_REVISION_1       1

_NDIS_WMI_RECEIVE_QUEUE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
QueueType               NDIS_RECEIVE_QUEUE_TYPE ?
QueueId                 NDIS_RECEIVE_QUEUE_ID ?
QueueGroupId            NDIS_RECEIVE_QUEUE_GROUP_ID ?
ProcessorAffinity       NDIS_WMI_GROUP_AFFINITY ?
NumSuggestedReceiveBuffers ULONG ?
MSIXTableEntry          ULONG ?
LookaheadSize           ULONG ?
VmName                  NDIS_VM_NAME ?
QueueName               NDIS_QUEUE_NAME ?
_NDIS_WMI_RECEIVE_QUEUE_PARAMETERS ends
NDIS_WMI_RECEIVE_QUEUE_PARAMETERS typedef _NDIS_WMI_RECEIVE_QUEUE_PARAMETERS
PNDIS_WMI_RECEIVE_QUEUE_PARAMETERS typedef ptr _NDIS_WMI_RECEIVE_QUEUE_PARAMETERS

define NDIS_SIZEOF_WMI_RECEIVE_QUEUE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_RECEIVE_QUEUE_PARAMETERS, QueueName)

define NDIS_WMI_RECEIVE_QUEUE_INFO_REVISION_1              1

_NDIS_WMI_RECEIVE_QUEUE_INFO struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
QueueType               NDIS_RECEIVE_QUEUE_TYPE ?
QueueId                 NDIS_RECEIVE_QUEUE_ID ?
QueueGroupId            NDIS_RECEIVE_QUEUE_GROUP_ID ?
QueueState              NDIS_RECEIVE_QUEUE_OPERATIONAL_STATE ?
ProcessorAffinity       NDIS_WMI_GROUP_AFFINITY ?
NumSuggestedReceiveBuffers ULONG ?
MSIXTableEntry          ULONG ?
LookaheadSize           ULONG ?
VmName                  NDIS_VM_NAME ?
QueueName               NDIS_QUEUE_NAME ?
_NDIS_WMI_RECEIVE_QUEUE_INFO ends
NDIS_WMI_RECEIVE_QUEUE_INFO typedef _NDIS_WMI_RECEIVE_QUEUE_INFO
PNDIS_WMI_RECEIVE_QUEUE_INFO typedef ptr _NDIS_WMI_RECEIVE_QUEUE_INFO

define NDIS_SIZEOF_WMI_RECEIVE_QUEUE_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_WMI_RECEIVE_QUEUE_INFO, QueueName)

endif

if (NDIS_SUPPORT_NDIS630)

include ndkinfo.inc

_NDIS_NDK_PERFORMANCE_COUNTERS struct
Connect                 ULONG64 ?
Accept                  ULONG64 ?
ConnectFailure          ULONG64 ?
ConnectionError         ULONG64 ?
ActiveConnection        ULONG64 ?
Reserved01              ULONG64 ?
Reserved02              ULONG64 ?
Reserved03              ULONG64 ?
Reserved04              ULONG64 ?
Reserved05              ULONG64 ?
Reserved06              ULONG64 ?
Reserved07              ULONG64 ?
Reserved08              ULONG64 ?
Reserved09              ULONG64 ?
Reserved10              ULONG64 ?
Reserved11              ULONG64 ?
Reserved12              ULONG64 ?
Reserved13              ULONG64 ?
Reserved14              ULONG64 ?
Reserved15              ULONG64 ?
Reserved16              ULONG64 ?
Reserved17              ULONG64 ?
Reserved18              ULONG64 ?
Reserved19              ULONG64 ?
Reserved20              ULONG64 ?
CQError                 ULONG64 ?
RDMAInOctets            ULONG64 ?
RDMAOutOctets           ULONG64 ?
RDMAInFrames            ULONG64 ?
RDMAOutFrames           ULONG64 ?
_NDIS_NDK_PERFORMANCE_COUNTERS ends
NDIS_NDK_PERFORMANCE_COUNTERS typedef _NDIS_NDK_PERFORMANCE_COUNTERS
PNDIS_NDK_PERFORMANCE_COUNTERS typedef ptr _NDIS_NDK_PERFORMANCE_COUNTERS

NDIS_NDK_PERFORMANCE_COUNTER_MASK macro CounterFieldName
  exitm<(1 shl (FIELD_OFFSET(NDIS_NDK_PERFORMANCE_COUNTERS, CounterFieldName) / sizeof(ULONG64)))>
  endm

define NDIS_NDK_CAPABILITIES_REVISION_1 1

_NDIS_NDK_CAPABILITIES  struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
MaxQpCount              ULONG ?
MaxCqCount              ULONG ?
MaxMrCount              ULONG ?
MaxPdCount              ULONG ?
MaxInboundReadLimit     ULONG ?
MaxOutboundReadLimit    ULONG ?
MaxMwCount              ULONG ?
MaxSrqCount             ULONG ?
MissingCounterMask      ULONG64 ?
NdkInfo                 ptr NDK_ADAPTER_INFO ?
_NDIS_NDK_CAPABILITIES  ends
NDIS_NDK_CAPABILITIES   typedef _NDIS_NDK_CAPABILITIES
PNDIS_NDK_CAPABILITIES  typedef ptr _NDIS_NDK_CAPABILITIES

define NDIS_SIZEOF_NDK_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NDK_CAPABILITIES, NdkInfo)

define OID_NDK_SET_STATE                0xFC040201
define OID_NDK_STATISTICS               0xFC040202
define OID_NDK_CONNECTIONS              0xFC040203
define OID_NDK_LOCAL_ENDPOINTS          0xFC040204

_NDK_WMI_ADAPTER_INFO   struct
Version                 NDK_VERSION ?
VendorId                UINT32 ?
DeviceId                UINT32 ?
MaxRegistrationSize     ULONGLONG ?
MaxWindowSize           ULONGLONG ?
FRMRPageCount           ULONG ?
MaxInitiatorRequestSge  ULONG ?
MaxReceiveRequestSge    ULONG ?
MaxReadRequestSge       ULONG ?
MaxTransferLength       ULONG ?
MaxInlineDataSize       ULONG ?
MaxInboundReadLimit     ULONG ?
MaxOutboundReadLimit    ULONG ?
MaxReceiveQueueDepth    ULONG ?
MaxInitiatorQueueDepth  ULONG ?
MaxSrqDepth             ULONG ?
MaxCqDepth              ULONG ?
LargeRequestThreshold   ULONG ?
MaxCallerData           ULONG ?
MaxCalleeData           ULONG ?
AdapterFlags            ULONG ?
if (NDIS_SUPPORT_NDIS650)
RdmaTechnology          NDK_RDMA_TECHNOLOGY ?
endif
_NDK_WMI_ADAPTER_INFO   ends
NDK_WMI_ADAPTER_INFO    typedef _NDK_WMI_ADAPTER_INFO
PNDK_WMI_ADAPTER_INFO   typedef ptr _NDK_WMI_ADAPTER_INFO

if (NDIS_SUPPORT_NDIS650)
define NDIS_SIZEOF_NDK_WMI_ADAPTER_INFO_REVISION_1 FIELD_OFFSET(NDK_WMI_ADAPTER_INFO, RdmaTechnology)

define NDIS_SIZEOF_NDK_WMI_ADAPTER_INFO_REVISION_2 sizeof(NDK_WMI_ADAPTER_INFO)
endif

_NDIS_WMI_NDK_CAPABILITIES struct
MaxQpCount              ULONG ?
MaxCqCount              ULONG ?
MaxMrCount              ULONG ?
MaxPdCount              ULONG ?
MaxInboundReadLimit     ULONG ?
MaxOutboundReadLimit    ULONG ?
MaxMwCount              ULONG ?
MaxSrqCount             ULONG ?
MissingCounterMask      ULONG64 ?
NdkInfo                 NDK_WMI_ADAPTER_INFO ?
_NDIS_WMI_NDK_CAPABILITIES ends
NDIS_WMI_NDK_CAPABILITIES typedef _NDIS_WMI_NDK_CAPABILITIES
PNDIS_WMI_NDK_CAPABILITIES typedef ptr _NDIS_WMI_NDK_CAPABILITIES

if (NDIS_SUPPORT_NDIS650)
define NDIS_SIZEOF_NDK_WMI_CAPABILITIES_REVISION_1 (FIELD_OFFSET(NDIS_WMI_NDK_CAPABILITIES, NdkInfo) + NDIS_SIZEOF_NDK_WMI_ADAPTER_INFO_REVISION_1)

define NDIS_SIZEOF_NDK_WMI_CAPABILITIES_REVISION_2 (FIELD_OFFSET(NDIS_WMI_NDK_CAPABILITIES, NdkInfo) + NDIS_SIZEOF_NDK_WMI_ADAPTER_INFO_REVISION_2)
endif

DEFINE_GUID(GUID_NDIS_NDK_CAPABILITIES, 0x7969ba4d, 0xdd80, 0x4bc7, 0xb3, 0xe6, 0x68, 0x04, 0x39, 0x97, 0xe5, 0x19)

DEFINE_GUID(GUID_NDIS_NDK_STATE, 0x530c69c9, 0x2f51, 0x49de, 0xa1, 0xaf, 0x08, 0x8d, 0x54, 0xff, 0xa4, 0x74)

define NDIS_NDK_STATISTICS_INFO_REVISION_1 1

_NDIS_NDK_STATISTICS_INFO struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
CounterSet              NDIS_NDK_PERFORMANCE_COUNTERS ?
_NDIS_NDK_STATISTICS_INFO ends
NDIS_NDK_STATISTICS_INFO typedef _NDIS_NDK_STATISTICS_INFO

define NDIS_SIZEOF_NDK_STATISTICS_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NDK_STATISTICS_INFO, CounterSet)

include ws2def.inc
include ws2ipdef.inc

_NDIS_NDK_CONNECTION_ENTRY struct
Local                   SOCKADDR_INET ?
Remote                  SOCKADDR_INET ?
UserModeOwner           BOOLEAN ?
OwnerPid                ULONG ?
_NDIS_NDK_CONNECTION_ENTRY ends
NDIS_NDK_CONNECTION_ENTRY typedef _NDIS_NDK_CONNECTION_ENTRY

define NDIS_NDK_CONNECTIONS_REVISION_1 1

_NDIS_NDK_CONNECTIONS   struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
Count                   ULONG ?
NDConnectionsMappedtoTCPConnections BOOLEAN ?
Connections             NDIS_NDK_CONNECTION_ENTRY 1 dup(?)
_NDIS_NDK_CONNECTIONS   ends
NDIS_NDK_CONNECTIONS    typedef _NDIS_NDK_CONNECTIONS

NDIS_SIZEOF_NDK_CONNECTIONS_REVISION_1 macro n
  exitm<FIELD_OFFSET(NDIS_NDK_CONNECTIONS, Connections[n])>
  endm

_NDIS_NDK_LOCAL_ENDPOINT_ENTRY struct
_Local                  SOCKADDR_INET ?
UserModeOwner           BOOLEAN ?
Listener                BOOLEAN ?
OwnerPid                ULONG ?
_NDIS_NDK_LOCAL_ENDPOINT_ENTRY ends
NDIS_NDK_LOCAL_ENDPOINT_ENTRY typedef _NDIS_NDK_LOCAL_ENDPOINT_ENTRY

define NDIS_NDK_LOCAL_ENDPOINTS_REVISION_1 1

_NDIS_NDK_LOCAL_ENDPOINTS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
Count                   ULONG ?
NDLocalEndpointsMappedtoTCPLocalEndpoints BOOLEAN ?
LocalEndpoints          NDIS_NDK_LOCAL_ENDPOINT_ENTRY 1 dup(?)
_NDIS_NDK_LOCAL_ENDPOINTS ends
NDIS_NDK_LOCAL_ENDPOINTS typedef _NDIS_NDK_LOCAL_ENDPOINTS

NDIS_SIZEOF_NDK_LOCAL_ENDPOINTS_REVISION_1 macro n
  exitm<FIELD_OFFSET(NDIS_NDK_LOCAL_ENDPOINTS, LocalEndpoints[n])>
  endm

define OID_QOS_HARDWARE_CAPABILITIES           0xFC050001
define OID_QOS_CURRENT_CAPABILITIES            0xFC050002
define OID_QOS_PARAMETERS                      0xFC050003
define OID_QOS_OPERATIONAL_PARAMETERS          0xFC050004
define OID_QOS_REMOTE_PARAMETERS               0xFC050005

define NDIS_QOS_MAXIMUM_PRIORITIES         8
define NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES    8

define NDIS_QOS_CAPABILITIES_STRICT_TSA_SUPPORTED      0x00000001
define NDIS_QOS_CAPABILITIES_MACSEC_BYPASS_SUPPORTED   0x00000002
define NDIS_QOS_CAPABILITIES_CEE_DCBX_SUPPORTED        0x00000004
define NDIS_QOS_CAPABILITIES_IEEE_DCBX_SUPPORTED       0x00000008

define NDIS_QOS_CAPABILITIES_REVISION_1    1

_NDIS_QOS_CAPABILITIES  struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
MaxNumTrafficClasses    ULONG ?
MaxNumEtsCapableTrafficClasses ULONG ?
MaxNumPfcEnabledTrafficClasses ULONG ?
_NDIS_QOS_CAPABILITIES  ends
NDIS_QOS_CAPABILITIES   typedef _NDIS_QOS_CAPABILITIES
PNDIS_QOS_CAPABILITIES  typedef ptr _NDIS_QOS_CAPABILITIES

define NDIS_SIZEOF_QOS_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_QOS_CAPABILITIES, MaxNumPfcEnabledTrafficClasses)

define NDIS_QOS_CLASSIFICATION_SET_BY_MINIPORT_MASK    0xFF000000
define NDIS_QOS_CLASSIFICATION_ENFORCED_BY_MINIPORT    0x01000000

define NDIS_QOS_CONDITION_RESERVED         0x0
define NDIS_QOS_CONDITION_DEFAULT          0x1
define NDIS_QOS_CONDITION_TCP_PORT         0x2
define NDIS_QOS_CONDITION_UDP_PORT         0x3
define NDIS_QOS_CONDITION_TCP_OR_UDP_PORT  0x4
define NDIS_QOS_CONDITION_ETHERTYPE        0x5
define NDIS_QOS_CONDITION_NETDIRECT_PORT   0x6
define NDIS_QOS_CONDITION_MAXIMUM          0x7

define NDIS_QOS_ACTION_PRIORITY            0x0
define NDIS_QOS_ACTION_MAXIMUM             0x1

define NDIS_QOS_CLASSIFICATION_ELEMENT_REVISION_1   1

_NDIS_QOS_CLASSIFICATION_ELEMENT struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
ConditionSelector       USHORT ?
ConditionField          USHORT ?
ActionSelector          USHORT ?
ActionField             USHORT ?
_NDIS_QOS_CLASSIFICATION_ELEMENT ends
NDIS_QOS_CLASSIFICATION_ELEMENT  typedef _NDIS_QOS_CLASSIFICATION_ELEMENT
PNDIS_QOS_CLASSIFICATION_ELEMENT typedef ptr _NDIS_QOS_CLASSIFICATION_ELEMENT

define NDIS_SIZEOF_QOS_CLASSIFICATION_ELEMENT_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_QOS_CLASSIFICATION_ELEMENT, ActionField)

define NDIS_QOS_PARAMETERS_ETS_CHANGED                 0x00000001
define NDIS_QOS_PARAMETERS_ETS_CONFIGURED              0x00000002
define NDIS_QOS_PARAMETERS_PFC_CHANGED                 0x00000100
define NDIS_QOS_PARAMETERS_PFC_CONFIGURED              0x00000200
define NDIS_QOS_PARAMETERS_CLASSIFICATION_CHANGED      0x00010000
define NDIS_QOS_PARAMETERS_CLASSIFICATION_CONFIGURED   0x00020000
define NDIS_QOS_PARAMETERS_WILLING                     0x80000000

define NDIS_QOS_TSA_STRICT                 0x0
define NDIS_QOS_TSA_CBS                    0x1
define NDIS_QOS_TSA_ETS                    0x2
define NDIS_QOS_TSA_MAXIMUM                0x3

define NDIS_QOS_PARAMETERS_REVISION_1   1

_NDIS_QOS_PARAMETERS    struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
NumTrafficClasses       ULONG ?
PriorityAssignmentTable UCHAR NDIS_QOS_MAXIMUM_PRIORITIES dup(?)
TcBandwidthAssignmentTable UCHAR NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TsaAssignmentTable      UCHAR NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
PfcEnable               ULONG ?
NumClassificationElements ULONG ?
ClassificationElementSize ULONG ?
FirstClassificationElementOffset ULONG ?
_NDIS_QOS_PARAMETERS    ends
NDIS_QOS_PARAMETERS     typedef _NDIS_QOS_PARAMETERS
PNDIS_QOS_PARAMETERS    typedef ptr _NDIS_QOS_PARAMETERS


define NDIS_SIZEOF_QOS_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_QOS_PARAMETERS, FirstClassificationElementOffset)

PNDIS_NIC_SWITCH_FRIENDLYNAME typedef ptr NDIS_NIC_SWITCH_FRIENDLYNAME
PNDIS_VPORT_NAME        typedef ptr NDIS_VPORT_NAME
PNDIS_SRIOV_FUNCTION_ID typedef ptr NDIS_SRIOV_FUNCTION_ID
PNDIS_VF_RID            typedef ptr NDIS_VF_RID

define NDIS_PF_FUNCTION_ID                 -1
define NDIS_INVALID_VF_FUNCTION_ID         -1
define NDIS_INVALID_RID                    -1
define NDIS_DEFAULT_VPORT_ID               0
define NDIS_INVALID_VPORT_ID               -1

define NDIS_DEFAULT_SWITCH_ID              0
define NDIS_INVALID_SWITCH_ID              -1

.enum NDIS_NIC_SWITCH_TYPE {
    NdisNicSwitchTypeUnspecified,
    NdisNicSwitchTypeExternal,
    NdisNicSwitchTypeMax
    }

define NDIS_NIC_SWITCH_PARAMETERS_CHANGE_MASK         0xFFFF0000
define NDIS_NIC_SWITCH_PARAMETERS_SWITCH_NAME_CHANGED 0x00010000
define NDIS_NIC_SWITCH_PARAMETERS_DEFAULT_NUMBER_OF_QUEUE_PAIRS_FOR_DEFAULT_VPORT 1
define NDIS_NIC_SWITCH_PARAMETERS_REVISION_1 1
if (NDIS_SUPPORT_NDIS660)
define NDIS_NIC_SWITCH_PARAMETERS_REVISION_2 2
endif

_NDIS_NIC_SWITCH_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SwitchType              NDIS_NIC_SWITCH_TYPE ?
SwitchId                NDIS_NIC_SWITCH_ID ?
SwitchFriendlyName      NDIS_NIC_SWITCH_FRIENDLYNAME ?
NumVFs                  ULONG ?
NdisReserved1           ULONG ?
NdisReserved2           ULONG ?
NdisReserved3           ULONG ?
if (NDIS_SUPPORT_NDIS660)
NumQueuePairsForDefaultVPort ULONG ?
endif
_NDIS_NIC_SWITCH_PARAMETERS ends
NDIS_NIC_SWITCH_PARAMETERS typedef _NDIS_NIC_SWITCH_PARAMETERS
PNDIS_NIC_SWITCH_PARAMETERS typedef ptr _NDIS_NIC_SWITCH_PARAMETERS

define NDIS_SIZEOF_NIC_SWITCH_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_PARAMETERS, NdisReserved3)

if (NDIS_SUPPORT_NDIS660)
define NDIS_SIZEOF_NIC_SWITCH_PARAMETERS_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_PARAMETERS, NumQueuePairsForDefaultVPort)
endif

define NDIS_NIC_SWITCH_DELETE_SWITCH_PARAMETERS_REVISION_1       1

_NDIS_NIC_SWITCH_DELETE_SWITCH_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SwitchId                NDIS_NIC_SWITCH_ID ?
_NDIS_NIC_SWITCH_DELETE_SWITCH_PARAMETERS ends
NDIS_NIC_SWITCH_DELETE_SWITCH_PARAMETERS typedef _NDIS_NIC_SWITCH_DELETE_SWITCH_PARAMETERS
PNDIS_NIC_SWITCH_DELETE_SWITCH_PARAMETERS  typedef ptr _NDIS_NIC_SWITCH_DELETE_SWITCH_PARAMETERS

define NDIS_SIZEOF_NIC_SWITCH_DELETE_SWITCH_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_DELETE_SWITCH_PARAMETERS, SwitchId)

define NDIS_NIC_SWITCH_INFO_REVISION_1              1

_NDIS_NIC_SWITCH_INFO   struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SwitchType              NDIS_NIC_SWITCH_TYPE ?
SwitchId                NDIS_NIC_SWITCH_ID ?
SwitchFriendlyName      NDIS_NIC_SWITCH_FRIENDLYNAME ?
NumVFs                  ULONG ?
NumAllocatedVFs         ULONG ?
NumVPorts               ULONG ?
NumActiveVPorts         ULONG ?
NumQueuePairsForDefaultVPort ULONG ?
NumQueuePairsForNonDefaultVPorts ULONG ?
NumActiveDefaultVPortMacAddresses ULONG ?
NumActiveNonDefaultVPortMacAddresses ULONG ?
NumActiveDefaultVPortVlanIds ULONG ?
NumActiveNonDefaultVPortVlanIds ULONG ?
_NDIS_NIC_SWITCH_INFO   ends
NDIS_NIC_SWITCH_INFO    typedef _NDIS_NIC_SWITCH_INFO
PNDIS_NIC_SWITCH_INFO   typedef ptr _NDIS_NIC_SWITCH_INFO

define NDIS_SIZEOF_NIC_SWITCH_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_INFO, NumActiveNonDefaultVPortVlanIds)

define NDIS_NIC_SWITCH_INFO_ARRAY_REVISION_1             1

_NDIS_NIC_SWITCH_INFO_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
FirstElementOffset      ULONG ?
NumElements             ULONG ?
ElementSize             ULONG ?
_NDIS_NIC_SWITCH_INFO_ARRAY ends
NDIS_NIC_SWITCH_INFO_ARRAY typedef _NDIS_NIC_SWITCH_INFO_ARRAY
PNDIS_NIC_SWITCH_INFO_ARRAY typedef ptr _NDIS_NIC_SWITCH_INFO_ARRAY

define NDIS_SIZEOF_NIC_SWITCH_INFO_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_INFO_ARRAY, ElementSize)

.enum NDIS_NIC_SWITCH_VPORT_STATE {
    NdisNicSwitchVPortStateUndefined,
    NdisNicSwitchVPortStateActivated,
    NdisNicSwitchVPortStateDeactivated,
    NdisNicSwitchVPortStateMaximum
    }

.enum NDIS_NIC_SWITCH_VPORT_INTERRUPT_MODERATION {
    NdisNicSwitchVPortInterruptModerationUndefined = 0,
    NdisNicSwitchVPortInterruptModerationAdaptive = 1,
    NdisNicSwitchVPortInterruptModerationOff = 2,
    NdisNicSwitchVPortInterruptModerationLow = 100,
    NdisNicSwitchVPortInterruptModerationMedium = 200,
    NdisNicSwitchVPortInterruptModerationHigh = 300,
    }

if (NDIS_SUPPORT_NDIS650)
ifndef _NDIS_SWITCH_PORT_ID
define _NDIS_SWITCH_PORT_ID NDIS_SWITCH_PORT_ID
PNDIS_SWITCH_PORT_ID    typedef ptr NDIS_SWITCH_PORT_ID
PNDIS_SWITCH_NIC_INDEX  typedef ptr NDIS_SWITCH_NIC_INDEX
else
C_ASSERT(sizeof(NDIS_SWITCH_PORT_ID) eq sizeof(UINT32))
C_ASSERT(sizeof(NDIS_SWITCH_NIC_INDEX) eq sizeof(USHORT))
endif

_NDIS_NDK_REQUEST_PARAMETERS struct
RdmaRequested           BOOLEAN ?
SwitchPortId            NDIS_SWITCH_PORT_ID ?
IfIndex                 NET_IFINDEX ?
MacAddress              UCHAR NDIS_MAX_PHYS_ADDRESS_LENGTH dup(?)
VlanId                  UINT ?
NdkReserved             NDIS_NDK_CAPABILITIES ?
_NDIS_NDK_REQUEST_PARAMETERS ends
NDIS_NDK_REQUEST_PARAMETERS typedef _NDIS_NDK_REQUEST_PARAMETERS
PNDIS_NDK_REQUEST_PARAMETERS typedef ptr _NDIS_NDK_REQUEST_PARAMETERS

_NDIS_NDK_RESPONSE_PARAMETERS struct
CapabilitiesAvailable   BOOLEAN ?
ReceivedCapabilities    NDIS_NDK_CAPABILITIES ?
_NDIS_NDK_RESPONSE_PARAMETERS ends
NDIS_NDK_RESPONSE_PARAMETERS typedef _NDIS_NDK_RESPONSE_PARAMETERS
PNDIS_NDK_RESPONSE_PARAMETERS typedef ptr _NDIS_NDK_RESPONSE_PARAMETERS

_NDIS_NDK_PARAMETERS    struct
NdkRequest              NDIS_NDK_REQUEST_PARAMETERS ?
NdkResponse             NDIS_NDK_RESPONSE_PARAMETERS ?
_NDIS_NDK_PARAMETERS    ends
NDIS_NDK_PARAMETERS     typedef _NDIS_NDK_PARAMETERS
PNDIS_NDK_PARAMETERS    typedef ptr _NDIS_NDK_PARAMETERS
endif

define NDIS_NIC_SWITCH_VPORT_PARAMS_LOOKAHEAD_SPLIT_ENABLED     0x00000001
if (NDIS_SUPPORT_NDIS650)
define NDIS_NIC_SWITCH_VPORT_PARAMS_PACKET_DIRECT_RX_ONLY       0x00000002
endif
define NDIS_NIC_SWITCH_VPORT_PARAMS_ENFORCE_MAX_SG_LIST         0x00008000
define NDIS_NIC_SWITCH_VPORT_PARAMS_CHANGE_MASK                 0xFFFF0000
define NDIS_NIC_SWITCH_VPORT_PARAMS_FLAGS_CHANGED               0x00010000
define NDIS_NIC_SWITCH_VPORT_PARAMS_NAME_CHANGED                0x00020000
define NDIS_NIC_SWITCH_VPORT_PARAMS_INT_MOD_CHANGED             0x00040000
define NDIS_NIC_SWITCH_VPORT_PARAMS_STATE_CHANGED               0x00080000
define NDIS_NIC_SWITCH_VPORT_PARAMS_PROCESSOR_AFFINITY_CHANGED  0x00100000
if (NDIS_SUPPORT_NDIS650)
define NDIS_NIC_SWITCH_VPORT_PARAMS_NDK_PARAMS_CHANGED          0x00200000
define NDIS_NIC_SWITCH_VPORT_PARAMS_QOS_SQ_ID_CHANGED           0x00400000
endif
if (NDIS_SUPPORT_NDIS660)
define NDIS_NIC_SWITCH_VPORT_PARAMS_NUM_QUEUE_PAIRS_CHANGED     0x00800000
endif

define NDIS_NIC_SWITCH_VPORT_PARAMETERS_REVISION_1       1
if (NDIS_SUPPORT_NDIS650)
define NDIS_NIC_SWITCH_VPORT_PARAMETERS_REVISION_2       2
endif

_NDIS_NIC_SWITCH_VPORT_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SwitchId                NDIS_NIC_SWITCH_ID ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
VPortName               NDIS_VPORT_NAME ?
AttachedFunctionId      NDIS_SRIOV_FUNCTION_ID ?
NumQueuePairs           ULONG ?
InterruptModeration     NDIS_NIC_SWITCH_VPORT_INTERRUPT_MODERATION ?
VPortState              NDIS_NIC_SWITCH_VPORT_STATE ?
ProcessorAffinity       GROUP_AFFINITY ?
LookaheadSize           ULONG ?
if (NDIS_SUPPORT_NDIS650)
NdkParams               NDIS_NDK_PARAMETERS ?
QosSqId                 NDIS_QOS_SQ_ID ?
endif
_NDIS_NIC_SWITCH_VPORT_PARAMETERS ends
NDIS_NIC_SWITCH_VPORT_PARAMETERS typedef _NDIS_NIC_SWITCH_VPORT_PARAMETERS
PNDIS_NIC_SWITCH_VPORT_PARAMETERS typedef ptr _NDIS_NIC_SWITCH_VPORT_PARAMETERS

define NDIS_SIZEOF_NIC_SWITCH_VPORT_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_VPORT_PARAMETERS, LookaheadSize)

if (NDIS_SUPPORT_NDIS650)
define NDIS_SIZEOF_NIC_SWITCH_VPORT_PARAMETERS_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_VPORT_PARAMETERS, QosSqId)
endif

define NDIS_NIC_SWITCH_DELETE_VPORT_PARAMETERS_REVISION_1       1

_NDIS_NIC_SWITCH_DELETE_VPORT_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
_NDIS_NIC_SWITCH_DELETE_VPORT_PARAMETERS ends
NDIS_NIC_SWITCH_DELETE_VPORT_PARAMETERS typedef _NDIS_NIC_SWITCH_DELETE_VPORT_PARAMETERS
PNDIS_NIC_SWITCH_DELETE_VPORT_PARAMETERS  typedef ptr _NDIS_NIC_SWITCH_DELETE_VPORT_PARAMETERS

define NDIS_SIZEOF_NIC_SWITCH_DELETE_VPORT_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_DELETE_VPORT_PARAMETERS, VPortId)

define NDIS_NIC_SWITCH_VPORT_INFO_LOOKAHEAD_SPLIT_ENABLED      0x00000001

if (NDIS_SUPPORT_NDIS650)
define NDIS_NIC_SWITCH_VPORT_INFO_PACKET_DIRECT_RX_ONLY        0x00000002
define NDIS_NIC_SWITCH_VPORT_INFO_GFT_ENABLED                  0x00000004
endif

define NDIS_NIC_SWITCH_VPORT_INFO_REVISION_1       1

_NDIS_NIC_SWITCH_VPORT_INFO struct
Header                  NDIS_OBJECT_HEADER ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
Flags                   ULONG ?
SwitchId                NDIS_NIC_SWITCH_ID ?
VPortName               NDIS_VPORT_NAME ?
AttachedFunctionId      NDIS_SRIOV_FUNCTION_ID ?
NumQueuePairs           ULONG ?
InterruptModeration     NDIS_NIC_SWITCH_VPORT_INTERRUPT_MODERATION ?
VPortState              NDIS_NIC_SWITCH_VPORT_STATE ?
ProcessorAffinity       GROUP_AFFINITY ?
LookaheadSize           ULONG ?
NumFilters              ULONG ?
_NDIS_NIC_SWITCH_VPORT_INFO ends
NDIS_NIC_SWITCH_VPORT_INFO typedef _NDIS_NIC_SWITCH_VPORT_INFO
PNDIS_NIC_SWITCH_VPORT_INFO typedef ptr _NDIS_NIC_SWITCH_VPORT_INFO

define NDIS_SIZEOF_NIC_SWITCH_VPORT_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_VPORT_INFO, NumFilters)

define NDIS_NIC_SWITCH_VPORT_INFO_ARRAY_ENUM_ON_SPECIFIC_FUNCTION      0x00000001
define NDIS_NIC_SWITCH_VPORT_INFO_ARRAY_ENUM_ON_SPECIFIC_SWITCH        0x00000002
define NDIS_NIC_SWITCH_VPORT_INFO_ARRAY_REVISION_1       1

_NDIS_NIC_SWITCH_VPORT_INFO_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SwitchId                NDIS_NIC_SWITCH_ID ?
AttachedFunctionId      NDIS_SRIOV_FUNCTION_ID ?
FirstElementOffset      ULONG ?
NumElements             ULONG ?
ElementSize             ULONG ?
_NDIS_NIC_SWITCH_VPORT_INFO_ARRAY ends
NDIS_NIC_SWITCH_VPORT_INFO_ARRAY typedef _NDIS_NIC_SWITCH_VPORT_INFO_ARRAY
PNDIS_NIC_SWITCH_VPORT_INFO_ARRAY typedef ptr _NDIS_NIC_SWITCH_VPORT_INFO_ARRAY

define NDIS_SIZEOF_NIC_SWITCH_VPORT_INFO_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_VPORT_INFO_ARRAY, ElementSize)

define NDIS_NIC_SWITCH_VF_PARAMETERS_REVISION_1       1

_NDIS_NIC_SWITCH_VF_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SwitchId                NDIS_NIC_SWITCH_ID ?
VMName                  NDIS_VM_NAME ?
VMFriendlyName          NDIS_VM_FRIENDLYNAME ?
NicName                 NDIS_SWITCH_NIC_NAME ?
MacAddressLength        USHORT ?
PermanentMacAddress     UCHAR NDIS_MAX_PHYS_ADDRESS_LENGTH dup(?)
CurrentMacAddress       UCHAR NDIS_MAX_PHYS_ADDRESS_LENGTH dup(?)
VFId                    NDIS_SRIOV_FUNCTION_ID ?
RequestorId             NDIS_VF_RID ?
_NDIS_NIC_SWITCH_VF_PARAMETERS ends
NDIS_NIC_SWITCH_VF_PARAMETERS typedef _NDIS_NIC_SWITCH_VF_PARAMETERS
PNDIS_NIC_SWITCH_VF_PARAMETERS typedef ptr _NDIS_NIC_SWITCH_VF_PARAMETERS

define NDIS_SIZEOF_NIC_SWITCH_VF_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_VF_PARAMETERS, RequestorId)

define NDIS_NIC_SWITCH_FREE_VF_PARAMETERS_REVISION_1       1

_NDIS_NIC_SWITCH_FREE_VF_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
VFId                    NDIS_SRIOV_FUNCTION_ID ?
_NDIS_NIC_SWITCH_FREE_VF_PARAMETERS ends
NDIS_NIC_SWITCH_FREE_VF_PARAMETERS typedef _NDIS_NIC_SWITCH_FREE_VF_PARAMETERS
PNDIS_NIC_SWITCH_FREE_VF_PARAMETERS typedef ptr _NDIS_NIC_SWITCH_FREE_VF_PARAMETERS

define NDIS_SIZEOF_NIC_SWITCH_FREE_VF_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_FREE_VF_PARAMETERS, VFId)

define NDIS_NIC_SWITCH_VF_INFO_REVISION_1       1

_NDIS_NIC_SWITCH_VF_INFO struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SwitchId                NDIS_NIC_SWITCH_ID ?
VMName                  NDIS_VM_NAME ?
VMFriendlyName          NDIS_VM_FRIENDLYNAME ?
NicName                 NDIS_SWITCH_NIC_NAME ?
MacAddressLength        USHORT ?
PermanentMacAddress     UCHAR NDIS_MAX_PHYS_ADDRESS_LENGTH dup(?)
CurrentMacAddress       UCHAR NDIS_MAX_PHYS_ADDRESS_LENGTH dup(?)
VFId                    NDIS_SRIOV_FUNCTION_ID ?
RequestorId             NDIS_VF_RID ?
_NDIS_NIC_SWITCH_VF_INFO ends
NDIS_NIC_SWITCH_VF_INFO typedef _NDIS_NIC_SWITCH_VF_INFO
PNDIS_NIC_SWITCH_VF_INFO typedef ptr _NDIS_NIC_SWITCH_VF_INFO

define NDIS_SIZEOF_NIC_SWITCH_VF_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_VF_INFO, RequestorId)

define NDIS_NIC_SWITCH_VF_INFO_ARRAY_ENUM_ON_SPECIFIC_SWITCH        0x00000001

define NDIS_NIC_SWITCH_VF_INFO_ARRAY_REVISION_1             1

_NDIS_NIC_SWITCH_VF_INFO_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SwitchId                NDIS_NIC_SWITCH_ID ?
FirstElementOffset      ULONG ?
NumElements             ULONG ?
ElementSize             ULONG ?
_NDIS_NIC_SWITCH_VF_INFO_ARRAY ends
NDIS_NIC_SWITCH_VF_INFO_ARRAY typedef _NDIS_NIC_SWITCH_VF_INFO_ARRAY
PNDIS_NIC_SWITCH_VF_INFO_ARRAY typedef ptr _NDIS_NIC_SWITCH_VF_INFO_ARRAY

define NDIS_SIZEOF_NIC_SWITCH_VF_INFO_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_NIC_SWITCH_VF_INFO_ARRAY, ElementSize)

define NDIS_SRIOV_CAPS_SRIOV_SUPPORTED         0x00000001
define NDIS_SRIOV_CAPS_PF_MINIPORT             0x00000002
define NDIS_SRIOV_CAPS_VF_MINIPORT             0x00000004

define NDIS_SRIOV_CAPABILITIES_REVISION_1             1

_NDIS_SRIOV_CAPABILITIES struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SriovCapabilities       ULONG ?
_NDIS_SRIOV_CAPABILITIES ends
NDIS_SRIOV_CAPABILITIES typedef _NDIS_SRIOV_CAPABILITIES
PNDIS_SRIOV_CAPABILITIES typedef ptr _NDIS_SRIOV_CAPABILITIES

define NDIS_SIZEOF_SRIOV_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_CAPABILITIES, SriovCapabilities)

define NDIS_SRIOV_READ_VF_CONFIG_SPACE_PARAMETERS_REVISION_1             1

_NDIS_SRIOV_READ_VF_CONFIG_SPACE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
VFId                    NDIS_SRIOV_FUNCTION_ID ?
Offset                  ULONG ?
Length                  ULONG ?
BufferOffset            ULONG ?
_NDIS_SRIOV_READ_VF_CONFIG_SPACE_PARAMETERS ends
NDIS_SRIOV_READ_VF_CONFIG_SPACE_PARAMETERS typedef _NDIS_SRIOV_READ_VF_CONFIG_SPACE_PARAMETERS
PNDIS_SRIOV_READ_VF_CONFIG_SPACE_PARAMETERS typedef ptr _NDIS_SRIOV_READ_VF_CONFIG_SPACE_PARAMETERS

define NDIS_SIZEOF_SRIOV_READ_VF_CONFIG_SPACE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_READ_VF_CONFIG_SPACE_PARAMETERS, BufferOffset)

define NDIS_SRIOV_WRITE_VF_CONFIG_SPACE_PARAMETERS_REVISION_1             1

_NDIS_SRIOV_WRITE_VF_CONFIG_SPACE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
VFId                    NDIS_SRIOV_FUNCTION_ID ?
Offset                  ULONG ?
Length                  ULONG ?
BufferOffset            ULONG ?
_NDIS_SRIOV_WRITE_VF_CONFIG_SPACE_PARAMETERS ends
NDIS_SRIOV_WRITE_VF_CONFIG_SPACE_PARAMETERS typedef _NDIS_SRIOV_WRITE_VF_CONFIG_SPACE_PARAMETERS
PNDIS_SRIOV_WRITE_VF_CONFIG_SPACE_PARAMETERS typedef ptr _NDIS_SRIOV_WRITE_VF_CONFIG_SPACE_PARAMETERS

define NDIS_SIZEOF_SRIOV_WRITE_VF_CONFIG_SPACE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_WRITE_VF_CONFIG_SPACE_PARAMETERS, BufferOffset)

define NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS_REVISION_1             1

_NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
VFId                    NDIS_SRIOV_FUNCTION_ID ?
BlockId                 ULONG ?
Length                  ULONG ?
BufferOffset            ULONG ?
_NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS ends
NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS typedef _NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS
PNDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS typedef ptr _NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS

define NDIS_SIZEOF_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS, BufferOffset)

define NDIS_SRIOV_WRITE_VF_CONFIG_BLOCK_PARAMETERS_REVISION_1             1

_NDIS_SRIOV_WRITE_VF_CONFIG_BLOCK_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
VFId                    NDIS_SRIOV_FUNCTION_ID ?
BlockId                 ULONG ?
Length                  ULONG ?
BufferOffset            ULONG ?
_NDIS_SRIOV_WRITE_VF_CONFIG_BLOCK_PARAMETERS ends
NDIS_SRIOV_WRITE_VF_CONFIG_BLOCK_PARAMETERS typedef _NDIS_SRIOV_WRITE_VF_CONFIG_BLOCK_PARAMETERS
PNDIS_SRIOV_WRITE_VF_CONFIG_BLOCK_PARAMETERS typedef ptr _NDIS_SRIOV_WRITE_VF_CONFIG_BLOCK_PARAMETERS

define NDIS_SIZEOF_SRIOV_WRITE_VF_CONFIG_BLOCK_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_WRITE_VF_CONFIG_BLOCK_PARAMETERS, BufferOffset)

define NDIS_SRIOV_RESET_VF_PARAMETERS_REVISION_1             1

_NDIS_SRIOV_RESET_VF_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
VFId                    NDIS_SRIOV_FUNCTION_ID ?
_NDIS_SRIOV_RESET_VF_PARAMETERS ends
NDIS_SRIOV_RESET_VF_PARAMETERS typedef _NDIS_SRIOV_RESET_VF_PARAMETERS
PNDIS_SRIOV_RESET_VF_PARAMETERS typedef ptr _NDIS_SRIOV_RESET_VF_PARAMETERS

define NDIS_SIZEOF_SRIOV_RESET_VF_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_RESET_VF_PARAMETERS, VFId)

define NDIS_SRIOV_SET_VF_POWER_STATE_PARAMETERS_REVISION_1             1

_NDIS_SRIOV_SET_VF_POWER_STATE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
VFId                    NDIS_SRIOV_FUNCTION_ID ?
PowerState              NDIS_DEVICE_POWER_STATE ?
WakeEnable              BOOLEAN ?
_NDIS_SRIOV_SET_VF_POWER_STATE_PARAMETERS ends
NDIS_SRIOV_SET_VF_POWER_STATE_PARAMETERS typedef _NDIS_SRIOV_SET_VF_POWER_STATE_PARAMETERS
PNDIS_SRIOV_SET_VF_POWER_STATE_PARAMETERS typedef ptr _NDIS_SRIOV_SET_VF_POWER_STATE_PARAMETERS

define NDIS_SIZEOF_SRIOV_SET_VF_POWER_STATE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_SET_VF_POWER_STATE_PARAMETERS, WakeEnable)

define NDIS_SRIOV_CONFIG_STATE_PARAMETERS_REVISION_1             1

_NDIS_SRIOV_CONFIG_STATE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
BlockId                 ULONG ?
Length                  ULONG ?
_NDIS_SRIOV_CONFIG_STATE_PARAMETERS ends
NDIS_SRIOV_CONFIG_STATE_PARAMETERS typedef _NDIS_SRIOV_CONFIG_STATE_PARAMETERS
PNDIS_SRIOV_CONFIG_STATE_PARAMETERS typedef ptr _NDIS_SRIOV_CONFIG_STATE_PARAMETERS

define NDIS_SIZEOF_SRIOV_CONFIG_STATE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_CONFIG_STATE_PARAMETERS, Length)

define NDIS_SRIOV_VF_VENDOR_DEVICE_ID_INFO_REVISION_1             1

_NDIS_SRIOV_VF_VENDOR_DEVICE_ID_INFO struct
Header                  NDIS_OBJECT_HEADER ?
VFId                    NDIS_SRIOV_FUNCTION_ID ?
VendorId                USHORT ?
DeviceId                USHORT ?
_NDIS_SRIOV_VF_VENDOR_DEVICE_ID_INFO ends
NDIS_SRIOV_VF_VENDOR_DEVICE_ID_INFO typedef _NDIS_SRIOV_VF_VENDOR_DEVICE_ID_INFO
PNDIS_SRIOV_VF_VENDOR_DEVICE_ID_INFO typedef ptr _NDIS_SRIOV_VF_VENDOR_DEVICE_ID_INFO

define NDIS_SIZEOF_SRIOV_VF_VENDOR_DEVICE_ID_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_VF_VENDOR_DEVICE_ID_INFO, DeviceId)

define NDIS_SRIOV_PROBED_BARS_INFO_REVISION_1             1

_NDIS_SRIOV_PROBED_BARS_INFO struct
Header                  NDIS_OBJECT_HEADER ?
BaseRegisterValuesOffset ULONG ?
_NDIS_SRIOV_PROBED_BARS_INFO ends
NDIS_SRIOV_PROBED_BARS_INFO typedef _NDIS_SRIOV_PROBED_BARS_INFO
PNDIS_SRIOV_PROBED_BARS_INFO typedef ptr _NDIS_SRIOV_PROBED_BARS_INFO

define NDIS_SIZEOF_SRIOV_PROBED_BARS_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_PROBED_BARS_INFO, BaseRegisterValuesOffset)

define NDIS_RECEIVE_FILTER_MOVE_FILTER_PARAMETERS_REVISION_1             1

_NDIS_RECEIVE_FILTER_MOVE_FILTER_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
FilterId                NDIS_RECEIVE_FILTER_ID ?
SourceQueueId           NDIS_RECEIVE_QUEUE_ID ?
SourceVPortId           NDIS_NIC_SWITCH_VPORT_ID ?
DestQueueId             NDIS_RECEIVE_QUEUE_ID ?
DestVPortId             NDIS_NIC_SWITCH_VPORT_ID ?
_NDIS_RECEIVE_FILTER_MOVE_FILTER_PARAMETERS ends
NDIS_RECEIVE_FILTER_MOVE_FILTER_PARAMETERS typedef _NDIS_RECEIVE_FILTER_MOVE_FILTER_PARAMETERS
PNDIS_RECEIVE_FILTER_MOVE_FILTER_PARAMETERS typedef ptr _NDIS_RECEIVE_FILTER_MOVE_FILTER_PARAMETERS

define NDIS_SIZEOF_RECEIVE_FILTER_MOVE_FILTER_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_RECEIVE_FILTER_MOVE_FILTER_PARAMETERS, DestVPortId)

define NDIS_SRIOV_BAR_RESOURCES_INFO_REVISION_1             1

_NDIS_SRIOV_BAR_RESOURCES_INFO struct
Header                  NDIS_OBJECT_HEADER ?
VFId                    NDIS_SRIOV_FUNCTION_ID ?
BarIndex                USHORT ?
BarResourcesOffset      ULONG ?
_NDIS_SRIOV_BAR_RESOURCES_INFO ends
NDIS_SRIOV_BAR_RESOURCES_INFO typedef _NDIS_SRIOV_BAR_RESOURCES_INFO
PNDIS_SRIOV_BAR_RESOURCES_INFO typedef ptr _NDIS_SRIOV_BAR_RESOURCES_INFO

define NDIS_SIZEOF_SRIOV_BAR_RESOURCES_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_BAR_RESOURCES_INFO, BarResourcesOffset)

define NDIS_SRIOV_PF_LUID_INFO_REVISION_1             1

_NDIS_SRIOV_PF_LUID_INFO struct
Header                  NDIS_OBJECT_HEADER ?
Luid                    LUID <>
_NDIS_SRIOV_PF_LUID_INFO ends
NDIS_SRIOV_PF_LUID_INFO typedef _NDIS_SRIOV_PF_LUID_INFO
PNDIS_SRIOV_PF_LUID_INFO typedef ptr _NDIS_SRIOV_PF_LUID_INFO

define NDIS_SIZEOF_SRIOV_PF_LUID_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_PF_LUID_INFO, Luid)

define NDIS_SRIOV_VF_SERIAL_NUMBER_INFO_REVISION_1             1

_NDIS_SRIOV_VF_SERIAL_NUMBER_INFO struct
Header                  NDIS_OBJECT_HEADER ?
SerialNumber            ULONG ?
_NDIS_SRIOV_VF_SERIAL_NUMBER_INFO ends
NDIS_SRIOV_VF_SERIAL_NUMBER_INFO typedef _NDIS_SRIOV_VF_SERIAL_NUMBER_INFO
PNDIS_SRIOV_VF_SERIAL_NUMBER_INFO typedef ptr _NDIS_SRIOV_VF_SERIAL_NUMBER_INFO

define NDIS_SIZEOF_SRIOV_VF_SERIAL_NUMBER_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_VF_SERIAL_NUMBER_INFO, SerialNumber)

define NDIS_SRIOV_VF_INVALIDATE_CONFIG_BLOCK_INFO_REVISION_1   1

_NDIS_SRIOV_VF_INVALIDATE_CONFIG_BLOCK_INFO struct
Header                  NDIS_OBJECT_HEADER ?
BlockMask               ULONG64 ?
_NDIS_SRIOV_VF_INVALIDATE_CONFIG_BLOCK_INFO ends
NDIS_SRIOV_VF_INVALIDATE_CONFIG_BLOCK_INFO typedef _NDIS_SRIOV_VF_INVALIDATE_CONFIG_BLOCK_INFO
PNDIS_SRIOV_VF_INVALIDATE_CONFIG_BLOCK_INFO typedef ptr _NDIS_SRIOV_VF_INVALIDATE_CONFIG_BLOCK_INFO

define NDIS_SIZEOF_SRIOV_VF_INVALIDATE_CONFIG_BLOCK_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_VF_INVALIDATE_CONFIG_BLOCK_INFO, BlockMask)

if (NDIS_SUPPORT_NDIS670)

_NDIS_SRIOV_OVERLYING_ADAPTER_INFO struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
IfIndex                 ULONG ?
NdisReserved1           ULONG ?
NdisReserved2           ULONG ?
_NDIS_SRIOV_OVERLYING_ADAPTER_INFO ends
NDIS_SRIOV_OVERLYING_ADAPTER_INFO typedef _NDIS_SRIOV_OVERLYING_ADAPTER_INFO
PNDIS_SRIOV_OVERLYING_ADAPTER_INFO typedef ptr _NDIS_SRIOV_OVERLYING_ADAPTER_INFO

define NDIS_SRIOV_OVERLYING_ADAPTER_INFO_VERSION_1 1

define NDIS_SIZEOF_SRIOV_OVERLYING_ADAPTER_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SRIOV_OVERLYING_ADAPTER_INFO, NdisReserved2)

endif

if (NTDDI_VERSION ge NTDDI_WINBLUE) or (NDIS_SUPPORT_NDIS640)

.enum NDIS_ISOLATION_MODE {
    NdisIsolationModeNone = 0,
    NdisIsolationModeNativeVirtualSubnet = 1,
    NdisIsolationModeExternalVirtualSubnet = 2,
    NdisIsolationModeVlan = 3,
    }

PNDIS_ROUTING_DOMAIN_ID typedef ptr NDIS_ROUTING_DOMAIN_ID

define NDIS_ISOLATION_NAME_MAX_STRING_SIZE 127
_NDIS_ISOLATION_NAME    struct
Length                  USHORT ?
String                  WCHAR NDIS_ISOLATION_NAME_MAX_STRING_SIZE + 1 dup(?)
_NDIS_ISOLATION_NAME    ends
NDIS_ISOLATION_NAME     typedef _NDIS_ISOLATION_NAME

PNDIS_ISOLATION_ID_NAME typedef ptr NDIS_ISOLATION_ID_NAME
PNDIS_ROUTING_DOMAIN_NAME typedef ptr NDIS_ROUTING_DOMAIN_NAME

_NDIS_ROUTING_DOMAIN_ISOLATION_ENTRY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
IsolationIdName         NDIS_ISOLATION_ID_NAME ?
union
 record
  VirtualSubnetId       UINT32 : 24 ?
 ends
 record
  VlanId                UINT32 : 12 ?
 ends
 IsolationId            UINT32 ?
ends
_NDIS_ROUTING_DOMAIN_ISOLATION_ENTRY ends
NDIS_ROUTING_DOMAIN_ISOLATION_ENTRY typedef _NDIS_ROUTING_DOMAIN_ISOLATION_ENTRY
PNDIS_ROUTING_DOMAIN_ISOLATION_ENTRY typedef ptr _NDIS_ROUTING_DOMAIN_ISOLATION_ENTRY

define NDIS_ROUTING_DOMAIN_ISOLATION_ENTRY_REVISION_1      1

define NDIS_SIZEOF_NDIS_ROUTING_DOMAIN_ISOLATION_ENTRY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_ROUTING_DOMAIN_ISOLATION_ENTRY,  IsolationId)

NDIS_ROUTING_DOMAIN_ISOLATION_ENTRY_GET_NEXT macro _IsolationInfoEntry_
  exitm<(((PUCHAR)(_IsolationInfoEntry_) + (_IsolationInfoEntry_).Header.Size))>
  endm

_NDIS_ROUTING_DOMAIN_ENTRY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
RoutingDomainId         NDIS_ROUTING_DOMAIN_ID ?
RoutingDomainName       NDIS_ROUTING_DOMAIN_NAME ?
NumIsolationEntries     ULONG ?
FirstIsolationEntryOffset ULONG ?
_NDIS_ROUTING_DOMAIN_ENTRY ends
NDIS_ROUTING_DOMAIN_ENTRY typedef _NDIS_ROUTING_DOMAIN_ENTRY
PNDIS_ROUTING_DOMAIN_ENTRY typedef ptr _NDIS_ROUTING_DOMAIN_ENTRY

define NDIS_ROUTING_DOMAIN_ENTRY_REVISION_1      1

define NDIS_SIZEOF_NDIS_ROUTING_DOMAIN_ENTRY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_ROUTING_DOMAIN_ENTRY,  FirstIsolationEntryOffset)

NDIS_ROUTING_DOMAIN_ENTRY_GET_NEXT macro _RoutingDomainEntry_
  exitm<(((PUCHAR)(_RoutingDomainEntry_) + (_RoutingDomainEntry_).Header.Size))>
  endm

NDIS_ROUTING_DOMAIN_ENTRY_GET_FIRST_ISOLATION_ENTRY macro _RoutingDomainEntry_
  exitm<(((PUCHAR)(_RoutingDomainEntry_) + (_RoutingDomainEntry_).FirstIsolationEntryOffset))>
  endm

_NDIS_ISOLATION_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
IsolationMode           NDIS_ISOLATION_MODE ?
AllowUntaggedTraffic    BOOLEAN ?
NumRoutingDomainEntries ULONG ?
FirstRoutingDomainEntryOffset ULONG ?
_NDIS_ISOLATION_PARAMETERS ends
NDIS_ISOLATION_PARAMETERS typedef _NDIS_ISOLATION_PARAMETERS
PNDIS_ISOLATION_PARAMETERS typedef ptr _NDIS_ISOLATION_PARAMETERS

define NDIS_ISOLATION_PARAMETERS_REVISION_1      1

define NDIS_SIZEOF_NDIS_ISOLATION_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_ISOLATION_PARAMETERS,  FirstRoutingDomainEntryOffset)

NDIS_ISOLATION_PARAMETERS_GET_FIRST_ROUTING_DOMAIN_ENTRY macro _MultiTenancyInfo_
  exitm<(((PUCHAR)(_MultiTenancyInfo_) + (_MultiTenancyInfo_).FirstRoutingDomainEntryOffset))>
  endm

endif

ifndef _NDIS_SWITCH_PORT_ID
define _NDIS_SWITCH_PORT_ID NDIS_SWITCH_PORT_ID
PNDIS_SWITCH_PORT_ID    typedef ptr NDIS_SWITCH_PORT_ID
PNDIS_SWITCH_NIC_INDEX  typedef ptr NDIS_SWITCH_NIC_INDEX
else
C_ASSERT(sizeof(NDIS_SWITCH_PORT_ID) eq sizeof(UINT32))
C_ASSERT(sizeof(NDIS_SWITCH_NIC_INDEX) eq sizeof(USHORT))
endif

PNDIS_SWITCH_OBJECT_INSTANCE_ID typedef ptr NDIS_SWITCH_OBJECT_INSTANCE_ID
PNDIS_SWITCH_OBJECT_ID  typedef ptr NDIS_SWITCH_OBJECT_ID
PNDIS_SWITCH_OBJECT_VERSION typedef ptr NDIS_SWITCH_OBJECT_VERSION
PNDIS_SWITCH_OBJECT_SERIALIZATION_VERSION typedef ptr NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION

define NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION_1       1

.enum NDIS_SWITCH_PORT_PROPERTY_TYPE {
    NdisSwitchPortPropertyTypeUndefined,
    NdisSwitchPortPropertyTypeCustom,
    NdisSwitchPortPropertyTypeSecurity,
    NdisSwitchPortPropertyTypeVlan,
    NdisSwitchPortPropertyTypeProfile,
    NdisSwitchPortPropertyTypeIsolation,
    NdisSwitchPortPropertyTypeRoutingDomain,
    NdisSwitchPortPropertyTypeMaximum
    }

define NDIS_SWITCH_PORT_PROPERTY_SECURITY_REVISION_1       1

if (NDIS_SUPPORT_NDIS640)
define NDIS_SWITCH_PORT_PROPERTY_SECURITY_REVISION_2       2
endif

_NDIS_SWITCH_PORT_PROPERTY_SECURITY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
AllowMacSpoofing        BOOLEAN ?
AllowIeeePriorityTag    BOOLEAN ?
VirtualSubnetId         UINT32 ?
AllowTeaming            BOOLEAN ?
if (NDIS_SUPPORT_NDIS640)
DynamicIPAddressLimit   UINT32 ?
endif
_NDIS_SWITCH_PORT_PROPERTY_SECURITY ends
NDIS_SWITCH_PORT_PROPERTY_SECURITY typedef _NDIS_SWITCH_PORT_PROPERTY_SECURITY
PNDIS_SWITCH_PORT_PROPERTY_SECURITY typedef ptr _NDIS_SWITCH_PORT_PROPERTY_SECURITY

define NDIS_SIZEOF_NDIS_SWITCH_PORT_PROPERTY_SECURITY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PROPERTY_SECURITY, AllowTeaming)

if (NDIS_SUPPORT_NDIS640)
define NDIS_SIZEOF_NDIS_SWITCH_PORT_PROPERTY_SECURITY_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PROPERTY_SECURITY, DynamicIPAddressLimit)
endif

.enum NDIS_SWITCH_PORT_VLAN_MODE {
    NdisSwitchPortVlanModeUnknown      = 0,
    NdisSwitchPortVlanModeAccess       = 1,
    NdisSwitchPortVlanModeTrunk        = 2,
    NdisSwitchPortVlanModePrivate      = 3,
    NdisSwitchPortVlanModeMax          = 4
    }

.enum NDIS_SWITCH_PORT_PVLAN_MODE {
    NdisSwitchPortPvlanModeUndefined = 0,
    NdisSwitchPortPvlanModeIsolated,
    NdisSwitchPortPvlanModeCommunity,
    NdisSwitchPortPvlanModePromiscuous
    }

define NDIS_SWITCH_PORT_PROPERTY_VLAN_REVISION_1       1

_NDIS_SWITCH_PORT_PROPERTY_VLAN struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
OperationMode           NDIS_SWITCH_PORT_VLAN_MODE ?
union
 struct VlanProperties
  AccessVlanId          UINT16 ?
  NativeVlanId          UINT16 ?
  PruneVlanIdArray      UINT64 64 dup(?)
  TrunkVlanIdArray      UINT64 64 dup(?)
 ends
 struct PvlanProperties
  PvlanMode             NDIS_SWITCH_PORT_PVLAN_MODE ?
  PrimaryVlanId         UINT16 ?
  union
   SecondaryVlanId      UINT16 ?
   SecondaryVlanIdArray UINT64 64 dup(?)
  ends
 ends
ends
_NDIS_SWITCH_PORT_PROPERTY_VLAN ends
NDIS_SWITCH_PORT_PROPERTY_VLAN typedef _NDIS_SWITCH_PORT_PROPERTY_VLAN
PNDIS_SWITCH_PORT_PROPERTY_VLAN typedef ptr _NDIS_SWITCH_PORT_PROPERTY_VLAN

define NDIS_SIZEOF_NDIS_SWITCH_PORT_PROPERTY_VLAN_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PROPERTY_VLAN, VlanProperties)

define NDIS_SWITCH_PORT_PROPERTY_PROFILE_REVISION_1       1

_NDIS_SWITCH_PORT_PROPERTY_PROFILE struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
ProfileName             NDIS_SWITCH_PORT_PROPERTY_PROFILE_NAME ?
ProfileId               GUID <>
VendorName              NDIS_VENDOR_NAME ?
VendorId                GUID <>
ProfileData             UINT32 ?
NetCfgInstanceId        GUID <>
struct PciLocation
 record
  PciSegmentNumber      UINT32 : 16 ?
  PciBusNumber          UINT32 :  8 ?
  PciDeviceNumber       UINT32 :  5 ?
  PciFunctionNumber     UINT32 :  3 ?
 ends
ends
CdnLabelId              UINT32 ?
CdnLabel                NDIS_SWITCH_PORT_PROPERTY_PROFILE_CDN_LABEL ?
_NDIS_SWITCH_PORT_PROPERTY_PROFILE ends
NDIS_SWITCH_PORT_PROPERTY_PROFILE typedef _NDIS_SWITCH_PORT_PROPERTY_PROFILE
PNDIS_SWITCH_PORT_PROPERTY_PROFILE typedef ptr _NDIS_SWITCH_PORT_PROPERTY_PROFILE

define NDIS_SIZEOF_NDIS_SWITCH_PORT_PROPERTY_PROFILE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PROPERTY_PROFILE, CdnLabel)

if (NTDDI_VERSION ge NTDDI_WINBLUE) or (NDIS_SUPPORT_NDIS640)

define NDIS_SWITCH_PORT_PROPERTY_ISOLATION_REVISION_1       1

_NDIS_SWITCH_PORT_PROPERTY_ISOLATION struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
IsolationMode           NDIS_ISOLATION_MODE ?
AllowUntaggedTraffic    BOOLEAN ?
DefaultIsolationId      UINT32 ?
_NDIS_SWITCH_PORT_PROPERTY_ISOLATION ends
NDIS_SWITCH_PORT_PROPERTY_ISOLATION typedef _NDIS_SWITCH_PORT_PROPERTY_ISOLATION
PNDIS_SWITCH_PORT_PROPERTY_ISOLATION typedef ptr _NDIS_SWITCH_PORT_PROPERTY_ISOLATION

define NDIS_SIZEOF_NDIS_SWITCH_PORT_PROPERTY_ISOLATION_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PROPERTY_ISOLATION, DefaultIsolationId)

define NDIS_SWITCH_PORT_PROPERTY_ROUTING_DOMAIN_REVISION_1       1

_NDIS_SWITCH_PORT_PROPERTY_ROUTING_DOMAIN struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
RoutingDomainId         NDIS_ROUTING_DOMAIN_ID ?
RoutingDomainName       NDIS_ROUTING_DOMAIN_NAME ?
NumIsolationEntries     ULONG ?
FirstIsolationEntryOffset USHORT ?
_NDIS_SWITCH_PORT_PROPERTY_ROUTING_DOMAIN ends
NDIS_SWITCH_PORT_PROPERTY_ROUTING_DOMAIN typedef _NDIS_SWITCH_PORT_PROPERTY_ROUTING_DOMAIN
PNDIS_SWITCH_PORT_PROPERTY_ROUTING_DOMAIN typedef ptr _NDIS_SWITCH_PORT_PROPERTY_ROUTING_DOMAIN

define NDIS_SIZEOF_NDIS_SWITCH_PORT_PROPERTY_ROUTING_DOMAIN_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PROPERTY_ROUTING_DOMAIN, FirstIsolationEntryOffset)

NDIS_SWITCH_PORT_PROPERTY_ROUTING_DOMAIN_GET_FIRST_ISOLATION_ENTRY macro _RoutingDomainProperty_
  exitm<(((PUCHAR)(_RoutingDomainProperty_) + (_RoutingDomainProperty_).FirstIsolationEntryOffset))>
  endm

endif

define NDIS_SWITCH_PORT_PROPERTY_CUSTOM_REVISION_1       1

_NDIS_SWITCH_PORT_PROPERTY_CUSTOM struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PropertyBufferLength    ULONG ?
PropertyBufferOffset    ULONG ?
_NDIS_SWITCH_PORT_PROPERTY_CUSTOM ends
NDIS_SWITCH_PORT_PROPERTY_CUSTOM typedef _NDIS_SWITCH_PORT_PROPERTY_CUSTOM
PNDIS_SWITCH_PORT_PROPERTY_CUSTOM typedef ptr _NDIS_SWITCH_PORT_PROPERTY_CUSTOM

define NDIS_SIZEOF_NDIS_SWITCH_PORT_PROPERTY_CUSTOM_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PROPERTY_CUSTOM, PropertyBufferOffset)

NDIS_SWITCH_PORT_PROPERTY_CUSTOM_GET_BUFFER macro _PortPropertyCustom_
  exitm<(((PUCHAR)(_PortPropertyCustom_) + (_PortPropertyCustom_).PropertyBufferOffset))>
  endm

C_ASSERT((sizeof(NDIS_SWITCH_PORT_PROPERTY_CUSTOM) mod sizeof(UINT64)) eq 0)

define NDIS_SWITCH_PORT_PROPERTY_PARAMETERS_REVISION_1     1

_NDIS_SWITCH_PORT_PROPERTY_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PortId                  NDIS_SWITCH_PORT_ID ?
PropertyType            NDIS_SWITCH_PORT_PROPERTY_TYPE ?
PropertyId              NDIS_SWITCH_OBJECT_ID ?
PropertyVersion         NDIS_SWITCH_OBJECT_VERSION ?
SerializationVersion    NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION ?
PropertyInstanceId      NDIS_SWITCH_OBJECT_INSTANCE_ID ?
PropertyBufferLength    ULONG ?
PropertyBufferOffset    ULONG ?
Reserved                ULONG ?
_NDIS_SWITCH_PORT_PROPERTY_PARAMETERS ends
NDIS_SWITCH_PORT_PROPERTY_PARAMETERS typedef _NDIS_SWITCH_PORT_PROPERTY_PARAMETERS
PNDIS_SWITCH_PORT_PROPERTY_PARAMETERS typedef ptr _NDIS_SWITCH_PORT_PROPERTY_PARAMETERS

define NDIS_SIZEOF_NDIS_SWITCH_PORT_PROPERTY_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PROPERTY_PARAMETERS, Reserved)

NDIS_SWITCH_PORT_PROPERTY_PARAMETERS_GET_PROPERTY macro _PortParameters_
  exitm<(((PUCHAR)(_PortParameters_) + (_PortParameters_).PropertyBufferOffset))>
  endm

NDIS_SWITCH_CREATE_PROPERTY_VERSION macro _VersionMajor_,_VersionMinor_
  exitm<(((_VersionMajor_) shl 8) + (_VersionMinor_))>
  endm

C_ASSERT((sizeof(NDIS_SWITCH_PORT_PROPERTY_PARAMETERS) mod sizeof(UINT64)) eq 0)

define NDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS_REVISION_1  1

_NDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PortId                  NDIS_SWITCH_PORT_ID ?
PropertyType            NDIS_SWITCH_PORT_PROPERTY_TYPE ?
PropertyId              NDIS_SWITCH_OBJECT_ID ?
PropertyInstanceId      NDIS_SWITCH_OBJECT_INSTANCE_ID ?
_NDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS ends
NDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS typedef _NDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS
PNDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS typedef ptr _NDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS

define NDIS_SIZEOF_NDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS, PropertyInstanceId)

define NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS_REVISION_1    1

_NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PortId                  NDIS_SWITCH_PORT_ID ?
PropertyType            NDIS_SWITCH_PORT_PROPERTY_TYPE ?
PropertyId              NDIS_SWITCH_OBJECT_ID ?
SerializationVersion    NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION ?
FirstPropertyOffset     ULONG ?
NumProperties           ULONG ?
Reserved                USHORT ?
_NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS ends
NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS typedef _NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS
PNDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS typedef ptr _NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS

define NDIS_SIZEOF_NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS, Reserved)

NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS_GET_FIRST_INFO macro _PortEnumParams_
  exitm<(((PUCHAR)(_PortEnumParams_) + (_PortEnumParams_).FirstPropertyOffset))>
  endm

C_ASSERT((sizeof(NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS) mod sizeof(UINT64)) eq 0)

define NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO_REVISION_1  1

_NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PropertyVersion         NDIS_SWITCH_OBJECT_VERSION ?
PropertyInstanceId      NDIS_SWITCH_OBJECT_INSTANCE_ID ?
QwordAlignedPropertyBufferLength ULONG ?
PropertyBufferLength    ULONG ?
PropertyBufferOffset    ULONG ?
_NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO ends
NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO typedef _NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO
PNDIS_SWITCH_PORT_PROPERTY_ENUM_INFO typedef ptr _NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO

define NDIS_SIZEOF_NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO, PropertyBufferOffset)

NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO_GET_NEXT macro _PortEnumInfo_
  exitm<((PNDIS_SWITCH_PORT_PROPERTY_ENUM_INFO)((_PortEnumInfo_) + (_PortEnumInfo_).QwordAlignedPropertyBufferLength + sizeof(NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO)))>
  endm

NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO_GET_PROPERTY macro _PortEnumInfo_
  exitm<(((PUCHAR)(_PortEnumInfo_) + (_PortEnumInfo_).PropertyBufferOffset))>
  endm

C_ASSERT((sizeof(NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO) mod sizeof(UINT64)) eq 0)


.enum NDIS_SWITCH_PORT_FEATURE_STATUS_TYPE {
    NdisSwitchPortFeatureStatusTypeUndefined,
    NdisSwitchPortFeatureStatusTypeCustom,
    NdisSwitchPortFeatureStatusTypeMaximum
    }

define NDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS_REVISION_1     1

_NDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PortId                  NDIS_SWITCH_PORT_ID ?
FeatureStatusType       NDIS_SWITCH_PORT_FEATURE_STATUS_TYPE ?
FeatureStatusId         NDIS_SWITCH_OBJECT_ID ?
FeatureStatusVersion    NDIS_SWITCH_OBJECT_VERSION ?
SerializationVersion    NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION ?
FeatureStatusInstanceId NDIS_SWITCH_OBJECT_INSTANCE_ID ?
FeatureStatusBufferLength ULONG ?
FeatureStatusBufferOffset ULONG ?
Reserved                ULONG ?
_NDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS ends
NDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS typedef _NDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS
PNDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS typedef ptr _NDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS

define NDIS_SIZEOF_NDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS, Reserved)

C_ASSERT((sizeof(NDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS) mod sizeof(UINT64)) eq 0)

NDIS_SWITCH_CREATE_FEATURE_STATUS_VERSION macro _VersionMajor_,_VersionMinor_
  exitm<(((_VersionMajor_) shl 8) + (_VersionMinor_))>
  endm

define NDIS_SWITCH_PORT_FEATURE_STATUS_CUSTOM_REVISION_1       1

_NDIS_SWITCH_PORT_FEATURE_STATUS_CUSTOM struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
FeatureStatusBufferLength ULONG ?
FeatureStatusBufferOffset ULONG ?
_NDIS_SWITCH_PORT_FEATURE_STATUS_CUSTOM ends
NDIS_SWITCH_PORT_FEATURE_STATUS_CUSTOM typedef _NDIS_SWITCH_PORT_FEATURE_STATUS_CUSTOM
PNDIS_SWITCH_PORT_FEATURE_STATUS_CUSTOM typedef ptr _NDIS_SWITCH_PORT_FEATURE_STATUS_CUSTOM

define NDIS_SIZEOF_NDIS_SWITCH_PORT_FEATURE_STATUS_CUSTOM_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_FEATURE_STATUS_CUSTOM, FeatureStatusBufferOffset)

.enum NDIS_SWITCH_PROPERTY_TYPE {
    NdisSwitchPropertyTypeUndefined,
    NdisSwitchPropertyTypeCustom,
    NdisSwitchPropertyTypeMaximum
    }

define NDIS_SWITCH_PROPERTY_CUSTOM_REVISION_1       1

_NDIS_SWITCH_PROPERTY_CUSTOM struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PropertyBufferLength    ULONG ?
PropertyBufferOffset    ULONG ?
_NDIS_SWITCH_PROPERTY_CUSTOM ends
NDIS_SWITCH_PROPERTY_CUSTOM typedef _NDIS_SWITCH_PROPERTY_CUSTOM
PNDIS_SWITCH_PROPERTY_CUSTOM typedef ptr _NDIS_SWITCH_PROPERTY_CUSTOM

define NDIS_SIZEOF_NDIS_SWITCH_PROPERTY_CUSTOM_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PROPERTY_CUSTOM, PropertyBufferOffset)

NDIS_SWITCH_PROPERTY_CUSTOM_GET_BUFFER macro _SwitchPropertyCustom_
  exitm<(((PUCHAR)(_SwitchPropertyCustom_) + (_SwitchPropertyCustom_).PropertyBufferOffset))>
  endm

define NDIS_SWITCH_PROPERTY_PARAMETERS_REVISION_1  1

_NDIS_SWITCH_PROPERTY_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PropertyType            NDIS_SWITCH_PROPERTY_TYPE ?
PropertyId              NDIS_SWITCH_OBJECT_ID ?
PropertyVersion         NDIS_SWITCH_OBJECT_VERSION ?
SerializationVersion    NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION ?
PropertyInstanceId      NDIS_SWITCH_OBJECT_INSTANCE_ID ?
PropertyBufferLength    ULONG ?
PropertyBufferOffset    ULONG ?
_NDIS_SWITCH_PROPERTY_PARAMETERS ends
NDIS_SWITCH_PROPERTY_PARAMETERS typedef _NDIS_SWITCH_PROPERTY_PARAMETERS
PNDIS_SWITCH_PROPERTY_PARAMETERS typedef ptr _NDIS_SWITCH_PROPERTY_PARAMETERS

define NDIS_SIZEOF_NDIS_SWITCH_PROPERTY_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PROPERTY_PARAMETERS, PropertyBufferOffset)

NDIS_SWITCH_PROPERTY_PARAMETERS_GET_PROPERTY macro _SwitchParameters_
  exitm<(((PUCHAR)(_SwitchParameters_) + (_SwitchParameters_).PropertyBufferOffset))>
  endm

C_ASSERT((sizeof(NDIS_SWITCH_PROPERTY_PARAMETERS) mod sizeof(UINT64)) eq 0)

define NDIS_SWITCH_PROPERTY_DELETE_PARAMETERS_REVISION_1  1

_NDIS_SWITCH_PROPERTY_DELETE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PropertyType            NDIS_SWITCH_PROPERTY_TYPE ?
PropertyId              NDIS_SWITCH_OBJECT_ID ?
PropertyInstanceId      NDIS_SWITCH_OBJECT_INSTANCE_ID ?
_NDIS_SWITCH_PROPERTY_DELETE_PARAMETERS ends
NDIS_SWITCH_PROPERTY_DELETE_PARAMETERS typedef _NDIS_SWITCH_PROPERTY_DELETE_PARAMETERS
PNDIS_SWITCH_PROPERTY_DELETE_PARAMETERS typedef ptr _NDIS_SWITCH_PROPERTY_DELETE_PARAMETERS

define NDIS_SIZEOF_NDIS_SWITCH_PROPERTY_DELETE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PROPERTY_DELETE_PARAMETERS, PropertyInstanceId)

define NDIS_SWITCH_PROPERTY_ENUM_INFO_REVISION_1  1

_NDIS_SWITCH_PROPERTY_ENUM_INFO struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PropertyInstanceId      NDIS_SWITCH_OBJECT_INSTANCE_ID ?
PropertyVersion         NDIS_SWITCH_OBJECT_VERSION ?
QwordAlignedPropertyBufferLength ULONG ?
PropertyBufferLength    ULONG ?
PropertyBufferOffset    ULONG ?
_NDIS_SWITCH_PROPERTY_ENUM_INFO ends
NDIS_SWITCH_PROPERTY_ENUM_INFO typedef _NDIS_SWITCH_PROPERTY_ENUM_INFO
PNDIS_SWITCH_PROPERTY_ENUM_INFO typedef ptr _NDIS_SWITCH_PROPERTY_ENUM_INFO

define NDIS_SIZEOF_NDIS_SWITCH_PROPERTY_ENUM_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PROPERTY_ENUM_INFO, PropertyBufferOffset)

NDIS_SWITCH_PROPERTY_ENUM_INFO_GET_NEXT macro _SwitchEnumInfo_
  exitm<((PNDIS_SWITCH_PROPERTY_ENUM_INFO)((_SwitchEnumInfo_) + (_SwitchEnumInfo_).QwordAlignedPropertyBufferLength + sizeof(NDIS_SWITCH_PROPERTY_ENUM_INFO)))>
  endm

NDIS_SWITCH_PROPERTY_ENUM_INFO_GET_PROPERTY macro _SwitchEnumInfo_
  exitm<(((PUCHAR)(_SwitchEnumInfo_) + (_SwitchEnumInfo_).PropertyBufferOffset))>
  endm

C_ASSERT((sizeof(NDIS_SWITCH_PROPERTY_ENUM_INFO) mod sizeof(UINT64)) eq 0)

define NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS_REVISION_1  1

_NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PropertyType            NDIS_SWITCH_PROPERTY_TYPE ?
PropertyId              NDIS_SWITCH_OBJECT_ID ?
SerializationVersion    NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION ?
FirstPropertyOffset     ULONG ?
NumProperties           ULONG ?
_NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS ends
NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS typedef _NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS
PNDIS_SWITCH_PROPERTY_ENUM_PARAMETERS typedef ptr _NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS

define NDIS_SIZEOF_NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS, NumProperties)

NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS_GET_FIRST_INFO macro _SwitchEnumParams_
  exitm<(((PUCHAR)(_SwitchEnumParams_) + (_SwitchEnumParams_).FirstPropertyOffset))>
  endm

C_ASSERT((sizeof(NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS) mod sizeof(UINT64)) eq 0)

define NDIS_SWITCH_FEATURE_STATUS_PARAMETERS_REVISION_1         1

.enum NDIS_SWITCH_FEATURE_STATUS_TYPE {
    NdisSwitchFeatureStatusTypeUndefined,
    NdisSwitchFeatureStatusTypeCustom,
    NdisSwitchFeatureStatusTypeMaximum
    }

_NDIS_SWITCH_FEATURE_STATUS_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
FeatureStatusType       NDIS_SWITCH_FEATURE_STATUS_TYPE ?
FeatureStatusId         NDIS_SWITCH_OBJECT_ID ?
FeatureStatusInstanceId NDIS_SWITCH_OBJECT_INSTANCE_ID ?
FeatureStatusVersion    NDIS_SWITCH_OBJECT_VERSION ?
SerializationVersion    NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION ?
FeatureStatusBufferOffset ULONG ?
FeatureStatusBufferLength ULONG ?
_NDIS_SWITCH_FEATURE_STATUS_PARAMETERS ends
NDIS_SWITCH_FEATURE_STATUS_PARAMETERS typedef _NDIS_SWITCH_FEATURE_STATUS_PARAMETERS
PNDIS_SWITCH_FEATURE_STATUS_PARAMETERS typedef ptr _NDIS_SWITCH_FEATURE_STATUS_PARAMETERS

define NDIS_SIZEOF_NDIS_SWITCH_FEATURE_STATUS_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_FEATURE_STATUS_PARAMETERS, FeatureStatusBufferLength)

C_ASSERT((sizeof(NDIS_SWITCH_FEATURE_STATUS_PARAMETERS) mod sizeof(UINT64)) eq 0)

define NDIS_SWITCH_FEATURE_STATUS_CUSTOM_REVISION_1       1

_NDIS_SWITCH_FEATURE_STATUS_CUSTOM struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
FeatureStatusCustomBufferLength ULONG ?
FeatureStatusCustomBufferOffset ULONG ?
_NDIS_SWITCH_FEATURE_STATUS_CUSTOM ends
NDIS_SWITCH_FEATURE_STATUS_CUSTOM typedef _NDIS_SWITCH_FEATURE_STATUS_CUSTOM
PNDIS_SWITCH_FEATURE_STATUS_CUSTOM typedef ptr _NDIS_SWITCH_FEATURE_STATUS_CUSTOM

define NDIS_SIZEOF_NDIS_SWITCH_FEATURE_STATUS_CUSTOM_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_FEATURE_STATUS_CUSTOM, FeatureStatusCustomBufferOffset)

C_ASSERT((sizeof(NDIS_SWITCH_FEATURE_STATUS_CUSTOM) mod sizeof(UINT64)) eq 0)

define NDIS_SWITCH_PARAMETERS_REVISION_1      1

_NDIS_SWITCH_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SwitchName              NDIS_SWITCH_NAME ?
SwitchFriendlyName      NDIS_SWITCH_FRIENDLYNAME ?
NumSwitchPorts          UINT32 ?
IsActive                BOOLEAN ?
_NDIS_SWITCH_PARAMETERS ends
NDIS_SWITCH_PARAMETERS  typedef _NDIS_SWITCH_PARAMETERS
PNDIS_SWITCH_PARAMETERS typedef ptr _NDIS_SWITCH_PARAMETERS

define NDIS_SIZEOF_NDIS_SWITCH_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PARAMETERS, IsActive)

.enum NDIS_SWITCH_PORT_TYPE {
    NdisSwitchPortTypeGeneric    = 0,
    NdisSwitchPortTypeExternal   = 1,
    NdisSwitchPortTypeSynthetic  = 2,
    NdisSwitchPortTypeEmulated   = 3,
    NdisSwitchPortTypeInternal   = 4
    }

.enum NDIS_SWITCH_PORT_STATE {
    NdisSwitchPortStateUnknown      = 0,
    NdisSwitchPortStateCreated      = 1,
    NdisSwitchPortStateTeardown     = 2,
    NdisSwitchPortStateDeleted      = 3
    }

if (NDIS_SUPPORT_NDIS650)
define NDIS_SWITCH_PORT_PARAMETERS_FLAG_UNTRUSTED_INTERNAL_PORT 0x1
endif

if (NDIS_SUPPORT_NDIS660)
define NDIS_SWITCH_PORT_PARAMETERS_FLAG_RESTORING_PORT 0x2
endif

_NDIS_SWITCH_PORT_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PortId                  NDIS_SWITCH_PORT_ID ?
PortName                NDIS_SWITCH_PORT_NAME ?
PortFriendlyName        NDIS_SWITCH_PORT_FRIENDLYNAME ?
PortType                NDIS_SWITCH_PORT_TYPE ?
IsValidationPort        BOOLEAN ?
PortState               NDIS_SWITCH_PORT_STATE ?
_NDIS_SWITCH_PORT_PARAMETERS ends
NDIS_SWITCH_PORT_PARAMETERS typedef _NDIS_SWITCH_PORT_PARAMETERS
PNDIS_SWITCH_PORT_PARAMETERS typedef ptr _NDIS_SWITCH_PORT_PARAMETERS

define NDIS_SWITCH_PORT_PARAMETERS_REVISION_1      1

define NDIS_SIZEOF_NDIS_SWITCH_PORT_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_PARAMETERS, PortState)

_NDIS_SWITCH_PORT_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
FirstElementOffset      USHORT ?
NumElements             ULONG ?
ElementSize             ULONG ?
_NDIS_SWITCH_PORT_ARRAY ends
NDIS_SWITCH_PORT_ARRAY  typedef _NDIS_SWITCH_PORT_ARRAY
PNDIS_SWITCH_PORT_ARRAY typedef ptr _NDIS_SWITCH_PORT_ARRAY

define NDIS_SWITCH_PORT_ARRAY_REVISION_1      1

define NDIS_SIZEOF_NDIS_SWITCH_PORT_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_PORT_ARRAY, ElementSize)

NDIS_SWITCH_PORT_AT_ARRAY_INDEX macro _PortArray_, _Index_
  exitm<(((PUCHAR)(_PortArray_) + (_PortArray_).FirstElementOffset + ((_PortArray_).ElementSize * (_Index_))))>
  endm

if defined(NDIS_SUPPORT_NDIS640)
define NDIS_SWITCH_NIC_FLAGS_NIC_INITIALIZING 0x00000001
endif
if defined(NDIS_SUPPORT_NDIS650)
define NDIS_SWITCH_NIC_FLAGS_NIC_SUSPENDED    0x00000002
endif
if defined(NDIS_SUPPORT_NDIS660)
define NDIS_SWITCH_NIC_FLAGS_MAPPED_NIC_UPDATED    0x00000004
endif
if defined(NDIS_SUPPORT_NDIS680)
define NDIS_SWITCH_NIC_FLAGS_NIC_SUSPENDED_LM      0x00000010
endif

.enum NDIS_SWITCH_NIC_TYPE {
    NdisSwitchNicTypeExternal      = 0,
    NdisSwitchNicTypeSynthetic     = 1,
    NdisSwitchNicTypeEmulated      = 2,
    NdisSwitchNicTypeInternal      = 3
    }

.enum NDIS_SWITCH_NIC_STATE {
    NdisSwitchNicStateUnknown       = 0,
    NdisSwitchNicStateCreated       = 1,
    NdisSwitchNicStateConnected     = 2,
    NdisSwitchNicStateDisconnected  = 3,
    NdisSwitchNicStateDeleted       = 4
    }

_NDIS_SWITCH_NIC_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
NicName                 NDIS_SWITCH_NIC_NAME ?
NicFriendlyName         NDIS_SWITCH_NIC_FRIENDLYNAME ?
PortId                  NDIS_SWITCH_PORT_ID ?
NicIndex                NDIS_SWITCH_NIC_INDEX ?
NicType                 NDIS_SWITCH_NIC_TYPE ?
NicState                NDIS_SWITCH_NIC_STATE ?
VmName                  NDIS_VM_NAME ?
VmFriendlyName          NDIS_VM_FRIENDLYNAME ?
NetCfgInstanceId        GUID <>
MTU                     ULONG ?
NumaNodeId              USHORT ?
PermanentMacAddress     UCHAR NDIS_MAX_PHYS_ADDRESS_LENGTH dup(?)
VMMacAddress            UCHAR NDIS_MAX_PHYS_ADDRESS_LENGTH dup(?)
CurrentMacAddress       UCHAR NDIS_MAX_PHYS_ADDRESS_LENGTH dup(?)
VFAssigned              BOOLEAN ?
if defined(NDIS_SUPPORT_NDIS640)
NdisReserved            ULONG64 2 dup(?)
endif
_NDIS_SWITCH_NIC_PARAMETERS ends
NDIS_SWITCH_NIC_PARAMETERS typedef _NDIS_SWITCH_NIC_PARAMETERS
PNDIS_SWITCH_NIC_PARAMETERS typedef ptr _NDIS_SWITCH_NIC_PARAMETERS

define NDIS_SWITCH_NIC_PARAMETERS_REVISION_1      1

define NDIS_SIZEOF_NDIS_SWITCH_NIC_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_NIC_PARAMETERS, VFAssigned)

if defined(NDIS_SUPPORT_NDIS640)
define NDIS_SWITCH_NIC_PARAMETERS_REVISION_2      2

define NDIS_SIZEOF_NDIS_SWITCH_NIC_PARAMETERS_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_NIC_PARAMETERS, NdisReserved)
endif

_NDIS_SWITCH_NIC_ARRAY  struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
FirstElementOffset      USHORT ?
NumElements             ULONG ?
ElementSize             ULONG ?
_NDIS_SWITCH_NIC_ARRAY  ends
NDIS_SWITCH_NIC_ARRAY   typedef _NDIS_SWITCH_NIC_ARRAY
PNDIS_SWITCH_NIC_ARRAY  typedef ptr _NDIS_SWITCH_NIC_ARRAY

define NDIS_SWITCH_NIC_ARRAY_REVISION_1      1

define NDIS_SIZEOF_NDIS_SWITCH_NIC_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_NIC_ARRAY, ElementSize)

NDIS_SWITCH_NIC_AT_ARRAY_INDEX macro _NicArray_, _Index_
  exitm<(((PUCHAR)(_NicArray_) + (_NicArray_).FirstElementOffset + ((_NicArray_).ElementSize * (_Index_))))>
  endm

PNDIS_OID_REQUEST       typedef ptr NDIS_OID_REQUEST

_NDIS_SWITCH_NIC_OID_REQUEST struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SourcePortId            NDIS_SWITCH_PORT_ID ?
SourceNicIndex          NDIS_SWITCH_NIC_INDEX ?
DestinationPortId       NDIS_SWITCH_PORT_ID ?
DestinationNicIndex     NDIS_SWITCH_NIC_INDEX ?
OidRequest              PNDIS_OID_REQUEST ?
_NDIS_SWITCH_NIC_OID_REQUEST ends
NDIS_SWITCH_NIC_OID_REQUEST typedef _NDIS_SWITCH_NIC_OID_REQUEST
PNDIS_SWITCH_NIC_OID_REQUEST typedef ptr _NDIS_SWITCH_NIC_OID_REQUEST

define NDIS_SWITCH_NIC_OID_REQUEST_REVISION_1     1

define NDIS_SIZEOF_NDIS_SWITCH_NIC_OID_REQUEST_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_NIC_OID_REQUEST, OidRequest)

_NDIS_SWITCH_NIC_SAVE_STATE struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
PortId                  NDIS_SWITCH_PORT_ID ?
NicIndex                NDIS_SWITCH_NIC_INDEX ?
ExtensionId             GUID <>
ExtensionFriendlyName   NDIS_SWITCH_EXTENSION_FRIENDLYNAME ?
FeatureClassId          GUID <>
SaveDataSize            USHORT ?
SaveDataOffset          USHORT ?
if (NDIS_SUPPORT_NDIS650)
SaveDataSizeOverflow    ULONG ?
endif
_NDIS_SWITCH_NIC_SAVE_STATE ends
NDIS_SWITCH_NIC_SAVE_STATE typedef _NDIS_SWITCH_NIC_SAVE_STATE
PNDIS_SWITCH_NIC_SAVE_STATE typedef ptr _NDIS_SWITCH_NIC_SAVE_STATE

define NDIS_SWITCH_NIC_SAVE_STATE_REVISION_1      1
define NDIS_SIZEOF_NDIS_SWITCH_NIC_SAVE_STATE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_NIC_SAVE_STATE,  SaveDataOffset)
if (NDIS_SUPPORT_NDIS650)
define NDIS_SWITCH_NIC_SAVE_STATE_REVISION_2      2
define NDIS_SIZEOF_NDIS_SWITCH_NIC_SAVE_STATE_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_SWITCH_NIC_SAVE_STATE,  SaveDataSizeOverflow)
endif

endif

define NDIS_PORT_STATE_REVISION_1     1

_NDIS_PORT_STATE        struct
Header                  NDIS_OBJECT_HEADER <>
MediaConnectState       NDIS_MEDIA_CONNECT_STATE ?
XmitLinkSpeed           ULONG64 ?
RcvLinkSpeed            ULONG64 ?
Direction               NET_IF_DIRECTION_TYPE ?
SendControlState        NDIS_PORT_CONTROL_STATE ?
RcvControlState         NDIS_PORT_CONTROL_STATE ?
SendAuthorizationState  NDIS_PORT_AUTHORIZATION_STATE ?
RcvAuthorizationState   NDIS_PORT_AUTHORIZATION_STATE ?
Flags                   ULONG ?
_NDIS_PORT_STATE        ends
NDIS_PORT_STATE         typedef _NDIS_PORT_STATE
PNDIS_PORT_STATE        typedef ptr _NDIS_PORT_STATE

define NDIS_SIZEOF_PORT_STATE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PORT_STATE, Flags)
define NDIS_PORT_CHAR_USE_DEFAULT_AUTH_SETTINGS 0x00000001
define NDIS_PORT_CHARACTERISTICS_REVISION_1     1

_NDIS_PORT_CHARACTERISTICS struct
Header                  NDIS_OBJECT_HEADER <>
PortNumber              NDIS_PORT_NUMBER ?
Flags                   ULONG ?
Type                    NDIS_PORT_TYPE ?
MediaConnectState       NDIS_MEDIA_CONNECT_STATE ?
XmitLinkSpeed           ULONG64 ?
RcvLinkSpeed            ULONG64 ?
Direction               NET_IF_DIRECTION_TYPE ?
SendControlState        NDIS_PORT_CONTROL_STATE ?
RcvControlState         NDIS_PORT_CONTROL_STATE ?
SendAuthorizationState  NDIS_PORT_AUTHORIZATION_STATE ?
RcvAuthorizationState   NDIS_PORT_AUTHORIZATION_STATE ?
_NDIS_PORT_CHARACTERISTICS ends
NDIS_PORT_CHARACTERISTICS typedef _NDIS_PORT_CHARACTERISTICS
PNDIS_PORT_CHARACTERISTICS typedef ptr _NDIS_PORT_CHARACTERISTICS

define NDIS_SIZEOF_PORT_CHARACTERISTICS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PORT_CHARACTERISTICS, RcvAuthorizationState)

PNDIS_PORT              typedef ptr NDIS_PORT

_NDIS_PORT              struct
Next                    PNDIS_PORT ?
NdisReserved            PVOID ?
MiniportReserved        PVOID ?
ProtocolReserved        PVOID ?
PortCharacteristics     NDIS_PORT_CHARACTERISTICS <>
_NDIS_PORT              ends

define NDIS_PORT_ARRAY_REVISION_1                1
_NDIS_PORT_ARRAY        struct
Header                  NDIS_OBJECT_HEADER <>
NumberOfPorts           ULONG ?
OffsetFirstPort         ULONG ?
ElementSize             ULONG ?
Ports                   NDIS_PORT_CHARACTERISTICS 1 dup(<>)
_NDIS_PORT_ARRAY        ends
NDIS_PORT_ARRAY         typedef _NDIS_PORT_ARRAY
PNDIS_PORT_ARRAY        typedef ptr _NDIS_PORT_ARRAY

define NDIS_SIZEOF_PORT_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PORT_ARRAY, Ports)

endif

endif

if (NDIS_SUPPORT_NDIS650)

include inaddr.inc
include in6addr.inc

define ETHERNET_LENGTH_OF_ADDRESS  6

.enum NDIS_GFP_TABLE_TYPE {
    NdisGfpTableTypeUndefined,
    NdisGfpTableTypeWildcardIngress,
    NdisGfpTableTypeWildcardEgress,
    NdisGfpTableTypeExactMatchIngress,
    NdisGfpTableTypeExactMatchEgress,
    NdisGfpTableTypePacketDirect,
    NdisGfpTableTypeMax
    }

define NDIS_GFP_HEADER_PRESENT_ETHERNET                0x00000001
define NDIS_GFP_HEADER_PRESENT_IPV4                    0x00000002
define NDIS_GFP_HEADER_PRESENT_IPV6                    0x00000004
define NDIS_GFP_HEADER_PRESENT_TCP                     0x00000008
define NDIS_GFP_HEADER_PRESENT_UDP                     0x00000010
define NDIS_GFP_HEADER_PRESENT_ICMP                    0x00000020
define NDIS_GFP_HEADER_PRESENT_NO_ENCAP                0x00000040
define NDIS_GFP_HEADER_PRESENT_IP_IN_IP_ENCAP          0x00000080
define NDIS_GFP_HEADER_PRESENT_IP_IN_GRE_ENCAP         0x00000100
define NDIS_GFP_HEADER_PRESENT_NVGRE_ENCAP             0x00000200
define NDIS_GFP_HEADER_PRESENT_VXLAN_ENCAP             0x00000400
define NDIS_GFP_HEADER_PRESENT_ESP                     0x00000800

define NDIS_GFP_HEADER_FIELD_DEST_MAC_ADDR             0x00000001
define NDIS_GFP_HEADER_FIELD_SRC_MAC_ADDR              0x00000002
define NDIS_GFP_HEADER_FIELD_ETH_TYPE                  0x00000004
define NDIS_GFP_HEADER_FIELD_CUSTOMER_VLAN_ID          0x00000008
define NDIS_GFP_HEADER_FIELD_PROVIDER_VLAN_ID          0x00000010
define NDIS_GFP_HEADER_FIELD_8021P_PRIORITY            0x00000020
define NDIS_GFP_HEADER_FIELD_SRC_IP_ADDR               0x00000040
define NDIS_GFP_HEADER_FIELD_DEST_IP_ADDR              0x00000080
define NDIS_GFP_HEADER_FIELD_TTL                       0x00000100
define NDIS_GFP_HEADER_FIELD_IP_PROTOCOL               0x00000200
define NDIS_GFP_HEADER_FIELD_IP_DSCP                   0x00000400
define NDIS_GFP_HEADER_FIELD_TRANSPORT_SRC_PORT        0x00000800
define NDIS_GFP_HEADER_FIELD_TRANSPORT_DEST_PORT       0x00001000
define NDIS_GFP_HEADER_FIELD_TCP_FLAGS                 0x00002000
define NDIS_GFP_HEADER_FIELD_TENANT_ID                 0x00004000
define NDIS_GFP_HEADER_FIELD_ENTROPY                   0x00008000
define NDIS_GFP_HEADER_FIELD_ICMP_TYPE                 0x00010000
define NDIS_GFP_HEADER_FIELD_ICMP_CODE                 0x00020000
define NDIS_GFP_HEADER_FIELD_OOB_VLAN                  0x00040000
define NDIS_GFP_HEADER_FIELD_OOB_TENANT_ID             0x00080000
define NDIS_GFP_HEADER_FIELD_GRE_PROTOCOL              0x00100000

define NDIS_GFP_ENCAPSULATION_TYPE_NOT_ENCAPSULATED    0x00000001
define NDIS_GFP_ENCAPSULATION_TYPE_IP_IN_IP            0x00000002
define NDIS_GFP_ENCAPSULATION_TYPE_IP_IN_GRE           0x00000004
define NDIS_GFP_ENCAPSULATION_TYPE_NVGRE               0x00000008
define NDIS_GFP_ENCAPSULATION_TYPE_VXLAN               0x00000010

PNDIS_GFP_PROFILE_ID    typedef ptr NDIS_GFP_PROFILE_ID
define NDIS_GFP_UNDEFINED_PROFILE_ID               0

define NDIS_GFP_HEADER_GROUP_EXACT_MATCH_PROFILE_IS_TTL_ONE    0x00000001

define NDIS_GFP_HEADER_GROUP_EXACT_MATCH_PROFILE_REVISION_1    1

_NDIS_GFP_HEADER_GROUP_EXACT_MATCH_PROFILE struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
HeadersPresent          ULONG ?
MatchFields             ULONG64 ?
_NDIS_GFP_HEADER_GROUP_EXACT_MATCH_PROFILE ends
NDIS_GFP_HEADER_GROUP_EXACT_MATCH_PROFILE typedef _NDIS_GFP_HEADER_GROUP_EXACT_MATCH_PROFILE
PNDIS_GFP_HEADER_GROUP_EXACT_MATCH_PROFILE typedef ptr _NDIS_GFP_HEADER_GROUP_EXACT_MATCH_PROFILE

define NDIS_SIZEOF_GFP_HEADER_GROUP_EXACT_MATCH_PROFILE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFP_HEADER_GROUP_EXACT_MATCH_PROFILE, MatchFields)

define NDIS_GFP_EXACT_MATCH_PROFILE_RDMA_FLOW      0x00000001

define NDIS_GFP_EXACT_MATCH_PROFILE_REVISION_1         1

_NDIS_GFP_EXACT_MATCH_PROFILE struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableType               NDIS_GFP_TABLE_TYPE ?
ProfileId               NDIS_GFP_PROFILE_ID ?
NumSupportedEntries     ULONG ?
HeaderGroupExactMatchProfileArrayOffset ULONG ?
HeaderGroupExactMatchProfileArrayNumElements ULONG ?
HeaderGroupExactMatchProfileArrayElementSize ULONG ?
_NDIS_GFP_EXACT_MATCH_PROFILE ends
NDIS_GFP_EXACT_MATCH_PROFILE typedef _NDIS_GFP_EXACT_MATCH_PROFILE
PNDIS_GFP_EXACT_MATCH_PROFILE typedef ptr _NDIS_GFP_EXACT_MATCH_PROFILE

define NDIS_SIZEOF_GFP_EXACT_MATCH_PROFILE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFP_EXACT_MATCH_PROFILE, HeaderGroupExactMatchProfileArrayElementSize)

_NDIS_GFP_ETHERNET_HEADER_FIELDS struct
DestinationMacAddress   UINT8 ETHERNET_LENGTH_OF_ADDRESS dup(?)
SourceMacAddress        UINT8 ETHERNET_LENGTH_OF_ADDRESS dup(?)
EthType                 UINT16 ?
CustomerVlanId          UINT16 ?
ProviderVlanId          UINT16 ?
Priority                UINT8 ?
_NDIS_GFP_ETHERNET_HEADER_FIELDS ends
NDIS_GFP_ETHERNET_HEADER_FIELDS typedef _NDIS_GFP_ETHERNET_HEADER_FIELDS
PNDIS_GFP_ETHERNET_HEADER_FIELDS typedef ptr _NDIS_GFP_ETHERNET_HEADER_FIELDS

define NDIS_GFP_HEADER_GROUP_EXACT_MATCH_IS_TTL_ONE        0x00000001

define NDIS_GFP_HEADER_GROUP_EXACT_MATCH_REVISION_1       1

_NDIS_GFP_HEADER_GROUP_EXACT_MATCH struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
HeadersPresent          ULONG ?
MatchFields             ULONG64 ?
EthernetFields          NDIS_GFP_ETHERNET_HEADER_FIELDS ?
union IPAddress
 struct IPv4Address
  SourceIPAddress       IN_ADDR ?
  DestinationIPAddress  IN_ADDR ?
 ends
 struct IPv6Address
  SourceIPAddress       IN6_ADDR ?
  DestinationIPAddress  IN6_ADDR ?
 ends
ends
Dscp                    UINT8 ?
IPProtocol              UINT8 ?
union TransportOrEncapsulation
 struct Udp
  SourcePort            USHORT ?
  DestinationPort       USHORT ?
 ends
 struct Tcp
  SourcePort            USHORT ?
  DestinationPort       USHORT ?
  TcpFlags              UINT8 ?
 ends
 struct Icmp
  Type                  UINT8 ?
  Code                  UINT8 ?
 ends
 struct Encapsulation
  TenantId              ULONG ?
  GreProtocol           USHORT ?
 ends
ends
_NDIS_GFP_HEADER_GROUP_EXACT_MATCH ends
NDIS_GFP_HEADER_GROUP_EXACT_MATCH typedef _NDIS_GFP_HEADER_GROUP_EXACT_MATCH
PNDIS_GFP_HEADER_GROUP_EXACT_MATCH typedef ptr _NDIS_GFP_HEADER_GROUP_EXACT_MATCH

define NDIS_SIZEOF_GFP_HEADER_GROUP_EXACT_MATCH_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFP_HEADER_GROUP_EXACT_MATCH, TransportOrEncapsulation)

.enum NDIS_GFP_WILDCARD_MATCH_TYPE {
    NdisGfpWildcardMatchTypeUndefined,
    NdisGfpWildcardMatchTypeEqual,
    NdisGfpWildcardMatchTypeMaskEqual,
    NdisGfpWildcardMatchTypeInRange,
    NdisGfpWildcardMatchTypeMax
    }

define NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH_PROFILE_IS_TTL_ONE    0x00000001

define NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH_PROFILE_REVISION_1            1

_NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH_PROFILE struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
HeadersPresent          ULONG ?
MatchFields             ULONG64 ?
SourceIPv4AddressMatchType NDIS_GFP_WILDCARD_MATCH_TYPE ?
DestinationIPv4AddressMatchType NDIS_GFP_WILDCARD_MATCH_TYPE ?
SourceIPv6AddressMatchType NDIS_GFP_WILDCARD_MATCH_TYPE ?
DestinationIPv6AddressMatchType NDIS_GFP_WILDCARD_MATCH_TYPE ?
SourcePortMatchType     NDIS_GFP_WILDCARD_MATCH_TYPE ?
DestinationPortMatchType NDIS_GFP_WILDCARD_MATCH_TYPE ?
TcpFlags                UINT8 ?
_NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH_PROFILE ends
NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH_PROFILE typedef _NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH_PROFILE
PNDIS_GFP_HEADER_GROUP_WILDCARD_MATCH_PROFILE typedef ptr _NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH_PROFILE

define NDIS_SIZEOF_GFP_HEADER_GROUP_WILDCARD_MATCH_PROFILE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH_PROFILE, TcpFlags)

define NDIS_GFP_WILDCARD_MATCH_PROFILE_REVISION_1            1

_NDIS_GFP_WILDCARD_MATCH_PROFILE struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableType               NDIS_GFP_TABLE_TYPE ?
ProfileId               NDIS_GFP_PROFILE_ID ?
NumSupportedEntries     ULONG ?
HeaderGroupWildcardMatchProfileArrayOffset ULONG ?
HeaderGroupWildcardMatchProfileArrayNumElements ULONG ?
HeaderGroupWildcardMatchProfileArrayElementSize ULONG ?
_NDIS_GFP_WILDCARD_MATCH_PROFILE ends
NDIS_GFP_WILDCARD_MATCH_PROFILE typedef _NDIS_GFP_WILDCARD_MATCH_PROFILE
PNDIS_GFP_WILDCARD_MATCH_PROFILE typedef ptr _NDIS_GFP_WILDCARD_MATCH_PROFILE

define NDIS_SIZEOF_GFP_WILDCARD_MATCH_PROFILE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFP_WILDCARD_MATCH_PROFILE, HeaderGroupWildcardMatchProfileArrayElementSize)

_NDIS_GFP_IPV4_ADDRESS_WILDCARD_MATCH struct
MatchType               NDIS_GFP_WILDCARD_MATCH_TYPE ?
IPAddress               IN_ADDR ?
union MatchValue
 PrefixLength           ULONG ?
 RangeSize              ULONG ?
ends
_NDIS_GFP_IPV4_ADDRESS_WILDCARD_MATCH ends
NDIS_GFP_IPV4_ADDRESS_WILDCARD_MATCH typedef _NDIS_GFP_IPV4_ADDRESS_WILDCARD_MATCH
PNDIS_GFP_IPV4_ADDRESS_WILDCARD_MATCH typedef ptr _NDIS_GFP_IPV4_ADDRESS_WILDCARD_MATCH

_NDIS_GFP_IPV4_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH struct
SourceIPv4Address       NDIS_GFP_IPV4_ADDRESS_WILDCARD_MATCH ?
DestinationIPv4Address  NDIS_GFP_IPV4_ADDRESS_WILDCARD_MATCH ?
_NDIS_GFP_IPV4_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH ends
NDIS_GFP_IPV4_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH typedef _NDIS_GFP_IPV4_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH
PNDIS_GFP_IPV4_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH typedef ptr _NDIS_GFP_IPV4_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH

_NDIS_GFP_IPV6_ADDRESS_WILDCARD_MATCH struct
MatchType               NDIS_GFP_WILDCARD_MATCH_TYPE ?
IPAddress               IN6_ADDR ?
union MatchValue
 PrefixLength           ULONG ?
 RangeSize              ULONG ?
ends
_NDIS_GFP_IPV6_ADDRESS_WILDCARD_MATCH ends
NDIS_GFP_IPV6_ADDRESS_WILDCARD_MATCH typedef _NDIS_GFP_IPV6_ADDRESS_WILDCARD_MATCH
PNDIS_GFP_IPV6_ADDRESS_WILDCARD_MATCH typedef ptr _NDIS_GFP_IPV6_ADDRESS_WILDCARD_MATCH

_NDIS_GFP_IPV6_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH struct
SourceIPv6Address       NDIS_GFP_IPV6_ADDRESS_WILDCARD_MATCH ?
DestinationIPv6Address  NDIS_GFP_IPV6_ADDRESS_WILDCARD_MATCH ?
_NDIS_GFP_IPV6_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH ends
NDIS_GFP_IPV6_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH typedef _NDIS_GFP_IPV6_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH
PNDIS_GFP_IPV6_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH typedef ptr _NDIS_GFP_IPV6_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH

_NDIS_GFP_IP_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH union
IPv4SrcAndDestAddress   NDIS_GFP_IPV4_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH ?
IPv6SrcAndDestAddress   NDIS_GFP_IPV6_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH ?
_NDIS_GFP_IP_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH ends
NDIS_GFP_IP_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH typedef _NDIS_GFP_IP_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH
PNDIS_GFP_IP_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH typedef ptr _NDIS_GFP_IP_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH

_NDIS_GFP_TRANSPORT_PORT_WILDCARD_MATCH struct
MatchType               NDIS_GFP_WILDCARD_MATCH_TYPE ?
Port                    USHORT ?
Range                   USHORT ?
_NDIS_GFP_TRANSPORT_PORT_WILDCARD_MATCH ends
NDIS_GFP_TRANSPORT_PORT_WILDCARD_MATCH typedef _NDIS_GFP_TRANSPORT_PORT_WILDCARD_MATCH
PNDIS_GFP_TRANSPORT_PORT_WILDCARD_MATCH typedef ptr _NDIS_GFP_TRANSPORT_PORT_WILDCARD_MATCH

_NDIS_GFP_TRANSPORT_SRC_AND_DEST_PORT_WILDCARD_MATCH struct
SourcePort              NDIS_GFP_TRANSPORT_PORT_WILDCARD_MATCH ?
DestinationPort         NDIS_GFP_TRANSPORT_PORT_WILDCARD_MATCH ?
_NDIS_GFP_TRANSPORT_SRC_AND_DEST_PORT_WILDCARD_MATCH ends
NDIS_GFP_TRANSPORT_SRC_AND_DEST_PORT_WILDCARD_MATCH typedef _NDIS_GFP_TRANSPORT_SRC_AND_DEST_PORT_WILDCARD_MATCH
PNDIS_GFP_TRANSPORT_SRC_AND_DEST_PORT_WILDCARD_MATCH typedef ptr _NDIS_GFP_TRANSPORT_SRC_AND_DEST_PORT_WILDCARD_MATCH

define NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH_IS_TTL_ONE        0x00000001

define NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH_REVISION_1            1

_NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
ProfileId               NDIS_GFP_PROFILE_ID ?
HeadersPresent          ULONG ?
MatchFields             ULONG64 ?
EthernetFields          NDIS_GFP_ETHERNET_HEADER_FIELDS ?
IPSrcAndDestAddress     NDIS_GFP_IP_SRC_AND_DEST_ADDRESS_WILDCARD_MATCH ?
Dscp                    UINT8 ?
IPProtocol              UINT8 ?
union TransportOrEncapsulation
 struct UdpHeader
  UdpSrcAndDestPort     NDIS_GFP_TRANSPORT_SRC_AND_DEST_PORT_WILDCARD_MATCH ?
 ends
 struct TcpHeader
  TcpSrcAndDestPort     NDIS_GFP_TRANSPORT_SRC_AND_DEST_PORT_WILDCARD_MATCH ?
  TcpFlags              UINT8 ?
 ends
 struct IcmpHeader
  Type                  UINT8 ?
  Code                  UINT8 ?
 ends
 struct Encapsulation
  TenantId              ULONG ?
  GreProtocol           USHORT ?
 ends
ends
_NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH ends
NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH typedef _NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH
PNDIS_GFP_HEADER_GROUP_WILDCARD_MATCH typedef ptr _NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH

define NDIS_SIZEOF_GFP_HEADER_GROUP_WILDCARD_MATCH_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFP_HEADER_GROUP_WILDCARD_MATCH, TransportOrEncapsulation)
define NDIS_PD_QUEUE_COUNT_DYNAMIC (-1)
define NDIS_PD_CAPS_RECEIVE_FILTER_COUNTERS_SUPPORTED              0x00000001
define NDIS_PD_CAPS_DRAIN_NOTIFICATIONS_SUPPORTED                  0x00000002
define NDIS_PD_CAPS_NOTIFICATION_MODERATION_INTERVAL_SUPPORTED     0x00000004
define NDIS_PD_CAPS_NOTIFICATION_MODERATION_COUNT_SUPPORTED        0x00000008

_NDIS_PD_CAPABILITIES   struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
MaximumTxPartialBufferCount ULONG ?
MaximumRxPartialBufferCount ULONG ?
RxFilterContextWidth    UCHAR ?
CapabilityFlags         ULONG ?
MaxNumberOfRxQueues     ULONG ?
MaxNumberOfTxQueues     ULONG ?
MaxNumberOfRxQueuesForDefaultVport ULONG ?
MaxNumberOfTxQueuesForDefaultVport ULONG ?
MaxNumberOfRxQueuesPerNonDefaultVport ULONG ?
MaxNumberOfTxQueuesPerNonDefaultVport ULONG ?
ExactMatchProfileArrayOffset ULONG ?
ExactMatchProfileArrayNumElements ULONG ?
ExactMatchProfileArrayElementSize ULONG ?
WildcardMatchProfileArrayOffset ULONG ?
WildcardMatchProfileArrayNumElements ULONG ?
WildcardMatchProfileArrayElementSize ULONG ?
MinimumModerationInterval ULONG ?
MaximumModerationInterval ULONG ?
ModerationIntervalGranularity ULONG ?
MaxRxQueueSize          ULONG ?
MaxTxQueueSize          ULONG ?
_NDIS_PD_CAPABILITIES   ends
NDIS_PD_CAPABILITIES    typedef _NDIS_PD_CAPABILITIES

define NDIS_PD_CAPABILITIES_REVISION_1 1
define NDIS_SIZEOF_PD_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PD_CAPABILITIES, MaxTxQueueSize)

_NDIS_PD_CONFIG         struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
Enabled                 BOOLEAN ?
CapabilitiesOffset      ULONG ?
CapabilitiesSize        ULONG ?
_NDIS_PD_CONFIG         ends
NDIS_PD_CONFIG          typedef _NDIS_PD_CONFIG

define NDIS_PD_CONFIG_REVISION_1 1
define NDIS_SIZEOF_PD_CONFIG_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_PD_CONFIG, CapabilitiesSize)

define PACKET_DIRECT_KEYWORD NDIS_STRING_CONST("*PacketDirect")

PNDIS_GFT_FLOW_ENTRY_ID typedef ptr NDIS_GFT_FLOW_ENTRY_ID
define NDIS_GFT_UNDEFINED_FLOW_ENTRY_ID    0

PNDIS_GFT_TABLE_ID      typedef ptr NDIS_GFT_TABLE_ID
define NDIS_GFT_UNDEFINED_TABLE_ID         0
define NDIS_GFT_TABLE_INCLUDE_EXTERNAL_VPPORT      0x00000001
define NDIS_GFT_TABLE_PARAMETERS_REVISION_1            1

_NDIS_GFT_TABLE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
TableType               NDIS_GFP_TABLE_TYPE ?
NextTableId             NDIS_GFT_TABLE_ID ?
_NDIS_GFT_TABLE_PARAMETERS ends
NDIS_GFT_TABLE_PARAMETERS typedef _NDIS_GFT_TABLE_PARAMETERS
PNDIS_GFT_TABLE_PARAMETERS typedef ptr _NDIS_GFT_TABLE_PARAMETERS

define NDIS_SIZEOF_GFT_TABLE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_TABLE_PARAMETERS, NextTableId)

define NDIS_GFT_TABLE_INFO_REVISION_1              1

_NDIS_GFT_TABLE_INFO    struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
TableType               NDIS_GFP_TABLE_TYPE ?
NextTableId             NDIS_GFT_TABLE_ID ?
NumFlowEntries          ULONG ?
_NDIS_GFT_TABLE_INFO    ends
NDIS_GFT_TABLE_INFO     typedef _NDIS_GFT_TABLE_INFO
PNDIS_GFT_TABLE_INFO    typedef ptr _NDIS_GFT_TABLE_INFO

define NDIS_SIZEOF_GFT_TABLE_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_TABLE_INFO, NumFlowEntries)

define NDIS_GFT_TABLE_INFO_ARRAY_REVISION_1        1

_NDIS_GFT_TABLE_INFO_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableArrayOffset        ULONG ?
TableArrayNumElements   ULONG ?
TableArrayElementSize   ULONG ?
_NDIS_GFT_TABLE_INFO_ARRAY ends
NDIS_GFT_TABLE_INFO_ARRAY typedef _NDIS_GFT_TABLE_INFO_ARRAY
PNDIS_GFT_TABLE_INFO_ARRAY typedef ptr _NDIS_GFT_TABLE_INFO_ARRAY

define NDIS_SIZEOF_GFT_TABLE_INFO_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_TABLE_INFO_ARRAY, TableArrayElementSize)

define NDIS_GFT_DELETE_TABLE_PARAMETERS_REVISION_1       1

_NDIS_GFT_DELETE_TABLE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
_NDIS_GFT_DELETE_TABLE_PARAMETERS ends
NDIS_GFT_DELETE_TABLE_PARAMETERS typedef _NDIS_GFT_DELETE_TABLE_PARAMETERS
PNDIS_GFT_DELETE_TABLE_PARAMETERS typedef ptr _NDIS_GFT_DELETE_TABLE_PARAMETERS

define NDIS_SIZEOF_GFT_DELETE_TABLE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_DELETE_TABLE_PARAMETERS, TableId)

PNDIS_GFT_COUNTER_ID    typedef ptr NDIS_GFT_COUNTER_ID

define NDIS_GFT_UNDEFINED_COUNTER_ID       0

define NDIS_GFT_MAX_COUNTER_OBJECTS_PER_FLOW_ENTRY     8

.enum NDIS_GFT_COUNTER_UPDATE_FREQUENCY {
    NdisGftCounterUpdateFrequencyUndefined,
    NdisGftCounterUpdateFrequencyOnQuery,
    NdisGftCounterUpdateFrequencyPerUpdatePeriod,
    NdisGftCounterUpdateFrequencyPerPacket,
    NdisGftCounterUpdateFrequencyMax
    }

.enum NDIS_GFT_COUNTER_TYPE {
    NdisGftCounterTypeUndefined,
    NdisGftCounterTypePacket,
    NdisGftCounterTypeByte,
    NdisGftCounterTypePacketByte,
    NdisGftCounterTypePacketByteAndState,
    NdisGftCounterTypeMax
    }

_NDIS_GFT_PACKET_COUNTER_VALUE struct
Packets                 ULONG64 ?
LastUpdate              LARGE_INTEGER <>
_NDIS_GFT_PACKET_COUNTER_VALUE ends
NDIS_GFT_PACKET_COUNTER_VALUE  typedef _NDIS_GFT_PACKET_COUNTER_VALUE
PNDIS_GFT_PACKET_COUNTER_VALUE typedef ptr _NDIS_GFT_PACKET_COUNTER_VALUE

_NDIS_GFT_BYTE_COUNTER_VALUE struct
Bytes                   ULONG64 ?
LastUpdate              LARGE_INTEGER <>
_NDIS_GFT_BYTE_COUNTER_VALUE ends
NDIS_GFT_BYTE_COUNTER_VALUE  typedef _NDIS_GFT_BYTE_COUNTER_VALUE
PNDIS_GFT_BYTE_COUNTER_VALUE typedef ptr _NDIS_GFT_BYTE_COUNTER_VALUE

_NDIS_GFT_PACKET_BYTE_COUNTER_VALUE struct
Packets                 ULONG64 ?
Bytes                   ULONG64 ?
LastUpdate              LARGE_INTEGER <>
_NDIS_GFT_PACKET_BYTE_COUNTER_VALUE ends
NDIS_GFT_PACKET_BYTE_COUNTER_VALUE  typedef _NDIS_GFT_PACKET_BYTE_COUNTER_VALUE
PNDIS_GFT_PACKET_BYTE_COUNTER_VALUE typedef ptr _NDIS_GFT_PACKET_BYTE_COUNTER_VALUE

_NDIS_GFT_FLOW_STATE    struct
TcpSeqNum               ULONG ?
TcpAckNum               ULONG ?
_NDIS_GFT_FLOW_STATE    ends
NDIS_GFT_FLOW_STATE     typedef _NDIS_GFT_FLOW_STATE
PNDIS_GFT_FLOW_STATE    typedef ptr _NDIS_GFT_FLOW_STATE

_NDIS_GFT_PACKET_BYTE_COUNTER_VALUE_AND_STATE struct
PacketByteCounterValue  NDIS_GFT_PACKET_BYTE_COUNTER_VALUE ?
FlowState               NDIS_GFT_FLOW_STATE ?
_NDIS_GFT_PACKET_BYTE_COUNTER_VALUE_AND_STATE ends
NDIS_GFT_PACKET_BYTE_COUNTER_VALUE_AND_STATE  typedef _NDIS_GFT_PACKET_BYTE_COUNTER_VALUE_AND_STATE
PNDIS_GFT_PACKET_BYTE_COUNTER_VALUE_AND_STATE typedef ptr _NDIS_GFT_PACKET_BYTE_COUNTER_VALUE_AND_STATE

define NDIS_GFT_COUNTER_PARAMETERS_CLIENT_SPECIFIED_ADDRESS    0x00000001

define NDIS_GFT_COUNTER_PARAMETERS_REVISION_1       1

_NDIS_GFT_COUNTER_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
CounterUpdateFrequency  NDIS_GFT_COUNTER_UPDATE_FREQUENCY ?
CounterType             NDIS_GFT_COUNTER_TYPE ?
CounterIdStart          NDIS_GFT_COUNTER_ID ?
NumCounters             ULONG ?
UpdatePeriod            ULONG ?
union CounterValuesBufferStart
 PacketCounters         PNDIS_GFT_PACKET_COUNTER_VALUE ?
 ByteCounters           PNDIS_GFT_BYTE_COUNTER_VALUE ?
 PacketByteCounters     PNDIS_GFT_PACKET_BYTE_COUNTER_VALUE ?
 PacketByteCountersAndState PNDIS_GFT_PACKET_BYTE_COUNTER_VALUE_AND_STATE ?
ends
_NDIS_GFT_COUNTER_PARAMETERS ends
NDIS_GFT_COUNTER_PARAMETERS typedef _NDIS_GFT_COUNTER_PARAMETERS
PNDIS_GFT_COUNTER_PARAMETERS typedef ptr _NDIS_GFT_COUNTER_PARAMETERS

define NDIS_SIZEOF_GFT_COUNTER_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_COUNTER_PARAMETERS, CounterValuesBufferStart)

define NDIS_GFT_FREE_COUNTER_PARAMETERS_REVISION_1       1

_NDIS_GFT_FREE_COUNTER_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
CounterIdStart          NDIS_GFT_COUNTER_ID ?
NumCounters             ULONG ?
LastCounterValueAndStateArrayOffset ULONG ?
LastCounterValueAndStateArrayNumElements ULONG ?
LastCounterValueAndStateArrayElementSize ULONG ?
_NDIS_GFT_FREE_COUNTER_PARAMETERS ends
NDIS_GFT_FREE_COUNTER_PARAMETERS typedef _NDIS_GFT_FREE_COUNTER_PARAMETERS
PNDIS_GFT_FREE_COUNTER_PARAMETERS typedef ptr _NDIS_GFT_FREE_COUNTER_PARAMETERS

define NDIS_SIZEOF_GFT_FREE_COUNTER_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_FREE_COUNTER_PARAMETERS, LastCounterValueAndStateArrayElementSize)

define NDIS_GFT_COUNTER_INFO_REVISION_1       1

_NDIS_GFT_COUNTER_INFO  struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
CounterIdStart          NDIS_GFT_COUNTER_ID ?
NumCounters             ULONG ?
CounterUpdateFrequency  NDIS_GFT_COUNTER_UPDATE_FREQUENCY ?
CounterType             NDIS_GFT_COUNTER_TYPE ?
UpdatePeriod            ULONG ?
_NDIS_GFT_COUNTER_INFO  ends
NDIS_GFT_COUNTER_INFO   typedef _NDIS_GFT_COUNTER_INFO
PNDIS_GFT_COUNTER_INFO  typedef ptr _NDIS_GFT_COUNTER_INFO

define NDIS_SIZEOF_GFT_COUNTER_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_COUNTER_INFO, UpdatePeriod)

define NDIS_GFT_COUNTER_INFO_ARRAY_REVISION_1        1

_NDIS_GFT_COUNTER_INFO_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
CounterInfoArrayOffset  ULONG ?
CounterInfoArrayNumElements ULONG ?
CounterInfoArrayElementSize ULONG ?
_NDIS_GFT_COUNTER_INFO_ARRAY ends
NDIS_GFT_COUNTER_INFO_ARRAY typedef _NDIS_GFT_COUNTER_INFO_ARRAY
PNDIS_GFT_COUNTER_INFO_ARRAY typedef ptr _NDIS_GFT_COUNTER_INFO_ARRAY

define NDIS_SIZEOF_GFT_COUNTER_INFO_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_COUNTER_INFO_ARRAY, CounterInfoArrayElementSize)

_NDIS_GFT_COUNTER_VALUE struct
CounterType             NDIS_GFT_COUNTER_TYPE ?
union CounterValue
 Packets                NDIS_GFT_PACKET_COUNTER_VALUE ?
 Bytes                  NDIS_GFT_BYTE_COUNTER_VALUE ?
 PacketsBytes           NDIS_GFT_PACKET_BYTE_COUNTER_VALUE ?
 PacketsBytesAndState   NDIS_GFT_PACKET_BYTE_COUNTER_VALUE_AND_STATE ?
ends
_NDIS_GFT_COUNTER_VALUE ends
NDIS_GFT_COUNTER_VALUE  typedef _NDIS_GFT_COUNTER_VALUE
PNDIS_GFT_COUNTER_VALUE typedef ptr _NDIS_GFT_COUNTER_VALUE

define NDIS_GFT_COUNTER_VALUE_ARRAY_UPDATE_MEMORY_MAPPED_COUNTERS      0x00000001
define NDIS_GFT_COUNTER_VALUE_ARRAY_GET_VALUES                         0x00000002

.enum NDIS_GFT_COUNTER_VALUE_QUERY_METHOD {
    NdisGftQueryValueQueryMethodUndefined,
    NdisGftQueryValueQueryMethodUsingCounterIds,
    NdisGftQueryValueQueryMethodUsingFlowEntryIds,
    NdisGftQueryValueQueryMethodVPortFlowEntries,
    NdisGftQueryValueQueryMethodAllFlowEntries,
    NdisGftQueryValueQueryMethodMax
    }

define NDIS_GFT_COUNTER_VALUE_ARRAY_REVISION_1       1

_NDIS_GFT_COUNTER_VALUE_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
union StartId
 FlowEntryId            NDIS_GFT_FLOW_ENTRY_ID ?
 CounterId              NDIS_GFT_COUNTER_ID ?
ends
NumCounters             ULONG ?
CounterValueArrayOffset ULONG ?
CounterValueArrayNumElements ULONG ?
CounterValueArrayElementSize ULONG ?
_NDIS_GFT_COUNTER_VALUE_ARRAY ends
NDIS_GFT_COUNTER_VALUE_ARRAY typedef _NDIS_GFT_COUNTER_VALUE_ARRAY
PNDIS_GFT_COUNTER_VALUE_ARRAY typedef ptr _NDIS_GFT_COUNTER_VALUE_ARRAY

define NDIS_SIZEOF_GFT_COUNTER_VALUE_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_COUNTER_VALUE_ARRAY, CounterValueArrayElementSize)

define NDIS_GFT_STATISTICS_REVISION_1       1

_NDIS_GFT_STATISTICS    struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
ProviderFlowEntryId     NDIS_GFT_FLOW_ENTRY_ID ?
Packets                 ULONG64 ?
Bytes                   ULONG64 ?
L1CacheHits             ULONG64 ?
L2CacheHits             ULONG64 ?
L3CacheHits             ULONG64 ?
L1CacheMisses           ULONG64 ?
L2CacheMisses           ULONG64 ?
L3CacheMisses           ULONG64 ?
_NDIS_GFT_STATISTICS    ends
NDIS_GFT_STATISTICS     typedef _NDIS_GFT_STATISTICS
PNDIS_GFT_STATISTICS    typedef ptr _NDIS_GFT_STATISTICS

define NDIS_SIZEOF_GFT_STATISTICS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_STATISTICS, L3CacheMisses)

.enum NDIS_GFT_HEADER_GROUP_TRANSPOSITION_ACTION {
    NdisGftHeaderGroupTranspositionActionUndefined,
    NdisGftHeaderGroupTranspositionActionModify,
    NdisGftHeaderGroupTranspositionActionIgnore,
    NdisGftHeaderGroupTranspositionActionPush,
    NdisGftHeaderGroupTranspositionActionPop,
    NdisGftHeaderGroupTranspositionActionMax
    }

define NDIS_GFT_HEADER_GROUP_TRANSPOSITION_PROFILE_DECREMENT_TTL_IF_NOT_ONE    0x00000001

define NDIS_GFT_HEADER_GROUP_TRANSPOSITION_PROFILE_REVISION_1       1

_NDIS_GFT_HEADER_GROUP_TRANSPOSITION_PROFILE struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
Action                  NDIS_GFT_HEADER_GROUP_TRANSPOSITION_ACTION ?
HeadersPresent          ULONG ?
HeaderFields            ULONG ?
_NDIS_GFT_HEADER_GROUP_TRANSPOSITION_PROFILE ends
NDIS_GFT_HEADER_GROUP_TRANSPOSITION_PROFILE typedef _NDIS_GFT_HEADER_GROUP_TRANSPOSITION_PROFILE
PNDIS_GFT_HEADER_GROUP_TRANSPOSITION_PROFILE typedef ptr _NDIS_GFT_HEADER_GROUP_TRANSPOSITION_PROFILE

define NDIS_SIZEOF_GFT_HEADER_GROUP_TRANSPOSITION_PROFILE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_HEADER_GROUP_TRANSPOSITION_PROFILE, HeaderFields)

PNDIS_GFT_CUSTOM_ACTION_TYPE typedef ptr NDIS_GFT_CUSTOM_ACTION_TYPE

define NDIS_GFT_UNDEFINED_CUSTOM_ACTION    0
define NDIS_GFT_RESERVED_CUSTOM_ACTIONS    256

define NDIS_GFT_CUSTOM_ACTION_PROFILE_REVISION_1       1

_NDIS_GFT_CUSTOM_ACTION_PROFILE struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableType               NDIS_GFP_TABLE_TYPE ?
ProfileId               NDIS_GFP_PROFILE_ID ?
Type                    NDIS_GFT_CUSTOM_ACTION_TYPE ?
Length                  ULONG ?
union
 Alignment              ULONG_PTR ?
 ActionProfileData      UCHAR 1 dup(?)
ends
_NDIS_GFT_CUSTOM_ACTION_PROFILE ends
NDIS_GFT_CUSTOM_ACTION_PROFILE typedef _NDIS_GFT_CUSTOM_ACTION_PROFILE
PNDIS_GFT_CUSTOM_ACTION_PROFILE typedef ptr _NDIS_GFT_CUSTOM_ACTION_PROFILE

define NDIS_SIZEOF_NDIS_GFT_CUSTOM_ACTION_PROFILE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_CUSTOM_ACTION_PROFILE, Alignment)

define NDIS_GFT_HTP_REDIRECT_TO_INGRESS_QUEUE_OF_VPORT                 0x00000001
define NDIS_GFT_HTP_REDIRECT_TO_EGRESS_QUEUE_OF_VPORT                  0x00000002
define NDIS_GFT_HTP_REDIRECT_TO_INGRESS_QUEUE_OF_VPORT_IF_TTL_IS_ONE   0x00000004
define NDIS_GFT_HTP_REDIRECT_TO_EGRESS_QUEUE_OF_VPORT_IF_TTL_IS_ONE    0x00000008
define NDIS_GFT_HTP_COPY_ALL_PACKETS                                   0x00000010
define NDIS_GFT_HTP_COPY_FIRST_PACKET                                  0x00000020
define NDIS_GFT_HTP_COPY_WHEN_TCP_FLAG_SET                             0x00000040
define NDIS_GFT_HTP_CUSTOM_ACTION_PRESENT                              0x00000080
define NDIS_GFT_HTP_META_ACTION_BEFORE_HEADER_TRANSPOSITION            0x00000100

define NDIS_GFT_HEADER_TRANSPOSITION_PROFILE_REVISION_1       1

_NDIS_GFT_HEADER_TRANSPOSITION_PROFILE struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableType               NDIS_GFP_TABLE_TYPE ?
ProfileId               NDIS_GFP_PROFILE_ID ?
HeaderGroupTranspositionProfileArrayOffset ULONG ?
HeaderGroupTranspositionProfileArrayNumElements ULONG ?
HeaderGroupTranspositionProfileArrayElementSize ULONG ?
CustomActionProfileOffset ULONG ?
_NDIS_GFT_HEADER_TRANSPOSITION_PROFILE ends
NDIS_GFT_HEADER_TRANSPOSITION_PROFILE typedef _NDIS_GFT_HEADER_TRANSPOSITION_PROFILE
PNDIS_GFT_HEADER_TRANSPOSITION_PROFILE typedef ptr _NDIS_GFT_HEADER_TRANSPOSITION_PROFILE

define NDIS_SIZEOF_GFT_HEADER_TRANSPOSITION_PROFILE_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_HEADER_TRANSPOSITION_PROFILE, CustomActionProfileOffset)

define NDIS_GFT_HEADER_GROUP_TRANSPOSITION_DECREMENT_TTL_IF_NOT_ONE    0x00000001

define NDIS_GFT_HEADER_GROUP_TRANSPOSITION_REVISION_1       1

_NDIS_GFT_HEADER_GROUP_TRANSPOSITION struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
Action                  NDIS_GFT_HEADER_GROUP_TRANSPOSITION_ACTION ?
HeadersPresent          ULONG ?
HeaderFields            ULONG64 ?
EthernetFields          NDIS_GFP_ETHERNET_HEADER_FIELDS ?
union IPAddress
 struct IPv4Address
  SourceIPAddress       IN_ADDR ?
  DestinationIPAddress  IN_ADDR ?
 ends
 struct IPv6Address
  SourceIPAddress       IN6_ADDR ?
  DestinationIPAddress  IN6_ADDR ?
 ends
ends
Ttl                     UINT8 ?
Dscp                    UINT8 ?
IPProtocol              UINT8 ?
union TransportOrEncapsulation
 struct Udp
  SourcePort            USHORT ?
  DestinationPort       USHORT ?
 ends
 struct Tcp
  SourcePort            USHORT ?
  DestinationPort       USHORT ?
 ends
 struct Encapsulation
  TenantId              ULONG ?
  GreProtocol           USHORT ?
  Entropy               USHORT ?
 ends
ends
_NDIS_GFT_HEADER_GROUP_TRANSPOSITION ends
NDIS_GFT_HEADER_GROUP_TRANSPOSITION typedef _NDIS_GFT_HEADER_GROUP_TRANSPOSITION
PNDIS_GFT_HEADER_GROUP_TRANSPOSITION typedef ptr _NDIS_GFT_HEADER_GROUP_TRANSPOSITION

define NDIS_SIZEOF_GFT_HEADER_GROUP_TRANSPOSITION_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_HEADER_GROUP_TRANSPOSITION, TransportOrEncapsulation)

.enum NDIS_GFT_FLOW_ENTRY_CACHE_HINT {
    NdisGftFlowEntryCacheHintUndefined = 0,
    NdisGftFlowEntryCacheHintLowFrequency = 100,
    NdisGftFlowEntryCacheHintMediumFrequency = 200,
    NdisGftFlowEntryCacheHintHighFrequency = 300,
    NdisGftFlowEntryCacheHintMax = 1000
    }

.enum NDIS_GFT_FLOW_ENTRY_STATE {
    NdisGftFlowEntryStateUndefined,
    NdisGftFlowEntryStateDeactivated,
    NdisGftFlowEntryStateActivated,
    NdisGftFlowEntryStateMax
    }

define NDIS_GFT_CUSTOM_ACTION_LAST_ACTION      0x00000001
define NDIS_GFT_CUSTOM_ACTION_REVISION_1       1

_NDIS_GFT_CUSTOM_ACTION struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
ProfileId               NDIS_GFP_PROFILE_ID ?
Type                    NDIS_GFT_CUSTOM_ACTION_TYPE ?
Length                  ULONG ?
union
 Alignment              ULONG_PTR ?
 ActionData             UCHAR 1 dup(?)
ends
_NDIS_GFT_CUSTOM_ACTION ends
NDIS_GFT_CUSTOM_ACTION  typedef _NDIS_GFT_CUSTOM_ACTION
PNDIS_GFT_CUSTOM_ACTION typedef ptr _NDIS_GFT_CUSTOM_ACTION

define NDIS_SIZEOF_NDIS_GFT_CUSTOM_ACTION_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_CUSTOM_ACTION, Alignment)

define NDIS_GFT_EMFE_ADD_IN_ACTIVATED_STATE                            0x00000001
define NDIS_GFT_EMFE_MATCH_AND_ACTION_MUST_BE_SUPPORTED                0x00000002

define NDIS_GFT_EMFE_RDMA_FLOW                                         0x00000004
define NDIS_GFT_EMFE_REDIRECT_TO_INGRESS_QUEUE_OF_VPORT                0x00001000
define NDIS_GFT_EMFE_REDIRECT_TO_EGRESS_QUEUE_OF_VPORT                 0x00002000
define NDIS_GFT_EMFE_REDIRECT_TO_INGRESS_QUEUE_OF_VPORT_IF_TTL_IS_ONE  0x00004000
define NDIS_GFT_EMFE_REDIRECT_TO_EGRESS_QUEUE_OF_VPORT_IF_TTL_IS_ONE   0x00008000
define NDIS_GFT_EMFE_COPY_ALL_PACKETS                                  0x00010000
define NDIS_GFT_EMFE_COPY_FIRST_PACKET                                 0x00020000
define NDIS_GFT_EMFE_COPY_WHEN_TCP_FLAG_SET                            0x00040000
define NDIS_GFT_EMFE_CUSTOM_ACTION_PRESENT                             0x00080000
define NDIS_GFT_EMFE_META_ACTION_BEFORE_HEADER_TRANSPOSITION           0x00100000
define NDIS_GFT_EMFE_COPY_AFTER_TCP_FIN_FLAG_SET                       0x00200000
define NDIS_GFT_EMFE_COPY_AFTER_TCP_RST_FLAG_SET                       0x00400000

define NDIS_GFT_EMFE_COPY_CONDITION_CHANGED                            0x01000000
define NDIS_GFT_EMFE_ALL_VPORT_FLOW_ENTRIES                            0x02000000

define NDIS_GFT_EMFE_COUNTER_ALLOCATE                                  0x00000001
define NDIS_GFT_EMFE_COUNTER_MEMORY_MAPPED                             0x00000002
define NDIS_GFT_EMFE_COUNTER_CLIENT_SPECIFIED_ADDRESS                  0x00000004
define NDIS_GFT_EMFE_COUNTER_TRACK_TCP_FLOW                            0x00000008

define NDIS_GFT_EXACT_MATCH_FLOW_ENTRY_REVISION_1       1

_NDIS_GFT_EXACT_MATCH_FLOW_ENTRY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
MatchProfileId          NDIS_GFP_PROFILE_ID ?
MatchRequestStatus      NDIS_STATUS ?
ActionRequestStatus     NDIS_STATUS ?
CounterFlags            ULONG ?
CounterUpdateFrequency  NDIS_GFT_COUNTER_UPDATE_FREQUENCY ?
CounterType             NDIS_GFT_COUNTER_TYPE ?
UpdatePeriod            ULONG ?
union CounterValueBuffer
 PacketCounterAddress   PNDIS_GFT_PACKET_COUNTER_VALUE ?
 ByteCounterAddress     PNDIS_GFT_BYTE_COUNTER_VALUE ?
 PacketByteCounterAddress PNDIS_GFT_PACKET_BYTE_COUNTER_VALUE ?
 PacketByteCounterAndStateAddress PNDIS_GFT_PACKET_BYTE_COUNTER_VALUE_AND_STATE ?
ends
HeaderTranspositionProfileId NDIS_GFP_PROFILE_ID ?
RedirectionVPortId      NDIS_NIC_SWITCH_VPORT_ID ?
TtlIsOneRedirectionVPortId NDIS_NIC_SWITCH_VPORT_ID ?
NumCounterObjects       ULONG ?
CounterIdArray          NDIS_GFT_COUNTER_ID NDIS_GFT_MAX_COUNTER_OBJECTS_PER_FLOW_ENTRY dup(?)
CacheHint               NDIS_GFT_FLOW_ENTRY_CACHE_HINT ?
ClientFlowEntryId       NDIS_GFT_FLOW_ENTRY_ID ?
ProviderFlowEntryId     NDIS_GFT_FLOW_ENTRY_ID ?
FlowEntryState          NDIS_GFT_FLOW_ENTRY_STATE ?
TcpSequenceNumber       ULONG ?
HeaderGroupExactMatchArrayOffset ULONG ?
HeaderGroupExactMatchArrayNumElements ULONG ?
HeaderGroupExactMatchArrayElementSize ULONG ?
HeaderGroupTranspositionArrayOffset ULONG ?
HeaderGroupTranspositionArrayNumElements ULONG ?
HeaderGroupTranspositionArrayElementSize ULONG ?
CustomActionOffset      ULONG ?
_NDIS_GFT_EXACT_MATCH_FLOW_ENTRY ends
NDIS_GFT_EXACT_MATCH_FLOW_ENTRY typedef _NDIS_GFT_EXACT_MATCH_FLOW_ENTRY
PNDIS_GFT_EXACT_MATCH_FLOW_ENTRY typedef ptr _NDIS_GFT_EXACT_MATCH_FLOW_ENTRY

define NDIS_SIZEOF_GFT_EXACT_MATCH_FLOW_ENTRY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_EXACT_MATCH_FLOW_ENTRY, CustomActionOffset)

.enum NDIS_GFT_WILDCARD_ACTION {
    NdisGftWildcardActionUndefined,
    NdisGftWildcardActionAllow,
    NdisGftWildcardActionDrop,
    NdisGftWildcardActionMax
    }

define NDIS_GFT_WCFE_ADD_IN_ACTIVATED_STATE                            0x00000001
define NDIS_GFT_WCFE_REDIRECT_TO_INGRESS_QUEUE_OF_VPORT                0x00000002
define NDIS_GFT_WCFE_REDIRECT_TO_EGRESS_QUEUE_OF_VPORT                 0x00000004
define NDIS_GFT_WCFE_REDIRECT_TO_INGRESS_QUEUE_OF_VPORT_IF_TTL_IS_ONE  0x00000008
define NDIS_GFT_WCFE_REDIRECT_TO_EGRESS_QUEUE_OF_VPORT_IF_TTL_IS_ONE   0x00000010
define NDIS_GFT_WCFE_COPY_ALL_PACKETS                                  0x00000020
define NDIS_GFT_WCFE_CUSTOM_ACTION_PRESENT                             0x00000040

define NDIS_GFT_WCFE_COUNTER_ALLOCATE                                  0x00000001
define NDIS_GFT_WCFE_COUNTER_MEMORY_MAPPED                             0x00000002
define NDIS_GFT_WCFE_COUNTER_CLIENT_SPECIFIED_ADDRESS                  0x00000004

define NDIS_GFT_WILDCARD_MATCH_FLOW_ENTRY_REVISION_1                   1

_NDIS_GFT_WILDCARD_MATCH_FLOW_ENTRY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
MatchProfileId          NDIS_GFP_PROFILE_ID ?
MatchRequestStatus      NDIS_STATUS ?
ActionRequestStatus     NDIS_STATUS ?
CounterFlags            ULONG ?
CounterUpdateFrequency  NDIS_GFT_COUNTER_UPDATE_FREQUENCY ?
CounterType             NDIS_GFT_COUNTER_TYPE ?
UpdatePeriod            ULONG ?
union CounterValueBuffer
 PacketCounterAddress   PNDIS_GFT_PACKET_COUNTER_VALUE ?
 ByteCounterAddress     PNDIS_GFT_BYTE_COUNTER_VALUE ?
 PacketByteCounterAddress PNDIS_GFT_PACKET_BYTE_COUNTER_VALUE ?
ends
Priority                ULONG ?
Action                  NDIS_GFT_WILDCARD_ACTION ?
RedirectionVPortId      NDIS_NIC_SWITCH_VPORT_ID ?
TtlIsOneRedirectionVPortId NDIS_NIC_SWITCH_VPORT_ID ?
NumCounterObjects       ULONG ?
CounterIdArray          NDIS_GFT_COUNTER_ID NDIS_GFT_MAX_COUNTER_OBJECTS_PER_FLOW_ENTRY dup(?)
CacheHint               NDIS_GFT_FLOW_ENTRY_CACHE_HINT ?
ClientFlowEntryId       NDIS_GFT_FLOW_ENTRY_ID ?
ProviderFlowEntryId     NDIS_GFT_FLOW_ENTRY_ID ?
FlowEntryState          NDIS_GFT_FLOW_ENTRY_STATE ?
HeaderGroupWildcardMatchArrayOffset ULONG ?
HeaderGroupWildcardMatchArrayNumElements ULONG ?
HeaderGroupWildcardMatchArrayElementSize ULONG ?
CustomActionOffset      ULONG ?
_NDIS_GFT_WILDCARD_MATCH_FLOW_ENTRY ends
NDIS_GFT_WILDCARD_MATCH_FLOW_ENTRY typedef _NDIS_GFT_WILDCARD_MATCH_FLOW_ENTRY
PNDIS_GFT_WILDCARD_MATCH_FLOW_ENTRY typedef ptr _NDIS_GFT_WILDCARD_MATCH_FLOW_ENTRY

define NDIS_SIZEOF_GFT_WILDCARD_MATCH_FLOW_ENTRY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_WILDCARD_MATCH_FLOW_ENTRY, CustomActionOffset)

.enum NDIS_GFT_PROFILE_TYPE {
    NdisGftProfileTypeUndefined,
    NdisGftProfileTypeExactMatch,
    NdisGftProfileTypeHeaderTransposition,
    NdisGftProfileTypeWildcardMatch,
    NdisGftProfileTypeMax
    }

define NDIS_GFT_PROFILE_INFO_REVISION_1       1

_NDIS_GFT_PROFILE_INFO  struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
ProfileType             NDIS_GFT_PROFILE_TYPE ?
TableType               NDIS_GFP_TABLE_TYPE ?
ProfileId               NDIS_GFP_PROFILE_ID ?
NumSupportedFlowEntries ULONG ?
NumCurrentFlowEntries   ULONG ?
HeaderGroupArrayOffset  ULONG ?
HeaderGroupArrayNumElements ULONG ?
HeaderGroupArrayElementSize ULONG ?
_NDIS_GFT_PROFILE_INFO  ends
NDIS_GFT_PROFILE_INFO   typedef _NDIS_GFT_PROFILE_INFO
PNDIS_GFT_PROFILE_INFO  typedef ptr _NDIS_GFT_PROFILE_INFO

define NDIS_SIZEOF_GFT_PROFILE_INFO_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_PROFILE_INFO, HeaderGroupArrayElementSize)

define NDIS_GFT_PROFILE_INFO_ARRAY_REVISION_1        1

_NDIS_GFT_PROFILE_INFO_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
ProfileInfoArrayOffset  ULONG ?
ProfileInfoArrayNumElements ULONG ?
ProfileInfoArrayElementSize ULONG ?
_NDIS_GFT_PROFILE_INFO_ARRAY ends
NDIS_GFT_PROFILE_INFO_ARRAY typedef _NDIS_GFT_PROFILE_INFO_ARRAY
PNDIS_GFT_PROFILE_INFO_ARRAY typedef ptr _NDIS_GFT_PROFILE_INFO_ARRAY

define NDIS_SIZEOF_GFT_PROFILE_INFO_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_PROFILE_INFO_ARRAY, ProfileArrayElementSize)

define NDIS_GFT_DELETE_PROFILE_ALL_PROFILES    0x00000001

define NDIS_GFT_DELETE_PROFILE_PARAMETERS_REVISION_1       1

_NDIS_GFT_DELETE_PROFILE_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
ProfileId               NDIS_GFP_PROFILE_ID ?
_NDIS_GFT_DELETE_PROFILE_PARAMETERS ends
NDIS_GFT_DELETE_PROFILE_PARAMETERS typedef _NDIS_GFT_DELETE_PROFILE_PARAMETERS
PNDIS_GFT_DELETE_PROFILE_PARAMETERS typedef ptr _NDIS_GFT_DELETE_PROFILE_PARAMETERS

define NDIS_SIZEOF_GFT_DELETE_PROFILE_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_DELETE_PROFILE_PARAMETERS, ProfileId)

.enum NDIS_GFT_FLOW_ENTRY_TYPE {
    NdisGftFlowEntryTypeUndefined,
    NdisGftFlowEntryTypeExactMatch,
    NdisGftFlowEntryTypeWildcard,
    NdisGftFlowEntryTypeMax
    }

define NDIS_GFT_FLOW_ENTRY_ARRAY_REVISION_1       1

_NDIS_GFT_FLOW_ENTRY_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
EntryType               NDIS_GFT_FLOW_ENTRY_TYPE ?
FlowEntryArrayOffset    ULONG ?
FlowEntryArrayNumElements ULONG ?
FlowEntryArrayElementSize ULONG ?
_NDIS_GFT_FLOW_ENTRY_ARRAY ends
NDIS_GFT_FLOW_ENTRY_ARRAY typedef _NDIS_GFT_FLOW_ENTRY_ARRAY
PNDIS_GFT_FLOW_ENTRY_ARRAY typedef ptr _NDIS_GFT_FLOW_ENTRY_ARRAY

define NDIS_SIZEOF_GFT_FLOW_ENTRY_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_FLOW_ENTRY_ARRAY, FlowEntryArrayElementSize)

define NDIS_GFT_FLOW_ENTRY_INFO_ALL_FLOW_ENTRIES           0x00000001

define NDIS_GFT_FLOW_ENTRY_INFO_ARRAY_REVISION_1       1

_NDIS_GFT_FLOW_ENTRY_INFO_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
ProviderFlowEntryIdStart NDIS_GFT_FLOW_ENTRY_ID ?
FlowEntryIdCount        ULONG ?
FlowEntryInfoArrayOffset ULONG ?
FlowEntryInfoArrayNumElements ULONG ?
FlowEntryInfoArrayElementSize ULONG ?
_NDIS_GFT_FLOW_ENTRY_INFO_ARRAY ends
NDIS_GFT_FLOW_ENTRY_INFO_ARRAY typedef _NDIS_GFT_FLOW_ENTRY_INFO_ARRAY
PNDIS_GFT_FLOW_ENTRY_INFO_ARRAY typedef ptr _NDIS_GFT_FLOW_ENTRY_INFO_ARRAY

define NDIS_SIZEOF_GFT_FLOW_ENTRY_INFO_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_FLOW_ENTRY_INFO_ARRAY, FlowEntryInfoArrayElementSize)

define NDIS_GFT_FLOW_ENTRY_ID_ALL_NIC_SWITCH_FLOW_ENTRIES      0x00000001
define NDIS_GFT_FLOW_ENTRY_ID_ALL_TABLE_FLOW_ENTRIES           0x00000002
define NDIS_GFT_FLOW_ENTRY_ID_ALL_VPORT_FLOW_ENTRIES           0x00000004
define NDIS_GFT_FLOW_ENTRY_ID_RANGE_DEFINED                    0x00000008
define NDIS_GFT_FLOW_ENTRY_ID_ARRAY_DEFINED                    0x00000010
define NDIS_GFT_FLOW_ENTRY_ID_ARRAY_COUNTER_VALUES             0x00010000

_NDIS_GFT_FLOW_ENTRY_ID_AND_COUNTER struct
FlowEntryId             NDIS_GFT_FLOW_ENTRY_ID ?
CounterValue            NDIS_GFT_COUNTER_VALUE ?
_NDIS_GFT_FLOW_ENTRY_ID_AND_COUNTER ends
NDIS_GFT_FLOW_ENTRY_ID_AND_COUNTER typedef _NDIS_GFT_FLOW_ENTRY_ID_AND_COUNTER
PNDIS_GFT_FLOW_ENTRY_ID_AND_COUNTER typedef ptr _NDIS_GFT_FLOW_ENTRY_ID_AND_COUNTER

define NDIS_GFT_FLOW_ENTRY_ID_ARRAY_REVISION_1       1

_NDIS_GFT_FLOW_ENTRY_ID_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
TableId                 NDIS_GFT_TABLE_ID ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
ProviderFlowEntryIdArrayOffset ULONG ?
ProviderFlowEntryIdArrayNumElements ULONG ?
ProviderFlowEntryIdArrayElementSize ULONG ?
_NDIS_GFT_FLOW_ENTRY_ID_ARRAY ends
FlowEntryIdArray        typedef _NDIS_GFT_FLOW_ENTRY_ID_ARRAY

FlowEntryIdAndCounterArray struct
ProviderFlowEntryIdAndCounterArrayOffset ULONG ?
ProviderFlowEntryIdAndCounterArrayNumElements ULONG ?
ProviderFlowEntryIdAndCounterArrayElementSize ULONG ?
FlowEntryIdAndCounterArray ends

define NDIS_SIZEOF_GFT_FLOW_ENTRY_ID_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_FLOW_ENTRY_ID_ARRAY, IdArray)

define NDIS_GFT_OFFLOAD_PARAMETERS_ENABLE_OFFLOAD      0x00000001

define NDIS_GFT_OFFLOAD_PARAMETERS_REVISION_1            1

_NDIS_GFT_OFFLOAD_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
ExceptionVPortId        NDIS_NIC_SWITCH_VPORT_ID ?
CopyLookaheadLength     ULONG ?
SampleLookaheadLength   ULONG ?
_NDIS_GFT_OFFLOAD_PARAMETERS ends
NDIS_GFT_OFFLOAD_PARAMETERS typedef _NDIS_GFT_OFFLOAD_PARAMETERS
PNDIS_GFT_OFFLOAD_PARAMETERS typedef ptr _NDIS_GFT_OFFLOAD_PARAMETERS

define NDIS_SIZEOF_GFT_OFFLOAD_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_OFFLOAD_PARAMETERS, SampleLookaheadLength)

define NDIS_GFT_OFFLOAD_CAPS_ADD_FLOW_ENTRY_DEACTIVATED_PREFERRED              0x00000001
define NDIS_GFT_OFFLOAD_CAPS_RATE_LIMITING_QUEUE_SUPPORTED                     0x00000002

define NDIS_GFT_OFFLOAD_CAPS_MEMORY_MAPPED_COUNTERS                            0x00000001
define NDIS_GFT_OFFLOAD_CAPS_MEMORY_MAPPED_PAKCET_AND_BYTE_COUNTERS            0x00000002
define NDIS_GFT_OFFLOAD_CAPS_PER_FLOW_ENTRY_COUNTERS                           0x00000004
define NDIS_GFT_OFFLOAD_CAPS_PER_PACKET_COUNTER_UPDATE                         0x00000008
define NDIS_GFT_OFFLOAD_CAPS_CLIENT_SPECIFIED_MEMORY_MAPPED_COUNTERS           0x00000010
define NDIS_GFT_OFFLOAD_CAPS_INGRESS_AGGREGATE_COUNTERS                        0x00000020
define NDIS_GFT_OFFLOAD_CAPS_EGRESS_AGGREGATE_COUNTERS                         0x00000040
define NDIS_GFT_OFFLOAD_CAPS_TRACK_TCP_FLOW_STATE                              0x00000080
define NDIS_GFT_OFFLOAD_CAPS_COMBINED_COUNTER_AND_STATE                        0x00000100

define NDIS_GFT_OFFLOAD_CAPS_INGRESS_WILDCARD_MATCH                            0x00000001
define NDIS_GFT_OFFLOAD_CAPS_EGRESS_WILDCARD_MATCH                             0x00000002
define NDIS_GFT_OFFLOAD_CAPS_INGRESS_EXACT_MATCH                               0x00000004
define NDIS_GFT_OFFLOAD_CAPS_EGRESS_EXACT_MATCH                                0x00000008
define NDIS_GFT_OFFLOAD_CAPS_EXT_VPORT_INGRESS_WILDCARD_MATCH                  0x00000010
define NDIS_GFT_OFFLOAD_CAPS_EXT_VPORT_EGRESS_WILDCARD_MATCH                   0x00000020
define NDIS_GFT_OFFLOAD_CAPS_EXT_VPORT_INGRESS_EXACT_MATCH                     0x00000040
define NDIS_GFT_OFFLOAD_CAPS_EXT_VPORT_EGRESS_EXACT_MATCH                      0x00000080

define NDIS_GFT_OFFLOAD_CAPS_POP                                               0x00000001
define NDIS_GFT_OFFLOAD_CAPS_PUSH                                              0x00000002
define NDIS_GFT_OFFLOAD_CAPS_MODIFY                                            0x00000004
define NDIS_GFT_OFFLOAD_CAPS_IGNORE_ACTION_SUPPORTED                           0x00000008
define NDIS_GFT_OFFLOAD_CAPS_REDIRECT_TO_INGRESS_QUEUE_OF_VPORT                0x00000010
define NDIS_GFT_OFFLOAD_CAPS_REDIRECT_TO_EGRESS_QUEUE_OF_VPORT                 0x00000020
define NDIS_GFT_OFFLOAD_CAPS_REDIRECT_TO_INGRESS_QUEUE_OF_VPORT_IF_TTL_IS_ONE  0x00000040
define NDIS_GFT_OFFLOAD_CAPS_REDIRECT_TO_EGRESS_QUEUE_OF_VPORT_IF_TTL_IS_ONE   0x00000080
define NDIS_GFT_OFFLOAD_CAPS_COPY_ALL                                          0x00000100
define NDIS_GFT_OFFLOAD_CAPS_COPY_FIRST                                        0x00000200
define NDIS_GFT_OFFLOAD_CAPS_COPY_WHEN_TCP_FLAG_SET                            0x00000400
define NDIS_GFT_OFFLOAD_CAPS_SAMPLE                                            0x00000800
define NDIS_GFT_OFFLOAD_CAPS_META_ACTION_BEFORE_HEADER_TRANSPOSITION           0x00001000
define NDIS_GFT_OFFLOAD_CAPS_META_ACTION_AFTER_HEADER_TRANSPOSITION            0x00002000
define NDIS_GFT_OFFLOAD_CAPS_PER_VPORT_EXCEPTION_VPORT                         0x00004000
define NDIS_GFT_OFFLOAD_CAPS_DESIGNATED_EXCEPTION_VPORT                        0x00008000
define NDIS_GFT_OFFLOAD_CAPS_DSCP_MASK                                         0x00010000
define NDIS_GFT_OFFLOAD_CAPS_8021P_PRIORITY_MASK                               0x00020000
define NDIS_GFT_OFFLOAD_CAPS_ALLOW                                             0x00040000
define NDIS_GFT_OFFLOAD_CAPS_DROP                                              0x00080000

define NDIS_GFT_OFFLOAD_CAPABILITIES_REVISION_1            1

_NDIS_GFT_OFFLOAD_CAPABILITIES struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
CounterCapabilities     ULONG ?
SupportedTableTypes     ULONG ?
SupportedEncapsulationTypes ULONG ?
SupportedIngressExactMatchTableActions ULONG ?
SupportedEgressExactMatchTableActions ULONG ?
SoftwareSupportedIngressExactMatchTableActions ULONG ?
SoftwareSupportedEgressExactMatchTableActions ULONG ?
SupportedIngressWildcardMatchTableActions ULONG ?
SupportedEgressWildcardMatchTableActions ULONG ?
SoftwareSupportedIngressWildcardMatchTableActions ULONG ?
SoftwareSupportedEgressWildcardMatchTableActions ULONG ?
NumPacketCounterObjects ULONG ?
NumByteCounterObjects   ULONG ?
NumPacketByteCounterObjects ULONG ?
NumPacketByteCounterAndStateObjects ULONG ?
NumCounterObjectsPerIngressExactMatchFlowEntry ULONG ?
NumCounterObjectsPerEgressExactMatchFlowEntry ULONG ?
NumCounterObjectsPerIngressWildcardMatchFlowEntry ULONG ?
NumCounterObjectsPerEgressWildcardMatchFlowEntry ULONG ?
_NDIS_GFT_OFFLOAD_CAPABILITIES ends
NDIS_GFT_OFFLOAD_CAPABILITIES typedef _NDIS_GFT_OFFLOAD_CAPABILITIES
PNDIS_GFT_OFFLOAD_CAPABILITIES typedef ptr _NDIS_GFT_OFFLOAD_CAPABILITIES

define NDIS_SIZEOF_GFT_OFFLOAD_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_OFFLOAD_CAPABILITIES, NumCounterObjectsPerEgressWildcardMatchFlowEntry)

define NDIS_GFT_VPORT_ENABLE                               0x00000001
define NDIS_GFT_VPORT_PARSE_VXLAN                          0x00000002
define NDIS_GFT_VPORT_PARSE_VXLAN_NOT_IN_SRC_PORT_RANGE    0x00000004

define NDIS_GFT_VPORT_ENABLE_STATE_CHANGED                 0x00100000
define NDIS_GFT_VPORT_EXCEPTION_VPORT_CHANGED              0x00200000
define NDIS_GFT_VPORT_SAMPLING_RATE_CHANGED                0x00400000
define NDIS_GFT_VPORT_DSCP_MASK_CHANGED                    0x00800000
define NDIS_GFT_VPORT_PRIORITY_MASK_CHANGED                0x01000000
define NDIS_GFT_VPORT_VXLAN_SETTINGS_CHANGED               0x02000000
define NDIS_GFT_VPORT_DSCP_FLAGS_CHANGED                   0x04000000
define NDIS_GFT_VPORT_PARAMS_CHANGE_MASK                   0xFFF00000

define NDIS_GFT_VPORT_MAX_DSCP_MASK_COUNTER_OBJECTS        64
define NDIS_GFT_VPORT_MAX_PRIORITY_MASK_COUNTER_OBJECTS    8

define NDIS_GFT_VPORT_DSCP_GUARD_ENABLE_RX                 0x00000001
define NDIS_GFT_VPORT_DSCP_GUARD_ENABLE_TX                 0x00000002
define NDIS_GFT_VPORT_DSCP_MASK_ENABLE_RX                  0x00000004
define NDIS_GFT_VPORT_DSCP_MASK_ENABLE_TX                  0x00000008

define NDIS_GFT_VPORT_PARAMETERS_REVISION_1    1

_NDIS_GFT_VPORT_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
VPortId                 NDIS_NIC_SWITCH_VPORT_ID ?
ExceptionVPortId        NDIS_NIC_SWITCH_VPORT_ID ?
SamplingRate            ULONG ?
DscpMask                ULONG64 ?
NumDscpMaskCounterObjects ULONG ?
DscpMaskCounterIdArray  NDIS_GFT_COUNTER_ID NDIS_GFT_VPORT_MAX_DSCP_MASK_COUNTER_OBJECTS dup(?)
PriorityMask            ULONG64 ?
NumPriorityMaskCounterObjects ULONG ?
PriorityMaskCounterIdArray NDIS_GFT_COUNTER_ID NDIS_GFT_VPORT_MAX_PRIORITY_MASK_COUNTER_OBJECTS dup(?)
VxLanSrcPortBase        USHORT ?
VxLanSrcPortRange       USHORT ?
DscpFlags               ULONG ?
_NDIS_GFT_VPORT_PARAMETERS ends
NDIS_GFT_VPORT_PARAMETERS typedef _NDIS_GFT_VPORT_PARAMETERS
PNDIS_GFT_VPORT_PARAMETERS typedef ptr _NDIS_GFT_VPORT_PARAMETERS

define NDIS_SIZEOF_GFT_VPORT_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_GFT_VPORT_PARAMETERS, DscpFlags)

PNDIS_QOS_SQ_ID         typedef ptr NDIS_QOS_SQ_ID
define NDIS_QOS_DEFAULT_SQ_ID         0

.enum NDIS_QOS_SQ_TYPE {
    NdisQosSqTypeUndefined,
    NdisQosSqTypeStandard,
    NdisQosSqTypeGFT,
    NdisQosSqTypeMax
    }

define NDIS_QOS_SQ_PARAMETERS_REVISION_1        1
if (NDIS_SUPPORT_NDIS684)
define NDIS_QOS_SQ_PARAMETERS_REVISION_2        2
endif

_NDIS_QOS_SQ_PARAMETERS struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SqId                    NDIS_QOS_SQ_ID ?
SqType                  NDIS_QOS_SQ_TYPE ?
TcEnabledTable          BOOLEAN NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TcTransmitBandwidthCapTable ULONG NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TcTransmitBandwidthReservationTable ULONG NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TcReceiveBandwidthCapTable ULONG NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
if (NDIS_SUPPORT_NDIS684)
CrossTcTransmitBandwidthCap ULONG ?
MaxNumSqInputs          ULONG ?
endif
_NDIS_QOS_SQ_PARAMETERS ends
NDIS_QOS_SQ_PARAMETERS  typedef _NDIS_QOS_SQ_PARAMETERS
PNDIS_QOS_SQ_PARAMETERS typedef ptr _NDIS_QOS_SQ_PARAMETERS

define NDIS_SIZEOF_QOS_SQ_PARAMETERS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_QOS_SQ_PARAMETERS, TcReceiveBandwidthCapTable)
if (NDIS_SUPPORT_NDIS684)
define NDIS_SIZEOF_QOS_SQ_PARAMETERS_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_QOS_SQ_PARAMETERS, MaxNumSqInputs)
endif

define NDIS_QOS_SQ_TRANSMIT_CAP_ENABLED            0x00000001
define NDIS_QOS_SQ_TRANSMIT_RESERVATION_ENABLED    0x00000002
define NDIS_QOS_SQ_RECEIVE_CAP_ENABLED             0x00000004

define NDIS_QOS_SQ_PARAMETERS_ARRAY_REVISION_1        1

if (NDIS_SUPPORT_NDIS684)
define NDIS_QOS_SQ_ARRAY_REVISION_1                   1
endif

_NDIS_QOS_SQ_PARAMETERS_ENUM_ARRAY struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SqType                  NDIS_QOS_SQ_TYPE ?
FirstSqId               NDIS_QOS_SQ_ID ?
MaxSqsToReturn          ULONG ?
if (NDIS_SUPPORT_NDIS684)
union
 SqArrayOffset          ULONG ?
 SqParamsArrayOffset    ULONG ?
ends
union
 SqArrayNumElements     ULONG ?
 SqParamsArrayNumElements ULONG ?
ends
union
 SqArrayElementSize     ULONG ?
 SqParamsArrayElementSize ULONG ?
ends
else
SqParamsArrayOffset     ULONG ?
SqParamsArrayNumElements ULONG ?
SqParamsArrayElementSize ULONG ?
endif
_NDIS_QOS_SQ_PARAMETERS_ENUM_ARRAY ends
NDIS_QOS_SQ_PARAMETERS_ENUM_ARRAY typedef _NDIS_QOS_SQ_PARAMETERS_ENUM_ARRAY
PNDIS_QOS_SQ_PARAMETERS_ENUM_ARRAY typedef ptr _NDIS_QOS_SQ_PARAMETERS_ENUM_ARRAY

if (NDIS_SUPPORT_NDIS684)
PNDIS_QOS_SQ_ARRAY      typedef ptr NDIS_QOS_SQ_ARRAY
define NDIS_SIZEOF_QOS_SQ_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_QOS_SQ_ARRAY, SqArrayElementSize)
endif

define NDIS_SIZEOF_QOS_SQ_PARAMETERS_ENUM_ARRAY_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_QOS_SQ_PARAMETERS_ENUM_ARRAY, SqParamsArrayElementSize)

define NDIS_QOS_OFFLOAD_CAPABILITIES_REVISION_1            1
if (NDIS_SUPPORT_NDIS684)
define NDIS_QOS_OFFLOAD_CAPABILITIES_REVISION_2            2
endif

_NDIS_QOS_OFFLOAD_CAPABILITIES struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SupportedSqTypes        ULONG ?
TransmitCapSupported    BOOLEAN NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TransmitReservationSupported BOOLEAN NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
ReceiveCapSupported     BOOLEAN NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TransmitGftCapSupported BOOLEAN NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
ReceiveGftCapSupported  BOOLEAN NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TcSupportedTable        BOOLEAN NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
NumStandardSqsSupported ULONG ?
NumGftSqsSupported      ULONG ?
ReservationGranularitySupported ULONG ?
MaxNumSqInputs          ULONG ?
if (NDIS_SUPPORT_NDIS684)
CrossTcTransmitMaxCapSupported BOOLEAN ?
endif
_NDIS_QOS_OFFLOAD_CAPABILITIES ends
NDIS_QOS_OFFLOAD_CAPABILITIES typedef _NDIS_QOS_OFFLOAD_CAPABILITIES
PNDIS_QOS_OFFLOAD_CAPABILITIES typedef ptr _NDIS_QOS_OFFLOAD_CAPABILITIES

define NDIS_SIZEOF_QOS_OFFLOAD_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_QOS_OFFLOAD_CAPABILITIES, MaxNumSqInputs)
if (NDIS_SUPPORT_NDIS684)
define NDIS_SIZEOF_QOS_OFFLOAD_CAPABILITIES_REVISION_2 RTL_SIZEOF_THROUGH_FIELD(NDIS_QOS_OFFLOAD_CAPABILITIES, CrossTcTransmitMaxCapSupported)
endif

define NDIS_QOS_OFFLOAD_CAPS_STANDARD_SQ   0x00000001
define NDIS_QOS_OFFLOAD_CAPS_GFT_SQ        0x00000002

endif

if (NDIS_SUPPORT_NDIS684)

define NDIS_QOS_SQ_STATS_REVISION_1            1

_NDIS_QOS_SQ_STATS      struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SqId                    NDIS_QOS_SQ_ID ?
SqType                  NDIS_QOS_SQ_TYPE ?
TxBytesRequested        UINT64 NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TxPktsRequested         UINT64 NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TxBytesSuccessfullySent UINT64 NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TxPktsSuccessfullySent  UINT64 NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TxBytesDroppedByRateLimiting UINT64 NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TxPktsDroppedByRateLimiting UINT64 NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TxBytesDroppedTotal     UINT64 NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
TxPktsDroppedTotal      UINT64 NDIS_QOS_MAXIMUM_TRAFFIC_CLASSES dup(?)
_NDIS_QOS_SQ_STATS      ends
NDIS_QOS_SQ_STATS       typedef _NDIS_QOS_SQ_STATS
PNDIS_QOS_SQ_STATS      typedef ptr _NDIS_QOS_SQ_STATS

define NDIS_SIZEOF_QOS_SQ_STATS_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_QOS_SQ_STATS, TxPktsDroppedTotal)

endif

if ((NTDDI_VERSION ge NTDDI_WIN10_RS5) or NDIS_SUPPORT_NDIS682)

define NDIS_TIMESTAMP_CAPABILITIES_REVISION_1 1

_NDIS_TIMESTAMP_CAPABILITY_FLAGS struct
PtpV2OverUdpIPv4EventMsgReceiveHw BOOLEAN ?
PtpV2OverUdpIPv4AllMsgReceiveHw BOOLEAN ?
PtpV2OverUdpIPv4EventMsgTransmitHw BOOLEAN ?
PtpV2OverUdpIPv4AllMsgTransmitHw BOOLEAN ?
PtpV2OverUdpIPv6EventMsgReceiveHw BOOLEAN ?
PtpV2OverUdpIPv6AllMsgReceiveHw BOOLEAN ?
PtpV2OverUdpIPv6EventMsgTransmitHw BOOLEAN ?
PtpV2OverUdpIPv6AllMsgTransmitHw BOOLEAN ?
AllReceiveHw            BOOLEAN ?
AllTransmitHw           BOOLEAN ?
TaggedTransmitHw        BOOLEAN ?
AllReceiveSw            BOOLEAN ?
AllTransmitSw           BOOLEAN ?
TaggedTransmitSw        BOOLEAN ?
_NDIS_TIMESTAMP_CAPABILITY_FLAGS ends
NDIS_TIMESTAMP_CAPABILITY_FLAGS typedef _NDIS_TIMESTAMP_CAPABILITY_FLAGS
PNDIS_TIMESTAMP_CAPABILITY_FLAGS typedef ptr _NDIS_TIMESTAMP_CAPABILITY_FLAGS

_NDIS_TIMESTAMP_CAPABILITIES struct
Header                  NDIS_OBJECT_HEADER ?
HardwareClockFrequencyHz ULONG64 ?
CrossTimestamp          BOOLEAN ?
Reserved1               ULONG64 ?
Reserved2               ULONG64 ?
TimestampFlags          NDIS_TIMESTAMP_CAPABILITY_FLAGS ?
_NDIS_TIMESTAMP_CAPABILITIES ends
NDIS_TIMESTAMP_CAPABILITIES typedef _NDIS_TIMESTAMP_CAPABILITIES
PNDIS_TIMESTAMP_CAPABILITIES typedef ptr _NDIS_TIMESTAMP_CAPABILITIES

define NDIS_SIZEOF_TIMESTAMP_CAPABILITIES_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_TIMESTAMP_CAPABILITIES, TimestampFlags)

define OID_TIMESTAMP_CAPABILITY 0x00A00001
define OID_TIMESTAMP_CURRENT_CONFIG 0x00A00002

define NDIS_HARDWARE_CROSSTIMESTAMP_REVISION_1 1

_NDIS_HARDWARE_CROSSTIMESTAMP struct
Header                  NDIS_OBJECT_HEADER ?
Flags                   ULONG ?
SystemTimestamp1        ULONG64 ?
HardwareClockTimestamp  ULONG64 ?
SystemTimestamp2        ULONG64 ?
_NDIS_HARDWARE_CROSSTIMESTAMP ends
NDIS_HARDWARE_CROSSTIMESTAMP typedef _NDIS_HARDWARE_CROSSTIMESTAMP
PNDIS_HARDWARE_CROSSTIMESTAMP typedef ptr _NDIS_HARDWARE_CROSSTIMESTAMP

define NDIS_SIZEOF_HARDWARE_CROSSTIMESTAMP_REVISION_1 RTL_SIZEOF_THROUGH_FIELD(NDIS_HARDWARE_CROSSTIMESTAMP, SystemTimestamp2)

define OID_TIMESTAMP_GET_CROSSTIMESTAMP 0x00A00003

endif

endif

endif
