From 7f21f4ef3dfd828f1505ba0bf33dbafe3b592e5d Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 7 Nov 2019 12:45:05 +0100 Subject: [PATCH] Added additional tcp keep alive settings. --- include/freerdp/settings.h | 8 ++++++- libfreerdp/common/settings_getters.c | 21 +++++++++++++++++++ .../core/test/settings_property_lists.h | 3 +++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index ff63e4c8b..ba3eb33e4 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -881,6 +881,9 @@ typedef struct _RDPDR_PARALLEL RDPDR_PARALLEL; #define FreeRDP_SupportVideoOptimized (5188) #define FreeRDP_RDP2TCPArgs (5189) #define FreeRDP_TcpKeepAlive (5190) +#define FreeRDP_TcpKeepAliveRetries (5191) +#define FreeRDP_TcpKeepAliveInterval (5192) +#define FreeRDP_TcpAckTimeout (5193) /** * FreeRDP Settings Data Structure @@ -1522,7 +1525,10 @@ struct rdp_settings ALIGN64 BOOL SupportVideoOptimized; /* 5188 */ ALIGN64 char* RDP2TCPArgs; /* 5189 */ ALIGN64 BOOL TcpKeepAlive; /* 5190 */ - UINT64 padding5312[5312 - 5191]; /* 5191 */ + ALIGN64 UINT32 TcpKeepAliveRetries; /* 5191 */ + ALIGN64 UINT32 TcpKeepAliveInterval; /* 5192 */ + ALIGN64 UINT32 TcpAckTimeout; /* 5193 */ + UINT64 padding5312[5312 - 5193]; /* 5193 */ /** * WARNING: End of ABI stable zone! diff --git a/libfreerdp/common/settings_getters.c b/libfreerdp/common/settings_getters.c index 6caedf398..0e85086b8 100644 --- a/libfreerdp/common/settings_getters.c +++ b/libfreerdp/common/settings_getters.c @@ -1559,6 +1559,15 @@ UINT32 freerdp_settings_get_uint32(const rdpSettings* settings, size_t id) case FreeRDP_DynamicChannelArraySize: return settings->DynamicChannelArraySize; + case FreeRDP_TcpKeepAliveRetries: + return settings->TcpKeepAliveRetries; + + case FreeRDP_TcpKeepAliveInterval: + return settings->TcpKeepAliveInterval; + + case FreeRDP_TcpAckTimeout: + return settings->TcpAckTimeout; + default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; @@ -1996,6 +2005,18 @@ BOOL freerdp_settings_set_uint32(rdpSettings* settings, size_t id, UINT32 val) settings->DynamicChannelArraySize = val; break; + case FreeRDP_TcpKeepAliveRetries: + settings->TcpKeepAliveRetries = val; + break; + + case FreeRDP_TcpKeepAliveInterval: + settings->TcpKeepAliveInterval = val; + break; + + case FreeRDP_TcpAckTimeout: + settings->TcpAckTimeout = val; + break; + default: WLog_ERR(TAG, "[%s] Invalid key index %" PRIuz, __FUNCTION__, id); return FALSE; diff --git a/libfreerdp/core/test/settings_property_lists.h b/libfreerdp/core/test/settings_property_lists.h index 7ffebdc61..4610a78e8 100644 --- a/libfreerdp/core/test/settings_property_lists.h +++ b/libfreerdp/core/test/settings_property_lists.h @@ -281,6 +281,9 @@ static const size_t uint32_list_indices[] = { FreeRDP_StaticChannelArraySize, FreeRDP_DynamicChannelCount, FreeRDP_DynamicChannelArraySize, + FreeRDP_TcpKeepAliveRetries, + FreeRDP_TcpKeepAliveInterval, + FreeRDP_TcpAckTimeout, }; #define have_int32_list_indices