Hi, I need to return a packet to the sender upon receiving one. Sort of
like a ping. So I was thinking of replacing the packet I receive with an
ICMP packet, pass it above and let the mechanisms on the upper layer return
a ping packet.
I want to know if there’s any other easier way to do it? I’m working on an
NDIS driver and is there anyway to send out the packet directly?
Thanks
Zelin
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
1.) Allocate some memory for packet data that you want to send. Remember
that the packet data must include the MAC header (14 bytes for Ethernet) and
the payload.
2.) Fill the VM from 1.) with the necessary MAC header and payload.
3.) Allocate a NDIS_BUFFER to wrap your packet data VM.
4.) Allocate a NDIS_PACKET and chain the NDIS_BUFFER ) from 3.) to it.
5.) Call NdisSend.
6.) Recover and recycle your allocated NDIS_PACKET, NDIS_BUFFER and VM in
your SendComplete handler.
----- Original Message ----- From: To: “NT Developers Interest List” Sent: Tuesday, November 20, 2001 12:30 AM Subject: [ntdev] How do I spawn a new packet on receiving one?
> Hi, I need to return a packet to the sender upon receiving one. Sort of > like a ping. So I was thinking of replacing the packet I receive with an > ICMP packet, pass it above and let the mechanisms on the upper layer return > a ping packet. > > I want to know if there’s any other easier way to do it? I’m working on an > NDIS driver and is there anyway to send out the packet directly? > > Thanks > > Zelin > > — > You are currently subscribed to ntdev as: xxxxx@pcausa.com > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
— 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:>