Hi All,
I’m facing a problem with passthru-based driver. If I return the original
packets to upper layer, it is accepting the packets. Whereas when i change
the packet and indicate it up, ndis is ignoring those packets. I’ve tested
the changed received packets integrity using ethereal, it is showing
everything OK (checksums, protocols etc).
In my case, ProtocolReceivePacket and ProtocolReceiveComplete handlers are
being called by lower layer. Here is the logic that I coded:
ProtocolReceivePacket handler
step 1. Allocate memory for contents, buffer and packet
step 2. changed it according to the requirement
step 3. copied OOB data, header size, flags from the original packet
step 4. set the status of new packet to NDIS_STATUS_RESOURCES
step 5. indicate the new packet using NdisMIndicateReceivePacket
step 6. free the memory, buffer and packet allocated in step 1
step 7. return 0
ProtocolReceiveComplete handler
do nothing
MiniportReturnPacket handler is not called because I returned 0 in
ProtocolReceivePacket handler.
ProtocolReceive is never called by lower layer, so I avoided that portion.
Can anybody please have a look and let me know where I am wrong ?
Any kind of help/tip will be of great use.
Thanks
Amit Manocha