Commit Graph
13 Commits
Author SHA1 Message Date
Frank Denis 704e663d6a Use /dev/urandom
http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/
https://speakerdeck.com/filosottile/the-plain-simple-reality-of-entropy

Also remove the iflag=fullblock GNUism that doesn't exist on BSD and OSX
2015-11-16 02:06:21 +01:00
Frank Denis c63885a748 Add support for the native OSX utun interface 2015-11-16 01:52:33 +01:00
Frank Denis 8530e4c378 On OSX and BSD, packets sent to the tun interface have to be prefixed
by the protocol family
2015-11-16 00:43:16 +01:00
Frank Denis fd35fae472 IllumOS requires resolv, nsl and socket 2015-11-09 02:30:55 +01:00
Frank Denis 468b9df67c The size in a %* formatter should be an int, not a size_t value 2015-11-09 02:14:56 +01:00
Frank Denis cc58c42396 tcpinfo properties are uint32_t 2015-11-09 02:14:56 +01:00
Frank Denis baef8233dc <stdint.h> is required for uint8_t and friends 2015-11-09 02:14:56 +01:00
Frank Denis 1fdf62a57a automake 2.65 is enough, and required for CentOS compatibility 2015-11-09 02:14:55 +01:00
Frank Denis aa917988de Require automake 1.9, add automatic dependency tracking 2015-11-09 02:14:55 +01:00
Frank Denis c1c5a5b099 Stop checking for things that any platform from the past 15 years has
Add AC_USE_SYSTEM_EXTENSIONS
2015-11-09 02:14:55 +01:00
Frank Denis da9464d3e2 Test under Linux and OSX, with gcc and clang
Possibly link the rt library for clock_gettime()
2015-11-09 02:14:34 +01:00
Frank Denis 69366ab996 Don't expect TCP_INFO and clock_gettime() to be portable
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__
2015-11-07 23:13:11 +01:00
Frank Denis 577f91e42b Remove Linuxisms 2015-10-22 17:08:20 +02:00