-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WSK: Simplify and fix WskSend/WskReceive
Buffers for WskSend/WskReceive calls are represented by WSK_BUF structures as memory descriptor lists (MDLs). Since the caller is responsible for making them fully initialized, there is no need to use MmProbeAndLockPages to lock the buffer memory in place (IoBuildAsynchronousFsdRequest does that under the hood). Since, the Socket Driver device object works in so-called direct mode, we just need to copy buffer MDLs through IoBuildPartialMdl and pass these copies to the Socket Driver within corresponding IRP_MJ_READ/IRP_MJ_WRITE IRPs. Such approach simplifies the code and also makes WskSend/WskReceive usable at IRQL = DISPATCH_LEVEL (which they should be from the beginning). Signed-off-by: Martin Drab <[email protected]>
- Loading branch information
1 parent
d4fca9b
commit 9d36b18
Showing
1 changed file
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters