You don’t have to clone the entire NBL & all the data. You can keep the NBL and NB, advance the NB forward, insert a new MDL into the list, then retreat the NB back again. You need to undo all this on receive-return, which can be a little tricky if you don’t have a way to immediately identify whether any given NBL is one you’ve modified or not. I suppose you can allocate your new MDLs from a larger buffer, then on receive-return check if the CurrentMdl is within that large buffer.
Making a deep clone is way easier.
BTW, I don’t know if it’s any consolation, but the NLB team has actually considered the multicast-to-a-cluster issue, and believe the current behavior of NLB’s LWF to be by design.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@spherecom.com
Sent: Monday, April 18, 2011 5:51 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Can one modify received buffers?
That’s what I thought based on other responses here and elsewhere but while reading the docs further I came across this statement:
“Pass it on to the next overlying driver by calling NdisFIndicateReceiveNetBufferLists. The driver can modify the contents of the buffer.”
in Receiving Data in a Filter Driver - http://msdn.microsoft.com/en-us/library/ff570448(v=VS.85).aspx
which would indicate that one can modify the data before passing it up.
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