angt / glorytun

Multipath UDP tunnel
BSD 2-Clause "Simplified" License
683 stars 105 forks source link

Don't expect TCP_INFO and clock_gettime() to be portable #2

Closed jedisct1 closed 8 years ago

jedisct1 commented 8 years ago

Sadly, TCP_INFO is only available on Linux and FreeBSD. Other systems make it easy to retrieve interface-specific parameters, but not the parameters for a given socket, except by inspecting PF states.

clock_gettime() is available on all BSD systems, but not on OSX.

mach_absolute_time() can be used there, but since it was only used to display the TCP socket info, and TCP_INFO doesn't exist on OSX, let's just ignore that altogether for now.

That's pretty sad but at least, it makes glorytun usable on !__linux__

angt commented 8 years ago

Thanks! Do you know a portable way to get at least rtt, pmtu and cwnd ?