Skip to content

Commit

Permalink
WSL 1 doesn’t do the new Winsock API to set just the ECN bits either
Browse files Browse the repository at this point in the history
  • Loading branch information
mirabilos committed Apr 21, 2023
1 parent 3e5dd51 commit bbf4d0f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
• ws2 vs WSL1
• c vs ws2: manpages
• document ws2 lib return value convention (errno vs. WSAGetLastError)
for every individual function…
Expand Down
5 changes: 3 additions & 2 deletions c/README
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ excluding native Windows/Winsock2) and Darwin.
As of version 2.1, the library is thread-safe except when
ecnbits_rdmsg() must inject a local control message buffer.

The traffic class for outgoing packets cannot be set under
Windows®, native or WSL 1, at all. This is a system limitation.
The traffic class for outgoing packets cannot be set under WSL 1
at all and any attempts to do so are (silently) ignored; this is
a system limitation.

Android is best served with the top-level c/ (for console applications,
maybe statically linked with musl libc, or with bionic) or android/ for
Expand Down
11 changes: 6 additions & 5 deletions ws2/README
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,12 @@ which is a Linux virtual machine after all.

Using v4-mapped IPv6 addresses works on WSL 1 but not on native Windows.

The traffic class for outgoing packets cannot be set under
Windows®, native or WSL 1, at all. This is a system limitation.
For this reason this version (ws2/ aka libecn-bitw) does not
ship certain functions dealing with outgoing traffic class
setting; if needed, the c/ (libecn-bits) version contains them.
The traffic class for outgoing packets cannot be set under WSL 1
at all and any attempts to do so are (silently) ignored; this is
a system limitation. The ecnbits_tc function always fails on native
Winsock2. However, with ecnbits_mkcmsg and ecnws2_sendmsg, 0x00 no ECN,
0x02 ECT(0) or 0x01 ECT(1) can be set on outgoing packets (any other
value causes sendmsg to not send the packet returning an error).

Android is best served with the top-level c/ (for console applications,
maybe statically linked with musl libc, or with bionic) or android/ for
Expand Down

0 comments on commit bbf4d0f

Please sign in to comment.