From 0bc7cf47c1266f9ae510c70833b5691c693c769f Mon Sep 17 00:00:00 2001 From: Pascal Obry Date: Wed, 7 Apr 2021 09:05:06 +0200 Subject: [PATCH] [Ada] Add some OS constants to control keepalive on TCP connections gcc/ada/ * s-oscons-tmplt.c: Add some OS constants. --- gcc/ada/s-oscons-tmplt.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index 25a4df0cedcb..d42e663fdde5 100644 --- 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 -- 2.47.2