add windows util functions, but without ipv6
fix some issues