Proper way to filter a specific flow (SMB file transfer) in NDIS LWF?

Hi,

Let’s say that whenever i detect that a certain connection is related to an SMB file tranfer request, i want to ignore that flow until the file transfer is finished, to improve the NDIS performance.

I already have written the SMB parser to detect if a packet is a SMB file transfer or not, now i want to ignore every packet that is related to this file transfer, until the transfer is finished. Meaning i want to detect in my send/receive callbacks whether a specific NBL is related to this file transfer or not, and if it is, ignore it.

So what is the best way to achieve this?