NDIS does not require filter drivers to match the NDIS version of the underlying miniport driver. NDIS should do any work necessary to make a 6.0 LWF function normally over a 6.40 miniport driver. (For that matter, you can put a 4.0 filter driver over a 6.40 miniport, and only a few things will break.)
Should you want to upgrade to 6.1+, FilterDirectOidRequest is actually optional for LWFs. So you can be a 6.1-compliant LWF with NULL FilterDirectOidRequest handlers.
Should you want to implement FIlterDirectOidRequest, you can start with the trivial implementation:
NDIS_STATUS
FilterDirectOidRequest(
IN NDIS_HANDLE FilterModuleContext,
IN PNDIS_OID_REQUEST Request
)
{
PMS_FILTER pFilter = (PMS_FILTER)FilterModuleContext;
return NdisFDirectOidRequest(pFilter->FilterHandle, Request);
}
Of course, if that’s all you ever do, it would be more efficient to delete your FilterDirectOidRequest handler and just let NDIS handle it on your behalf - the NDIS default implementation is the same as the above.
Anyway, it sounds like the real problem is that your filter driver doesn’t receive regular OID requests, i.e., non-direct OID requests. If that’s the case, verify that NDIS has your filter’s OidRequestHandler by running !ndiskd.filterdriver in the kernel debugger – look for something like this:
HANDLERS
Filter handler Function pointer Symbol (if available)
OidRequestHandler fffff800014028e0 mydriver!MyFilterOidRequest
OidRequestCompleteHandler fffff800014026a0 mydriver!MyFilterOidRequestComplete
If you see that OidRequestHandler is not NULL and has a symbol, then NDIS knows about your filter’s OID handlers, and NDIS ought to call them. Set a breakpoint on those functions and verify that they really aren’t being called.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Friday, December 6, 2013 8:27 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] FilterDirectOidRequest
Hi guys,
My ndis 6.0 filter driver does not receive OID requests in windows 7. I’ve noticed that the driver I’m trying to filter does not specify ndis version but has directoid handlers, which implies ndis 6.1 at least.
I think I need to upgrade my filter driver, but can’t find any samples for FilterDirectOidRequest. Can anyone help?
Thanks,
Anatoly.
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer