public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Add some OS constants to control keepalive on TCP connections
@ 2021-06-30  9:30 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-30  9:30 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

This adds some OS constants that are needed to control the
keepalive status of TCP connections. The new constants are
TCP_KEEPCNT, TCP_KEEPIDLE and TCP_KEEPINTVL.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* s-oscons-tmplt.c: Add some OS constants.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 658 bytes --]

diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/gcc/ada/s-oscons-tmplt.c
@@ -1501,6 +1501,21 @@ CNS(MSG_Forced_Flags, "")
 #endif
 CND(TCP_NODELAY, "Do not coalesce packets")
 
+#ifndef TCP_KEEPCNT
+# define TCP_KEEPCNT -1
+#endif
+CND(TCP_KEEPCNT, "Maximum number of keepalive probes")
+
+#ifndef TCP_KEEPIDLE
+# define TCP_KEEPIDLE -1
+#endif
+CND(TCP_KEEPIDLE, "Idle time before TCP starts sending keepalive probes")
+
+#ifndef TCP_KEEPINTVL
+# define TCP_KEEPINTVL -1
+#endif
+CND(TCP_KEEPINTVL, "Time between individual keepalive probes")
+
 #ifndef SO_REUSEADDR
 # define SO_REUSEADDR -1
 #endif



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-30  9:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30  9:30 [Ada] Add some OS constants to control keepalive on TCP connections Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).