Do you Receive packet on passthru in Win2000 DDK?

hi,All.
The thorny problem on NDIS Intermediate floored me . I want to consult with you about it because my PassThru Program could’t receive any packet.
In my LAN, Miniport in the Intermediate Driver could normally send the packets, but protocol in the Intermediate Driver couldn’t receive a Packet.
The return value of NdisGetReceivedPacket(…) in Function PtReceive(…) is NULL , so I hardly received any packets and couldn’t deal with these packets. Could you tell me why and how resolving this problem ?
Expect solicitous your answer!!!
Please reply Genius3@8848.net
Thank you very much!

[microsoft bug]
TCP/IP ReceivePacket Handler Bug
—Summary—
If a miniport or NDIS IM driver uses the NdisMIndicateReceivePacket function to indicate receives, the TCP/IP ReceivePacketHandler does not handle the case where the virtual memory that would represent the LookAheadBuffer area spans multiple NDIS_BUFFERs (MDLs).
If a miniport or NDIS IM driver uses the old NdisMEthIndicateReceive function rather than NdisMIndicateReceivePacket, then multiple NDIS_BUFFERs (MDLs) in receive works fine as buffer chain is converted to a flat buffer.
As far as known, this bug is present in Windows 2000 through at least SP1 as well as Whistler. This bug may actually never be fixed and may, instead, become part of the specification.
—Discussion—
This bug effects how your miniport or NDIS IM miniport edge constructs a NDIS_PACKET to be indicated upwards as received data. If the packet is not constructed as necessary to accomodate this bug, then the TCP/IP ReceivePacketHandler will essentially ignore the packet.

Richard Jee
May 9,2001


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

In your PtReceive handler you should write your code as if
NdisGetReceivedPacket does not exist.

In your PtReceive handler the HeaderBuffer contains the MAC header
information and the LookAheadBuffer contains at least some (usually all…)
of the packet payload.

If LookaheadSize == PacketSize, then the HeaderBuffer and LookaheadBuffer
together present you with all on the bytes of the network frame. They just
aren’t “packaged” in a NDIS_PACKET. You must do that yourself if you require
it.

There is one additional case that you must deal with. If LookaheadSize <
PacketSize, then you must use the NdisTransferData function to fetch the
rest of the packet.

Looking through some “older” NDIS IM driver samples or perhaps the looking
at the ReceiveHandler code in other ordinary NDIS protocol drivers may give
you a perspective on how to work in the ReceiveHandler.

Good luck,

Thomas F. Divine

PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client
http: - http:

----- Original Message -----
From:
To: NT Developers Interest List
Sent: Wednesday, May 09, 2001 8:45 AM
Subject: [ntdev] Do you Receive packet on passthru in Win2000 DDK?

> hi,All.
> The thorny problem on NDIS Intermediate floored me . I want to consult
with you about it because my PassThru Program could’t receive any packet.
> In my LAN, Miniport in the Intermediate Driver could normally send the
packets, but protocol in the Intermediate Driver couldn’t receive a Packet.
> The return value of NdisGetReceivedPacket(…) in Function
PtReceive(…) is NULL , so I hardly received any packets and couldn’t deal
with these packets. Could you tell me why and how resolving this problem ?
> Expect solicitous your answer!!!
> Please reply Genius3@8848.net
> Thank you very much!


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</http:></http:>

Thomas F. Divine:
hi,thanks for your answer.I am tring to write myself code for ReceiveHandle.
After I has chaanged RealTek RTL8139 for D-Link DEF530TX, Packet could be received. I couldn’t understand why PtReceivePacket is called not PtReceive( ),


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com