An NDIS miniport driver sets up an NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES structure to define the general miniport driver attributes that are associated with a miniport adapter.
Syntax
typedef struct _NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES {
NDIS_OBJECT_HEADER Header;
ULONG Flags;
NDIS_MEDIUM MediaType;
NDIS_PHYSICAL_MEDIUM PhysicalMediumType;
ULONG MtuSize;
ULONG64 MaxXmitLinkSpeed;
ULONG64 XmitLinkSpeed;
ULONG64 MaxRcvLinkSpeed;
ULONG64 RcvLinkSpeed;
NDIS_MEDIA_CONNECT_STATE MediaConnectState;
NDIS_MEDIA_DUPLEX_STATE MediaDuplexState;
ULONG LookaheadSize;
PNDIS_PNP_CAPABILITIES PowerManagementCapabilities;
ULONG MacOptions;
ULONG SupportedPacketFilters;
ULONG MaxMulticastListSize;
USHORT MacAddressLength;
UCHAR PermanentMacAddress[NDIS_MAX_PHYS_ADDRESS_LENGTH];
UCHAR CurrentMacAddress[NDIS_MAX_PHYS_ADDRESS_LENGTH];
PNDIS_RECEIVE_SCALE_CAPABILITIES RecvScaleCapabilities;
NET_IF_ACCESS_TYPE AccessType;
NET_IF_DIRECTION_TYPE DirectionType;
NET_IF_CONNECTION_TYPE ConnectionType;
NET_IFTYPE IfType;
BOOLEAN IfConnectorPresent;
ULONG SupportedStatistics;
ULONG SupportedPauseFunctions;
ULONG DataBackFillSize;
ULONG ContextBackFillSize;
PNDIS_OID SupportedOidList;
ULONG SupportedOidListLength;
ULONG AutoNegotiationFlags;
PNDIS_PM_CAPABILITIES PowerManagementCapabilitiesEx;
} NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES, *PNDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES;
Members
Header
The NDIS_OBJECT_HEADER structure for the NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES structure. Set the Type member of the structure that Header specifies to NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES.
To indicate the version of the NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES structure, set the Revision member to one of the following values:
NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES_REVISION_2
Added the PowerManagementCapabilitiesEx member for NDIS 6.2.
Set the Size member to NDIS_SIZEOF_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES_REVISION_2.
NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES_REVISION_1
NDIS 6.0 和 NDIS 6,1 的原始版本。
Set the Size member to NDIS_SIZEOF_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES_REVISION_1.
Flags
保留为 NDIS。
MediaType
The NdisMediumXxx type that the miniport adapter supports. For more information, see NDIS_MEDIUM.
PhysicalMediumType
微型端口适配器的物理中等类型。 For more information, see OID_GEN_PHYSICAL_MEDIUM
MtuSize
最大传输单位(MTU)大小。 For more information, see OID_GEN_MAXIMUM_FRAME_SIZE.
MaxXmitLinkSpeed
适配器的最大传输链路速度(以位/秒为单位)。 For more information, see OID_GEN_MAX_LINK_SPEED.
XmitLinkSpeed
适配器的当前传输链路速度(以位/秒为单位)。 For more information, see OID_GEN_LINK_SPEED_EX.
MaxRcvLinkSpeed
适配器的最大接收链路速度(以位/秒为单位)。 For more information, see OID_GEN_MAX_LINK_SPEED.
RcvLinkSpeed
适配器的当前接收链路速度(以位/秒为单位)。 For more information, see OID_GEN_LINK_SPEED_EX.
MediaConnectState
微型端口适配器的媒体连接状态。 有关详细信息,请参阅 OID_GEN_MEDIA_CONNECT_STATUS_EX.
MediaDuplexState
微型端口适配器的媒体双工状态。 For more information, see OID_GEN_MEDIA_DUPLEX_STATE.
LookaheadSize
微型端口适配器的外观大小。 For more information, see OID_GEN_CURRENT_LOOKAHEAD.
PowerManagementCapabilities
微型端口适配器的即插即用(PnP)功能。 For more information about PnP capabilities, see OID_PNP_CAPABILITIES. If the miniport adapter is not power management-aware, the miniport driver should set PowerManagementCapabilities to NULL. NDIS 6.20 and later drivers must use the PowerManagementCapabilitiesEx member instead.
MacOptions
微型端口适配器的 MAC 选项。 For more information, see OID_GEN_MAC_OPTIONS.
SupportedPacketFilters
微型端口适配器的数据包筛选器标志。
MaxMulticastListSize
微型端口适配器的多播地址列表大小。 有关详细信息,请参阅 OID_802_3_MAXIMUM_LIST_SIZE.
MacAddressLength
MAC 地址长度(以字节为单位)。 MAC 地址长度特定于媒体类型。
PermanentMacAddress[NDIS_MAX_PHYS_ADDRESS_LENGTH]
永久 MAC 地址。 For example, the OID_802_3_PERMANENT_ADDRESS OID specifies the permanent MAC address for IEEE 802.3 drivers.
CurrentMacAddress[NDIS_MAX_PHYS_ADDRESS_LENGTH]
当前 MAC 地址。 For example, the OID_802_3_CURRENT_ADDRESS OID specifies the current MAC address for IEEE 802.3 drivers.
RecvScaleCapabilities
NIC 的接收端缩放 (RSS) 功能。 If the miniport adapter does not support the RSS feature, set RecvScaleCapabilities to NULL. 有关 RSS 的详细信息,请参阅 OID_GEN_RECEIVE_SCALE_CAPABILITIES.
AccessType
A NET_IF_ACCESS_TYPE NDIS network interface access type.
DirectionType
A NET_IF_DIRECTION_TYPE NDIS network interface direction type.
ConnectionType
A NET_IF_CONNECTION_TYPE NDIS network interface connection type.
IfType
Internet 分配号码机构 (IANA) 接口类型。 For example, IF_TYPE_ETHERNET_CSMACD (6) is the value for IfType that is assigned to any Ethernet-like interface. 有关接口类型(如果接口类型)的列表,请参阅 NDIS 接口类型。
IfConnectorPresent
一个布尔值,该值指示连接器是否存在。 Set this value to TRUE if there is a physical adapter.
SupportedStatistics
支持的统计信息。
NDIS_STATISTICS_DIRECTED_FRAMES_RCV_SUPPORTED
The data in the ifHCInUcastPkts member is valid.
NDIS_STATISTICS_MULTICAST_FRAMES_RCV_SUPPORTED
The data in the ifHCInMulticastPkts member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_BROADCAST_FRAMES_RCV_SUPPORTED
The data in the ifHCInBroadcastPkts member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_BYTES_RCV_SUPPORTED
The data in the ifHCInOctets member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_RCV_DISCARDS_SUPPORTED
The data in the ifInDiscards member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_RCV_ERROR_SUPPORTED
The data in the ifInErrors member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_DIRECTED_FRAMES_XMIT_SUPPORTED
The data in the ifHCOutUcastPkts member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_MULTICAST_FRAMES_XMIT_SUPPORTED
The data in the ifHCOutMulticastPkts member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_BROADCAST_FRAMES_XMIT_SUPPORTED
The data in the ifHCOutBroadcastPkts member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_BYTES_XMIT_SUPPORTED
The data in the ifHCOutOctets member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_XMIT_ERROR_SUPPORTED
The data in the ifOutErrors member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_XMIT_DISCARDS_SUPPORTED
The data in the ifOutDiscards member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_DIRECTED_BYTES_RCV_SUPPORTED
The data in the ifHCInUcastOctets member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_MULTICAST_BYTES_RCV_SUPPORTED
The data in the ifHCInMulticastOctets member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_BROADCAST_BYTES_RCV_SUPPORTED
The data in the ifHCInBroadcastOctets member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_DIRECTED_BYTES_XMIT_SUPPORTED
The data in the ifHCOutUcastOctets member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_MULTICAST_BYTES_XMIT_SUPPORTED
The data in the ifHCOutMulticastOctets member of NDIS_STATISTICS_INFO is valid.
NDIS_STATISTICS_BROADCAST_BYTES_XMIT_SUPPORTED
The data in the ifHCOutBroadcastOctets member of NDIS_STATISTICS_INFO is valid.
SupportedPauseFunctions
支持 IEEE 802.3 暂停帧作为以下暂停函数之一:
NdisPauseFunctionsUnsupported
指示适配器或链接伙伴不支持暂停帧。
NdisPauseFunctionsSendOnly
指示适配器和链接伙伴仅支持将暂停帧从适配器发送到链接伙伴。
NdisPauseFunctionsReceiveOnly
指示适配器和链接伙伴仅支持将暂停帧从链接伙伴发送到适配器
NdisPauseFunctionsSendAndReceive
指示适配器和链接合作伙伴支持在 transint 和接收方向中发送和接收暂停帧。
NdisPauseFunctionsUnknown
指示正在进行暂停帧协商。 链接合作伙伴提供的暂停帧支持未知。
DataBackFillSize
驱动程序所需的数据回填大小(以字节为单位)。
ContextBackFillSize
驱动程序所需的上下文回填大小(以字节为单位)。
SupportedOidList
微型端口驱动程序支持的 OID 列表。 For more information, see OID_GEN_SUPPORTED_LIST.
SupportedOidListLength
The size, in bytes, of the OID list at SupportedOidList .
AutoNegotiationFlags
微型端口适配器的自动协商设置。 此成员是从以下标志的按位 OR 创建的:
NDIS_LINK_STATE_XMIT_LINK_SPEED_AUTO_NEGOTIATED
适配器已与链接伙伴自动协商传输链路速度。
NDIS_LINK_STATE_RCV_LINK_SPEED_AUTO_NEGOTIATED
适配器已与链接伙伴自动协商接收链接速度。
NDIS_LINK_STATE_DUPLEX_AUTO_NEGOTIATED
适配器已与链接伙伴自动协商双工状态。
NDIS_LINK_STATE_PAUSE_FUNCTIONS_AUTO_NEGOTIATED
适配器已与链接伙伴自动协商暂停函数。
PowerManagementCapabilitiesEx
A pointer to an NDIS_PM_CAPABILITIES structure. 此结构指定微型端口适配器的电源管理功能。 对于 NDIS 6.20 及更高版本的驱动程序,此成员是必需的。
Remarks
A miniport driver passes a pointer to an NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES structure in the MiniportAttributes parameter of the NdisMSetMiniportAttributes function. A miniport driver calls NdisMSetMiniportAttributes from its MiniportInitializeEx function during initialization. 微型端口驱动程序在设置注册属性后应设置这些属性 NDIS_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES structure and before they set any other attributes. 设置这些属性是必需的。
Requirements
| Requirement | Value |
|---|---|
| 最低支持的客户端 | NDIS 6.0 及更高版本中受支持。 |
| Header | miniportgeneralattributes.h (include ndis.h) |