From: Thomas F. Divine [tdivine@pcausa.com] Sent: Saturday, February 03, 2001 2:08 PM To: NT Developers Interest List Subject: [ntdev] Re: Multiple Receive -Packet Driver Jay, You must study the sample application to learn how it works. You should study and understand each step that is involved: 1.) Open The Adapter (PacketOpenAdapter) 2.) Set The NDIS Packet Filter (PacketSetFilter) Now you are "ready" to start receiving. 3.) Allocate A "Packet" (PacketAllocatePacket) 4.) Initialize The Packet (PacketInitializePacket) 5.) Start A Receive On The Packet (PacketReceivePacket) Please carefully examine the code that implements each of these functions. You must understand every step and why it is done. You should learn these functions well enough to be able to think of other ways to accomplish the same result. You should look at the driver code that handles the PacketReceivePacket, which is the PacketRead function in the driver read.c module. Follow the steps that are taken from the time that the driver is called at PacketRead until (in normal operation) the receive is finished when the driver calls IoCOmpleteRequest from the PacketTransferDataComplete handler. In this part of the study, give some thought to what the driver does when a packet is received at PacketReceiveIndicate and there is no pending receives to satisfy. If you study carefully you will learn that you can repeat steps 4.) and 5.) as many times as you want to to perform additional receives. 6.) Free The Packet After The Last Read Completes (PacketFreePacket) 7.) Close The Adapter (PacketCloseAdapter) Once you understand the Packet sample you should start over and write a new application that works the way you want it to. You may want to revise the way some of the PacketXYZ functions work to suit your own needs. After all, the Packet sample is NOT intended to do useful work. It simply illustrates the bare essentials. In the case of packet reception, it just shows how to receive a single packet. Just one. It's up to you to write a completely new application that does what you want it to do. Good luck, Thomas F. Divine PCAUSA - Toolkits & Resources For Network Software Developers NDIS Protocol - NDIS Intermediate - TDI Client - ----- Original Message ----- From: Jayachandran.B To: NT Developers Interest List Sent: Saturday, February 03, 2001 5:24 AM Subject: [ntdev] Multiple Receive -Packet Driver > > Hi, > > How do I configure the packet driver sample from microsoft to perform > multiple Reads and writes? > > I put the code for packet reception in a loop .But it waits for the > packet only for the first time.It reads only once > It will wait or read only if it is invoked through the menu(IDM_READ:) > > > > Also can I use two threads, one for Read and the other for write so that > I can do them parallelly? > > > Could anybody please help? > > Regards > jay > --- You are currently subscribed to ntdev as: GlennEverhart@FirstUSA.com To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com