0

We are upgrading our NDIS 5.1 Intermediate Miniport driver to NDIS 6.

We need to prepend some header information to a packet that is goind to be sent. In 5.1 we used NdisChainBufferAtFront().

We already did the entire kitchen to traverse and clone the entire NetBufferLists structure, we are down to preparing each cloned NetBuffer.

What is the correct way to prepend (means, at front!) a 22-byte header to a packet (NetBuffer) that is going to be sent? (We would prefer a method that avoids copying original MDL data)

user245481
  • 17
  • 3

1 Answers1

0

You can use NdisRetreatNetBufferDataStart to add bytes for header information.

read this link till remarks to know how its done. It will surely help:

http://msdn.microsoft.com/en-in/library/windows/hardware/ff564527%28v=vs.85%29.aspx

ps: you dont at all need to copy mdl

  • We figured that out already, but thanks anyway for the confirmation. Somewhere it's said that NDIS will automatically prepend mdl if needed. – user245481 Nov 29 '14 at 18:26