navystone

Hi, everyone, I want to set the TCPIP.SYS BootStart to zero so it can enable in kernel mode. But it's always hang or raise BOSD.

if the TCPIP does not start in BootStart mode, the WSK function of WskCaptureProviderNPI with WSK_INFINITE_WAIT will blocked. I also create a system thread to call WskCaptureProviderNPI with WSK_INFINITE_WAIT, I still can not create any WSK_SOCKET if tcpip's start value as 1.

Does anyone know how to deal it Under 2000/XP with TDI, tcpip bootstart to zero is OK.

Thanks in adavnced.


Re: Winsock Kernel (WSK) How to Enable TCPIP.SYS in kernel Mode?

Osman Ertugay - MSFT

Hello Stone,

Both the WSK subsystem and the TCPIP transport will eventually start as the system boots up. You can wait for the WSK subsystem to come up by calling WskCaptureProviderNPI in a thread different from the one your DriverEntry is called in. Once you capture the WSK provider NPI, you can query avaliable transports via the WSK_TRANSPORT_LIST_QUERY Ioctl with WskControlClient routine. If the transport that you are interested in is not up yet, then you can use the WSK_TRANSPORT_LIST_CHANGE Ioctl to wait for transport list change notifications.

As you noted, TCPIP transport will not start as a boot driver in Vista RTM, so you can not use it to create sockets when the system is still in the boot start phase. Additionally, the WSK subsystem itself will not be up and running in the boot start phase either. It's not a reliable/supported way to change the start phase of these system drivers by manipulating their start modes in the Registry or via SCM APIs. I would be very interested to know if you really need to be able to create WSK sockets over TCPIP in boot start phase and why.

Thanks.

--Osman






Re: Winsock Kernel (WSK) How to Enable TCPIP.SYS in kernel Mode?

navystone

Thanks, Osman, it's a bad news for me. :(

You are right. I try a some ways to pass the WskCaptureProviderNPI in another system thread, and it's return success. but when creating TCP device using TDI or Mapped TDI, or createing TCP socket using WSK, it always return STATUS_OBJECTNAME_NOT_FOUND or STATUS_PROTOCOL_UNREACHABLE.....

What I testing is mounting remote disk via TCP in BootStart, I have successfully mounting the disk in bootstart phase under Windows 2000 and Windows XP and WIndows 2003. Also Under Vista, it also successfully under system start phase, but always fail under the boot start phase. :(

Mr. Osman, Is there any another way to implement it

Thanks.