5th os detection try

This commit is contained in:
2020-08-13 12:22:22 +02:00
parent 1309ce681a
commit 5f32aa5e8f

View File

@ -106,13 +106,14 @@ string get_os_info(int fd) {
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 winsize_rcv = trw.rcv_wnd;
int winsize_snd = trw.snd_wnd;
int ttl;
unsigned int ttlsize = sizeof(ttl);
socklen_t ttlsize = sizeof(ttl);
getsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, &ttlsize);
return "win_size=" + to_string(winsize) + ", ttl=" + to_string(ttl);
return "win_size=" + to_string(winsize_rcv) + "/" + to_string(winsize_snd) + ", ttl=" + to_string(ttl);
}
string getETag(string filename) {