Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function informs the NDIS library about significant features of the caller's NIC or virtual NIC during initialization.
VOID NdisMSetAttributesEx( IN NDIS_HANDLE MiniportAdapterHandle , IN NDIS_HANDLE MiniportAdapterContext , IN UINT CheckForHangTimeInSeconds , OPTIONAL, IN ULONG AttributeFlags , IN NDIS_INTERFACE_TYPE AdapterType );
Parameters
Specifying a value greater than 2 extends both the check-for-hang and time-out intervals. NDIS uses double the specified check-for-hang interval as its time-out interval for the caller.
Value | Description |
---|---|
NDIS_ATTRIBUTE_BUS_MASTER | Set if the caller's NIC is a busmaster DMA device. |
NDIS_ATTRIBUTE_IGNORE_PACKET_TIMEOUT | Set if NDIS should not attempt to time-out pending send packets that it holds queued to the caller. Intermediate drivers should set this flag, but NIC drivers should not. |
NDIS_ATTRIBUTE_IGNORE_REQUEST_TIMEOUT | Set if NDIS should not attempt to time-out pending query and set requests that it holds queued to the caller. Intermediate drivers should set this flag, but NIC drivers should not. |
NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER | Set if the caller is an intermediate driver. |
NDIS_ATTRIBUTE_IGNORE_TOKEN_RING_ERRORS | Set if NDIS should not call a token ring NIC driver's MiniportResetfunction if token ring errors are indicated. |
Value | Description |
---|---|
NdisInterfaceInternal | Specifies a host-specific internal interface. |
NdisInterfaceIsa | Specifies the ISA interface. |
NdisInterfaceEisa | Specifies the extended ISA (EISA) interface. |
NdisInterfacePci | Specifies the Peripheral Component Interconnect (PCI) interface. |
NdisInterfacePCMcia | Specifies the Personal Computer Memory Card International Association (PCMCIA) interface. |
This parameter is irrelevant for intermediate drivers, which should pass 0 for this parameter to this function.
Remarks
MiniportInitializemust call this function or NdisMSetAttributesbefore calling any other NdisMRegister XXXor Ndis XXX function that depends on the information supplied to this function. For example, an NIC driver's call to NdisMAllocateMapRegistersfails if MiniportInitializehas not yet called this function with the AttributeFlagsset with NDIS_ATTRIBUTE_BUS_MASTER.
Intermediate drivers must call this function, rather than NdisMSetAttributes, and they must set the NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER in the AttributeFlags. Setting this flag causes NDIS to treat an intermediate driver as a full-duplex miniport, which prevents rare but intermittent deadlocks from occurring in the intermediate driver. Consequently, every intermediate driver must be capable of handling concurrent sends and indications.
NIC drivers can call either of these functions from MiniportInitialize, but NdisMSetAttributesdoes not allow its caller to adjust the interval at which an NIC driver's MiniportCheckForHangand/or MiniportResetfunction(s) are called.
The value of CheckForHangTimeInSecondsdetermines the NDIS library's time-out interval on sends and requests that it holds queued to the caller. By default, NDIS times out queued sends and requests at twice the check-for-hang interval, after which it calls the MiniportResetfunction, unless the driver sets AttributeFlagswith NDIS_ATTRIBUTE_IGNORE_PACKET_TIMEOUT and NDIS_ATTRIBUTE_IGNORE_REQUEST_TIMEOUT when it calls this function. Intermediate drivers should set these flags when calling this function because such a driver cannot determine or control when the underlying device driver processes sends and requests.
NIC drivers should not set the NDIS_ATTRIBUTE_IGNORE_PACKET_TIMEOUT and NDIS_ATTRIBUTE_IGNORE_REQUEST_TIMEOUT flags, although NDIS honors such a specification by an NIC driver. However, NIC drivers can adjust the time-out interval at which their MiniportResetfunctions are called by specifying an explicit CheckForHangTimeInSeconds. For example, an NIC driver that emulates Ethernet over a modem might not complete every packet within the default time-out interval of the NDIS library. Whenever a packet appears to time out on such an NIC, NDIS assumes that the NIC is no longer operating correctly and calls the driver's MiniportResetfunction. For the driver of such an NIC, calling this function with a CheckForHangTimeInSecondsset to something greater than 2 both prevents unnecessary resets and extends the interval at which its MiniportCheckForHangfunction, if any, is called to test the operational state of the NIC.
In general, an NIC driver must call this function before it calls any Ndis XXXfunction that claims hardware resources in the registry for its NIC, because NDIS must have the AttributeFlagsvalue before such a call is made and because the driver usually needs the memory at MiniportAdapterContextto store information for these calls. This restriction implies that an NIC driver's MiniportInitializefunction cannot call the following Ndis XXXfunctions before it calls this function:
However, before calling this function, any driver's MiniportInitializefunction can call the NDIS configuration functions to retrieve configuration information installed in the registry. Before calling this function, an NIC driver can call the NdisImmediate XXX, such as NdisImmediateReadPciSlotInformationor NdisImmediateReadSharedMemory, as well as the NdisImmediate XXXPort XXXfunctions. MiniportInitializecan also call the bus-type-specific NdisRead XXXfunctions, such as NdisReadPciSlotInformation, as long as the installed registry entry for the driver's interface type matches the bus-type-specific NdisRead XXX MiniportInitializecalls.
The MiniportAdapterContexthandle supplied to this function becomes an input parameter to all Miniport XXXfunctions that were registered, along with MiniportInitialize, in the call to NdisMRegisterMiniportor NdisIMRegisterLayeredMiniport. Usually, this handle is a pointer to resident memory allocated by MiniportInitialize, in which the driver maintains NIC-specific run-time state.
A driver that calls this function runs at IRQL PASSIVE_LEVEL.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Ndis.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
NdisAllocateMemory, NdisMMapIoSpace, NdisMPciAssignResources, NdisMRegisterInterrupt, NdisMRegisterIoPortRange, NdisMRegisterMiniport, NdisOpenConfiguration
Last updated on Tuesday, July 13, 2004