次の方法で共有


Initializing Network Interface Cards (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

Before it receives and sends packets on the network, a miniport driver must initialize each network interface card (NIC) that it manages.

The MiniportInitializefunction:

  • Allocates memory for the adapter-specific context area where it maintains the NIC's run-time state.

  • Obtain a list of hardware resources for the NIC by calling NdisMQueryAdapterResources.

  • Reads the configuration registry database to determine advanced parameters for the NIC it is initializing. The miniport driver stores this information in the adapter-specific context area for the NIC.

  • Reads bus-specific information maintained by the I/O bus, if available.

  • Registers the NIC with NDIS by calling NdisMSetAttributesEx. A deserialized miniport driver must call NdisMSetAttributesEx with the NDIS_ATTRIBUTE_DESERIALIZE flag set to indicate that it is deserialized.

  • Claims the system resources required to operate the NIC. These resources include memory for packets and buffers, I/O port addresses used to read from and write to the device, and so forth. A miniport driver for a bus-master DMA device should call NdisMInitializeScatterGatherDma to initialize system resources used in DMA operations. A legacy miniport driver for a bus-master DMA device calls NdisMAllocateMapRegisters instead.

  • Initializes the NIC.

  • Registers an interrupt if the NIC generates an interrupt.

  • Registers a shutdown handler.

  • Initializes timers.

For a detailed description of the MiniportInitializefunction, see NDIS Miniport Driver Initialization.

 

 

Send comments about this topic to Microsoft