Skip to content

Commit b1c9801

Browse files
committed
Support more TCP socket options on Windows
1 parent f7754ab commit b1c9801

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

libc/sysv/consts.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -678,18 +678,18 @@ syscon tcp TCP_CORK 3 3 4 4 4 16 4 0 # nagle's algorithm stri
678678
syscon tcp TCP_MAXSEG 2 2 2 2 2 2 2 0 # reduces tcp segment size; see also tcp offloading
679679
syscon tcp TCP_FASTOPEN 23 23 0x105 0x105 0x0401 0 0 15 # reduces roundtrips; for listener; Linux 3.7+ (c. 2012) / or is windows it 0x22? /proc/sys/net/ipv4/tcp_fastopen TODO(jart): MSG_FASTOPEN; XNU sources say 261 but not sure if that's true
680680
syscon tcp TCP_FASTOPEN_CONNECT 30 30 0 0 0 0 0 0 # reduces roundtrips; for listener; Linux 3.7+ (c. 2012) / or is windows it 0x22? /proc/sys/net/ipv4/tcp_fastopen TODO(jart): MSG_FASTOPEN; XNU sources say 261 but not sure if that's true
681-
syscon tcp TCP_KEEPIDLE 4 4 0 0 0x100 0 3 0 # start keepalives after this period
682-
syscon tcp TCP_KEEPINTVL 5 5 0x101 0x101 0x200 0 5 0 # interval between keepalives
683-
syscon tcp TCP_KEEPCNT 6 6 0x102 0x102 0x400 0 6 0 # number of keepalives before death
681+
syscon tcp TCP_KEEPIDLE 4 4 0 0 0x100 0 3 3 # start keepalives after this period
682+
syscon tcp TCP_KEEPINTVL 5 5 0x101 0x101 0x200 0 5 17 # interval between keepalives
683+
syscon tcp TCP_KEEPCNT 6 6 0x102 0x102 0x400 0 6 16 # number of keepalives before death
684+
syscon tcp TCP_INFO 11 11 0x200 0x200 32 9 9 0 # get connection info
685+
syscon tcp TCP_NOTSENT_LOWAT 25 25 513 513 0 0 0 0 # limit unset byte queue
686+
syscon tcp TCP_MD5SIG 14 14 0 0 16 4 16 0 # what is it (rfc2385)
687+
syscon tcp TCP_CONGESTION 13 13 0 0 64 0 0 0 # set traffic control
684688
syscon tcp TCP_SYNCNT 7 7 0 0 0 0 0 0 # how hard to syn packet the enemy
685689
syscon tcp TCP_ULP 31 31 0 0 0 0 0 0 # setsockopt(sock, IPPROTO_TCP, TCP_ULP, "tls", 4)
686690
syscon tcp TCP_COOKIE_TRANSACTIONS 15 15 0 0 0 0 0 0 # defense against the syn packets
687691
syscon tcp TCP_LINGER2 8 8 0 0 0 0 0 0 # orphaned fin-wait-2 lifetime cf. net.ipv4.tcp_fin_timeout see cloudflare blog
688-
syscon tcp TCP_NOTSENT_LOWAT 25 25 513 513 0 0 0 0 # limit unset byte queue
689-
syscon tcp TCP_INFO 11 11 0 0 0x20 0 9 0 # get connection info
690692
syscon tcp TCP_CC_INFO 26 26 0 0 0 0 0 0 # get congestion control info
691-
syscon tcp TCP_CONGESTION 13 13 0 0 0x40 0 0 0 # set traffic control
692-
syscon tcp TCP_MD5SIG 14 14 0 0 0x10 4 16 0 # what is it (rfc2385)
693693
syscon tcp TCP_MD5SIG_MAXKEYLEN 80 80 0 0 0 0 0 0 # what is it
694694
syscon tcp TCP_TIMESTAMP 24 24 0 0 0 0 0 0 # what is it
695695
syscon tcp TCP_USER_TIMEOUT 18 18 0 0 0 0 0 0 # what is it

libc/sysv/consts/TCP_CONGESTION.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#include "libc/sysv/consts/syscon.internal.h"
2-
.syscon tcp,TCP_CONGESTION,13,13,0,0,0x40,0,0,0
2+
.syscon tcp,TCP_CONGESTION,13,13,0,0,64,0,0,0

libc/sysv/consts/TCP_INFO.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#include "libc/sysv/consts/syscon.internal.h"
2-
.syscon tcp,TCP_INFO,11,11,0,0,0x20,0,9,0
2+
.syscon tcp,TCP_INFO,11,11,0x200,0x200,32,9,9,0

libc/sysv/consts/TCP_KEEPCNT.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#include "libc/sysv/consts/syscon.internal.h"
2-
.syscon tcp,TCP_KEEPCNT,6,6,0x102,0x102,0x400,0,6,0
2+
.syscon tcp,TCP_KEEPCNT,6,6,0x102,0x102,0x400,0,6,16

libc/sysv/consts/TCP_KEEPIDLE.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#include "libc/sysv/consts/syscon.internal.h"
2-
.syscon tcp,TCP_KEEPIDLE,4,4,0,0,0x100,0,3,0
2+
.syscon tcp,TCP_KEEPIDLE,4,4,0,0,0x100,0,3,3

libc/sysv/consts/TCP_KEEPINTVL.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#include "libc/sysv/consts/syscon.internal.h"
2-
.syscon tcp,TCP_KEEPINTVL,5,5,0x101,0x101,0x200,0,5,0
2+
.syscon tcp,TCP_KEEPINTVL,5,5,0x101,0x101,0x200,0,5,17

libc/sysv/consts/TCP_MD5SIG.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#include "libc/sysv/consts/syscon.internal.h"
2-
.syscon tcp,TCP_MD5SIG,14,14,0,0,0x10,4,16,0
2+
.syscon tcp,TCP_MD5SIG,14,14,0,0,16,4,16,0

0 commit comments

Comments
 (0)