Received packet is NULL

hi,
I am having a problem. I modified the passthru sample to encrypt/decrypt the
packets. It works fine if the miniport calls ProtocolReceivePackets but a
lot of the packets are going to ProtocolReceive and there
NdisGetReceivedPacket returns NULL indicating that the miniport didnot
indicate a Packet however i know that ‘Packets’ are being indicated. Now
what do i do? What should one do in this case?

I read some documentation and then did the following.

NdisGetReceivedPacket(packet,…)

IF( packet == NULL)
{

IF ( Lookahead buffer size < Total packet size )
{
Allocate a packet descriptor
Allocate a buffer of ‘lookahead data’ size
Copy the lookahead data into this buffer

Allocate a Buffer equal to (Total Packet size- Lookahead data)
Chain it to the packet descriptor at front

Call NdisTransferData with the packet descriptor

IF (myStatus == STATUS_SUCCESS )
{
chain the lookahead buffer to the packet descriptor at the back
indicate it up to clients.
}
}
}

All goes fine until i try to indicate my packet up when it just crashes.
Should i even be doing all this? Am I reading the problem wrong? I have read
the documentation repeatedly and still haven’t found any other clue.

Thanks a bunch


The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail

It is in your best interest to IndicateReceive if your drivers
ProtocolReceive is called.
Allocate a buffer copy the encrypted data into this buffer, and indicate
the buffer to protocol.

This will work.
-Srin.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yasser Toor
Sent: Wednesday, June 09, 2004 6:54 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Received packet is NULL

hi,
I am having a problem. I modified the passthru sample to encrypt/decrypt
the
packets. It works fine if the miniport calls ProtocolReceivePackets but
a
lot of the packets are going to ProtocolReceive and there
NdisGetReceivedPacket returns NULL indicating that the miniport didnot
indicate a Packet however i know that ‘Packets’ are being indicated. Now

what do i do? What should one do in this case?

I read some documentation and then did the following.

NdisGetReceivedPacket(packet,…)

IF( packet == NULL)
{

IF ( Lookahead buffer size < Total packet size )
{
Allocate a packet descriptor
Allocate a buffer of ‘lookahead data’ size
Copy the lookahead data into this buffer

Allocate a Buffer equal to (Total Packet size- Lookahead data)
Chain it to the packet descriptor at front

Call NdisTransferData with the packet descriptor

IF (myStatus == STATUS_SUCCESS )
{
chain the lookahead buffer to the packet descriptor at the
back
indicate it up to clients.
}
}
}

All goes fine until i try to indicate my packet up when it just crashes.

Should i even be doing all this? Am I reading the problem wrong? I have
read
the documentation repeatedly and still haven’t found any other clue.

Thanks a bunch


The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@nai.com
To unsubscribe send a blank email to xxxxx@lists.osr.com