Network INF Files

The INF file format for network drivers follows the same general format as all Windows 95 Plug and Play hardware INF files. NETDI adds to this format by specifying network-installer-specific registry entries. These entries are specified in the INF scripts using the AddReg keyword; they are therefore added to the registry where NETDI stores them along with other driver-related information. Each INF file has the following general format. Many sections entries are omitted so that the general structure of the file can be seen. Boldface type indicates defined keywords.

[version]
signature=$Windows95$
Provider=%V_PROVIDER%
; Class = Net | NetTrans | NetClient | NetService
Class=Net

[manufacturer]
%V_ACME%=acme_drivers

[acme_drivers]
%*PNPF007.desc%=acme007_ndi, *PNPF007
%*PNPF008.desc%=acme008_ndi, *PNPF008

[acme007_ndi]
AddReg=acme00X_ndi_reg

[acme008_ndi]
AddReg=acme00X_ndi_reg

[acme00X_ndi_reg]
; the contents of this section are described later in this document
...

[strings]
V_ACME="ACME, Inc."
V_PROVIDER="ACME, Inc."
; Plug and Play drivers must have a pnp-id + .desc entry in the strings section.
*PNPF007.desc="ACME Ethernet 007"
*PNPF008.desc="ACME Ethernet 008"
 

Note  The files Net.inf, Nettrans.inf, Netcli.inf, and Netservr.inf contain an extra section, the [ClassInstall] section, that are not in other INFs. These files are the only INF files that should have [ClassInstall] sections.

Each software component has three main INF file sections. The main section is executed whenever the user selects a component from the Select Device dialog. It contains all the registration information required by NETDI. This information, described in the next section describes the network interfaces used by the component, compatibility rules, and general PnP driver parameters. It is also used to copy any third-party NDI DLLs. This section defines the other two important INF file sections, the Install and Remove sections. The registration section for the Microsoft NetBEUI protocol is shown in the following:

[NETBEUI.ndi]
AddReg=NETBEUI.ndi.reg
;Unique PnP ID, entry need to be present so that setup can back track
;
the device name from the driver
DeviceID=NETBEUI
;Specify if the device can be installed more than once
;if not specify, default is MaxInstance=1
MaxInstance=1

[NETBEUI.ndi.reg]
HKR,Ndi,DeviceID,,NETBEUI
; NDIS Info
HKR,NDIS,LogDriverName,,NETBEUI
HKR,NDIS,MajorNdisVersion,1,03
HKR,NDIS,MinorNdisVersion,1,0A
HKR,NDIS\NDIS2,DriverName,,"NETBEUI$"
HKR,NDIS\NDIS2,FileName,,"*netbeui"
; Interfaces
HKR,Ndi\Interfaces,DefUpper,,"netbios"
HKR,Ndi\Interfaces,DefLower,,"ndis2,ndis3,odi"
HKR,Ndi\Interfaces,UpperRange,,"netbios"
HKR,Ndi\Interfaces,LowerRange,,"ndis2,ndis3,odi"
; Install sections
HKR,Ndi\Install,,,"NETBEUI.Install"
HKR,Ndi\Remove,,,"NETBEUI.Remove"
;Sessions Parameter (global)
HKR,Ndi\params\sessions,location,,"System\CurrentControlSet\Services\Vxd\NetBeui"
HKLM,System\CurrentControlSet\Services\VxD\NETBEUI\Ndi\params\sessions,ParamDesc,,%NETBEUI_PARAM_SESSIONS%
HKLM,System\CurrentControlSet\Services\VxD\NETBEUI\Ndi\params\sessions,default,,10
HKLM,System\CurrentControlSet\Services\VxD\NETBEUI\Ndi\params\sessions,type,,int
HKLM,System\CurrentControlSet\Services\VxD\NETBEUI\Ndi\params\sessions,min,,3
HKLM,System\CurrentControlSet\Services\VxD\NETBEUI\Ndi\params\sessions,max,,117
;NCBS Parameter (global)
HKR,Ndi\params\ncbs,location,,"System\CurrentControlSet\Services\Vxd\NetBeui"
HKLM,System\CurrentControlSet\Services\VxD\NETBEUI\Ndi\Params\ncbs,ParamDesc,,%NETBEUI_PARAM_NCBS%
HKLM,System\CurrentControlSet\Services\VxD\NETBEUI\Ndi\Params\ncbs,default,,12
HKLM,System\CurrentControlSet\Services\VxD\NETBEUI\Ndi\Params\ncbs,type,,int
HKLM,System\CurrentControlSet\Services\VxD\NETBEUI\Ndi\Params\ncbs,min,,7
HKLM,System\CurrentControlSet\Services\VxD\NETBEUI\Ndi\Params\ncbs,max,,255
; Context help
HKR,Ndi,HelpText,,%NETBEUI_HELP%
 

If your INF file refers to other INF files, there are some additional steps you must take in this registration section. See Referring to Other INFs.

The Install section is executed when the Network Control Panel (or Setup) saves all changes. This section should copy all the files needed for the software component. It should make any registry or .ini file entries that need to be made to start the software beyond the entries NETDI makes in the Plug and Play tree.

For example, the Install section for NetBEUI is:

[NETBEUI.Install]
AddReg=NETBEUI.AddReg
CopyFiles=NETBEUI.CopyFiles
[NETBEUI.AddReg]
HKR,,DevLoader,,*ndis
HKR,,DeviceVxDs,,netbeui.vxd
; RPC
HKLM,"Software\Microsoft\Rpc\ClientProtocols",ncacn_nb_nb,,rpcltc5.dll
HKLM,"Software\Microsoft\Rpc\ServerProtocols",ncacn_nb_nb,,rpclts5.dll
[NETBEUI.CopyFiles]
netbeui.vxd
; RPC
rpcltc5.dll
rpclts5.dll
 

The Remove section is executed when the user removes a software component. This section should remove any registry or .ini file entries that refer to the software and optionally delete the software from the hard disk. The NETBEUI Remove section is:

[NETBEUI.Install]
AddReg=NETBEUI.AddReg
CopyFiles=NETBEUI.CopyFiles
 [NETBEUI.AddReg]
HKR,,DevLoader,,*ndis
HKR,,DeviceVxDs,,netbeui.vxd
; RPC
HKLM,"Software\Microsoft\Rpc\ClientProtocols",ncacn_nb_nb,,rpcltc5.dll
HKLM,"Software\Microsoft\Rpc\ServerProtocols",ncacn_nb_nb,,rpclts5.dll
[NETBEUI.CopyFiles]
netbeui.vxd
; RPC
rpcltc5.dll
rpclts5.dll