Hi evrybody,
I am writing a transport driver now, I wonder if I can hold the NDIS PACKET from the link layer. If I can hold this packet, how can I release it after it has been consumed? This problem trouble me for a few days. Say, I have received a packet from ProtocolReceivePacket(), I return NoZero because I want to hold this packet. But How can I return this packet back to the lower driver. Instead of returning the packet back, can I free this packet by myself in this transport driver?
Thanks and Regards
Elton
Please read the DDK documentation. Lookup the topic “ProtocolReceivePacket” in the index. It is clear about how to return a packet.
Good luck,
Thomas F. Divine
PCAUSA - Tools & Resources For Network Software Developers
NDIS Protocol/Intermediate/Hooking - TDI Client/Filter
http: - http:
“Li Dong” wrote in message news:xxxxx@ntdev…
Hi evrybody,
I am writing a transport driver now, I wonder if I can hold the NDIS PACKET from the link layer. If I can hold this packet, how can I release it after it has been consumed? This problem trouble me for a few days. Say, I have received a packet from ProtocolReceivePacket(), I return NoZero because I want to hold this packet. But How can I return this packet back to the lower driver. Instead of returning the packet back, can I free this packet by myself in this transport driver?
Thanks and Regards
Elton</http:></http:>
call NdisReturnPackets(…)
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Li Dong
Sent: Montag, 25. M?rz 2002 15:06
To: NT Developers Interest List
Subject: [ntdev] Transport Driver ( ProtocolReceivePacket)
Hi evrybody,
I am writing a transport driver now, I wonder if I can hold the NDIS
PACKET from the link layer. If I can hold this packet, how can I release it
after it has been consumed? This problem trouble me for a few days. Say, I
have received a packet from ProtocolReceivePacket(), I return NoZero because
I want to hold this packet. But How can I return this packet back to the
lower driver. Instead of returning the packet back, can I free this packet
by myself in this transport driver?
Thanks and Regards
Elton
You are currently subscribed to ntdev as: xxxxx@yahoo.de
To unsubscribe send a blank email to %%email.unsub%%
>ProtocolReceivePacket(), I return NoZero because I want to hold
this packet. But How can I return this packet back to the lower
driver.
NdisReturnPackets
Instead of returning the packet back, can I free this packet by
myself in this transport driver?
No. It belongs to the miniport, not to your code. Only the miniport can free it.
Max
Hi Max,
No. It belongs to the miniport, not to your code.
Only the miniport can
free it.
I’m not sure if this is really the reason for
not freeing the packet in the receive handler.
What I mean is that when you hook NDIS you actually
able to free the packet that you receive
in the receive handler and in this case the packet
that you receive is also owned by the miniport
-Mike.
— “Maxim S. Shatskih”
wrote:
> >ProtocolReceivePacket(), I return NoZero because I
> want to hold
> >this packet. But How can I return this packet back
> to the lower
> >driver.
>
> NdisReturnPackets
>
> >Instead of returning the packet back, can I free
> this packet by
> >myself in this transport driver?
>
> No. It belongs to the miniport, not to your code.
> Only the miniport can free it.
>
> Max
>
>
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
%%email.unsub%%
__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/
“Mike Malgin” wrote in message news:xxxxx@ntdev…
>
> Hi Max,
>
> >No. It belongs to the miniport, not to your code.
> Only the miniport can
> >free it.
>
> I’m not sure if this is really the reason for
> not freeing the packet in the receive handler.
> What I mean is that when you hook NDIS you actually
> able to free the packet that you receive
> in the receive handler and in this case the packet
> that you receive is also owned by the miniport
>
Mike,
For packets received at your ProtocolReceivePacket handler in an NDIS
protocol (transport) driver of an NDIS Intermediate (IM) driver you MUST
either 1.) not claim the packet (you can make a copy if you want to
there…) or 2.) claim the packet and call NdisReturnPackets later when you
are done.
Mike, I know (from other questions that you have asked me directly) that you
don’t yet have a 100% picture of NDIS or NDIS hooking, so it’s not quite
time for you to be making replies to these sorts of inquiries. Keep at it
and you will have a great understanding.
In a NDIS hooker you can possibly do things that a NDIS protocol driver or
NDIS IM driver cannot.
Good luck,
–
Thomas F. Divine
PCAUSA - Tools & Resources For Network Software Developers
NDIS Protocol/Intermediate/Hooking - TDI Client/Filter
http: - http:</http:></http:>
Hi Thomas,
there was no ProtocolReceivePacket Handler Hook supplied in your PIM Driver
for 9x, I can imagine that the problem is that hooked protocol would try to
call NdisRetrunPackets(…) to give back the packet to the underlying NIC.
If PIM claims the packet at its ProtocolReceivePacket Hanlder, repackages
the packet received at ProtocolReceivePacket, do anything it wishes to do
with it, and call the hooked protocols ProtocolReceivePacket Hanlder with
the new packet, PIM driver would need to hook the Ndis function
NdisReturnPackets(…) either… to free the packet it allocated.
Do you see any problems in hooking NdisReturnPackets() or is there any other
reason you do not have an implementation for ProtocolReceivePacket Handler?
(As I remember, DDK says that impelemeting a ProtocolReceivePacket would
give better IO performance if it is supported by the underlying NIC)
Thanks in advance
Johnny
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Thomas F. Divine
Sent: Montag, 25. März 2002 18:48
To: NT Developers Interest List
Subject: [ntdev] Re: Transport Driver ( ProtocolReceivePacket)
“Mike Malgin” wrote in message news:xxxxx@ntdev…
>
> Hi Max,
>
> >No. It belongs to the miniport, not to your code.
> Only the miniport can
> >free it.
>
> I’m not sure if this is really the reason for
> not freeing the packet in the receive handler.
> What I mean is that when you hook NDIS you actually
> able to free the packet that you receive
> in the receive handler and in this case the packet
> that you receive is also owned by the miniport
>
Mike,
For packets received at your ProtocolReceivePacket handler in an NDIS
protocol (transport) driver of an NDIS Intermediate (IM) driver you MUST
either 1.) not claim the packet (you can make a copy if you want to
there…) or 2.) claim the packet and call NdisReturnPackets later when you
are done.
Mike, I know (from other questions that you have asked me directly) that you
don’t yet have a 100% picture of NDIS or NDIS hooking, so it’s not quite
time for you to be making replies to these sorts of inquiries. Keep at it
and you will have a great understanding.
In a NDIS hooker you can possibly do things that a NDIS protocol driver or
NDIS IM driver cannot.
Good luck,
–
Thomas F. Divine
PCAUSA - Tools & Resources For Network Software Developers
NDIS Protocol/Intermediate/Hooking - TDI Client/Filter
http: - http:
—
You are currently subscribed to ntdev as: xxxxx@yahoo.de
To unsubscribe send a blank email to %%email.unsub%%
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com</http:></http:>
“Johnny” wrote in message news:xxxxx@ntdev…
>
> Hi Thomas,
>
> there was no ProtocolReceivePacket Handler Hook supplied in your PIM
Driver
> for 9x, I can imagine that the problem is that hooked protocol would try
to
> call NdisRetrunPackets(…) to give back the packet to the underlying NIC.
>
Basically, since Windows 9X/ME is on the way out, I don’t support
ProtocolReceivePacket on those platforms. The PIM driver is fully functional
using only ProtocolReceive without ProtocolReceivePacket.
Certainly one could consider hooking ProtocolReceivePacket and other
supporting operations. However, I would not expect this to be of much real
value on 9X/ME.
Regards,
Thos