Fix c++11 compiler warnings.
Fix signed/unsigned compare compiler warnings.
Fix use of BSD-style tcphdr/udphdr definitions on Linux.
Fix compiler errors/warnings.
Fix strict-aliasing breakage compiler warnings.