4th os detection try
This commit is contained in:
@ -103,10 +103,10 @@ IpAddressInfo get_ip_address_info(Address* addr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
string get_os_info(int fd) {
|
string get_os_info(int fd) {
|
||||||
struct tcp_info ti;
|
struct tcp_repair_window trw;
|
||||||
socklen_t tisize = sizeof(ti);
|
socklen_t trwsize = sizeof(trw);
|
||||||
getsockopt(fd, IPPROTO_TCP, TCP_INFO, &ti, &tisize);
|
getsockopt(fd, IPPROTO_TCP, TCP_REPAIR_WINDOW, &trw, &trwsize);
|
||||||
int winsize = ti.tcpi_rcv_space;
|
int winsize = trw.rcv_wnd;
|
||||||
|
|
||||||
int ttl;
|
int ttl;
|
||||||
unsigned int ttlsize = sizeof(ttl);
|
unsigned int ttlsize = sizeof(ttl);
|
||||||
|
Reference in New Issue
Block a user