GetIfTable2 at BOOT_START

I need to call GetIfTable2 (from netio) in a BOOT_START driver. I have had it working in the past, but now it returns 0xC00000BB (STATUS_NOT_SUPPORTED), which as best as I can tell means that something GetIfTable2 needs isn’t running.

I have set BootDriverFlags so it should load the right drivers, and then have also set Start=0 in TcpIp and AFD, and in the netvsc network driver, so it definitely loads those drivers at BOOT_START.

When I break in the debugger at the point of the error, the lm command tells me that the above 3 drivers are loaded:

start end module name
fffff80001213000 fffff8000132b000 NDIS (deferred)
fffff8000132b000 fffff800013a4000 NETIO (deferred)
fffff80001c08000 fffff80001e87000 tcpip (deferred)
fffff80001e87000 fffff80001ef3000 fwpkclnt (deferred)
fffff80001ef3000 fffff80001f86000 afd (deferred)
fffff80001f86000 fffff80001f94000 TDI (deferred)
fffff80001f94000 fffff80001fb9000 wfplwfs (deferred)
fffff80001fb9000 fffff80001fd5000 netvsc63 (deferred)
(not the full list, obviously)

What could I try next to find the cause of the problem?

Thanks

James

@james, I had to write something around EMS once what I observed is that
although the drivers are loaded and visible in loaded modules list they
have not yet started. HTH.

On Thu, Jun 9, 2016 at 3:34 PM, James Harper
wrote:

> I need to call GetIfTable2 (from netio) in a BOOT_START driver. I have had
> it working in the past, but now it returns 0xC00000BB
> (STATUS_NOT_SUPPORTED), which as best as I can tell means that something
> GetIfTable2 needs isn’t running.
>
>
>
> I have set BootDriverFlags so it should load the right drivers, and then
> have also set Start=0 in TcpIp and AFD, and in the netvsc network driver,
> so it definitely loads those drivers at BOOT_START.
>
>
>
> When I break in the debugger at the point of the error, the lm command
> tells me that the above 3 drivers are loaded:
>
>
>
> start end module name
>
> fffff80001213000 fffff8000132b000 NDIS (deferred)
>
> fffff8000132b000 fffff800013a4000 NETIO (deferred)
>
> fffff80001c08000 fffff80001e87000 tcpip (deferred)
>
> fffff80001e87000 fffff80001ef3000 fwpkclnt (deferred)
>
> fffff80001ef3000 fffff80001f86000 afd (deferred)
>
> fffff80001f86000 fffff80001f94000 TDI (deferred)
>
> fffff80001f94000 fffff80001fb9000 wfplwfs (deferred)
>
> fffff80001fb9000 fffff80001fd5000 netvsc63 (deferred)
>
> (not the full list, obviously)
>
>
>
> What could I try next to find the cause of the problem?
>
>
>
> Thanks
>
>
>
> James
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: <
> http://www.osronline.com/showlists.cfm?list=ntdev&gt;
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

I don’t recall exactly what subsystem you can register with to get a callback that tells you the network stack is up and running.
WSK? NMR? TDI? WFP?
How about a DriverReinitialize() routine and ‘gently’ poll until NETIO is willing to play.
Good Luck,Dave Cattley

How about NotifyIPInterfaceChange()?
Can you register with NETIO and just wait for the first interface notification?
Regards,Dave Cattley

My vstorport launches a thread and right now it just sits in a loop trying GetIfTable2 and then sleeping for a second. If it was just a matter of waiting, I assume this would be sufficient.

In my previous filter incarnation of this code, GetIfTable2 always worked immediately. It would take a few seconds after that for TCPIP to fully initialise etc, and then I was using NotifyIPInterfaceChange to know when the interface was ready to accept my new address, but GetIfTable2 always worked straight away.

It’s really frustrating, because it’s only now that I am implementing the vstorport side of the driver as opposed to the filter side that this isn’t working. I’m suspecting something quirky with the new visual studio project linking, because the code is fundamentally the same, but I just can’t find what is wrong.

Thanks

James

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Dave Cattley
Sent: Friday, 10 June 2016 11:18 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] GetIfTable2 at BOOT_START

How about NotifyIPInterfaceChange()?

Can you register with NETIO and just wait for the first interface notification?

Regards,
Dave Cattley


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

Got it. Once I took the blinkers off and starting looking at my code I found that my dummy HwStorStartIo was holding on to an SRB_FUNCTION_PNP (RemoveDevice), presumably holding up the initialization process of the modules I required.

Thanks

James

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of James Harper
Sent: Saturday, 11 June 2016 12:05 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] GetIfTable2 at BOOT_START

My vstorport launches a thread and right now it just sits in a loop trying GetIfTable2 and then sleeping for a second. If it was just a matter of waiting, I assume this would be sufficient.

In my previous filter incarnation of this code, GetIfTable2 always worked immediately. It would take a few seconds after that for TCPIP to fully initialise etc, and then I was using NotifyIPInterfaceChange to know when the interface was ready to accept my new address, but GetIfTable2 always worked straight away.

It’s really frustrating, because it’s only now that I am implementing the vstorport side of the driver as opposed to the filter side that this isn’t working. I’m suspecting something quirky with the new visual studio project linking, because the code is fundamentally the same, but I just can’t find what is wrong.

Thanks

James

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Dave Cattley
Sent: Friday, 10 June 2016 11:18 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] GetIfTable2 at BOOT_START

How about NotifyIPInterfaceChange()?

Can you register with NETIO and just wait for the first interface notification?

Regards,
Dave Cattley


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></http:></http:></http:>