From 1309ce681aed25794465c5b592cfc5ce0239acd3 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Thu, 13 Aug 2020 12:20:49 +0200 Subject: [PATCH] 4th os detection try --- src/client.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index 5f35b33..ee1ccbf 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -103,10 +103,10 @@ IpAddressInfo get_ip_address_info(Address* addr) { } string get_os_info(int fd) { - struct tcp_info ti; - socklen_t tisize = sizeof(ti); - getsockopt(fd, IPPROTO_TCP, TCP_INFO, &ti, &tisize); - int winsize = ti.tcpi_rcv_space; + struct tcp_repair_window trw; + socklen_t trwsize = sizeof(trw); + getsockopt(fd, IPPROTO_TCP, TCP_REPAIR_WINDOW, &trw, &trwsize); + int winsize = trw.rcv_wnd; int ttl; unsigned int ttlsize = sizeof(ttl);