4th os detection try

This commit is contained in:
2020-08-13 12:20:49 +02:00
parent 33bb63cb2b
commit 1309ce681a

View File

@ -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);