Initial implementation of essync tool

Thanks for this change, which incidentally makes it work ok with ipv6 addresses.