I receive a packet in myReceivePacket() and then I create own descriptor and chain up my own buffers to it and do an NdisMIndicateReceivePacket to the upperlayer. Before passing the pkt up I make sure I have all the right information and all the expected buffers of expected lengths are chained up. Also, for the desciptor that I create I do
NDIS_SET_ORIGINAL_PACKET(MyPacket, NDIS_GET_ORIGINAL_PACKET(MyPacket));
I see that my breakpoint for IPRcv is not being hit. Does anyone know what the problem could be ? . How can I set breakpoints to see what happened to the indication … which driver got it… Also since its a deserialized driver, I cant check the status of the pkt after the indicate call, but I set the pkt desc status to NDIS_STATUS_RESOURCES before the indication.
Thanks
-Johnny
====----
>From: Michal Vodicka
>Reply-To: “NT Developers Interest List”
>To: “NT Developers Interest List”
>Subject: [ntdev] Re: Q on NdisReturnPackets
>Date: Mon, 8 Apr 2002 23:38:01 +0200
>
> > ----------
> > From: xxxxx@vallcom.com[SMTP:xxxxx@vallcom.com]
> > Reply To: xxxxx@lists.osr.com
> > Sent: Monday, April 08, 2002 10:09 PM
> > To: xxxxx@lists.osr.com
> > Subject: [ntdev] Re: Q on NdisReturnPackets
> >
> > Michal,
> > What does NdisGetReceivedPacket returns the packet set by
> > NDIS_SET_ORIGINAL_PACKET to do with packet buffer modification? That song
> > really strange.
> >
>Jicun, imagine you have encryption packet filter. Its ProtocolReceive
>handler allocates new packet descriptor and attaches decrypted packet
>buffers. It calls NdisGetReceivedPacket() and copies all necessary info
>including original packet field to its descriptor (as passthru suggests).
>Then sets packet status to NDIS_STATUS_RESOURCES and calls
>NdisMIndicateReceive packet.
>
>Now imagine there is passthru-like driver layered above. ProtocolReceive
>handler calls NdisGetReceivePacket() which returns original encrypted
>packet descriptor and re-attaches its buffers to new descriptor exactly as
>passthru does. It indicates packet and above protocol receives encrypted
>packet which can’t deal with.
>
> > What I understand is NdisGetReceivedPacket is geting a
> > packet saved somewhere in the MINIPORT_BLOCK that has nothing to do with
> > the
> > original packet field in the packet extenstion.
> >
>It should but doesn’t. That’s my point. It gets packet saved in
>MINIPORT_BLOCK and returns original packet field saved in its extension.
>
> > How did you find out what
> > you said?
> >
>My encryption driver failed when QOS packet scheduler (which reattaches
>buffers the same way as passthru) was layered above. So I took debugger and
>found the problem. I verified it last time for w2k SP2 but after quick look
>to XP code I believe problem is still present.
>
>Best regards,
>
>Michal Vodicka
>STMicroelectronics Design and Application s.r.o.
>[michal.vodicka@st.com, http:://www.st.com]
>
>
> > Jicun
> >
> > ----- Original Message -----
> > From: “Michal Vodicka”
> > To: “NT Developers Interest List”
> > Sent: Monday, April 08, 2002 8:24 PM
> > Subject: [ntdev] Re: Q on NdisReturnPackets
> >
> >
> > > There is yet another problem with NdisGetReceivedPacket(). It doesn’t
> > return
> > > the packet packet which below layered driver indicated which is
> > documented
> > > in the DDK but returns packet set using NDIS_SET_ORIGINAL_PACKET macro
> > > instead. So passthru code
> > >
> > > NDIS_SET_ORIGINAL_PACKET(MyPacket, NDIS_GET_ORIGINAL_PACKET(Packet));
> > >
> > > is wrong if MyPacket contains modified packet buffers. The problem is
> > > unfortunately invisible until passthru-like filter is layered above
> > > modifying driver (mentioned optimization chains buffers before
> > modification
> > > to packet descriptor). The workaround is to clear original packet field
> > in
> > > MyPacket or set it to MyPacket.
> > >
> > > It is unclear if there is a bug in the docs or implementation of
> > > NdisGetReceivedPacket. My guess is implementation.
> > >
> > > Best regards,
> > >
> > > Michal Vodicka
> > > STMicroelectronics Design and Application s.r.o.
> > > [michal.vodicka@st.com, http:://www.st.com]
> > >
> >
>
>—
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to %%email.unsub%%
Chat with friends online, try MSN Messenger: Click Here
Chat with friends online, try MSN Messenger: Click Here