I am trying to assign a static ip to my Intermediate driver using the
registry as shown below. My IM driver, which is based off the windows DDK
sample passthru code, only exposes the upper-edge functions to the NDIS and
the
does not have an interface to any underlying driver because of the fact that
I am reading data off a file and sending it up the TCP/IP stack to the Apps.
My driver gets loaded fine but when i try to bind to "192.168.3.3", thats the
IP of my miniport, it errors out with the error code: 10049, cannot assign
requested address, requested address is not valid in its context.
GetAdapatersInfo() does not list my driver. I have an entry in the registry
to hook TCP/IP protocol driver to the IM but even then winsock apis dont seem
to see that IP. I am not sure whether i am missing something in the
registry.
;-------------------------------------------------------------------------------
; Tell NDIS about the PASSTHRU driver:
[HKEY_LOCAL_MACHINE\Comm\PASSTHRU]
"DisplayName"="VNIC Miniport Driver"
"Group"="NDIS"
"ImagePath"="fndis.dll"
[HKEY_LOCAL_MACHINE\Comm\PASSTHRU\Linkage]
"Route"=multi_sz:"PASSTHRU1"
[HKEY_LOCAL_MACHINE\Comm\PASSTHRU1]
"DisplayName"="VNIC Miniport Driver"
"Group"="NDIS"
"ImagePath"="fndis.dll"
; Tell NDIS some required info about the PASSTHRU adapter instance:
[HKEY_LOCAL_MACHINE\Comm\PASSTHRU1\Parms]
"BusType"=dword:0
"BusNumber"=dword:0
"DisablePowerManagement"=dword:1
[HKEY_LOCAL_MACHINE\Comm\PASSTHRU1\Parms\TcpIp]
"EnableDHCP"=dword:0
"DefaultGateway"=""
"UseZeroBroadcast"=dword:0
"IpAddress"="192.168.3.3"
"Subnetmask"="255.255.255.0"
;Bind TCP/IP to the miniport instance
[HKEY_LOCAL_MACHINE\Comm\Tcpip\Linkage]
"Bind"=multi_sz:"PASSTHRU1"
Any input from you would be greatly appreciated.
Thanks,