diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-06-26 10:30:52 +0000 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-07-03 08:50:30 +0000 |
commit | 007ea09d1b8cf6127f2c4769ba1a9ecf0adbdb25 (patch) | |
tree | 493832f2f89506d42abedbbacd68026529207b32 /README.md | |
parent | Consider receive NBLs to be immutable (diff) | |
download | wintun-007ea09d1b8cf6127f2c4769ba1a9ecf0adbdb25.tar.xz wintun-007ea09d1b8cf6127f2c4769ba1a9ecf0adbdb25.zip |
Map user buffer only once
This avoids needless page table modifications and also lets us enforce
having writable pages.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -119,6 +119,6 @@ After loading the driver and creating a network interface the typical way using ~ ~ ``` -Each packet segment should contain a layer 3 IPv4 or IPv6 packet. Up to 15728640 bytes may be read or written during each call to `ReadFile` or `WriteFile`. +Each packet segment should contain a layer 3 IPv4 or IPv6 packet. Up to 15728640 bytes may be read or written during each call to `ReadFile` or `WriteFile`. All calls to `ReadFile` must be called with the same virtual address, and all calls to `WriteFile` must be called with the same virtual address. These virtual addresses must reference pages that are readable and writable for the same length as passed to the first calls of `ReadFile` and `WriteFile`. It is advisable to use [overlapped I/O](https://docs.microsoft.com/en-us/windows/desktop/sync/synchronization-and-overlapped-input-and-output) for this. If using blocking I/O instead, it may be desirable to open separate handles for reading and writing. |