Hi,
I have a question regarding NdisMSendNetBufferListsComplete(…).
I understand that this function will return a NET_BUFFER_LIST (NBL) structure back to the ‘sending’ driver. The documentation also seems to say that any linked NBL structs will be returned as well. Correct ?
Now assuming I get a NBL list from MiniportSendNetBufferLists with multiple NBL’s chained together, how can I safely return individual NBL structs?
Is it just a matter of NULL-ing the Next pointer of one and calling NdisMSendNetBufferListsComplete ?
Or are there some additional tricks to be done ? Documentation mentions ‘splitting’ the NBL list but doesn’t say how.
Thanks,
Filip-
As you iterate through the original NBL you can put each NBL into a separate
queue. For example, if you are blocking some packets (NBLs) but allowing
others to passthru unchanged you can have two queues.
When you have finished processing the original NBL you can process each
queue.
The WDK NDIS LWF sample actually includes some handy MACROs that work really
well in managing simple queues for this purpose, but I don’t think the
sample actually uses anything. If you study those MACROs and give it some
thought I suspect you’ll get the idea.
Examine various NDIS 6 WDK samples to see how they address this issue.
Thomas F. Divine
http://www.pcausa.com
From:
Sent: Tuesday, January 12, 2010 12:08 PM
To: “Windows System Software Devs Interest List”
Subject: [ntdev] NdisMSendNetBufferListsComplete question
> Hi,
>
> I have a question regarding NdisMSendNetBufferListsComplete(…).
>
> I understand that this function will return a NET_BUFFER_LIST (NBL)
> structure back to the ‘sending’ driver. The documentation also seems to
> say that any linked NBL structs will be returned as well. Correct ?
>
> Now assuming I get a NBL list from MiniportSendNetBufferLists with
> multiple NBL’s chained together, how can I safely return individual NBL
> structs?
>
> Is it just a matter of NULL-ing the Next pointer of one and calling
> NdisMSendNetBufferListsComplete ?
>
> Or are there some additional tricks to be done ? Documentation mentions
> ‘splitting’ the NBL list but doesn’t say how.
>
> Thanks,
>
> Filip-
>
> —
> NTDEV is sponsored by OSR
>
> 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