From: ValdikSS Date: Wed, 15 Oct 2025 21:48:25 +0000 (+0300) Subject: man/man7/tcp.7: Add TCP_SAVE_SYN and TCP_SAVED_SYN X-Git-Tag: man-pages-6.16~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec1e7fdf368ea0ef21fb3f576d28fbebc6eb26aa;p=thirdparty%2Fman-pages.git man/man7/tcp.7: Add TCP_SAVE_SYN and TCP_SAVED_SYN Document TCP_SAVE_SYN and TCP_SAVED_SYN options based on git commit linux.git cd8ae85299d5 (2015-05-05; "tcp: provide SYN headers for passive connections") which introduced it. Link: Cc: Eric Dumazet Signed-off-by: ValdikSS Message-ID: <20251015214826.70750-1-iam@valdikss.org.ru> Signed-off-by: Alejandro Colomar --- diff --git a/man/man7/tcp.7 b/man/man7/tcp.7 index 4d8026c4f..e89c00daf 100644 --- a/man/man7/tcp.7 +++ b/man/man7/tcp.7 @@ -72,10 +72,6 @@ .\" commit 6e9250f59ef9efb932c84850cd221f22c2a03c4a .\" Author: Eric Dumazet .\" -.\" TCP_SAVE_SYN, TCP_SAVED_SYN (4.2) -.\" commit cd8ae85299d54155702a56811b2e035e63064d3d -.\" Author: Eric Dumazet -.\" .TH tcp 7 (date) "Linux man-pages (unreleased)" .SH NAME tcp \- TCP protocol @@ -1202,6 +1198,23 @@ aborting the attempt to connect. It cannot exceed 255. This option should not be used in code intended to be portable. .TP +.BR TCP_SAVE_SYN " (since Linux 4.3)" +Saves incoming SYN packet contents of the listening socket +until it is read with +.B TCP_SAVED_SYN +once. +Could be set before or after the +.BR listen (2) +call. +.TP +.BR TCP_SAVED_SYN " (since Linux 4.3)" +Reads SYN packet contents saved by +.BR TCP_SAVE_SYN . +The saved SYN headers are freed after the first call. +The data returned in +.B TCP_SAVED_SYN +are network (IPv4/IPv6) and TCP headers. +.TP .BR TCP_USER_TIMEOUT " (since Linux 2.6.37)" .\" commit dca43c75e7e545694a9dd6288553f55c53e2a3a3 .\" Author: Jerry Chu