this adds ipv6 support

changes are very limited but my emacs also cleaned up whitespaces...