Share via


Filter Intermediate Driver Installation (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.

This topic provides an overview of NDIS filter intermediate driver installation issues. For additional information about the structure of intermediate driver INF files, see Installation Requirements for Network Filter Intermediate Drivers.

A filter intermediate driver requires two INF files. The protocol INF file defines the installation parameters for the protocol lower edge. The virtual miniport INF file defines the installation parameters for the virtual miniport upper edge. Set the Class INF file entry to Net in the virtual miniport INF file and Net in the protocol INF file. A sample Class entry for the protocol INF file follows:

Class = NetService

The DDInstall section in a filter intermediate driver INF file must have a Characteristics entry. Define the Characteristicsentry in your protocol INF file as demonstrated in the following sample:

Characteristics = 0x410

The 0x410 value indicates that the NCF_FILTER and NCF_NO_SERVICE flags are set. NCF_FILTER is required for filter intermediate drivers. NCF_NO_SERVICE is optional.

Define the Characteristics entry in your virtual miniport INF file as demonstrated in the following sample:

Characteristics = 0x29

The Characteristics value 0x29 indicates the NCF_VIRTUAL (0x1), NCF_HIDDEN (0x8) and NCF_NOT_USER_REMOVABLE (0x20) flags are set. NCF_VIRTUAL specifies that the device is a virtual adapter. NCF_NOT_USER_REMOVABLE is optional and specifies that the user cannot remove the intermediate driver. NCF_HIDDEN is optional. Define NCF_HIDDEN if you want to hide the virtual miniport from the user (you should not do this if your user must install devices manually).

The values of the NCF_* flags are defined in netcfgx.h. For more information about NCF_* flags, see DDInstall Section.

The DDInstall section of the protocol INF file for a filter intermediate driver must include an Addreg directive for an Ndi key. The protocol INF file must specify the Service entry under the Ndi key. The virtual miniport INF file, in turn, contains an AddService directive that references a service-install section. The ServiceName value of this AddService directive must match the name of the protocol INF Service entry. The ServiceBinary entry in the service-installsection of the virtual miniport INF file specifies the path to the binary for the filter intermediate driver. During virtual miniport installation, this filter intermediate driver must have been already transferred to the target computer using the CopyFiles directive of the protocol INF file. For more information, see Adding Service-Related Values to the Ndi Keyand DDInstall.Services Section.

The following example shows how a filter intermediate driver protocol INF file specifies the name of the service:

HKR, Ndi,            Service,             , Passthru

This name is the name of the driver's service as it is reported to NDIS. Note that the name of a filter intermediate driver's service need not be the same as the name of the binary for the driver although typically they are the same.

The following is an example of how the virtual miniport INF file references the name of the filter intermediate driver's service when it adds that service:

[PassthruMP.ndi.Services]
AddService = Passthru,0x2, PassthruMP.AddService

[PassthruMP.AddService]
DisplayName    = %PassthruMP_Desc%
ServiceType    = 1 ;SERVICE_KERNEL_DRIVER
StartType      = 3 ;SERVICE_DEMAND_START
ErrorControl   = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\passthru.sys
LoadOrderGroup = PNP_TDI

The user installs the protocol INF file. The protocol INF file references the virtual miniport INF from the FilterDeviceInfId INF file entry as follows:

HKR, Ndi,            FilterDeviceInfId,   , ms_passthrump

Define the virtual miniport INF part of the reference as follows:

%PassthruMP_Desc% = PassthruMP.ndi, ms_passthrump

[Strings]
Msft = "Microsoft"
PassthruMP_Desc = "Passthru Miniport"

The FilterDeviceInfld (ms_passthrump in the example) in the protocol INF file must match the name provided in the virtual miniport INF file.

The FilterClass value of a filter intermediate driver determines its order in a stack of filters. Filter intermediate drivers must define the FilterClass key. The class of the driver can be one of the values in the following table:

Value DescriptionMeaning

scheduler

Packet-scheduling filter service. This class of filter intermediate driver is the highest driver in a stack. A packet scheduler detects the 802.1p priority classification given to packets by QoS-signaling components, and sends those packets according to their priority levels to underlying drivers.

loadbalance

Load-balancing filter service. This class of filter intermediate driver exists between packet-scheduling and fail-over drivers. A load balancing filter service balances its workload of packet transfers by distributing the workload over its bundle of underlying miniport instances.

failover

Fail-over filter service. This class of filter intermediate driver is the lowest driver in a stack. That is, no other drivers that belong to other classes, if installed, can be between this driver's virtual miniport and the adapter being filtered.

 

Note   Only one filter intermediate driver of a specific class can exist in a layered stack of filter intermediate drivers. For example, two filter intermediate drivers of FilterClass "schedule" cannot exist in a stack simultaneously.

 

A sample FilterClass entry follows:

HKR, Ndi,            FilterClass,         , failover

You must define the following entries in the filter intermediate driver protocol INF file to control the driver bindings:

HKR, Ndi\Interfaces, UpperRange,          , noupper
HKR, Ndi\Interfaces, LowerRange,          , nolower
HKR, Ndi\Interfaces, FilterMediaTypes,    , "ethernet, tokenring, fddi, wan"

For more information about controlling the driver bindings, see Intermediate Driver UpperRange And LowerRange INF File Entries.

A filter intermediate driver does not require a notify object for proper installation. When no notify object DLL is provided, the network class installer completes the installation automatically.

A notify object can be used to provide a user interface for the entry of component-specific parameters and configuration information. For more information about creating a notify object, see Intermediate Driver Notify Object.

Adapting the Passthru Sample INF files (NDIS 5.1)

The best way to create your own filter intermediate driver INF files is to copy the INF files from the Passthru sample driver and modify them.

To adapt the protocol INF file (NDIS 5.1)

  1. Change passthru.sys to the name of your own driver in the SourceDiskFiles and Passthru.CopyFiles.Sys sections.

  2. Change the values for BindForm and MiniportId in the Passthru.ndi.AddReg section to appropriate values.

To adapt the virtual miniport INF file (NDIS 5.1)

  1. Replace "MS_PassthruMP" with the InfId of your virtual miniport.

  2. Change ServiceBinary in the PassthruMP.AddService section to the name of your driver.

  3. Change "Passthru" in the PassthruMP.ndi.AddReg section "Service" line to reflect the appropriate name.

 

 

Send comments about this topic to Microsoft