Re: How do I create a custom packet?
- From: rohanm79@xxxxxxxxx
- Date: 23 Aug 2006 12:26:42 -0700
Thanks Maxim. I am not clear at the part where I fill the packet with
data. First of all do I just create a packet of type NDIS_PACKET? If
so, then how do I fill it with my data that is in a structure that I
have created?
Maxim S. Shatskih wrote:
Allocate the nonpaged memory
Fill it with data, do not forget to fill the Ethernet header
call NdisAllocateBuffer to create the descriptor which will describe this
memory
call NdisAllocatePacket to create NDIS_PACKET
call NdisChainBufferAtFront to attach the descriptor to the packet
call NdisSend
if it returned something other then "pending" - call your own
ProtocolSendComplete yourself inline
The ProtocolSendComplete handler must free the NDIS_BUFFER descriptor,
NDIS_PACKET and also the memory chunk.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com
<rohanm79@xxxxxxxxx> wrote in message
news:1156356381.142930.60120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all. I am new to windows driver programming and I am interested in
NDIS programming. I would like to know how to create a custom packet
using NDIS for sending a UDP message. If anybody could show some code
as to how to create custom packets it would be much appreciated.
Thanks.
.
- Follow-Ups:
- Re: How do I create a custom packet?
- From: Maxim S. Shatskih
- Re: How do I create a custom packet?
- From: Thomas F. Divine [DDK MVP]
- Re: How do I create a custom packet?
- References:
- How do I create a custom packet?
- From: rohanm79
- Re: How do I create a custom packet?
- From: Maxim S. Shatskih
- How do I create a custom packet?
- Prev by Date: Re: Can TerminateThread() kill a thread that has entered the kernel?
- Next by Date: Re: How do I create a custom packet?
- Previous by thread: Re: How do I create a custom packet?
- Next by thread: Re: How do I create a custom packet?
- Index(es):
Relevant Pages
|