> ----------
From: xxxxx@netvigator.com[SMTP:xxxxx@netvigator.com]
Reply To: xxxxx@lists.osr.com
Sent: Tuesday, October 08, 2002 2:25 PM
To: xxxxx@lists.osr.com
Subject: [ntdev] Re: Problem about ProtocolReceive()
Are the following steps correct?
If the lookahead buffer does not contain the complete packet, I should
Step 1) Chain enough buffer for NdisTransferData.
Will NdisTransferData also fill in the header + lookahead? If not, then I
also need to
Header isn’t copied, packet body depends on ByteOffset paramer. See docs for
this function.
Step 2) Copy header + lookahead to a new buffer and chain them to the
beginning.
According to docs, it should by possible to copy header and lookahead and
use NdisTransferData for the rest of packet. As I wrote, I had problems with
it but it was long time before and maybe it is already solved.
If OOB is available, I will do the next step
Step 3) NdisGetReceivedPacket and do NDIS_SET_ORIGINAL_PACKET( ,
NDIS_GET_ORIGINAL_PACKET( ));
Fine but it isn’t enough. At least header size should be set also. See docs
for NDIS_PACKET_OOB_DATA, it is pretty detailed.
After NdisMIndicateReceive returned, I can free both the packet and the
buffers.
General answer is “NO!” but there are special cases. Again, see docs for
this function.
I would recommend to carefully study NDIS docs at first, play with passthru
and debugger at the second and then ask about possible problems or
clarification here. Also, study other network examples in the DDK and see
PCAUSA web site (http://www.pcausa.com) for more info.
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]